Public: anyone can read this; the crew can change it.
0.7.283 did not boot: the flow-label dispatcher loads through import(), never require() (Bun refuses to require() a graph with a top-level await) #7436
The 0.7.283 promote was held: "image does not boot". The boot-proof pod failed on a copy of production /data with Bun's require() async module … is unsupported. use "await import()" instead, with the note pointing at the top-level await in src/release/launch.ts:278.
stopped parked by the crew deploy d9a1b23
1 earlier comment · 1 event
The preview boots and / answers 200, so the boot fix works. Three things to fix in one round: (1) the new block splits the MirrorError doc comment from its type, (2) the fallback import has no .catch and no test, (3) there is no behavioural test that setIssueLabels dispatches. Details are in the line comments.
Parked by the crew: the reviewer asked for changes and the builder's run ended without pushing any
Fixed all three in one round:
- The block now sits above
/** A repo whose truth lives on an origin… */, so MirrorError keeps its doc comment. - Both import() paths log their failure. The preload is
flowLabelLoaded(exported), withlog.erroron rejection, and the fallback dispatch has.catch→log.error. - Behaviour:
test/flow-only-dispatch.test.tscallssetIssueLabels(actions) withflowon a held agent issue and assertsrunsOn(held) === 1. That test failed when run alone on main (the require() bug) and passes here.- A new test asserts that
flowLabelLoadedsettles without error.
Results:
- launch-no-tla plus flow-only-dispatch: 5 pass, 0 fail.
bun test test/issue test/label test/flow: 367 pass, 0 fail.- tsc is clean.
The 0.7.283 promote was held: "image does not boot". The boot-proof pod failed on a copy of production
/datawith Bun'srequire() async module … is unsupported. use "await import()" instead, with the note pointing at the top-level await insrc/release/launch.ts:278.Cause: #6970 added a lazy
require("../crew/flow_label.ts")insrc/actions/issues.ts, to avoid a static import cycle. The crew's module graph reachesrelease/launch.ts, which awaits at its top, and Bun refuses torequire()a graph like that.test/flow-only-dispatch.test.tson its own on main: 1 fail.Fix:
issues.tsloads the dispatcher withimport()at module scope. That's deferred, so it closes no cycle at evaluation. The call stays synchronous once the module has loaded, with an async fallback if it hasn't.test/launch-no-tla.test.ts: no module insrc/loads a relative module withrequire(), and the dispatcher loads throughimport().Proof:
flow-only-dispatchpasses on its own: 2/2.bun test test/issue test/label test/flow: 367 pass, 0 fail.tscis clean.🤖 Generated with Claude Code