Skip to content

fix(ci): ship serve-web.ts's import into the web runtime image - #3837

Merged
tyler-dane merged 1 commit into
mainfrom
claude/broken-ci-dr4spp
Sep 16, 2026
Merged

tyler-dane merged 1 commit into
mainfrom
claude/broken-ci-dr4spp

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

What and why

Every Release on main run since #3815 has failed its staging health check with service web is not running: web restarting, on both staging-cloud and staging-selfhosted (latest run).

#3815 gave self-host/serve-web.ts its first import: the COMPRESSIBLE_STATIC_TYPES map it shares with build.ts's precompress writer. Both web Dockerfiles copy named files into their runtime stage rather than the tree, and neither copies that file, so bun self-host/serve-web.ts exits with error: Cannot find module '../packages/web/compressible-static-types' before Bun.serve is reached. The image builds green and the container restart-loops. Reproduced by running serve-web.ts against a directory holding only the files the runtime stage copies; verified that the same layout plus the map boots and answers 200 on / and /index.html.

Both Dockerfiles now copy the map alongside the server.

The guard goes in check-agent-constraints rather than next to the Dockerfiles: self-host/*.test.ts is matched by no test:* scan root and by no test-unit.yml step, so nothing in that directory runs in CI, which is why this shipped past a green build. The new runtime-copy rule resolves each relative import in serve-web.ts and requires a matching runtime-stage COPY in both web Dockerfiles, so bun lint fails the next one too.

Two things this deliberately does not touch, both reported in the session rather than fixed here:

  • Performance budget is separately red on main: desktop script transfer is 1,068,905 bytes against the 1,060,000 budget. That is a real accumulated regression, and [agent] performance v1 WP-14: drop zod locales, devtools, rrule, bson from boot #3766 is the work that removes ~100 KB from the boot path. Raising the budget to go green would weaken the gate, so it is left alone.
  • self-host/docker-compose.test.ts has a stale assertion (expect(workflow).not.toContain("base64") now trips on an unrelated openssl rand -base64 32 help string). It fails on clean main today but is invisible because CI never runs the file. Wiring that directory into CI is a larger change than this hotfix should carry.

Verify

Selected packages: scripts
Checks run: test:scripts:fast, type-check, lint, knip
VERDICT: PASS

🤖 Generated with Claude Code

https://claude.ai/code/session_01YKNwtBmST6KpA4seeJGiSC


Generated by Claude Code

Every Release on main since #3815 has failed its staging health check
with `service web is not running: web restarting`, on both
staging-cloud and staging-selfhosted.

#3815 gave serve-web.ts its first import, the COMPRESSIBLE_STATIC_TYPES
map shared with build.ts's precompress writer. Both web Dockerfiles copy
named files into the runtime stage rather than the tree, and neither
copies that file, so `bun self-host/serve-web.ts` exits on

  error: Cannot find module '../packages/web/compressible-static-types'

before Bun.serve is reached. The image builds green and the container
restart-loops. Reproduced by running serve-web.ts against a directory
holding only the files the runtime stage copies.

Both Dockerfiles now copy the map alongside the server. Verified the
same layout plus the map boots and answers 200 on / and /index.html.

The guard goes in check-agent-constraints, not next to the Dockerfiles:
self-host/*.test.ts is matched by no test:* scan root and by no
test-unit.yml step, so nothing there runs in CI, which is why this
shipped. The new runtime-copy rule resolves each relative import in
serve-web.ts and requires a matching runtime-stage COPY in both web
Dockerfiles, so `bun lint` fails the next one too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKNwtBmST6KpA4seeJGiSC
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Sep 16, 2026 — with Claude
@tyler-dane
tyler-dane added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 3851c44 Sep 16, 2026
22 checks passed
@tyler-dane
tyler-dane deleted the claude/broken-ci-dr4spp branch September 16, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants