Repository navigation
fix(pr-review): raise findings to the summary's manifest flag lines - #848
Conversation
The verify step in both review lanes counts the summary's `manifest <field>: flag` lines (bulleted or backticked included) and raises the findings count to that number when the model reported fewer, logging one line when it does. The completion notice and the inline-comment check read the raised count, so a model under-count cannot pass the downstream merge hold. Refs #847 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 2m 23s —— View job Code review
Scope: Summary: The fix adds an identical I don't have tool approval to execute PR body contract: opens with Closing issue: no No findings to report — the change is small, self-contained, and the added tests directly cover the new behavior. claude-lane-summary: lane=claude-review sha=1704de4dc1a78da756f12ad5d13ad0fd27fd0a2f run=39669590014 |
|
Claude finished @kyle-sexton's task in 1m 54s —— View job Security review complete
No security issues found. This PR adds a floor to the self-reported const flags = summary.match(/^[ \t]*(?:[-*+][ \t]+)?`?manifest \S+: flag/gmu)?.length ?? 0;
if (findings < flags) {
core.info(`${lane}: raised the findings count from ${findings} to ${flags}, the summary's manifest flag lines.`);
findings = flags;
}Reviewed for an exploitable path, specifically:
Scope was limited to the 4 changed files per the lane's criteria (GitHub Actions hardening concerns like trigger/permission/pin changes are zizmor's lane, not this one, and none of that applies here regardless). claude-lane-summary: lane=claude-security-review sha=1704de4dc1a78da756f12ad5d13ad0fd27fd0a2f run=39669590014 |
|
claude-security-review has reviewed this pull request through 1704de4; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 1704de4; a later push is reviewed from there. |
…838) Refs: melodic-software/claude-code-plugins#8938 ## Summary Registers ci-workflows [v0.59.1](https://github.com/melodic-software/ci-workflows/releases/tag/v0.59.1) (`8bd4d7f963a06627dd2d551ffcd8d9db5e6b881b`) contracts for `pr-review.yml` and `pr-review-security.yml`, so [claude-code-plugins#8938](melodic-software/claude-code-plugins#8938) can repin both review lanes from v0.55.0 (`3a2c748`) to v0.59.1. **Review: the GitHub Security & Cost session reviews this PR.** The gate cannot auto-approve these entries, so the copies rest on the review below. The README rollout line says "sign-off pending"; replace it with "signed off by hand on <date>" at sign-off. ## Fix - `components/runner-policy/policy.json`: verbatim copies of the v0.55.0 (`3a2c748`) entries at `8bd4d7f9`, for `pr-review` and `pr-review-security`. No input, secret mapping, caller permission or routing is added or widened. The policy entries do not record a credential-reference shape; the gate computes `credentialReferences` from the workflow, so no field changes there. - `components/runner-policy/README.md`: the v0.59.1 rollout line, sign-off pending. - `components/runner-policy/runner-policy.test.mjs`: a test that both v0.59.1 entries equal their v0.55.0 entries and are the only two keys at that SHA. ### Review basis Git blob SHAs (`git rev-parse <sha>:.github/workflows/<file>`): | File | `3a2c748` (v0.55.0) | `8bd4d7f9` (v0.59.1) | |---|---|---| | `pr-review.yml` | `c67ec82b` | `4f3d4e44` | | `pr-review-security.yml` | `1737f82d` | `30b595b9` | `git log 3a2c748f..8bd4d7f9` on the two files lists two commits. The full diff of each file has three hunks and none touches `on.workflow_call`, permissions or `runs-on`: 1. **Credential-bearing steps:** the review step and its fallback step, which receive `CLAUDE_CODE_OAUTH_TOKEN`, move `anthropics/claude-code-action` from `f27be6b65a4652f08a2ba3cff79114829b588967` (v1.0.252) to `5eb090f3c3afd701a0672cd32981197ca27688f6` (v1.0.253) ([ci-workflows#838](melodic-software/ci-workflows#838)). This is the `credentialReferences` diff the gate declines to auto-approve. 2. **Findings count:** the result step raises the review's findings count to the number of `manifest <field>: flag` lines in its summary when the count is lower ([ci-workflows#848](melodic-software/ci-workflows#848)). Model-free script logic, no credential. ## Verification - `npm run test:runner-policy`: 326 pass, 0 fail, including `✔ both review contracts at the v0.59.1 tag copy their v0.55.0 entries forward verbatim`. - `npm run lint:runner-policy`: `Runner policy passed.` - In the claude-code-plugins#8938 worktree (head `5fd71552`), `node .github/standards/runner-policy/runner-policy.mjs --root .`: - with its vendored policy (identical to standards `main`): two `runner-target-contract` failures, "auto-approval declined: credentialReferences changed since the previously reviewed melodic-software/ci-workflows@3a2c748f..." and the same for `pr-review-security.yml`; - with this branch's `policy.json` copied in: `Runner policy passed.` (file restored afterwards). - lefthook pre-commit (typos, editorconfig, markdownlint, gitleaks, biome): clean. ## Related - [claude-code-plugins#8938](melodic-software/claude-code-plugins#8938) passes its runner-policy gate once this merges and syncs. - [ci-workflows#838](melodic-software/ci-workflows#838): the claude-code-action bump. - [ci-workflows#848](melodic-software/ci-workflows#848): the findings-count fix (the v0.59.1 release commit). - Precedent: #832, #829, #828. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Closes #847
Summary
The review lanes' verify step trusted the model's self-reported
findingscount. claude-code-plugins#8909 has both lanes write onemanifest <field>: flag, <reason>line per flagged manifest item and counts every flag as a finding, but nothing checked the count against those lines, so an under-count would let a flagged manifest change through the downstream merge hold.Fix
In the shared "Verify the review completed" script (identical in
pr-review.ymlandpr-review-security.yml), after the summary is parsed and HTML comments stripped, count the summary lines matching^[ \t]*(?:[-*+][ \t]+)??manifest \S+: flagand setfindings = max(findings, flags), logging one line when the count is raised. The raise happens before the inline-comment check, thefindingsoutput and theclaude-lane-review-complete … findings=N` notice, so every reader sees the raised count.The pattern is the issue's
^manifest \S+: flagwidened to allow leading whitespace, a list marker and an opening backtick, since the summary is Markdown and #8909's skill text does not require column 0. A wider match can only raise the count, never lower it.Raising rather than failing keeps the notice format unchanged, so the downstream hold (
babysit_review_evidence.py) needs no edit. README's completion-record section states the floor.Verification
.github/scripts/claude-lane-review-complete.test.cjs: for each lane, a summary with four flag lines (two bare, one bulleted, one backticked), a pass line and a mid-line flag phrase, withfindings: 0, yieldsfindings=4and the log line;findings: 5with one flag line stays5. The two raise tests fail without the workflow change; the keep-at-5 test guards against replacing the count and cannot fail on the old code, since nothing lowered a count before.node --test .github/scripts/*.test.cjs: 556 before, 559 after, all pass.report-lane-outcomeandrun-claude-clitests: 123 pass.Related
**/.claude-plugin/**from pr-merge's HIGH floor (feat(source-control): exempt test-only changes under floored script paths from pr-merge's path floor claude-code-plugins#8884), once released and pinned downstream.🤖 Generated with Claude Code