Skip to content

Kernel: a Lens review whose applied/1 is past retention on an open pull request is asked for again (#346) - #423

Merged
don-petry merged 9 commits into
mainfrom
kernel/expired-review-asked-again
Oct 30, 2026
Merged

don-petry merged 9 commits into
mainfrom
kernel/expired-review-asked-again

Conversation

@don-petry

@don-petry don-petry commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #346. Record 0096.

A Lens Run's applied/1 past the artifact retention (90 days) can no longer be read. Until now it was read as recording nothing, whole: record 0069's "Retention, the accepted miss". The Kernel now asks that Lens's review again.

What changes

Where What changed
adapters/artifacts.py read takes an optional expired list, which it tells when the artifact is past retention. applied returns the sentinel EXPIRED, whole, so a record gone with time is told apart from one never uploaded. A Run that succeeded and lists none (a deleted record) is still not whole
adapters/applied.py An expired Run is named among those read, expired: True, reviewing nothing that can be held
adapters/facts.py, schemas/facts.schema.json facts/1 gains a required expired_reviews: the run ids of the pull request's Lens Runs whose record is past retention
kernel/derive.py review_expired: a Lens whose Run has an expired record is asked to review the current content again (awaiting_review) until a review of exactly that content by that Lens succeeds after the expired Run. readable_expired: a list the Kernel cannot read is facts_incomplete. A run id that names no Run of the item is run_unreadable
Tests tests/test_decide.py::test_a_lens_review_past_retention_is_asked_for_again covers each side of the rule. The adapter tests cover the expired record and the snapshot
tools/mutants.py 18 mutants added and 3 repointed for this change, each killed
Records 0096 is new. 0069 gains a Boundaries row naming the rule; its Decision text is unchanged
Examples, tests/support.py, sim/world.py Each fact builder and example gains "expired_reviews": []

What answers an expired review, and what does not:

  • It is answered by a review, by the same Lens, of exactly the current content, that succeeded and started after the expired Run. Of two expired Runs, the later is the one to follow.
  • It is not answered by:
    • a review that failed;
    • a review of other content;
    • a review that started earlier;
    • an adjudication;
    • another Lens's review;
    • a review still running, which the item waits on instead.
  • Another Lens's expired Run asks nothing of this Lens.

The limit, and its follow-up

A fresh review does not close the expired Run's own open threads. With no record, their category cannot be joined, so a required Lens's open one is unreadable. The Kernel reads threads before it asks for a review, and an unreadable fact yields a deferral, never an action. So while such a thread is open, the item defers and the review is not asked until a person resolves it.

The re-ask works where the expired Run left no open thread, for example where a thread it recorded was deleted after the window. The rest is #420, "An expired Lens Run's open threads can be closed without a person, by that Lens's ruling carried out by the queue App", through record 0086's resolve act. Its story must also rule how such a thread is read.

Verify

  • make verify on ee92d5d, an export of the branch merged with main, whose records now run to 0095: 1,359 tests OK (9 expected failures).

Gates

  • Claude review with a security pass: request changes; one fix round.

    • Major: the re-ask cannot run while an expired thread is open, because the Kernel defers on the thread first. This is stated in 0096's limit and in An expired Lens Run's open threads can be closed without a person, by that Lens's ruling carried out by the queue App #420, with a test case, not changed: the core rule forbids an action on an unreadable fact.
    • Minor, fixed: an adjudication does not answer an expired review; case and mutant added.
    • Minor, fixed: the later of two expired Runs is the one a review must follow (max, not min); case and mutant added.
    • Minor, fixed: 0096's wording now matches the check: text, with the schema holding each entry to a run id's form.
    • Nit, fixed: EXPIRED is an object, never data a record could hold; the docstrings are updated.
  • Argon (split script, 3 parts): request changes.

    • Major, fixed: a run id naming no Run of the item was ignored. It is now run_unreadable, which also covers an empty id.
    • Minor, fixed: a review still running now has its own case.
    • Already fixed: its max/min finding was fixed in the Claude round.
  • Muse: request changes.

    • Blocker, not taken: the record numbered 0096 leaves a gap after main's 0090. The Factory Builder assigned 0096 to queue after 0095, so the gap closes when 0091 to 0095 land. The verify above renumbers it in its export so that nothing else hides behind the gap.
    • Minor, fixed: a Run of another pull request named as past retention is run_unreadable; case and mutant added.
    • Minor, fixed: a review of another pull request answers nothing of this one's; case and mutant added.
    • It found no correctness or security defect in the flow.
  • Codex, on the merged branch (6efac51):

    • P1, fixed in df57c67: a Run named as past retention that is no Run of the item was read only after a conflict or a Lens's failure had admitted a fix Run. It now defers before both; cases and two mutants added. The four reads above ran before this commit.
  • CI, on the merged branch (df57c67): the mutant "a review whose record is past retention supersedes" survived. Now that an expired record has its own branch, a Run that succeeded has a record, or is expired, or is not whole, so done is not None held nothing. Fixed in ee92d5d: the clause is gone, and the mutant now breaks the expired branch's reviewed.

Not changed here: the contradicts guard, a Lens review that succeeded yet names a fault, also sits after those two branches. Read from the code, not tested.

🤖 Generated with Claude Code

don-petry and others added 5 commits October 29, 2026 20:18
…ll request is asked for again (#346)

An applied/1 past the artifact retention recorded what can no longer be read, so the threads its Run opened
cannot be joined to their Findings. The artifacts reader now tells it from one never uploaded; what the Lenses
recorded names each such Run; the facts hold them as expired_reviews; and the Kernel asks that Lens's review of
the current content again until one succeeds after it. A list it cannot read is facts_incomplete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r again, and the limit left to #420 (#346)

Decision 0069's accepted miss gains a Boundaries row naming the rule; its Decision is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and an object for EXPIRED

A thread the expired Run left open is unreadable, and the Kernel defers on it before it asks for a review, so
the re-ask runs only where no such thread is open: record 0096's limit and issue 420 say so, with a case.
An adjudication answers no expired review, and of two expired Runs the later is the one a review must follow,
each with a case and a mutant. EXPIRED is an object, never data a record could hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…em is unreadable, and a running review answers nothing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner October 30, 2026 02:00
@coderabbitai

coderabbitai Bot commented Oct 30, 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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T21:23:41.408073Z ee92d5d 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.

…this one, each held

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

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6efac514a7

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread kernel/derive.py Resolved
don-petry and others added 2 commits October 30, 2026 15:46
…'s is read before a conflict or a Lens's failure admits a fix Run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le, so `done is not None` holds nothing; the mutant moves to what does

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

Copy link
Copy Markdown

@don-petry
don-petry added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
@don-petry
don-petry added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit a700933 Oct 30, 2026
28 of 30 checks passed
@don-petry
don-petry deleted the kernel/expired-review-asked-again branch October 30, 2026 22:44
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.

Kernel: a Lens review whose applied/1 is past retention on an open pull request is asked for again

1 participant