The fake's merge queue merges on its required checks alone, as GitHub's does (#677)

Merged
DO
7d ago
+125-30

Closes #677, "The fake's merge queue merges on its required checks alone, as GitHub's does (a_pass_comes_before_the_merge)". Stacked on #682, the P-2 no-pass trial, whose fixture trials/P-2.no-pass.json grounds it. The sim/ edits are pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder.

What changes

  • The fake's queue (sim/world.py, platform()) merges a queued item once its required checks pass, with no pass read between, as GitHub's did in P-2's run (and for the queue App's enqueue in trials/P-2.queue-app.json).
    • Where the last pass read the item as it is at the merge, the merge is still held to what a pass would take it out for (L-19).
    • What came after the last read is merged over and noted, merged before a pass read …, never asserted.
  • The Factory's own enqueue now holds whatever the item may not merge over: objections(), which covers the approval of this content by an approver who can write, a writer's thread or request for changes, a Hold, a failed check, an impostor check, the contract, its evidence and an unread description edit. I-37 and I-45 are held there too. This is where the guarantee the old merge gave now lives.
  • At every merge, I-37 and I-45 are still asserted: a push takes the item out of the queue, and run records only grow. NFR-4 and I-29/I-31 are asserted at the merge only where a pass read the item as it was merged.
  • Grounding: a_pass_comes_before_the_merge, which the fake contradicted, becomes the_queue_merges_on_its_required_checks, grounded on trials/P-2.no-pass.json and trials/P-2.queue-app.json. The port's contract lists it in NOT_READ as shape: the trial read it by REST lists and a timeline query, not the facts port's rollup.
  • L-19 and sim/AGENTS.md now say what the Factory holds: nothing enters the queue without an approval of exactly the content queued, and one that loses it leaves at the next pass. L-19's Check names the new enqueue test.
  • P-2's row in section 6 says the fake was changed.
  • Tests and mutants:
    • The two queue tests now show the merge over a change with no pass read between, the dequeue when a pass reads first, and the Broken when a pass had read it.
    • test_the_factorys_own_enqueue_holds_what_the_queue_merges_on_alone forces each bad enqueue: no approval, a thread, a failed check, an unapproved contract, no review. It pins each one's reason.
    • Eight new mutants, all killed.
    • The two tests keep their names, because five decisions cite them for the dequeue part, which they still hold.

For the Factory Builder: NFR-4 has a window on GitHub

GitHub merges on required checks alone. A dismissal, Hold or thread made while an item is queued is honoured only if a pass dequeues it before the queue merges, which may be up to one poll interval later. So "every merge carries a standing approval" (NFR-4) cannot be met in full. L-19 now says so plainly.

Closing the window would need a required check of a Factory App on the merge group. Your ruling on #659 said that breaks §9.1's recovery rule, so this PR does not do it.

The first 40 seeds

SIM_SEEDS=40: every path is still reached, and test_invariants_hold_under_faults and the seed-coverage tests pass. Over the first 40 seeds at 250 steps, before the fix round, 5 merged: 1 after a pass read it and 4 with no read between, 2 of them over something unread.

Checks

CheckResult
SIM_SEEDS=40 make verifyOK, 1727 tests (at 53a5127e)
Mutants, filtered9 of 9 queue mutants killed (8 new) at 53a5127e
gitleaksNo leaks
Argon (ad2580f), 2 partsClean
Muse (ad2580f)2 major, 1 minor, all fixed: sim/AGENTS.md stated the old rule; the enqueue checks had no test or mutant; stale test comments
Claude review (ad2580f)3 major, all fixed: the enqueue checked less than the old merge did (measured on planted Kernel bugs; now it checks every objection); L-19 and sim/AGENTS.md; no tests for the new checks. Minor and nits fixed: grounding names P-2.queue-app; a mutant drops the success-only condition; I-37 and I-45 held at every merge
Claude security (ad2580f)Nothing for security. The medium L-19 finding and the two low findings are the same as above, fixed
AstraOnly where Muse gives no read

Labelled factory:hands-off. Enqueue waits for the Factory Builder's all-clear. No record is added.

🤖 Generated with Claude Code