Skip to content

The texts port reads what a Lens said on each of its own review threads, and never an edited comment (#856) - #884

Merged
don-petry merged 5 commits into
mainfrom
adapters/a-lenss-own-thread-texts-856
Nov 16, 2026
Merged

don-petry merged 5 commits into
mainfrom
adapters/a-lenss-own-thread-texts-856

Conversation

@don-petry

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

Copy link
Copy Markdown
Contributor

Part of #856: step 1 of the three the Factory Builder ruled on 2026-11-14, the Maintainer's choice "Full fix, keep auto-release".

What is wrong

"A re-review is given none of its Lens's open Findings, so a thread closes on the silence of one more review" (#856). A review is handed no Finding its Lens raised before, so a later review that says nothing of one has not ruled on it. Since "A push past a Lens's review asks it again while its thread gates, and a thread its later review dropped is the Kernel's to resolve (#833, record 0212)" (#859), live on factory/v0.1.13, that silence releases the thread.

The fix has three steps. This is the first: the read. Nothing changes at run time until the second.

What this changes

  • adapters/texts.py gains findings. It reads what a Lens said on each review thread a caller asks for, by the thread's id, as {id, by, body} with the id thread: and the thread's id: a text as an issue's body is, which a Task carries under its writer's trust. It is never a fact, a decision or a code.
  • What it holds each text to. A review thread, the one asked for, of this pull request in this repo; its first comment, which replies to none; written by that Lens's own account, by id and type, as adapters/timeline.Accounts tells it; never edited; and a body that is text.
  • An edited comment is refused. GitHub's author is who made a comment, not who wrote the words it holds now, and anyone with write access can edit one (the design's 3.3). So a first comment with a lastEditedAt, the Lens's own edit included, raises.
  • A field GitHub does not give proves nothing. That a comment replies to none, and that it was never edited, are each read from an explicit null.
  • What cannot be read whole raises Unanswered, so that no Task lists a Finding it does not show. A list that is no list, names a thread twice, holds an id of no thread's form or is longer than 50 raises before anything is asked of GitHub.
  • No caller asks yet. Which threads to ask for is the caller's, from the facts.

What it does not do

  • Step 2, by hand: harness/read.py hands a re-review its Lens's open Findings, harness/apply.py refuses a Result with no disposition on a Finding it was shown, and the reviewer's instructions ask for one. harness/ is a model Lens's input, so that pull request is the Maintainer's to approve.
  • Step 3, after the cut that follows step 2: a thread closes on a later review's accepted ruling alone, with the record that takes the place of 0212's row on a dropped thread. Until then release on silence stays as it is.
  • No trial has recorded this read. The query follows the threads port's (P-41, P-5, P-49), and P-58 records lastEditedAt for a description, not for a review comment. I asked GitHub the query word for word, once, as the Maintainer's login, for the reviewer's thread on "Trial P-66, a queued pull request: once the base it waits on moves into conflict with it, the queue takes it out unmerged (Trial: what does the merge queue answer to an enqueue of a head that conflicts with its base? #812)" (Trial P-66, a queued pull request: once the base it waits on moves into conflict with it, the queue takes it out unmerged (#812) #847): it answered a PullRequestReviewThread with its pull request, replyTo null, lastEditedAt null and the author a Bot with its id. An edited review comment's answer I have not seen. The test states the query word for word, so a change to it is a change to a test.
  • A deleted first comment. GitHub then gives the thread's next comment as its first (P-49, P-53), so a Lens's own reply would be read as what it first said. No Factory write replies on a thread today. The module says so; step 2's caller must not rely on more.
  • Length. The port bounds how many threads it reads, not how long each is. What a Task keeps is harness/task.py's: a Lens's text ranks before an issue's there, and a text over the room left is left out whole. Step 2 must count a Finding as shown only where its text was kept.

Checked at this desk

At 9b796a12: tests.test_adapters, 184 tests; make checks, every check ok; the change's 22 mutants, all killed, and no mutant stale of 7,611; gitleaks, no leaks. 314 lines and 27,956 characters as the Kernel counts them, under the 60,000 of the review budget. CI verifies.

Reviews

Astra (max): 3 findings, 3 taken. Kimi (max): 1 finding, 1 taken. Carbon: 4 findings, 4 taken. Claude security: 5 findings, 5 taken. Muse: not run (quota), owed. Each read 0b2e8c32; none has read the fixes at 9b796a12.

Reader Severity Finding Taken
Claude security major A first comment is handed as the Lens's own words by its author alone, though another account may have edited it Yes: lastEditedAt is asked for and an edited comment raises, with two mutants
Astra major A missing replyTo is accepted as proof of an opening comment Yes: read from an explicit null, with a mutant
Astra, Claude security major, minor The query is its own test oracle: one that asks less still passes Yes: the test states the query word for word, with two mutants
Astra, Kimi, Carbon, Claude security major, minor No test holds the status guard: the failed read's body was empty Yes: a 502 with a whole body, and a mutant; one for a body that is no object too
Carbon major data or repository that is a string raises AttributeError, not Unanswered Yes: each is read as an object or as nothing, with cases
Carbon major The guard on a list that is no list, the id's length and a comment that is no object survive mutation Yes: cases for a string with no letter twice, a tuple, 100 and 101 characters and a null comment, with two mutants
Carbon info adapters/AGENTS.md no longer names texts.py Yes: one sentence; the file is at its 40 lines
Claude security info A thread whose Finding's comment was deleted hands the Lens's reply as the Finding Said in the module and above; nothing reaches it today
Claude security info The port bounds the threads' number, not their length, and a thread's text ranks before the issue's in a Task Said in the module and above; it is step 2's to hold

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

don-petry and others added 2 commits November 14, 2026 08:45
…ds asked for (#856)

A later review can rule on a Finding only if it is shown what its Lens said.
adapters/texts.py gains findings: the first comment of each review thread asked
for, read by the thread's id and held to this pull request and to that Lens's
own account. What is not that, or cannot be read whole, raises. No caller asks
yet: handing a re-review its open Findings is the Harness's, in a hand PR.

Co-Authored-By: Claude <noreply@anthropic.com>
… has its test (#856)

GitHub's author is who made a comment, not who wrote what it holds now: a first
comment that was edited, or that GitHub does not say never was, is refused. A
field not given proves nothing, so a reply and an edit are each read by an
explicit null. An answer that is not what GraphQL gives raises Unanswered, never
an AttributeError. The test states the query word for word, and holds the status
guard, the list guard and the id's length. From the readers' findings.

Co-Authored-By: Claude <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 14, 2026 15:00
@coderabbitai

coderabbitai Bot commented Nov 14, 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 14, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #5c991 Incremental review completed 0e5174c Nov 16, 2026 · 00:35 00:35
✅  #66e16 Incremental review completed 5d439ed Nov 14, 2026 · 21:10 21:10
✅  #021fc Incremental review completed 4b22012 Nov 14, 2026 · 17:43 17:43
✅  #77b8a Reviewed your PR 9b796a1 Nov 14, 2026 · 15:00 15:05

@codeant-ai

codeant-ai Bot commented Nov 14, 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 14, 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-16T00:37:50.203714Z 0e5174c 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 introduces the ability to retrieve a Lens's comments on its own review threads by adding the findings function in adapters/texts.py along with a GraphQL query, and includes comprehensive unit tests in tests/test_adapters.py. The review feedback recommends several readability improvements in findings, such as renaming the threads parameter to avoid shadowing the imported module, simplifying the duplicate check, and replacing non-idiomatic .get(..., 0) is not None checks with explicit membership and nullness checks.

Comment thread adapters/texts.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 4 files

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

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

Comment thread adapters/texts.py Resolved
@codeant-ai

codeant-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 0e5174c34490

donpetry-bot
donpetry-bot previously approved these changes Nov 14, 2026
…est's (#856)

GitHub's answer is held to a whole number before it is compared: Python reads
26.0 and true as equal to a number. From cubic's read.

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

@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.

One rule that has stopped waiting names no test.

Comment thread adapters/AGENTS.md Resolved
…bove gives a line for it (#856)

The rule stopped waiting when texts.py left the not-built list, and no row named
its tests. The four prose lines are three, so the file stays at its 40. From the
Factory reviewer's Finding.

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

@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 findings.

…keeps three lines (#856)

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

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Resolving the reviewer's thread PRRT_kwDOVFBqVc63hWb2 (on adapters/AGENTS.md, "One rule that has stopped waiting names no test") by hand, as the Maintainer's account, under decision 0212's hand rule. The Factory's check on the current head 0e5174c3 reads adjudicating: resolve_due, act resolve_thread, evidence PRRT_kwDOVFBqVc63hWb2, pass p_3DNMKPEG21MFRVCVHJBM (release factory/v0.1.13). The Finding is no security Finding: it asked for a row in the Rule | Held by table, which 5d439ed0 added and the reviewer's later review of that head no longer records. The head since then only merges main in (the issues port's prose), keeping the row.

🤖 Generated with Claude Code

@don-petry
don-petry added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 869e147 Nov 16, 2026
33 checks passed
@don-petry
don-petry deleted the adapters/a-lenss-own-thread-texts-856 branch November 16, 2026 03:58
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