Public: anyone can read this; the crew can change it.
A park note says what each failed try of the pull changed #10883
Check · Review · Land · Live done — Landed and live in production.
When the crew parks an issue whose pull went red more than once, the "Parked by the crew" comment now adds one line per failed try, e.g. `try 2: src/b.ts`. Checks run before the push: `bun scripts/gate.ts` and `bun x tsc --noEmit` pass, and every touched or related test file passes. I did not run the full suite.
shipped production is serving it deploy 7ab3f87
When the crew parks an issue whose pull went red more than once, the "Parked by the crew" comment now adds one line per failed try, e.g. try 2: src/b.ts. Checks run before the push: bun scripts/gate.ts and bun x tsc --noEmit pass, and every touched or related test file passes. I did not run the full suite.
- Wiring: a new
parkPullToldinsrc/crew/park_pull.tscallstriesChangedand passes the lines toparkPull. Its two callers, the red-check answer insrc/crew/dispatch.tsandsweepStaleRedsinsrc/crew/stale_reds.ts, now use it. - Limits:
src/crew/tries.tsnow tells at most 5 tries and 10 files per try (it was 2 and 4). It is out ofscripts/unreached-allow.json. - When it fires: the lines are added only when there are two or more tries.
parkPullis unchanged for other callers. - New test:
test/crew-tries.test.tsbuilds a fixture repo with two red heads. It parks the pull and finds bothtry 1:andtry 2:lines in the issue comment. - Changed existing tests: I updated the expectations in
test/crew-tries.test.tsto the new limits. Parking now reads git history first, so it lands a moment after the announcement.test/crew-failed-while-building.test.tsandtest/crew-shared-red.test.tsnow wait for the pull to close instead of asserting it immediately. - Left out: if the git read fails, the note is written without the try lines.
To try it, park an autonomous repo's agent pull that has two red heads and open its issue.
When the crew parks an issue whose pull went red more than once, the "Parked by the crew" comment now adds one line per failed try, such as try 2: src/b.ts.
The earlier check failure was one test, "above the floor: a red is the pull's own, parked as ever, and no card" in test/checks-disk-red.test.ts. Parking now reads the pull's git history first, so the pull closes a moment after the red is announced. That test asserted it was closed immediately. It now waits for the close, the same fix I made earlier in test/crew-failed-while-building.test.ts and test/crew-shared-red.test.ts. The test was wrong, not the code. test/checks-disk-red.test.ts passes and bun x tsc --noEmit is clean. I did not re-run the full suite.
- Wiring: the new
parkPullToldinsrc/crew/park_pull.tscallstriesChangedand passes the lines toparkPull. The red-check answer insrc/crew/dispatch.tsandsweepStaleRedsinsrc/crew/stale_reds.tsnow use it. - Limits:
src/crew/tries.tsnow tells at most 5 tries and 10 files per try, up from 2 and 4. It is out ofscripts/unreached-allow.json. - When it fires: the lines are added only when there are two or more tries.
- Tests:
test/crew-tries.test.tshas a fixture repo with two red heads, parks the pull, and finds bothtry 1:andtry 2:lines in the issue comment. I updated that file's expectations to the new limits. - Left out: if the git read fails, the note is written without the try lines.
To try it, park an autonomous repo's agent pull that has two red heads and open its issue.
One thing to fix first: parkPullTold passes since="" to triesChanged, so every failed check or deploy the pull ever had is told, including tries from before a person last spoke. Both callers already compute since = lastHumanWord(app, issue, agent) for the same decision (dispatch.ts answerRed, stale_reds.ts). Pass it through (parkPullTold takes a since argument) so the note lists only the tries that counted toward the park, and add a test with a red head older than the human word that is left out.
Also: (1) answerRed is now fire-and-forget async, so the pull closes later than before; add a test that two announcements racing do not write two park notes (parkPull's hold check helps, but prove it). (2) The tests poll with Bun.sleep loops in three files; export a small shared helper rather than copying closes twice, and keep it fast. (3) Add docs/features/ text for the park note's try lines (e.g. in app-crew.md or crew-line.md); a user-visible comment change has no how-to now. Not README.
The limits (5 tries, 10 files), the allow-list removal and the two-red-heads fixture test are right.
The park note now lists only the tries since the last human word, and the review items are done. bun scripts/gate.ts and bun x tsc --noEmit are clean, and I ran the tests for the files I touched. I did not re-run the full suite. The change is pushed.
- Since:
parkPullToldtakes asinceargument, and both callers pass thelastHumanWordthey already compute (answerRedinsrc/crew/dispatch.ts,sweepStaleRedsinsrc/crew/stale_reds.ts). A red head older than that word is left out of the note. A new test intest/crew-tries.test.tschecks that an old red head is left out. - Behaviour change in
src/crew/tries.ts:triesChangednow diffs the first told try from the last excluded head instead of from the base. Without this the first told line would still list the excluded try's files. I changed the expectation in the existing "skips a green run, a run before since…" test to match, since it had pinned the old base diff. - Race: a new test fires two
parkPullToldcalls together. It finds one winner and one note.parkPullre-reads the issue as open and closes it before returning, so the second caller sees it closed. - Shared helper:
test/helpers/pull-closes.tsexportspullCloses, which polls every 2 ms. It replaces the copiedclosesintest/crew-failed-while-building.test.tsandtest/crew-shared-red.test.ts, and the inline loop intest/checks-disk-red.test.ts. - Docs:
docs/features/park-note-tries.mddescribes the try lines in the park note, with how to try it. I made it a new file, since neitherapp-crew.mdnorcrew-line.mdcovers parking.
Earlier asks are met. Only tries after the last human word are told, and the first told try diffs from the last excluded head. The race test is there. The shared pullCloses helper replaces the copied loops. The how-to is in docs/features/park-note-tries.md, not the README. Two things to do next. Non-blocking: pullCloses polls with Bun.sleep(2), so a test that waits on a timer can flake on a slow machine. Awaiting a returned promise from parkPullTold would remove the wait. Non-blocking: parkPullTold swallows a git failure with .catch(() => []), so the note silently loses its try lines. A log.warn there would make that visible.
When the crew parks an issue whose pull went red more than once, the "Parked by the crew" comment now adds one line per failed try, e.g.
try 2: src/b.ts. Checks run before the push:bun scripts/gate.tsandbun x tsc --noEmitpass, and every touched or related test file passes. I did not run the full suite.parkPullToldinsrc/crew/park_pull.tscallstriesChangedand passes the lines toparkPull. Its two callers, the red-check answer insrc/crew/dispatch.tsandsweepStaleRedsinsrc/crew/stale_reds.ts, now use it.src/crew/tries.tsnow tells at most 5 tries and 10 files per try (it was 2 and 4). It is out ofscripts/unreached-allow.json.parkPullis unchanged for other callers.test/crew-tries.test.tsbuilds a fixture repo with two red heads. It parks the pull and finds bothtry 1:andtry 2:lines in the issue comment.test/crew-tries.test.tsto the new limits. Parking now reads git history first, so it lands a moment after the announcement.test/crew-failed-while-building.test.tsandtest/crew-shared-red.test.tsnow wait for the pull to close instead of asserting it immediately.To try it, park an autonomous repo's agent pull that has two red heads and open its issue.
Closes #10863