A run stopped before it judged is passed over beside another run of the Lens on the same head (#681 step 3, record 0203)

Merged
DO
5d ago
+226-10

Part of #681 (step 3 of 4). The simulator's cancelled-run case is split to #749. #681 stays open until #749 lands, and step 4 waits on the Factory Builder.

What

The Kernel passes over a stopped run's checks when another run of the same Lens on the same head did not stop.

  • The rule. A check of a Lens is passed over, giving no verdict, when:

    • its run's check suite concluded cancelled or timed_out;
    • and another run of the same Lens on that head has a suite that did not, whether completed or still running.

    Runs are told apart by run_id alone and never ordered by it (kernel/derive.py run_of, lens_reading; kernel/terms.py STOPPED_SUITES, SUITE_CONCLUSIONS).

  • Every run stopped. The Lens is unreadable: a wait, never a pass and never a failure.

  • A suite not yet concluded. A failing check there is a wait ("concluding"), even beside another run that passed. A queued item reads it as a failure and leaves the queue, so the queue never reads past a failure.

  • What still sticks. A completed failure in a run that did not stop still fails the Lens. Every check of a run that did not stop is still read, so decision 0104's defence against a duplicate job stands.

  • Absent fields. A check lacking run_id or suite_conclusion, or whose run is null, reads as before: it is never passed over and never passes another over. This is ruling (B): the fields are optional in facts/1.

  • Unreadable inputs. Either field in any form but its own, a suite word GitHub does not give, or one run given two suite conclusions anywhere on the head (under another Lens's check too) leaves the Lens unreadable.

The port that writes both fields merged as #768 (step 2). The trial fixture trials/P-65.json merged as #744 (step 1).

Record 0203, numbered by the Factory Builder, amends 0026's row "Every check a Lens's own App and workflow file report under its name is read, never the last alone". Design §4 and its §5 table say the same.

What remains is named in the record:

  • The Kernel cannot tell a run stopped before it judged from one that judged and was then stopped. So someone with actions: write could cancel a failing run and re-trigger it.
  • A real hang that times out can be cleared by a flaky pass in a run that a close and reopen starts.
  • A suite that GitHub concludes cancelled, with one job failed for real and another timed out, would pass the real failure over. P-65 did not try this.
  • A concurrency group's cancel was not tried.
  • The merge group runs verify again regardless.

Held by

  • The boundary test: tests/test_decide.py::Content::test_a_cancelled_runs_checks_are_superseded_by_another_run_of_the_lens_on_the_head. It is written to the four Kernel-side rulings: (a) a stopped run is passed over beside a run that did not stop, and every run stopped is unreadable; (b) a timeout is read as a cancel; (c) a failing check in an unconcluded suite is a wait; (B) a check missing either field reads as before.
  • Mutants: the 22 that the record's first boundary row names. Four older lens_reading mutants are re-anchored to its new lines.
  • Desk run: 439/439 mutants of kernel/derive.py and kernel/terms.py are killed, and none is stale.
  • Size: 213 insertions and 10 deletions, about 37k diff characters.

make checks is red on one check alone: record 0203 opens a gap until 0200–0202 (#779, #770, #769) merge. After that I merge main into this branch and push, and the Factory reviews that head.

Second readers

Carbon (Gemini 4 Carbon), Muse, Astra and a Claude plus security review all read step 3 before its rebase onto main. Their findings were fixed in two commits, 1e17ead0 and 4feb7689:

  • a queued item never reads past a failure whose suite has not concluded;
  • a suite word GitHub does not give, or a run given two suites, is unreadable, and a run's suites are read across Lenses;
  • each field is read in its own form first;
  • only a failing check waits for its suite;
  • every run stopped never passes;
  • the suite words are pinned in the test.

The rebases since have changed no content, and record 0203 only renumbers the record.

🤖 Generated with Claude Code