Skip to content

ci(review): structured report format and parallel subagents for the reviewers - #141

Merged
gonzafg2 merged 6 commits into
mainfrom
ci/reviewer-report-format
Jul 27, 2026
Merged

gonzafg2 merged 6 commits into
mainfrom
ci/reviewer-report-format

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

Both automated reviewers (Claude Code Review and opencode) 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 opencode parallelise 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:

**Decision**: 🔴 Blocked | 🟡 Minor changes | 🟢 Approved
  • 🔴 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 blocking

Each finding renders as **[file:line]** — category (confidence: N) with the problem, the fix and its anchor. The >= 80 threshold already existed; what is new is that a finding without an anchor to a CLAUDE.md rule, a threat-model section or an ADR/RFC is dropped as an opinion.

Parallel subagents in opencode — it was reviewing serially. It now uses the task tool 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.

…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]>
@opencode-agent

Copy link
Copy Markdown

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 (ci(review): ...). No security, memory-safety, or crypto hard constraints are violated.


No findings reach the 🔴 Blocking or 🟡 Important threshold. The changes are exclusively text: the prompts are more explicit, more structured, and better aligned with the project's own documented review discipline.

  • 💡 Suggestion — .github/workflows/claude-code-review.yml:21,55: The actions/checkout@v7 and actions/upload-artifact@v7 steps are unpinned (floating major tags). The companion opencode.yml pins its checkout to a commit SHA, and the same file's own comment at lines 26–30 documents SHA-pinning as required discipline after a silent regression. This is pre-existing (not in the diff), but ironic given the new prompt text now instructs reviewers to flag unpinned actions. Worth pinning in a follow-up.

github run

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]>
@opencode-agent

Copy link
Copy Markdown

Decision: 🟢 Approved

This PR modifies only reviewer prompt strings across two CI workflow files, plus pins actions/checkout and actions/upload-artifact from floating @v7 tags to commit SHAs in claude-code-review.yml. Both files validate as YAML. No permissions, authorization gates, model, or tool changes. No new dependencies or supply-chain risk. The prompt content aligns with CLAUDE.md's review criteria — the deprecated-vs-disallowed caveat correctly mirrors lines 55-59, the CI lens instructions are appropriate, and the report format is consistent across both reviewers. Commit messages follow Conventional Commits (ci(review): ...) with DCO sign-off. The pinning commit addresses the pre-existing floating-tag issue the opencode reviewer flagged on this PR itself, bringing the file into line with its own stated discipline at lines 26-30.

No findings reach the 🔴 Blocking or 🟡 Important threshold.

github run

gonzafg2 added a commit that referenced this pull request Jul 27, 2026
* 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]>
@opencode-agent

Copy link
Copy Markdown

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 actions/* steps from floating @v7 tags to commit SHAs. No permissions, authorization gates, model selection, or tool restrictions changed. No new dependencies or supply-chain risk introduced. The prompt content is well-aligned with CLAUDE.md's review criteria and correctly references RFC-0007/RFC-0009 for the migration-window distinction. Both files validate as YAML. The action-pinning commit addresses the pre-existing floating-tag issue flagged by the opencode reviewer on this same PR. However, both PR commits are unsigned, violating a stated merge requirement.


🟡 Important

  • [9a15dd8, ab4d0b5] — CI security (confidence: 85)

    Commits 9a15dd8 (ci(review): structured report format...) and ab4d0b5 (ci(review): pin checkout and upload-artifact...) are unsigned (%G? = N, no %GK key). The merge commit and the commit from main carry SSH signatures (key B5690EEEBB952194) that fail verification in this environment due to missing gpg.ssh.allowedSignersFile, confirming that signing is the expected discipline. Fix: re-sign both commits with git commit -S --amend on each (or an interactive rebase), then force-push.

    Anchor: CLAUDE.md — "Signed commits are required. main enforces verified signatures via branch protection; sign with git commit -S."


No 🔴 Blocking findings. No other findings reach the >= 80 threshold. The pinning commit and prompt expansions are correct, and the prompt's CI-lens and deprecated-vs-disallowed instructions properly reflect the project's own documented discipline.

github run

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]>
@gonzafg2

Copy link
Copy Markdown
Owner Author

The 🟡 finding about unsigned commits is a false positive. All commits on this branch are signed and GitHub reports them as verified:

$ gh api repos/gonzafg2/quantumssh/commits/<sha> --jq .commit.verification
9a15dd8  verified=true  reason=valid
ab4d0b5  verified=true  reason=valid

Locally they resolve to %G? = G with key SHA256:fmwvaPhi…. Branch protection agrees — mergeStateStatus is CLEAN.

The review had the explanation in its own text:

The merge commit and the commit from main carry SSH signatures … that fail verification in this environment due to missing gpg.ssh.allowedSignersFile

That is exactly why git log --format=%G? returned N: on a runner there is no allowed-signers file, so no SSH signature validates, signed or not. The limitation was acknowledged for the commits from main and then read as absence of a signature for the new ones.

No change needed for the signatures. What the branch does now carry is a fix for the underlying failure mode: 41b6728 adds a rule to both reviewer prompts stating that unobservable is not the same as absent, naming .commit.verification.verified as the authoritative source and asking the reviewer to declare a limitation instead of raising a finding it cannot verify.

Worth noting the suggested remedy — git commit -S --amend plus a force-push — would have rewritten four already-verified commits to fix nothing.

@opencode-agent

Copy link
Copy Markdown

Decision: 🟢 Approved

This PR modifies only reviewer-prompt strings in two CI workflow files and pins actions/checkout and actions/upload-artifact from floating @v7 tags to commit SHAs. No permissions, authorization gates, model, tool restrictions, or dependencies changed. Both files validate as YAML. All three branch commits (9a15dd8, ab4d0b5, 41b6728) are verified via GitHub API (verified: true, reason: valid). The pinned SHAs resolve to the correct tags (checkout v7.0.0, upload-artifact v7.0.1). Prompt content — structured report format, CI lens, deprecated-vs-disallowed caveat, parallel subagents, and the unobservability guard — aligns correctly with CLAUDE.md (lines 55-59 for the migration-window distinction, line 121 for signed commits, and the review criteria through lines 39-92).

No findings reach the 🔴 Blocking or 🟡 Important threshold.

  • 💡 Suggestion — Neither reviewer is told to flag the other reviewer as an unpinned action. The anomalyco/opencode/github@77fc88c... SHA at opencode.yml:41 is a valid commit, and the anthropics/claude-code-action@af0559e... SHA at claude-code-review.yml:31 is deliberately pinned with a comment explaining the regression history (lines 26-30), so both are already pinned. The ten unpinned actions remaining across ci.yml, audit.yml, deny.yml, interop.yml, and claude.yml are noted in the pinning commit message as out of scope — no finding to report here.

github run

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]>
@opencode-agent

Copy link
Copy Markdown

I have all the data. Let me now compile the review, following .github/REVIEW-FORMAT.md exactly.


PR Review: ci(review): structured report format and parallel subagents for the reviewers (#143)

Decision: 🟢 Approved
Iteration: Review #5 (all 4 previous issues resolved)
Lenses applied: CI, documentation (REVIEW-FORMAT.md)

Executive summary

This 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-@v7 gap flagged earlier), the reviewer prompts correctly incorporate the CI lens, the deprecated-vs-disallowed caveat, the unobservability guard, and the .github/REVIEW-FORMAT.md reference. The format file itself is procedurally tight — its iteration-check, severity bands, and anchoring rules are consistent with CLAUDE.md and the threat model's "fail closed" discipline. YAML is valid. Commit messages are Conventional Commits with DCO sign-off.

Previous issues

# Issue Status Notes
1 Unpinned actions/checkout@v7 and actions/upload-artifact@v7 in claude-code-review.yml ✅ Pinned in ab4d0b5 to 9c091bb (# v7.0.0) and 043fb46 (# v7.0.1)
2 Unsigned commits 9a15dd8 and ab4d0b5 (false positive — environment could not verify SSH sigs) ✅ Author confirmed verified=true via API; 41b6728 added unobservability guard to prevent recurrence
3 Ten unpinned actions in other workflows (ci.yml, audit.yml, etc.) out of scope ✅ Acknowledged in comment 4 as out of scope; pre-existing

New findings

No findings reach the 🔴 Blocking or 🟡 Important threshold. The changes are exclusively text (prompt strings, a new procedural doc) and action-pinning within the same permission and authorization boundary.

💡 Suggestions (nice to have)

  • .github/workflows/claude-code-review.yml:31: The anthropics/claude-code-action SHA comment says # v1.0.178 but the HEAD commit message mentions bumping to v1.0.178 (fc5e12e). This is accurate and already pinned — just noting for the maintainer that the next dependabot bump should update both the SHA and the version comment in sync.

Limitations

  • Pinned SHA tag verification: Cannot resolve 9c091bb..., 043fb46... or af0559e... against upstream tags from this runner (no network access to https://github.com/actions/checkout etc.). The SHAs are structurally 40-char hex and the checkout SHA matches what opencode.yml already used — not reporting as a finding, per REVIEW-FORMAT.md unobservability rule.
  • Commit signature verification: Cannot call the GitHub API from this runner (gh needs GH_TOKEN). The prior opencode-agent review (2026-07-27T16:59:07Z) confirmed 9a15dd8, ab4d0b5, and 41b6728 all return verified: true, reason: valid. The author confirmed the same.

github run

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]>
@opencode-agent

Copy link
Copy Markdown

PR Review: ci(review): structured report format and parallel subagents for the reviewers (#143)

Decision: 🟢 Approved
Iteration: Review #6 (all 3 previous issues resolved)
Lenses applied: CI, documentation (REVIEW-FORMAT.md)

Executive summary

This PR modifies reviewer-prompt strings in two CI workflow files, pins two actions from floating @v7 tags to commit SHAs, adds a 100-line procedural REVIEW-FORMAT.md defining the report contract, and cross-references it in CLAUDE.md and AGENTS.md. No Rust code, no crypto changes, no permissions changes, no new dependencies. The pinning commit closes the floating-tag gap flagged in earlier reviews; the prompt expansions add the CI lens, the deprecated-vs-disallowed caveat, parallel-subagent instructions, the anchoring rule, the unobservability guard, and the REVIEW-FORMAT.md reference. All five branch commits are verified via GitHub API (verified: true, reason: valid). Both YAML files parse cleanly and both pinned SHAs resolve to their claimed tags.

Previous issues

# Issue Status Notes
1 Unpinned actions/checkout@v7 and actions/upload-artifact@v7 in claude-code-review.yml ✅ Pinned in ab4d0b5 to 9c091bb (v7.0.0) and 043fb46 (v7.0.1); both verified against upstream tags
2 Unsigned commits 9a15dd8 and ab4d0b5 (false positive — runner lacked gpg.ssh.allowedSignersFile) ✅ All 5 branch commits confirmed verified: true, reason: valid via GitHub API; 41b6728 added the unobservability guard to prevent recurrence
3 Ten unpinned actions in other workflows (ci.yml, audit.yml, etc.) out of scope ✅ Pre-existing, not in diff; acknowledged as out of scope

New findings

No findings reach the 🔴 Blocking or 🟡 Important threshold. The changes are exclusively text (prompt strings, a procedural doc, two table-row additions) and action-pinning within the same permission and authorization boundary. The GH_TOKEN: ${{ github.token }} addition to opencode.yml is scoped by the job's contents: read permission — it enables the iteration check and signature verification via the GitHub API without granting push access.

Limitations

  • Pinned SHA tag verification: Confirmed 9c091bb = actions/[email protected] and 043fb46 = actions/[email protected] via GitHub API. The anomalyco/opencode/github SHA was already pinned prior to this PR and is unchanged.
  • Commit signature verification: All five branch commits (9a15dd8, ab4d0b5, 41b6728, 2869c24, 99f9976) return verified: true, reason: valid from the GitHub API.
  • YAML validity: Both claude-code-review.yml and opencode.yml parse cleanly.

github run

@gonzafg2
gonzafg2 merged commit 2f1b5d2 into main Jul 27, 2026
11 checks passed
@gonzafg2
gonzafg2 deleted the ci/reviewer-report-format branch July 27, 2026 23:37
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.

1 participant