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 #8022

opened this in answer to

Merged 31d 9h ago, live in production

A merge conflict no longer counts as a failed try, and the change is now merged with current main and pushed. The 9 tests in test/crew-merge-conflict.test.ts and test/asks-counts.test.ts pass, and bun scripts/gate.ts passes.

Notes

opened this

A merge conflict no longer counts as a failed try, and the change is now merged with current main and pushed. The 9 tests in test/crew-merge-conflict.test.ts and test/asks-counts.test.ts pass, and bun scripts/gate.ts passes. I did not run bun x tsc --noEmit clean: it reports one error, Cannot find module 'happy-dom' in test/changelog.test.ts. That module comes from the merge with main and isn't installed in this clone. I didn't run bun install after the merge, so I haven't confirmed that clears it.

What changed:

  • No try, no park: a "does not merge into main" red no longer counts towards CHECK_FAILED_LIMIT and no longer parks a pull. The change is in src/core/runs.ts, src/crew/autonomy.ts and src/crew/dispatch.ts.
  • List-doc clashes: when the only conflict is in a list-like docs file (docs/MCP.md, README tables), the forge keeps both sides itself, with no model run. That is src/actions/list-conflicts.ts and src/git/union-merge.ts.
  • Other conflicts: any other conflict queues a bring-up-to-date run for the pull. That run's tries are kept and don't count.
  • Tests: test/crew-merge-conflict.test.ts covers both the non-counting conflict red and the list-doc union. test/asks-counts.test.ts now finds the tries by the new query text.
  • Why #7918 parked: the previous reds were a flaky shard (a stalled view-source run that passes in about 2.5 s here), not the logic. I made no code change for that.

I did not put a figure on conflict runs saved per day. The issue asks for one, but I can't read the forge's run history from this sandbox.

I did not split docs/MCP.md into separate files. Keeping both sides covers the clash without changing how the docs are laid out.

To try it, run bun test test/crew-merge-conflict.test.ts.

Closes #7909

commented

A merge conflict no longer counts as a failed try, and the change is now merged with current main and pushed. The 9 tests in test/crew-merge-conflict.test.ts and test/asks-counts.test.ts pass, and bun scripts/gate.ts passes. I did not run bun x tsc --noEmit clean: it reports one error, Cannot find module 'happy-dom' in test/changelog.test.ts. That module comes from the merge with main and isn't installed in this clone. I didn't run bun install after the merge, so I haven't confirmed that clears it.

What changed:

  • No try, no park: a "does not merge into main" red no longer counts towards CHECK_FAILED_LIMIT and no longer parks a pull. The change is in src/core/runs.ts, src/crew/autonomy.ts and src/crew/dispatch.ts.
  • List-doc clashes: when the only conflict is in a list-like docs file (docs/MCP.md, README tables), the forge keeps both sides itself, with no model run. That is src/actions/list-conflicts.ts and src/git/union-merge.ts.
  • Other conflicts: any other conflict queues a bring-up-to-date run for the pull. That run's tries are kept and don't count.
  • Tests: test/crew-merge-conflict.test.ts covers both the non-counting conflict red and the list-doc union. test/asks-counts.test.ts now finds the tries by the new query text.
  • Why #7918 parked: the previous reds were a flaky shard (a stalled view-source run that passes in about 2.5 s here), not the logic. I made no code change for that.

I did not put a figure on conflict runs saved per day. The issue asks for one, but I can't read the forge's run history from this sandbox.

I did not split docs/MCP.md into separate files. Keeping both sides covers the clash without changing how the docs are laid out.

To try it, run bun test test/crew-merge-conflict.test.ts.

commented

All three of juniper's points and the smaller ones are addressed in one new commit on this branch, and the pull is pushed again. bun scripts/gate.ts and bun x tsc --noEmit ran clean after bun install. test/crew-merge-conflict.test.ts passed 3 runs out of 3, and test/conflict_sweep.test.ts passes. I did not run the full suite.

Changes

  • Narrower list-merge: LIST_DOCS is now docs/MCP.md only. --union keeps both sides' lines unreviewed, which suits table rows and bullets but would duplicate or interleave prose. README.md and CHANGELOG.md hold sections of prose, so a clash in them still queues a bring-up-to-date run. The comment in src/git/union-merge.ts says why, and a test shows those two files do not qualify.
  • Stronger tests in test/crew-merge-conflict.test.ts:
    • The list-doc path now asserts the new head's docs/MCP.md contains both - ours and - theirs and no conflict markers.
    • A new test drives sweepConflicts (autonomy.ts) on a list-doc clash. The head moves, both sides are kept, and no run is queued.
    • A new test runs a real unionMergeFile over base, ours and theirs.
  • No fixed sleeps: settle() and its 1500 ms wait are gone. Tests poll the head or the run with a 10 s bound. To show that two reds queue only one run, a list-doc pull is queued after them, and its head moving shows the earlier reds were seen.
  • Smaller points: I wrapped the resolveListConflicts doc comment and softened the dispatch comment. It no longer claims a day's cap and the breaker bound the conflict runs, and I did not add a test for that.

One thing the sweep test showed The sweep settles a list-doc clash only while the conflict lane has room, because the push it makes starts a check. I left that as it was. In the test, the earlier tests' pulls and runs are cleared first, so the one slot is free for the pull under test.

The change has no page surface, so there is no look to attach; the tests are the evidence.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs