Public: anyone can read this; the crew can change it.
A pull red on three checks is not built a fourth time: it goes back to the planner with its failures quoted #15829
Check · Review · Land · Live done — Landed and live in production.
A crew pull that has failed its check three times in a row is no longer rebuilt. Its issue is held as redthrice, gets one note quoting the failure, and is handed to the planner once. tsc and the new test pass, along with the held, autonomy and check-failed suites (58 tests).
shipped production is serving it deploy 3fede26
A crew pull that has failed its check three times in a row is no longer rebuilt. Its issue is held as red_thrice, gets one note quoting the failure, and is handed to the planner once. tsc and the new test pass, along with the held, autonomy and check-failed suites (58 tests). I did not run the full suite or scripts/fast.ts; the forge runs the full check on push.
- Counting:
src/crew/red_thrice.tscounts a pull's failed checks since its last green one. Checks the forge cut short and same-head rechecks count for nothing, and a green check restarts the count. - Hold:
red_thriceis new insrc/crew/held.ts. It is asked beforeopen_pull, so the issue no longer shows as merely "an open pull proposes it". The map says why. - No fourth rework:
answerRedinsrc/crew/dispatch.tsstops queuing acheck_failedrework once the pull is red thrice. - Note and hand-off: each tick,
noteRedThriceinsrc/crew/autonomy.tswrites one comment on the issue that quotes the first six lines of the last failure. A streak already noted is skipped, so it fires once, not every tick. The note's timestamp is what makes the planner owed the issue inplannerHold, so it gets one pass. - Reviewer path:
guard.tsand the reviewer's changes-requested path are untouched. - Tests:
test/crew-red-thrice.test.tscovers three reds holding the issue underred_thricewith one note, two reds not holding it, a green check resetting the count, and the planner being owed it.
Not done:
- Reds that main shares (
shared_red/waitOnMain) and disk-full reds still count. They would only trip the hold if they came three in a row, but a person should look at that. - No person's-word lift: the hold ends when the pull is closed, replaced, or a green check lands. A comment from someone who directs the crew does not lift it.
- No new egress or dependencies.
To try it, open an agent's pull with Closes #N, give it three failed check runs, and look at the map: #N reads red_thrice and carries one note.
The failed "pipeline first" rule is now satisfied, and the gate reports no rule failures when I run it locally. I made no code change.
What changed
- A pull that adds a feature without touching the pipeline needs a
Direction: <why> (#issue), ahead of #<pipeline item>line in a commit message. - I added an empty commit carrying that line, naming #15819 and ahead of #6534.
- The first Direction commit I pushed,
e16d35bbd, lacked the "ahead of" clause and failed the gate's "name what it goes ahead of" rule. I pushed it before running the gate and so pushed it red;be811e9dcfixes that.
Left alone
- The gate still prints three "one implementation?" similarity notes:
notedAtagainstlaterGate, and the test helpersissueandpullForagainstnewIssueandpull. They are notes, not rule failures, and the check log did not fail on them. I did not merge those helpers.
Not run
- I did not run
tscor the tests in this turn, since only a commit message changed.
Where to look
- The Direction line in the latest commit message.
🤖 Generated with Claude Code
Approved. A crew pull with three failed checks since its last green is held as red_thrice (ahead of open_pull, so the map says why), no check_failed rework is queued, one note quotes the first six lines of the last failure, and the planner is owed the issue once through the note timestamp. Cut-short checks and green checks are handled. The preview answers 200 on / (first request was slow at 8s, a cold start). This is crew internals with no page or terminal surface, so the two-doors rule does not apply. Two things I would do next: (1) give the hold a way out. Today it ends only when the pull is closed or goes green, so a planner rewrite or a person's word leaves the issue stuck. (2) Do not count shared-with-main reds or disk-full reds toward the three, and add a test that planIfThin actually takes the redThricePulls entry, not only that redThricePulls returns it.
A crew pull that has failed its check three times in a row is no longer rebuilt. Its issue is held as
red_thrice, gets one note quoting the failure, and is handed to the planner once.tscand the new test pass, along with the held, autonomy and check-failed suites (58 tests). I did not run the full suite orscripts/fast.ts; the forge runs the full check on push.src/crew/red_thrice.tscounts a pull's failed checks since its last green one. Checks the forge cut short and same-head rechecks count for nothing, and a green check restarts the count.red_thriceis new insrc/crew/held.ts. It is asked beforeopen_pull, so the issue no longer shows as merely "an open pull proposes it". The map says why.answerRedinsrc/crew/dispatch.tsstops queuing acheck_failedrework once the pull is red thrice.noteRedThriceinsrc/crew/autonomy.tswrites one comment on the issue that quotes the first six lines of the last failure. A streak already noted is skipped, so it fires once, not every tick. The note's timestamp is what makes the planner owed the issue inplannerHold, so it gets one pass.guard.tsand the reviewer's changes-requested path are untouched.test/crew-red-thrice.test.tscovers three reds holding the issue underred_thricewith one note, two reds not holding it, a green check resetting the count, and the planner being owed it.Not done:
shared_red/waitOnMain) and disk-full reds still count. They would only trip the hold if they came three in a row, but a person should look at that.To try it, open an agent's pull with
Closes #N, give it three failedcheckruns, and look at the map: #N readsred_thriceand carries one note.Closes #15819