The simulator gives each check its run and suite, and starts another run of a Lens beside the one it leaves (#749)
Fixes #749
The simulator now reaches #681 step 3's rule (record 0203, #783). That rule passes over a check from a run whose suite concluded cancelled or timed_out, beside another run of the same Lens on the head that did not stop. This change adds no new rule and no record, by the Factory Builder's ruling.
Protected paths: sim/world.py and tests/test_simulator.py, pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder 2026-11-11.
What
Run ids and suites. Each check carries run_id and suite_conclusion, as adapters/checks.py writes them:
- A Lens that a workflow runs reports from a workflow run. Its suite is null while pending and concludes as its check does.
- A Lens no workflow runs, CodeQL's, has
run_idnull and its App's suite. - Each push starts new runs. A person's re-run keeps its run's id and suite, as P-65 recorded.
- A check a job creates names the Lens's own run. Another workflow's check has a run of its own; another App's has none.
The fault (another_run). On one seed in four (seed % 4 == 3), another run of a workflow Lens starts on the head. The causes are the three P-65 recorded:
- a push back to the head, a new run;
- a reopening, a new run;
- a re-run of an earlier run there, which keeps that run's id and stands in the rollup for its earlier attempt.
The run it leaves stays beside it. If it was in progress, it is cancelled: suite cancelled, if: always() judging check failure. Otherwise it stays as it concluded. The fault prefers a Lens whose run just failed. A person's re-run result is that person's (the ruling on #38).
Grounding. sim/grounding.py adds a_check_names_its_run_and_suite and a_cancelled_run_stays_beside_a_later_run, both on trials/P-65.json. The port reads each of them from that fixture (tests/test_adapters.py).
Invariants, restated in the world's own words:
- No verdict: a stopped run beside a run of the same check that did not stop is no check of the head.
- I-27 and the queue: I-27 (no model review before the checks pass) and the queue's objections and merge gate read each Lens through
passed()/failed(). A stopped run is passed over beside one that did not stop, and a failure an earlier run left counts. - New: a stopped run never lets a Lens pass that a completed failure fails. A failing check of a Lens's own App and file, whose suite concluded and did not stop, lets no review start, nothing be approved or enqueued, and nothing converge.
- settle(): the Maintainer pushes past an earlier run's check that did not pass and did not stop, as for another App's check.
Held by
- The seed test:
tests/test_simulator.py::test_the_seeds_start_another_run_of_a_lens_on_the_head. It holds:- all three causes are reached, on seed % 4 == 3 alone, and a re-run keeps its run's id;
- a run left
cancellednever passes; - the Kernel's own
lens_readingpasses a Lens with a cancelled run beside a passing one; - a completed failure beside a passing run is never approved or enqueued.
- The invariants:
test_invariants_hold_under_faults, on the fixed seeds. - Mutants: all 67 of
sim/world.pyandsim/grounding.py, with the Kernel mutants this test names, are killed. Among them:- "another run of a Lens never starts" and "a cancelled run's judging check passes" (the world's);
- "every run is passed over beside a run that did not stop" and "the simulator's stopped run is never passed over" (the Kernel's), each killed by the simulator's tests alone;
- "the latest run alone is read".
- Re-anchored: three older mutants, for the
facts()line and the queue's merge gate. - Runs: the simulator suite passes on 300 seeds (CI's count), and the tests the mutants name pass on 40 (the mutants' count).
make checkspasses.
Seed review
I compared every seed's trace and transitions over 250 steps, before and after: 76 of 300 seeds change.
| Seeds | Why they change |
|---|---|
| 56 (all on seed % 4 == 3) | Another run of a Lens starts on the head. From that step on the world differs: the run left beside the new one, the Lens pending again, and what follows |
| 18: 2, 21, 24, 26, 36, 58, 65, 102, 141, 165, 170, 216, 219, 220, 254, 255, 268, 279 | A check concluded timed_out, its suite timed_out. Alone it is now every run stopped, so unreadable (verifying check_unreadable -> defer), where it used to fail (addressing check_failed -> admit), under ruling (b) |
| 2: 16, 202 | The same timed-out check, with no pass between it and a person's act. The trace is unchanged, but the State that act moves from is verifying, not addressing, so the transitions it makes differ |
None is unexplained.
Not modelled
- A push back to the head or a reopening is modelled as its run alone. The world adds no timeline event, and the item does not leave the queue. The facts it gives are still ones GitHub can give, for example a run another event starts. The Claude review named this.
- A failing check whose suite has not yet concluded (
concluding) is never served. In P-65 a judging check concluded about a second before its suite; the world concludes both at once.
Second readers
| Reader | Head | Result |
|---|---|---|
| Carbon (Gemini 4 Carbon) | 71837652 | no findings |
| Muse | 71837652 | 1 major, fixed in a66ba2b1: the queue's objections and merge gate ignored earlier runs. 1 minor, fixed: created and posted checks named no run |
| Astra (gpt-6-astra) | 71837652 | 2 majors, both fixed in a66ba2b1: the test now asserts a re-run keeps its id, and that only seed % 4 == 3 gets the fault; sim/AGENTS.md names the test |
| Claude + security | 71837652 | no blocker. 2 majors, fixed in a66ba2b1: the test now reads the Kernel's own lens_reading (it could pass vacuously), and the queue reads earlier runs. Minors: a re-run's result is the person's, which is fixed; the two not modelled above are named |
The fixes in a66ba2b1 came after the readers; none of them re-read that head.
š¤ Generated with Claude Code