Repository navigation
test(ci): edit only after the first watch run finishes in the watch-rerun case (#4081) - #4082
Merged
Merged
Conversation
…erun case (#4081) The watch-rerun case edited the watched files as soon as the first run printed its marker line, while that run was still finishing. On main run 43858822733 no rerun followed within ten seconds. Wait for the run's own summary before editing, so the edit cannot land inside it. Failure labels that report output were built when the wait began, so the annotation showed only what had arrived before it. Build them when the wait ends. Refs #4081 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Root-cause follow-up: #4083 (no milestone). |
schlessera
marked this pull request as draft
November 16, 2026 12:19
schlessera
marked this pull request as ready for review
November 16, 2026 12:19
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #4081
Declared red-main fix for incident #4081 (main run 43858822733, first bad SHA
132505f0bdac). The incident stays open until a green main run that includes the failing set clears the record.What changed
In
tests/test-invocation-lifetime.test.ts, the watch-rerun cases now edit the watched files only after the first watch run has printed its own summary (Ran 1 test across 1 file). Before, they edited as soon as the run printed itsWATCH_CONSUMER 1marker line, while that run was still finishing. On main run 43858822733 no rerun then followed within ten seconds (SECOND_WATCH_CONSUMER). The claim under test is unchanged: the rerun must rebuild and consumecargo = 2without borrowing the outer authority. Waits whose labels report output now build the label when the wait ends. Before, the label was built when the wait began, so the CI annotation showed only the output that had arrived before the ten seconds started. The same bug class at the survivor-fallback wait is fixed too.Why this shape
#4064 cannot reach this test. Its fixture copies a fixed list of
scripts/*files and three test helpers (invocationFixture,tests/helpers/test-invocation-fixture.ts:6-37), and #4064 changes none of them. Its onlyscripts/changes are inscripts/native-proof/. A revert would remove unrelated good work and would not touch the failing file. This failure is a timing flake, so under the maintainer's flake ruling this takes the cheapest fix that removes the race, the edit landing inside the first run. Bun's watch-reload root cause is not established, and the deeper investigation is filed separately with no milestone.The expedited
--fixes-main-runroute needs the failing file shown red at the exact base (scripts/red-main-expedite.ts:59), which a flake that does not reproduce cannot supply. So this lands as a declared fix through ordinary candidate confirmation.Proof
(fail) wrapper watch reruns rebuild instead of borrowing live outer authority [12750.82ms]atSECOND_WATCH_CONSUMER. The same case passed in 2.4–3.8 s on main runs 43849565555, 43844647238, 43840844397 and 43836699141.bun test --watchprobe reran 40/40 on Bun 1.4.2 after an edit made right after the test's last statement.bun run test tests/test-invocation-lifetime.test.tspassed 15/15, three times on Bun 1.4.4. The watch cases passed 2/2, five times on Bun 1.4.2.packages/ithacasource edit, so the rerun consumes a stale build): fails withWATCH_RERUN_FRESH_CONSUMERinside the rerun andSECOND_WATCH_CONSUMERoutside. The lazy label now carries the rerun's real output. Restored.Ran 2 tests across 1 file): fails withFIRST_WATCH_RUN_COMPLETE, and the label shows the first run's full output. Restored.nodeshim now reports the real cause (mise ERROR node is not a valid shim) where the old eager label reported empty output.{"version":1,"kind":"brain-check-pr-receipt","head":"9b6ca0d718bdedfa3528f228ae6124f04ec4fe52","base":"origin/main","mode":"focused","startedAt":"2026-11-16T12:15:34.217Z","finishedAt":"2026-11-16T12:17:00.362Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12433.523254},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":115.94341400000121},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":80.7015050000009},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":18.269476999999824},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":73480.35318199999}]}Checklist
docs/reflect the change, or nothing documented moved.Anything left open
The root cause inside Bun's watch reload is not established. The follow-up issue is linked in a comment below.
🤖 Generated with Claude Code