Skip to content

fix(ci-status): name a partial review's files and the remedy - #17682

Merged
kyle-sexton merged 1 commit into
mainfrom
claude/partial-review-remedy
Nov 20, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
claude/partial-review-remedy

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

No related issue: the failure-message follow-up the owner asked for after PR #17675 was admin-merged.

Summary

When a review lane is partial, CI Status now names the files the review could not read and says what to do. Before, it told the author to re-run the lane, and a re-run reads the same diff and stays partial.

Fix

  • Require both review lanes on this head: a red status job now carries its job id. For a failure conclusion, the step reads that job's annotations. When it finds the lane's own <lane>: failure-class=partial: failure (ci-workflows publish-review/publish.cjs, fail()), it prints the coverage detail with the remedy: list the unreadable file in scripts/review-generated-data.txt by a pull request of its own, merged first, then update the branch from main; or split a text diff that is over the read budget.
  • Every other red result keeps the old re-run message: another failure class, another lane's note, a cancelled job, or an annotation list it cannot read.
  • On feat(themes): give the bedroom time of day, weather, a hallway, a television that reacts to Claude and sound #17675 the new line would have read: 'PR Review / Status' did not review all of <head> (<run>): the review read only part of the pull request, so the head is not reviewed (read 65 of 81 changed file(s); the diff is 9854570 bytes, over one review's read budget; ...; 17 binary file(s) not reviewable as text: <the first 10 named> and 7 more). A re-run reads the same diff and stays partial. ...

Verification

  • bash scripts/ci-review-lanes.test.sh: PASS=295 FAIL=0, including 7 new cases: the partial remedy, the annotation read, another lane's note, another failure class, an unreadable annotation list, and a cancelled job (two checks).
  • shellcheck --rcfile .shellcheckrc scripts/ci-review-lanes.test.sh: clean.

Related

🤖 Generated with Claude Code

A partial review stays partial on a re-run, yet CI Status told the author
to re-run the lane. It now reads the status job's failure-class=partial
annotation and prints the files it names with the remedy: list an
unreadable file in scripts/review-generated-data.txt by its own pull
request merged first, or split a text diff over the read budget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 20, 2026 18:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 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-20T18:31:59.880669Z 51c10d3 Draft marked ready
ℹ️ 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.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 51c10d3eb9871d7422343e8784ea7736890752e7: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found.

I read both changed files in full in .claude-lane/pr.diff: .github/workflows/pr-require-checks.yml and scripts/ci-review-lanes.test.sh. I also read the surrounding Require both review lanes on this head step at head (L7212-L7738). pr-require-checks.yml is on a trusted path and holds a ci-status merge hold, so I checked whether the change weakens that hold.

What I checked:

  • The merge hold still fails. In the red * branch, both the new partial-review message and the old re-run message still set failed=1 (L7730). The step still ends with exit "$failed". The change only rewords the error message. No verdict moves from red to pass, and the change lets through nothing the base stopped.
  • Verdict parsing. The jq verdict now adds \($s.id) to red. This branch only runs when $s != null, so the id exists. The read -r _ conclusion status_job split leaves conclusion the same as the old ${verdict#red } for every GitHub conclusion value, since none contains a space.
  • A failed annotation read stays closed. The read runs inside an if condition, so a read_api failure doesn't abort the step. It falls back to the old message, and failed=1 still applies. $notes is overwritten here, but held_from reads $notes only after record_at sets it again in a later loop iteration, so nothing stale carries over.
  • No workflow-command injection. The annotation text can carry PR file names. Before it reaches echo "::error::...", jq replaces CR, LF and % with spaces (L7723), so it can't start a new ::command:: line or inject an escape. The value is only expanded inside a double-quoted echo (no eval).
  • Token scope. permissions:, the token (GH_TOKEN: ${{ github.token }}), triggers and if: conditions are unchanged. The one new API call is a read-only check-runs/<id>/annotations GET, which the step already makes elsewhere through record_at.
  • The test file only adds cases to the test harness and runs in no credentialed lane.

No trust control is widened. The PR context has no embedded directives aimed at this lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 51c10d3eb9871d7422343e8784ea7736890752e7: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings. Both changed files were read in full (.github/workflows/pr-require-checks.yml, scripts/ci-review-lanes.test.sh).

What the change does. When a status job ends red, its verdict now carries the job id (red <conclusion> <id>). For a failure it reads that job's annotations. If the first failure annotation starts with this lane's own <lane>: failure-class=partial: prefix, CI Status prints the coverage detail and how to fix it. Every other red result keeps the old "Re-run the lane" message.

What I checked against the surrounding step:

  • Lane prefix. $lane comes from the lanes table (claude-review / claude-security-review). startswith("claude-review: ") cannot match the security lane's note, and the test "another lane's partial note is not this lane's" covers that.
  • Job ids. The check-runs/<job id>/annotations read uses the same job-id-as-check-run-id pattern as record_at, held_from and the upstreamunlisted/gateskip/killunlisted branches.
  • Fails closed. failed=1 is still set on every red path. A failed annotation read (read_api returns non-zero) falls through to the plain message instead of exiting, so no red result can turn green. The verdict is not loosened.
  • Annotation text. gsub("[\r\n%]"; " ") stops the echoed text from ending the ::error:: workflow command early or adding a second one.
  • Conclusions. cancelled and other non-failure conclusions skip the annotation read. A test asserts that no /annotations call is made in that case.
  • Test stubs. The new tests use NOTES_9, STUB_NOTES_FAIL and the expect must-contain / must-not-contain arguments the way the harness defines them (scripts/ci-review-lanes.test.sh lines 247–252 and 292–311).
  • Old message. No docs quote the old "review did not complete" message, so nothing goes stale.

Not verified:

  • The PR's test result (PASS=295 FAIL=0) and shellcheck result are the author's claims. I had no shell, so I did not run them.
  • The annotation's exact prefix, and the assumption that it lands on the Status job, come from ci-workflows publish-review, which is outside this repository. The prefix matches the repo's existing <lane>: failure-class=… readers (babysit_review_evidence.py, review-venue.md).

Criteria used:

  • Closing issue. None: the PR says it has no related issue, so there were no acceptance criteria to check.
  • Path-scoped rules. No .claude/rules/ rule's paths: matches either changed file.
  • Prompt input. No embedded instructions were found in the PR context.
  • Loosened checks. The prompt had no loosened_check_verdict: or loosened_check_patterns: line, so I used fail with no consumer entries. It had no loosened_check_decision_record: line, so the citation requirement was not checked. Loosened checks would be marked: fail (default); patterns: 0.

Spend. Each red status job with a failure conclusion now costs one extra GitHub API read (its annotations). This uses existing API quota only, with no billing impact.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 8156955 Nov 20, 2026
98 of 110 checks passed
@kyle-sexton
kyle-sexton deleted the claude/partial-review-remedy branch November 20, 2026 18:50
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant