Public: anyone can read this; the crew can change it.
A merge conflict is not a failed try: the pull is brought up to date and its tries are kept #7918
A "does not merge into main" red no longer counts as a try or parks a pull, and a list-doc conflict is now settled without a model run. I pushed this to the branch. The new test and the existing conflict tests pass, as does test/mcp-size.test.ts, and the type check and scripts/gate.ts are clean.
stopped parked by the crew deploy 85781ec
3 earlier comments
A "does not merge into main" red no longer counts as a try or parks a pull, and a list-doc conflict is now settled without a model run. I pushed this to the branch. The new test and the existing conflict tests pass, as does test/mcp-size.test.ts, and the type check and scripts/gate.ts are clean. I did not run the broader suite. scripts/fast.ts would have named 1387 of 1730 test files, so I left that to the forge's check.
What changed
- Tries:
automaticRunsSinceandautomaticRunsSinceForinsrc/core/runs.tsnow count onlycheck_failedruns, soconflictruns no longer spendCHECK_FAILED_LIMIT. - Conflict red: when a check's summary says it "does not merge into" the base,
src/crew/dispatch.tsskips the failed-try and park path.- It first asks the forge to settle the conflict itself.
- If that doesn't apply, it queues one cheap bring-up-to-date run, and only when none is already in flight.
- It records no strike and parks nothing.
- List docs: when every conflicted file is
docs/MCP.md,README.mdorCHANGELOG.md, the forge merges main into the pull's branch itself. A newsrc/git/union-merge.tsusesgit merge-file --union, and a newsrc/actions/list-conflicts.tscommits the merge on the branch. There is no clone and no model run. The push announces itself like any other push, so the pull gets checked again. - Sweep:
sweepConflictsinsrc/crew/autonomy.tstries the same list-doc merge before it queues a run. - Test:
test/crew-merge-conflict.test.tscovers both halves. A conflict insrc/queues one run and leaves the pull open with its tries unchanged. A conflict indocs/MCP.mdmoves the head with no run.
Not done
- I did not split
docs/MCP.md. - I did not measure how many conflict runs per day this saves. I couldn't read production's run data from the sandbox. Counting
reason='conflict'runs on production where every conflicted file is one of those three docs gives the figure; I haven't run that count. - A list-doc conflict where a side's file is missing or over 1 MB still falls through to a run.
To try: bun test test/crew-merge-conflict.test.ts test/conflict_sweep.test.ts
A merge conflict no longer counts as a failed try. When a list-doc clash can't be merged, the forge keeps both sides of it. If it can't do that, it queues a bring-up-to-date run. Neither counts towards the try limit.
What changed: the earlier commit narrowed the try counters in src/core/runs.ts to reason = 'check_failed'. This follow-up fixes the test that failed on the check, "home's asks are read grouped, and once". test/asks-counts.test.ts picked out the grouped tries read by matching the old SQL text, reason IN ('check_failed','conflict'). With the text changed it matched nothing and counted 0 reads instead of 1. The test now matches run.reason = 'check_failed'. It is still the same assertion that home reads the tries once per request, so the test was stale rather than wrong.
Checked: test/asks-counts.test.ts passes (6 tests) and tsc --noEmit is clean. I did not rerun the full suite; the forge's check does that on this push.
Left alone: src/core/runs.ts:1104 still counts 'conflict' runs in a SUM(reason IN ('check_failed','conflict')) AS retries aggregate. I didn't touch it because it is outside this issue. Someone should confirm whether it should also stop counting conflicts.
A merge conflict no longer counts as a failed try. I found no code cause for the failed check and pushed an empty commit to re-run it.
What the check hit: shard 35 was killed after 48 s while running test/view-source.test.ts. The other 59 shards passed (11,492 tests, 0 failed). That file doesn't touch the files this pull changes.
What I ran here:
test/view-source.test.tspasses (23 tests) in about 2.5 s, four runs in a row.- I didn't re-run the gate,
tscor the other tests; nothing in the tree changed. - If shard 35 is killed again, the stall is in the check's machine or shard setup and not in this change.
What the pull does:
- When a try's merge clashes on a list document, the forge keeps both sides.
- Otherwise it queues a bring-up-to-date run.
- Neither case counts towards the try limit.
- The code is in
src/actions/list-conflicts.ts,src/git/union-merge.ts,src/crew/dispatch.ts,src/crew/autonomy.tsandsrc/core/runs.ts. test/crew-merge-conflict.test.tsis new, andtest/asks-counts.test.tsnow reads the tries by the new query text.
To try it, run bun test test/crew-merge-conflict.test.ts test/asks-counts.test.ts.
🤖 Generated with Claude Code
Parked by the crew: the check stayed red through 2 automatic tries
A "does not merge into main" red no longer counts as a try or parks a pull, and a list-doc conflict is now settled without a model run. I pushed this to the branch. The new test and the existing conflict tests pass, as does
test/mcp-size.test.ts, and the type check andscripts/gate.tsare clean. I did not run the broader suite.scripts/fast.tswould have named 1387 of 1730 test files, so I left that to the forge's check.What changed
automaticRunsSinceandautomaticRunsSinceForinsrc/core/runs.tsnow count onlycheck_failedruns, soconflictruns no longer spendCHECK_FAILED_LIMIT.src/crew/dispatch.tsskips the failed-try and park path.docs/MCP.md,README.mdorCHANGELOG.md, the forge merges main into the pull's branch itself. A newsrc/git/union-merge.tsusesgit merge-file --union, and a newsrc/actions/list-conflicts.tscommits the merge on the branch. There is no clone and no model run. The push announces itself like any other push, so the pull gets checked again.sweepConflictsinsrc/crew/autonomy.tstries the same list-doc merge before it queues a run.test/crew-merge-conflict.test.tscovers both halves. A conflict insrc/queues one run and leaves the pull open with its tries unchanged. A conflict indocs/MCP.mdmoves the head with no run.Not done
docs/MCP.md.reason='conflict'runs on production where every conflicted file is one of those three docs gives the figure; I haven't run that count.To try:
bun test test/crew-merge-conflict.test.ts test/conflict_sweep.test.tsCloses #7909