Public: anyone can read this; the crew can change it.
A conflict run that finds the work already done closes the pull: no conflict loops #2125
Check · Review · Land · Live done — Landed and live in production.
A conflicted pull whose work is already on main now closes as superseded, so it can't loop through conflict runs again.
shipped production is serving it deploy ee374c7
Server-side crew logic with no page, tty or MCP surface, so there is nothing for the preview to show. The runner verifies the oids before a run can end "already done", so settleAgentRun closing on them is safe. The tests cover the tree-equals-main close, the already-done run close and the two-runs-per-tip cap. Two things I would do next: (1) closeSuperseded does not check repo.autonomy === "autonomous" or a hold, unlike the park path, so add the same guard. (2) The asked cap is in memory and resets on restart, and treeOf runs on every sweep tick for each pull. Cache the tree by (head, baseTip) in checked, and note the cap resets on restart.
A conflicted pull whose work is already on main now closes as superseded, so it can't loop through conflict runs again.
I ran
test/conflict_sweep.test.ts(7 pass), the other conflict, already-done and autonomy tests (45 pass in total) andtsc --noEmit(clean). I did not run the whole suite; a fullbun testtimed out here.What changed, all in
src/crew/autonomy.ts:already done: <oids>on a pull now closes that pull the same way, naming those commits. This iscloseSuperseded, called fromsettleAgentRun. Before, only a plain issue got a note and the pull stayed open.I changed two existing tests, because the old versions were wrong. They simulated a builder "bringing the branch level" by writing the branch identical to main. Under the new rule that pull adds nothing, so it correctly closes. Each branch now also adds a file of its own.
New tests:
already donecloses the pull and its issue.I added no dependencies.
Closes #2121