Skip to content

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

Merged
don-petry merged 9 commits into
mainfrom
claude/kernel-cancelled-681-main
Nov 13, 2026
Merged

don-petry merged 9 commits into
mainfrom
claude/kernel-cancelled-681-main

Conversation

@don-petry

@don-petry don-petry commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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, 1e17ead and 4feb768:

  • 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

View guided diff Turn on auto-fix

don-petry and others added 7 commits November 12, 2026 00:58
…the Lens that did not stop, every run stopped is unreadable, and a failing check in a suite not concluded is a wait (#681, step 3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…it judged is passed over beside another run of the Lens on the same head, amending 0026 (#681)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uite has not concluded, a suite word GitHub does not give or a run given two suites is unreadable, each field read in its form first, and only a failing check waits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, every run stopped never passes, and the suite words pinned in the test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and four older mutants of lens_reading named for its new lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 12, 2026 16:54
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codeant-ai

codeant-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #c42a4 Incremental review completed df05f5f Nov 13, 2026 · 01:20 01:20
✅  #2e8b0 Reviewed your PR 74f4ff0 Nov 12, 2026 · 16:55 17:02

@codeant-ai

codeant-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T01:30:44.054228Z e6c95cf New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a mechanism to pass over check runs that were stopped (cancelled or timed out) before they judged, provided there is another run of the same Lens on the head that did not stop. It includes updates to the architecture documentation, a new decision record, implementation of the logic in kernel/derive.py, and comprehensive unit tests. Feedback on the implementation suggests optimizing the validation of shared runs in kernel/derive.py from O(M * N) to O(N + M) complexity by grouping suite conclusions in a single pass.

Comment thread kernel/derive.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread kernel/derive.py Resolved
Comment thread tests/test_decide.py Resolved
Comment thread kernel/derive.py Resolved
@codeant-ai

codeant-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟡  Medium Risk

  • The PR needs attention before merging.
  • In kernel/derive.py, malformed suite metadata on checks outside this Lens's app and workflow is dropped from shared-run validation; if it shares a run ID, a stopped failure may be passed over.

Assessed commit: e6c95cfe0a9b

don-petry and others added 2 commits November 12, 2026 19:17
…Lens's own App and file leaves it unreadable, the valid suite words are pinned to an approval, and the design says the Kernel cannot tell when a run stopped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@combsmith-sf-pr-review combsmith-sf-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No gating findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants