Public: anyone can read this; the crew can change it.

The bundle's boot is held by counted work: the imports it resolves on the way to /readyz, against the source boot's #17347

opened this

Merged 33h 11m ago, live in production

The bundle is the cheap path to /readyz (#17019) because it does not resolve and load the source's thousands of modules.

Notes

opened this

The bundle is the cheap path to /readyz (#17019) because it does not resolve and load the source's thousands of modules. Two timed bounds failed on runners: a wall-clock bound (busy runners), then a CPU share set from Mac numbers (0.37) that read about 1.0 on Linux (0.88 to 1.11 over ten checks) and failed every pull (#17320, reverted in #17346, which this replaces). Now each boot runs with a preload that counts the imports it resolves (test/helpers/count-imports.ts, a Bun.plugin onResolve that answers nothing) and says the count on SIGUSR2 once /readyz answers 200. Counted work, the same on any machine.

Measured on the Mac: the bundle 1 import resolved, the source 8,592; the bound is a hundredth of the source's, and a source boot must resolve over 1,000, so the count is live. It bites: with src/http/server.ts imported at the bundle's top for one run, the bundle resolved 6,060 (share 0.7053) and the test went red. The numbers print on every run ("imports resolved to ready: bundle …; source …; share …"). On a runner (#17347's check, shard 7/64, read from the full log on the host): "imports resolved to ready: bundle 1; source 8592; share 0.0001", the same as on the Mac, as counted work should be.

docs/features/bundle.md and the gate's SLOW reason say what the test now does (2 s alone).

No door: test only. Direction: checks in minutes, no wall-clock bound in a pull's check (#7824).

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs