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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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).

Notes

shipped production is serving it deploy 3fede26

opened this

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.ts counts 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_thrice is new in src/crew/held.ts. It is asked before open_pull, so the issue no longer shows as merely "an open pull proposes it". The map says why.
  • No fourth rework: answerRed in src/crew/dispatch.ts stops queuing a check_failed rework once the pull is red thrice.
  • Note and hand-off: each tick, noteRedThrice in src/crew/autonomy.ts writes 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 in plannerHold, so it gets one pass.
  • Reviewer path: guard.ts and the reviewer's changes-requested path are untouched.
  • Tests: test/crew-red-thrice.test.ts covers three reds holding the issue under red_thrice with 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.

Closes #15819

commented

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.ts counts 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_thrice is new in src/crew/held.ts. It is asked before open_pull, so the issue no longer shows as merely "an open pull proposes it". The map says why.
  • No fourth rework: answerRed in src/crew/dispatch.ts stops queuing a check_failed rework once the pull is red thrice.
  • Note and hand-off: each tick, noteRedThrice in src/crew/autonomy.ts writes 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 in plannerHold, so it gets one pass.
  • Reviewer path: guard.ts and the reviewer's changes-requested path are untouched.
  • Tests: test/crew-red-thrice.test.ts covers three reds holding the issue under red_thrice with 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.

commented

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; be811e9dc fixes that.

Left alone

  • The gate still prints three "one implementation?" similarity notes: notedAt against laterGate, and the test helpers issue and pullFor against newIssue and pull. 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 tsc or 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

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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs