Skip to content

Add a Bun boot-check in CI for website, docs, and ui-website #542

Description

@vivek7405

Problem

All 4 in-repo apps deploy on Bun in production, but only examples/blog has Bun coverage in CI (the blog-on-bun e2e from #523/#525). website, docs, and packages/ui/packages/website only get a NODE boot-check, so a per-route break that occurs only on Bun can reach production undetected.

This is not hypothetical: the #526 incident was exactly this class. ui.webjs.dev served 500s on its component detail pages in production. Railway's deploy gate (/__webjs/ready) did not catch it because that healthcheck is liveness-only and never probes individual routes. A CI step that boots those three apps on Bun and GETs real routes would have caught it before deploy.

Design / approach

Add a Bun boot-check for website, docs, and packages/ui/packages/website to the CI Bun job (the matrix already runs node scripts/run-bun-tests.js + the test/bun/*.mjs scripts on Bun). Reuse the existing prod boot-check harness shape (boot each app via createRequestHandler({ dev: false }), GET a few real routes, assert status < 400, and assert no modulepreload hint 404s, the #158/#159 probe), but run it under Bun rather than Node.

  • Probe REAL routes, not just / and not just the liveness /__webjs/ready. For ui-website specifically, include a component detail page (e.g. /docs/components/progress), since that is the exact route class that broke in dogfood: bake the ui-website registry into the deploy image (Bun serve 500s without it) #526.
  • Run from inside the repo so the bare @webjsdev/* specifiers resolve from the workspace (the in-repo boot-check already does this on Node).
  • Keep the blog on its existing bun e2e (no duplication); this issue covers the OTHER three apps.
  • This is the in-repo-app analog of the per-PR "Dogfood four-app" gate, extended to the Bun runtime the apps actually deploy on.

NON-GOALS: not converting the apps' local scripts or lockfiles to Bun (they are npm-workspace members that resolve @webjsdev/* via symlink to HEAD; a per-app bun install would break that, see #541's non-goals). This is CI-only.

Acceptance criteria

  • CI boots website, docs, and ui-website on Bun and GETs real routes (incl. a ui-website component detail page), failing the job on a status >= 400 or a broken modulepreload.
  • The check runs in the existing CI Bun job and resolves @webjsdev/* from the workspace.
  • A counterfactual confirms the check actually fires (e.g. it would fail against the pre-dogfood: bake the ui-website registry into the deploy image (Bun serve 500s without it) #526 ui-website state, where a component page 500'd on the bun/deploy path).
  • The blog's existing bun e2e is left as-is (no duplicate coverage).
  • Docs / agent-docs/testing.md + the relevant AGENTS.md note the new Bun app boot-check.

Implementation notes (where to edit + the #526 landmine)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions