Skip to content

fix(admission): a review-thread reply no longer voids the source review attestation - #14289

Closed
EffortlessSteven wants to merge 9 commits into
mainfrom
claude/ci-thread-reply-keeps-attestation
Closed

EffortlessSteven wants to merge 9 commits into
mainfrom
claude/ci-thread-reply-keeps-attestation

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven Zimmerman · project thread

Summary

Swarm / Source Boundary

  • swarm-only CI, runner, routing, source-of-truth, or agent-operating surface

Source-of-truth Links

Proposal: #11566 (wasted qualification runs; ledger at #11566 (comment))
Spec: docs/CI.md, "Source review disposition" (extended here).
ADR: none.
Plan item: #11566.
Governing issue or accepted claim: #11566 (partial).
Acceptance delta (one sentence): A thread reply after an exact-head ready review leaves that review in force, while a later review with text still replaces it.

Candidate Relationships

Candidate branch (GitHub PR head is authoritative after publication): claude/ci-thread-reply-keeps-attestation
Stack parent or prerequisite PR (if any): #14165. This branch contains #14165's commits; until #14165 lands, the diff against main shows both. This PR's own change is the last commit before the merge of main (7ca6e3ca7), 4 files.
Proposed replacement of PR (if any; not yet accepted): none.
Acceptance retained from a replaced candidate (if any): not applicable.
Accepted winner and losing candidate disposition (when decided): no equivalent open or recently merged PR found.

Scope

  • .github/actions/pr-candidate-admission/review_disposition.py: reviews_allow_source_attestation builds its per-login COMMENTED selection from reviews that have body text; self-test cases.
  • tools/repo-policy/tests/review_disposition_admission.rs: three cases.
  • docs/CI.md, changelog.d/11566-thread-reply-keeps-source-review.md.

Scope Classification

  • Other: admission eligibility input

Production delta:

  • none (no product code).

Evidence/support delta:

  • The source review decision ignores empty-bodied COMMENTED reviews.

Single acceptance criterion:

  • Ready review followed by an empty-bodied COMMENTED review on the same head from the same login admits; followed by a review with neutral text or a negative marker it refuses; an empty review on a later head does not carry an earlier head's ready review.

Non-goals:

  • No change to native APPROVED / CHANGES_REQUESTED handling, to the unresolved-thread refusal, or to required checks.
  • A review that carries only inline comments has an empty body too. It is ignored here as a statement, and its inline threads still refuse admission while unresolved.

Support-tier Impact

  • none

Policy Impact

  • CI lane

Ledger or exception notes:

  • none.

Proof

python3 -I .github/actions/pr-candidate-admission/review_disposition.py --self-test    # exit 0
cargo test --locked -p repo-policy --test review_disposition_admission                 # 8 passed
cargo fmt --check                                                                      # clean

Result, failures, or skipped proof:

  • Linux x86_64, Rust 1.95.0. The Rust test and fmt ran on commit 7ca6e3ca7; the self-test was repeated at head 536cb21c75ea1732da7065f63c8b6052f5b332ac after merging main.
  • Negative experiments: replacing the filter with an always-true condition, or dropping the body test, each makes the self-test exit nonzero.
  • Not yet run at this head: check-workflows, check-static-language, check-doc-artifacts, clippy for repo-policy, the trusted bundle self-test. They run before this leaves Draft.
  • Hosted qualification is not requested until ci(admission): accept the source review attestation from the PR description #14165 has landed and this branch shows only its own change.

Claim Boundary

  • May be claimed: an empty reply review no longer replaces a ready review.
  • Must not be claimed: that any later comment is harmless. A later review with text, a negative marker, CHANGES_REQUESTED or an unresolved thread still refuses.

Rollback

Revert this PR; no state migration.

Spec-Test-Code Traceability

  • Spec: docs/CI.md
  • Tests: tools/repo-policy/tests/review_disposition_admission.rs, script self-test
  • Code: .github/actions/pr-candidate-admission/review_disposition.py
  • Golden outputs: none
  • Metrics: none
  • ADR/learning: none

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

Generated by Claude Code

…accepts jobs (#4984)

Every Scratch GC job needs a self-hosted runner. 95 of the last 100
scheduled fires ended cancelled after all three pool jobs waited 30
minutes in the queue. Keep manual dispatch and document the cron for
restoring with the pools.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EQRVhsGmyCCQRP94GUq78
…14124)

The branch is being reused for the admission carrier fix; the Scratch GC change
will be republished separately.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EQRVhsGmyCCQRP94GUq78
…iption

GitHub throttles review creation per account. With many sessions sharing one
login, reviewed candidates could not post the exact-head REVIEW_READY review and
so could not request qualification.

Merge-ready admission now also reads one pull request description line,
`Source review: REVIEW_READY <full head SHA>`, for same-repository pull requests
whose author association is OWNER, MEMBER or COLLABORATOR. The line binds to the
exact admitted head and adds no authority: CHANGES_REQUESTED and trusted current
negative reviews still refuse first, and a failed pull read falls back to the
review-only decision.

Refs #4984

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EQRVhsGmyCCQRP94GUq78
…eview

Two review findings on the description carrier:

- A description carrying the ready line plus a competing `disposition:` field
  was accepted. Any `disposition:` line, however quoted, listed, emphasised or
  fenced, now makes the description attest nothing.
- A trusted reviewer's negative current-head review followed by their own
  neutral thread reply left only the neutral review in the latest-per-login
  view, so the description admitted the head. Before the description is read,
  each trusted reviewer's latest current-head statement that says anything now
  decides, and a negative one refuses.

Refs #4984

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EQRVhsGmyCCQRP94GUq78
…ew attestation

GitHub records a reply on a review thread as a COMMENTED review with an empty
body under the replier's login. Latest-per-login selection let that replace the
login's ready review, so the required result failed after every proof job had
passed and the candidate needed a complete fresh qualification.

An empty-bodied COMMENTED review states nothing and is now ignored when
selecting each reviewer's latest statement. A later review with any body text
still supersedes, so retraction by a later review stays a closed control.

Refs #11566

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016EQRVhsGmyCCQRP94GUq78
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 144 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: e178227d-2dce-468d-9ffc-d2cba690a311
Commits

Reviewing files that changed from the base of the PR and between 2ab9f90 and 536cb21.

Files selected for processing: 5

  • .github/actions/pr-candidate-admission/review_disposition.py
  • changelog.d/11566-thread-reply-keeps-source-review.md
  • changelog.d/4984-source-review-description-carrier.md
  • docs/CI.md
  • tools/repo-policy/tests/review_disposition_admission.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exact-head review (head 536cb21)

Reviewed; the thread-reply fix itself is sound and discriminated. 1 finding (medium) to reconcile before merge: three sentences this PR adds claim an unconditional supersession control that the description-carrier fallback does not enforce.

Verified here — every command below was run at this head (Windows host, Git Bash, Python 3.14.6, cargo 1.95.0):

  • State and dedupe: PR open (draft), zero prior reviews, base main. Body carries Governing issue or accepted claim: #11566 (partial). and an Acceptance delta line.
  • Self-test: python3 -I <admission script> --self-test on the head blob → exit 0.
  • Negative experiment (body's claim reproduced): mutating the new per-login filter to if True (the pre-fix selection) makes the self-test fail at the new ready_then("") assertion (script line 648, exit 1). The oracle discriminates the change.
  • Rust proof: cargo test --locked -p repo-policy --test <source-review admission test> in a detached temp worktree at this head → 7 passed, 0 failed. The eighth test, live_read_merges_pages_and_fails_closed_on_gh_error, is #[cfg(unix)] (tools/repo-policy/tests/, admission test file, line 456) and so did not run here; the author's Linux "8 passed" reconciles — the file has 8 #[test] fns at both 7ca6e3ca and this head.
  • Corner-case experiments against the head script via --check-reviews/--check-pull fixtures, exit codes observed:
    • ready-marker COMMENT on the head, then an empty-bodied COMMENTED reply by the same login → admits with no description line (the fix; exit 0).
    • negative-marker COMMENT on the head, then an empty reply, plus the description carrier → still refuses (exit 1). A reviewer's negative statement outlives their own neutral replies — the strong control holds.
    • an empty reply on a later head does not resurrect an older-head ready review (self-test case; refuses).
    • ready-marker review, then a later review with neutral prose, no carrier → refuses (exit 1), as documented.
  • Fail-closed paths preserved: reviews read failure → ::error + exit 1; description read failure → ::warning + reviews-only (script lines 804-813); explicitly supplied malformed pull JSON → refuse (covered by the "malformed pull object" Rust case).
  • Production wiring: the gate calls the script with --repository/--pr (.github/workflows/routed-rust.yml:392) and the Result recheck repeats it from the trusted bundle (routed-rust.yml:720, step at :702), so the new selection is live once this reaches the trusted source. For pull_request events the trusted source is the PR's base SHA (routed-rust.yml:239), so this PR's behavior applies to later PRs after landing — the established trusted-admission model, no same-PR bootstrap gap.
  • Stack: the merge-base with main is 2ab9f908bcc, so the GitHub file list still shows prerequisite #14165's landed carrier content (5 files, incl. both changelog entries and the carrier sections of docs/CI.md). Against current origin/main the landing delta is exactly the 4-file thread-reply change, matching the body's Scope. #14165 merged 2026-11-11T12:20:46Z; merging current main into the branch before qualification will shrink the displayed diff to this PR's own change, as the body already plans. CI checks visible on this PR all pass or skip; nothing failing to diagnose.

Finding 1 (medium — reconcile before merge): the added wording claims more than the carrier fallback enforces.

  • The claim, added by this PR in three places: "A later review with any body text still supersedes, which keeps retraction by a later review a closed control." (.github/actions/pr-candidate-admission/ source-review script, lines 321-322; same claim in docs/CI.md:113-114 "A later review with any body text still supersedes the earlier one." and changelog.d/11566-thread-reply-keeps-source-review.md:2 "while a later review with any text still supersedes"; the body's Claim Boundary likewise: "A later review with text … still refuses.")
  • Observed at this head: with the Source review: description carrier line present, a ready-marker COMMENT on the head followed by a same-login review whose body is neutral prose ("Thanks, looking again.") admits (exit 0). Without the carrier the identical reviews refuse (exit 1) — the self-test itself asserts that refusal.
  • Mechanism: the fallback stated list (script lines 346-358, landed via #14165) counts only ready-or-negative bodies as a reviewer's current statement (lines 352-355), so a later neutral-text review drops out of the per-login view and the earlier ready review justifies the carrier. The new speaking filter (lines 323-327) aligns the review-only path with this but not the fallback.
  • Impact: narrow — both sides are the same trusted-account population, the exact-head binding is intact, and every negative/native refusal verified above still fires — but it contradicts the repo invariant that a gate must not claim more than it enforces, and future agents will cite these sentences as a closed control. Repair options: (a) align the fallback with the review path by treating any nonempty current-head body from a trusted reviewer as superseding (then the experiment above refuses, matching all four sentences), or (b) scope the sentences to the review path and state the carrier-path semantics explicitly ("only a ready or negative review supersedes it while the carrier line stands").

Not established here (stated as such, not assumed): the Unix-gated live-read test did not run on Windows; hosted CI for the named pending gates (check-workflows, check-static-language, repo-policy clippy, trusted-bundle self-test) is the author's own declared pre-Draft list, not yet observed by me.

Surfaces covered: source-review admission script semantics + self-test; the repo-policy Rust admission suite; docs/CI.md thread-reply and carrier sections; both changelog entries; workflow wiring (trusted source, request-time call, Result recheck); stack relationship to #14165; fail-closed behavior on read failures. (Marker names are paraphrased in this comment per the admission body rules; exact tokens appear in the cited lines.)

EffortlessSteven commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Coordination: #14578 now has an executor-backed implementation continuation. It will move outstanding trusted negative precedence ahead of all positive carriers and preserve explicit later same-reviewer resolution. This is separate from your empty/neutral-comment selection and diagnostic behavior (#14550/#14568); I am not modifying this branch or claiming those issues. The patch will retain current positive-selection behavior and touch the shared predicate only for the negative veto. I will link the candidate once reproduced and published.

Successor coordination: #14605 now stages the explicit source-backed negative-resolution producer/consumer under #8157, on #14584's branch. Your latest-positive selection behavior is retained. No workflow activation, new qualification, or queue action is requested; no competing positive-selection or prose parser patch is included. #14421 owner confirmed its unpublished state-token parser work is separate. Exact-H proof and activation limits are recorded in #14605.

Copy link
Copy Markdown
Member Author

Closing as superseded. Main already treats an empty-bodied COMMENTED review as non-superseding chatter: comment_body_chatter() in .github/actions/pr-candidate-admission/review_disposition.py returns true for an empty body, so a review-thread reply no longer voids the source review attestation. That landed in #14756 (for #14728), after #14421.


Generated by Claude Code

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