Repository navigation
ci(review): structured report format and parallel subagents for the reviewers - #141
Conversation
…eviewers Both automated reviewers reported findings as a flat list with no severity, no decision and no confidence score. This gives them the report contract used by the code-review agents in my dotfiles, so a review reads the same regardless of which reviewer produced it. - Decision line (🔴 Blocked | 🟡 Minor changes | 🟢 Approved) plus a one paragraph executive summary. - Findings grouped by severity — 🔴 Blocking (90-100), 🟡 Important (80-89), 💡 Suggestion — each rendered as **[file:line]** — category (confidence: N) with the problem, the fix and its anchor. Findings still need >= 80 to be reported; one without an anchor is an opinion and gets dropped. - opencode now fans out with the `task` tool: one subagent per applicable lens, then one validation subagent per finding. It was reviewing serially; the claude reviewer already parallelises through its plugin. - Both gain the CI lens (unpinned actions, excessive token permissions, missing authorization gates, supply-chain risk); the claude one lacked it. - Both gain the deprecated-vs-disallowed caveat, so neither rejects a primitive that RFC-0007/RFC-0009 keep inside an open migration window — `ssh-ed25519` under RFC-0006 being the live example. No behavioural change to the workflows themselves: same actions, same pinned SHAs, same permissions, same model and allowed tools. Signed-off-by: Gonzalo Fleming <[email protected]>
|
Here is my review of this PR. Decision: 🟢 Approved The PR modifies only the reviewer prompt strings in two CI workflow files — no structural YAML changes, no permission changes, no new dependencies. The prompt content is well-formed, aligns with the project's review criteria in CLAUDE.md, and correctly references RFC-0007/RFC-0009 for the deprecated-vs-disallowed distinction. Both files validate as YAML. The commit message follows Conventional Commits ( No findings reach the
|
The opencode reviewer flagged these on this very PR: claude-code-review.yml pinned the third-party action to a SHA — with a comment explaining that an unpinned re-fetch silently regressed the OIDC exchange on 2026-07-06 — while leaving both actions/* steps on floating v7 tags. The new prompt in this PR tells reviewers to flag unpinned actions, so the file was contradicting its own instruction. checkout is pinned to the same SHA opencode.yml already uses, so both workflows stay on the same version instead of diverging. Ten more unpinned actions remain across ci.yml, audit.yml, deny.yml, interop.yml and claude.yml. They are out of scope here and left for a follow-up. Signed-off-by: Gonzalo Fleming <[email protected]>
|
Decision: 🟢 Approved This PR modifies only reviewer prompt strings across two CI workflow files, plus pins No findings reach the |
* ci: pin the remaining third-party actions to commit SHAs claude-code-review.yml already documents why: an unpinned re-fetch of an action silently regressed the OIDC→app-token exchange on 2026-07-06. That discipline was applied to the action that broke, but the rest of the workflows kept floating tags — a floating tag is a mutable reference, so the code that runs with the workflow token can change without any commit to this repo. Pins ten uses across five workflows: - actions/checkout@v7 -> 9c091bb (v7.0.0), in ci, audit, deny, interop, claude - Swatinem/rust-cache@v2 -> e18b497 (v2.9.1), in ci, audit, interop - EmbarkStudios/cargo-deny-action@v2 -> 3c63498 (v2.1.1), in deny checkout is pinned to the SHA opencode.yml already used, so every workflow now agrees on one version instead of drifting apart. The two remaining floating tags in claude-code-review.yml are fixed in #141; they are left untouched here to avoid a conflict. Signed-off-by: Gonzalo Fleming <[email protected]> * ci: correct the rust-cache pin to the actual v2.9.1 commit The opencode reviewer caught this on this PR: e18b497 is what the floating `v2` tag currently points at, not what the `v2.9.1` tag resolves to. It is an untagged commit ("update changelog, not sure why npm suddenly does not commit this"), so the trailing `# v2.9.1` comment was asserting something false. Resolving `v2` and labelling it with the latest release name is exactly the kind of mismatch SHA-pinning is meant to prevent: the pin was correct as a reference but unauditable against any published release. Now pinned to c193711, which is what refs/tags/v2.9.1 dereferences to. cargo-deny-action was checked the same way and is unaffected: its `v2` and `v2.1.1` tags happen to point at the same commit (3c63498). actions/checkout was taken from the SHA already used in opencode.yml, and refs/tags/v7.0.0 confirms it. Signed-off-by: Gonzalo Fleming <[email protected]> --------- Signed-off-by: Gonzalo Fleming <[email protected]>
|
I now have all the data needed. Here's my review: Decision: 🟡 Minor changes This PR modifies only reviewer-prompt strings in two CI workflow files, expands the prompt content with structured report format, parallel-subagent instructions, a CI lens, and the deprecated-vs-disallowed caveat, and pins two 🟡 Important
No |
The opencode reviewer flagged two commits on this PR as unsigned, at confidence 85, anchored to a real CLAUDE.md rule. All four commits are signed and GitHub reports verified=true for each. The cause is environmental: SSH signatures never validate on a runner because gpg.ssh.allowedSignersFile is not configured there, so git log --format=%G? returns N or E for every commit. The same comment had already acknowledged that limitation for the commits from main, then read the identical symptom on the new commits as absence of a signature. Both prompts now state the general failure mode rather than the specific symptom — absence of evidence in CI is not evidence of absence — name the authoritative source (.commit.verification.verified, which is what branch protection enforces), and give the honest way out: declare it as a limitation instead of reporting it as a finding. Signed-off-by: Gonzalo Fleming <[email protected]>
|
The 🟡 finding about unsigned commits is a false positive. All commits on this branch are signed and GitHub reports them as verified: Locally they resolve to The review had the explanation in its own text:
That is exactly why No change needed for the signatures. What the branch does now carry is a fix for the underlying failure mode: Worth noting the suggested remedy — |
|
Decision: 🟢 Approved This PR modifies only reviewer-prompt strings in two CI workflow files and pins No findings reach the
|
The format inlined in the two prompts was a condensed version of the contract: decision, one summary paragraph and three severity bands. It produced exactly that, and everything else was missing — no report heading, no iteration line, no table of previously raised issues, no problem/fix blocks. The most valuable part was the piece that got dropped. A repeat review earns its keep by checking whether the issues raised last time were actually fixed, not by restating them; an issue acknowledged in a thread and never corrected is still open, and only the iteration table surfaces that. Inlining the full contract in both workflows would duplicate ~60 lines and let the two drift apart, so it moves to .github/REVIEW-FORMAT.md and each prompt points at it — the same discipline CLAUDE.md already applies to the documents it references rather than duplicates. Both reviewers already read repo files, so the mechanism is proven. The contract covers the iteration check, the section layout, severity bands with their confidence ranges, anchoring, and the full-SHA link format. Added to the repo map in CLAUDE.md and to the key-files table in AGENTS.md. Signed-off-by: Gonzalo Fleming <[email protected]>
|
I have all the data. Let me now compile the review, following PR Review: ci(review): structured report format and parallel subagents for the reviewers (#143)Decision: 🟢 Approved Executive summaryThis PR is exclusively CI prompt text + action pinning + a new procedural doc. No Rust code, no crypto changes, no permissions changes, no dependencies. The two workflows now have all actions pinned to commit SHAs (closing the floating- Previous issues
New findingsNo findings reach the 💡 Suggestions (nice to have)
Limitations
|
The reviewer reported it could not read previous PR comments or confirm commit signatures, and inferred the runner had no network access. It has network — what it lacked was credentials: the job declares permissions, but the token was never passed to the step, so `gh` had nothing to authenticate with. That blocked the two things the report contract depends on: - step 1 of REVIEW-FORMAT.md, reading existing comments to classify earlier issues as resolved, open or partly resolved; - checking .commit.verification.verified, which is the only place an SSH signature can be verified — a runner has no gpg.ssh.allowedSignersFile, so `git log --format=%G?` returns N for every commit regardless. Using the API rather than a deeper clone is deliberate: fetch-depth: 0 would carry the history but still cannot verify signatures, and `persist-credentials: false` stays as it is so the token never lands in the workspace .git/config. Scoped by the job's existing permissions — contents: read, so the agent cannot push — and the workflow still only runs for OWNER/MEMBER/COLLABORATOR. Signed-off-by: Gonzalo Fleming <[email protected]>
PR Review: ci(review): structured report format and parallel subagents for the reviewers (#143)Decision: 🟢 Approved Executive summaryThis PR modifies reviewer-prompt strings in two CI workflow files, pins two actions from floating Previous issues
New findingsNo findings reach the Limitations
|
Both automated reviewers (
Claude Code Reviewandopencode) reported findings as a flat list — no severity, no decision, no confidence score. A reader could not tell a blocking bug from a nitpick without reading every line, and the two produced visibly different output for the same PR.This gives both the same report contract, and lets
opencodeparallelise the way the claude reviewer already does through its plugin.What changes
Report format — both reviewers now open with a decision and group findings by severity:
🔴 Blocking(90-100) — confirmed bug, vulnerability, exposed secret, violated hard constraint🟡 Important(80-89) — real issue affecting behaviour or breaking a stated rule💡 Suggestion— never blockingEach finding renders as
**[file:line]** — category (confidence: N)with the problem, the fix and its anchor. The>= 80threshold already existed; what is new is that a finding without an anchor to aCLAUDE.mdrule, a threat-model section or an ADR/RFC is dropped as an opinion.Parallel subagents in
opencode— it was reviewing serially. It now uses thetasktool to fan out one subagent per applicable lens, then one validation subagent per finding. The claude reviewer already does this inside its plugin (haiku for the mechanical steps, sonnet for conventions, opus for bugs and validation).CI lens — the claude reviewer had lenses for ADR/RFC docs and for Rust, but not for its own workflows. Both now check unpinned actions, excessive token permissions, missing authorization gates and supply-chain risk.
Deprecated is not disallowed — both now check RFC-0007 / RFC-0009 for an open migration window before rejecting a primitive. Without it a reviewer would flag
ssh-ed25519, which RFC-0006 keeps in use during its migration.What does not change
Same actions and pinned SHAs, same permissions, same author-association gate, same model, same
--allowedTools. Only the prompts changed. Both files were validated as YAML.Testing
Not exercised against a live PR yet — the reviewers run on the next PR that opens, and this one will be the first to exercise the new format on itself.