Public: anyone can read this; the crew can change it.

A change is not parked for the runner's failure: ask whose fault before stopping #148

Closed opened this
Closed without merging

A failed check asked two questions in the wrong order: retryOrStop first, and a stop parked the pull before whoseFault was ever put — so the question that exists for a timeout or a flaky runner was only ever asked on again, and #113 was thrown away twice by the same 60s flake.

Notes

stopped closed without shipping

opened this

A failed check asked two questions in the wrong order: retryOrStop first, and a stop parked the pull before whoseFault was ever put — so the question that exists for a timeout or a flaky runner was only ever asked on again, and #113 was thrown away twice by the same 60s flake. The two questions are now one decision, judgeFailedCheck: one round trip over one log tail, retry and cause answered together, retry still the answer the ledger keeps and cause riding along (decideAndRecord was already built for that). No extra decider call per failure — the second question is folded into the first, and whoseFault is gone because nothing else called it.

answerFailedCheck in src/crew/dispatch.ts is where to look: the environment's fault runs the check again, once per head commit, whatever the verdict, and spends none of the agent's tries; then a stop parks, with a reason that distinguishes "the check failed in the place it ran, not in the change" from today's "the decider saw no point in another try"; then again reworks. retriedChecks still bounds it, so a permanently broken runner parks on the second red on that commit rather than looping. The limit branch, the no-decider fast path (which apps-adversarial depends on queueing synchronously) and both rules are untouched: CHECK_FAILED_LIMIT still ends it and still asks a person.

Two tests in test/ledger.test.ts cover it, driving a real checks service: a scripted stop + environment re-runs and leaves the pull open with no rework queued (and asserts the decider was asked exactly once), a second red on the same commit parks saying the environment, and stop + change parks with exactly today's reason. The existing "try again or stop" test follows the rename only — its assertions are unchanged. docs/PLANNING.md and the failed-check bullet in docs/APPS.md describe the new order.

bun x tsc --noEmit is clean and the check's suite is green except six tests that fail identically on the unmodified tree in this sandbox — test/web.test.ts, pulls, apps, apps-adversarial, cross-repo-pull — all of them pushes over HTTP failing with remote: auth required, which is the sandbox's git credentials, not this change. This does not fix #124; it removes the class of loss that flake caused.

🤖 Generated with Claude Code

Closes #128

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs