Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:39d89j4f7b is past its budget: trevato/forge: "a pull whose review loop is spent is the planner's (#1655) > the planner is asked for it and its brief … #3993
Merged 42d 23h ago, live in production
This fixes a race in test/crew-parks-planner.test.ts, which I believe caused the flaky "the planner is asked for it and its brief says three reviews asked for changes" test. I couldn't reproduce the failure here, so the fix is untested against the real cause.
-
Reviews
ApprovedTest-only change that removes a real race: the live crew tick and the test's own driveRepo call can both ask the planner, and either outcome (planned or idle) still leaves the planner run and brief asserted exactly. No production code, security surface, UI or dependency is touched, so the preview is unaffected. Two things I would do next: (1) the shared 45s deadline now also bounds the later settled() wait, which fits inside the 60s test timeout but leaves little margin; give the settled wait its own deadline. (2) Accepting idle also hides the case where the planner was never asked for another reason; if directionIssueId is still null after the wait, fail with an explicit message instead of the non-null assertion, and check the other crew tests for the same tick race.
-
Checks
shipped production is serving it deploy 8f7dfc4
-
History
- Tests: the planner-run tests no longer assume their driveRepo call is the one that asks the planner (#3965) c9a9d81
- Release 0.7.220: Design: the code browser's explorer column uses the design system, and its ex-* classes leave §5d (#3814) d06daa4
- Design: the code browser's explorer column uses the design system, and its ex-* classes leave §5d (#3814) f06062e
- Release 0.7.219: Egress: a public destination gets a 64-connection cap; the 8-connection cap stays for granted private devices (#3719 capped bun install at the registry and every check failed) e7cbee0
- Egress: a public destination gets a 64-connection cap; the 8-connection cap stays for granted private devices (#3719 capped bun install at the registry and every check failed) c7ea193
- Release 0.7.218: The forge pill's panel opens and closes: inline display:flex overrides hidden, so the toggle and close do nothing (#3346) 6aa5ebc
- The forge pill's panel opens and closes: inline display:flex overrides hidden, so the toggle and close do nothing (#3346) 0bcd4d6
- Release 0.7.217: Design: the everyday-account card uses the design system, and everyday-ask leaves §5d (#3845);The board opens on its panels, with notes in one quiet line: land pull #3774's branch with its last review asks (#3857);A GitHub migration carries each milestone: title, description, due date, state, once ( 030c929
- Design: the everyday-account card uses the design system, and everyday-ask leaves §5d (#3845) 922f5c2
- The board opens on its panels, with notes in one quiet line: land pull #3774's branch with its last review asks (#3857) 85c3b52
- A GitHub migration carries each milestone: title, description, due date, state, once (#3851) 8359c6a
- MCP `runs`: list a repository's recent runs, with the same rules as GET …/runs (#3844) b1c7265
- MCP `search`: find issues, pulls, repositories and code with the same results as /search (#3812) 1387b4d
- MCP `commits`: list a branch's recent commits, with the same rules as GET …/commits (#3811) 5f852c6
- The API's read of one repository names its Server-Timing phases: session, repo, each read, render (#3795) 9bb2121
- Release 0.7.216: GET /apps/new names its Server-Timing phases (session, each read, render) and answers under 50 ms (#3739) b2044fa
- GET /apps/new names its Server-Timing phases (session, each read, render) and answers under 50 ms (#3739) 7f24940
- Release 0.7.215: After a GitHub migration the person chooses: leave GitHub alone, archive it, or keep it as a read-only mirror the forge pushes to (#3730);URGENT: the forge crashed (Bun segfault on the main thread) and 255 socat processes are alive (#3724);URGENT: the egress relay leaks upstream sockets - 40 open ca 15ed15b
- After a GitHub migration the person chooses: leave GitHub alone, archive it, or keep it as a read-only mirror the forge pushes to (#3730) b15b374
- URGENT: the forge crashed (Bun segfault on the main thread) and 255 socat processes are alive (#3724) 180f40c
This fixes a race in test/crew-parks-planner.test.ts, which I believe caused the flaky "the planner is asked for it and its brief says three reviews asked for changes" test. I couldn't reproduce the failure here, so the fix is untested against the real cause.
Cause: the test starts a live crew with a 50 ms tick, then calls driveRepo itself and expects "planned". The crew's own tick can ask the planner first. On a loaded check machine that happens often enough that the test's call returns "idle" ("a planning run is in flight"), and the test fails even though the planner was asked correctly. I found this by reading the log, which shows that "planner not asked … in flight" line. The sibling "second park, next tick" test in the same file has the same race.
Change: both tests now accept "planned" or "idle" from their own call. They then wait up to 45 s for directionIssueId to appear before looking for the planner run. That run, and the brief the stand-in Claude Code received, are still asserted exactly as before. The verdict now depends on the code under test, not on who wins the tick.
Not done: I didn't change the production tick or the planner logic, and I didn't touch the other crew tests that may share this pattern. I ran bun test test/crew-parks-planner.test.ts three times and it passed each time. bun x tsc --noEmit couldn't run in the sandbox (read-only tempdir), so the forge's check will be its first run.
To verify: bun test test/crew-parks-planner.test.ts. The sentinel cause shared:…39d89j4f7b should clear once main's check is green again.
This fixes a race in
test/crew-parks-planner.test.ts, which I believe caused the flaky "the planner is asked for it and its brief says three reviews asked for changes" test. I couldn't reproduce the failure here, so the fix is untested against the real cause.Cause: the test starts a live crew with a 50 ms tick, then calls
driveRepoitself and expects"planned". The crew's own tick can ask the planner first. On a loaded check machine that happens often enough that the test's call returns"idle"("a planning run is in flight"), and the test fails even though the planner was asked correctly. I found this by reading the log, which shows that "planner not asked … in flight" line. The sibling "second park, next tick" test in the same file has the same race.Change: both tests now accept
"planned"or"idle"from their own call. They then wait up to 45 s fordirectionIssueIdto appear before looking for the planner run. That run, and the brief the stand-in Claude Code received, are still asserted exactly as before. The verdict now depends on the code under test, not on who wins the tick.Not done: I didn't change the production tick or the planner logic, and I didn't touch the other crew tests that may share this pattern. I ran
bun test test/crew-parks-planner.test.tsthree times and it passed each time.bun x tsc --noEmitcouldn't run in the sandbox (read-only tempdir), so the forge's check will be its first run.To verify:
bun test test/crew-parks-planner.test.ts. The sentinel causeshared:…39d89j4f7bshould clear once main's check is green again.Closes #3965