Repository navigation
Description
Context
Main run 43858822733 (incident #4081) failed wrapper watch reruns rebuild instead of borrowing live outer authority in tests/test-invocation-lifetime.test.ts. The first bun test --watch run printed WATCH_CONSUMER 1, the test edited watched.test.ts and the packages/ithaca source, and for ten seconds no rerun printed WATCH_CONSUMER 2. The case normally passes in 2.4–3.8 s.
#4082 cleared main with the cheapest fix that removes the race: it edits only after the first watch run prints its summary, and it builds the failure labels when the wait ends. The label used to be built when the wait began, so the CI annotation from 43858822733 shows only the output from before the wait. Nothing is known about what Bun's watch process did during those ten seconds.
What was tried, all passing:
- 3 local runs with Bun 1.4.4, 8 under a 20-loop CPU burn, and 5 with Bun 1.4.2 (CI's version).
- A minimal
bun test --watchprobe that edits the test file right after its last statement, or while the body is still running: it reran 40/40 times on Bun 1.4.2.
Needs scoping: the root cause is unknown. The suspects are an edit landing inside the first run's teardown and being dropped or stalling the reload in Bun 1.4.2, or a reload that started and then blocked (for example in the preload's ensureWorkspaceLease, scripts/test-network-preload.ts:10).
Scope
- If the case fails again after test(ci): edit only after the first watch run finishes in the watch-rerun case (#4081) #4082, read the now-complete
SECOND_WATCH_CONSUMERoutput and find out whether the reload started. - If it is a Bun watch bug, reduce it to a minimal upstream reproduction.
Out of scope
- Rerunning, skipping or loosening the watch-rerun assertions.
- Changing
scripts/test.tswatch handling without a reproduced cause.
Acceptance criteria
- The cause is named with evidence: a reproduction, or a failing run's complete output. Or, if no recurrence and no reproduction appear within a reasonable window, the issue is closed as not reproducible, with that window stated.
Verification
- A reproduction recipe or a run link with the complete label output.
Contract impact
None.
2026-11-16 triage at main 3b104890f8: Verified the delivered first-run-summary wait (tests/test-invocation-lifetime.test.ts:184) and lazy SECOND_WATCH_CONSUMER diagnostic (:187), plus the preload lease boundary (scripts/test-network-preload.ts:11). #4081 is now closed; neither that closure nor the current passing controls attributes Bun’s original behavior. Keep needs: repro for a complete post-fix failure capture or minimal watch reproduction. If no recurrence is used to justify a later not-reproducible disposition, state the actual observed time window/selected-run count and obtain the disposition on this issue; this triage does not invent a closure deadline. Priority p2 reflects wanted unscheduled follow-up, not a continuing red-main incident or release commitment. Leave standalone: #736 has 100 direct children and no narrower existing epic owns Bun watch/preload diagnosis.
2026-11-20 triage — On main bd751d434, the unchanged bun run test tests/test-invocation-lifetime.test.ts -t "wrapper watch reruns rebuild" control passed on Bun 1.4.4 (1 pass, 15 assertions, 2.32 seconds). The complete output of a future failure or a minimal Bun watch reproduction is still needed to attribute the historical stall.
Activity