Skip to content

[Feature]: Adversarial review panel: let models from other providers check review findings #126

Closed

Description

@caiopizzol

Problem statement

When Pullfrog reviews a PR, the main model asks its reviewfrog specialists for a second look. Those specialists always run on the same provider, usually a cheaper model: Opus asks Sonnet, Sol asks Terra (agents/claude.ts, agents/subagentModels.ts). Models from the same provider tend to make the same mistakes, so they also tend to miss the same false positives.

Many users already connect subscriptions or keys from several providers (Claude, Codex, Grok, Meta). Today a review uses only one of them.

Proposed solution

An opt-in review panel. The user picks which connected models verify findings. Before Pullfrog posts a review, each verifier tries to disprove each finding, independently and in parallel.

Image
  • Verification still decides what posts. The main model checks every finding against the code, as Review mode does today (modes.ts). Each verifier answers confirmed, refuted or not enough evidence. Agreement raises confidence, and a refutation sends the finding back for a second look.
  • No majority vote by default. A finding only one model raised still posts if the main model verifies it, because a vote would drop correct bugs that only one model catches. A stricter "require N confirmations" mode could come later, once there's data on how it performs.
  • Verifiers are read-only and independent. Each gets the diff and the findings. None sees the main model's reasoning or the other verifiers' answers.
  • Bounded. Each verifier has a time limit and never falls back to a paid key. If one fails, the review posts with the rest of the panel.

Where it could live in the console:

Image

How the review could show it:

Image

Use case

A team connects Claude, Codex and Grok subscriptions and a Meta API key. Opus writes the review. Sol, Grok and Muse try to disprove each finding before it posts. A finding all three confirm carries more weight, and one they refute gets a second look. Most often that drops a wrong comment before the author sees it.

Alternatives considered

  • Post only what most verifiers confirm. Simpler to explain, but it suppresses correct findings that only one model raises. The specialists also answer different questions, so their results aren't directly comparable votes.
  • Several full reviews merged into one. Costs a full review per provider and burns subscription quota faster. Verifying a short list of findings is cheaper.
  • Point subagentModel at another provider. Not enough on its own. OpenCode limits each run to the main model's provider (agents/opencode.ts), and a Claude subscription only works through Claude Code.

Additional context

Hard parts I can see:

  • Credentials. The credential pool activates one credential per run and clears the rest (utils/credentialPool.ts), so each verifier would need its own environment.
  • Read-only enforcement. A separate verifier process isn't covered by today's subagent gate, and the git/shell tools aren't marked mutates (mcp/shared.ts). Each verifier would need an explicit read-only tool list.
  • Cost and data. Each verifier reads the whole diff, so cost and quota grow with the panel size. The code also goes to every provider on the panel, so the setting should say that plainly.

Evidence. GitHub reported that a multi-model ensemble in Copilot code review raised addressed rate by 8.0% and recall by 13.6% in an A/B test, while comment volume rose 61% (ReviewBench). That report doesn't test cross-provider verification specifically, so I'd treat this as an experiment.

How to judge it: compare reviews with no panel, with one verifier and with three, plus a same-cost extra pass on the main model. It works if wrong comments drop without losing correct findings that only one model raised.

Activity

  1. pullfrog commented on Nov 1, 2026

    @pullfrog
    Contributor

    Plan: opt-in cross-provider review panel

    The issue is actionable and is not a duplicate. The closest related issues are #81 (models per task, closed), which shipped the same-provider subagentModel tiering this proposal builds on, and #123 (Martian Review Bench), whose harness can be reused for the evaluation below. The issue already names the three hard parts: credentials, read-only enforcement, and cost/data. The plan below takes each one in turn. Part of the work lives outside this repo. Console UI, settings storage and the run-context server are in pullfrog/app, so this checkout can only define the action-side contract.

    Design decisions

    1. Verifiers are separate headless processes, not reviewfrog subagents. Subagents inherit the orchestrator's harness, provider and credential. opencode pins enabled_providers to the main model's prefix (agents/opencode.ts:159-165), and Claude Code's --agents only takes Anthropic models (agents/claude.ts:211-222). Each verifier gets its own process, temp HOME/XDG_* dirs and env, built from scratch rather than from process.env.
    2. The panel runs as a one-time pre-flight inside create_pull_request_review. This is the same pattern as the existing diff-coverage nudge (mcp/review.ts ~L947). On the first submission with inline comments, the tool runs the panel on exactly those comments, in parallel. It returns per-finding verdicts instead of posting and asks the orchestrator to re-check every refuted finding and resubmit. The second submission posts. Because the tool enforces the panel, it does not depend on prompt compliance, and verifiers see the actual findings rather than a paraphrase.
    3. No vote. The orchestrator stays the only judge, as in Review step 6 (modes.ts:223). A refuted verdict only forces a second look. confirmed and insufficient have no effect on what posts.
    4. Read-only by construction, not by prompt. Verifiers get no Pullfrog MCP server, no shell, no GitHub token and no write tools. They get native read, grep and glob over the checkout, plus the diff path and the findings as JSON. This avoids the issue's concern that git and shell are not marked mutates (mcp/shared.ts:14-24), because verifiers never see those tools.
    5. Each panel entry is a (model, credential) pair. A verifier only uses the credential the user picked. It never falls back to another key in the pool. If a subscription is exhausted or rejected, that verifier is skipped and the review notes it.

    Milestones

    M1: settings contract and credential isolation (action side)

    • Add RepoSettings.reviewPanel: { verifiers: { model: string; credential: string }[]; timeoutMs?: number }, defaulting to { verifiers: [] }, plus a defaultSettings entry. Thread it into ToolContext at main.ts's ctx construction, using reviewDrafts as the template.
    • Split utils/credentialPool.ts's select → probe → activate sequence. Add a resolveIsolatedCredential({ access, name, model }) that selects and probes, records the verdict, and returns { name, value, receipt } without touching process.env. activate() (L244-263) stays the main run's path.
    • Give installCodexAuth / installXaiAuth (utils/codexHome.ts) a target data-home parameter, so a verifier's subscription lands in its own dir and does not clear the main run's.
    • Add buildVerifierEnv(): start from filterEnvForUntrustedCode (utils/secrets.ts), strip every provider credential and GITHUB_* token, then add only the verifier's credential and private dirs.

    M2: verifier runner (agents/verifier.ts)

    • Pick the harness for each verifier model with the existing resolveAgent({ model }) logic. Ship opencode first, since it covers xAI (including the Grok subscription), Meta and most API-key providers. Then add codex (--sandbox read-only, approvals off) and claude (--tools Read,Grep,Glob, plus the settings-level denies buildClaudeSettings already writes).
    • Use a fixed prompt: try to disprove each finding against the code, and answer per finding with { id, verdict: "confirmed" | "refuted" | "insufficient", evidence }. Parse the answer with zod. Malformed output counts as that verifier failing, not as a verdict.
    • Each verifier gets a hard timeout and runs under Promise.allSettled, so one failure never blocks the others.
    • Constraint to check first: the panel's total time budget must fit inside the MCP client timeout for create_pull_request_review. opencode allows 660s (agents/opencode.ts:139); Claude Code's MCP tool timeout needs to be confirmed.

    M3: Review integration

    • In mcp/review.ts, add a reviewPanelPreflightRan latch next to coveragePreflightRan. It only applies when the panel is configured, the mode is Review or IncrementalReview, and comments.length > 0.
    • Give findings stable ids (path:line[-start]), so verdicts can be matched to the resubmitted comments even after the orchestrator edits the wording.
    • Update Review step 7 and the IncrementalReview prompt in modes.ts. They should say that the first submit may return panel verdicts, that every refuted finding must be re-traced and then either dropped or kept with a reason, and that verifier verdicts are hypotheses, not votes.

    M4: rendering, usage and logging

    • Add panel badges to inline comments (e.g. Panel: GPT Sol ✅ · Grok ✅ · Muse ⚠️ insufficient) and a footer line naming panel members and any that failed or were skipped. The action renders these, not the model, extending buildPullfrogFooter.
    • Add verifier token and cost usage to the run's usage reporting. OpenAI verifiers going through codex need CODEX_MODEL_PRICING rows.
    • Add log lines labelled per verifier, reusing the sessionLabeler prefix convention.

    M5: out-of-repo work (pullfrog/app)

    • A console picker limited to connected credentials, with a data-sharing notice ("your code is sent to every provider on the panel"). Store the setting and return it from run-context. Make sure credentialAccess.candidates exposes the credentials each panel entry needs.
    • Codex refresh-token write-back: today codex_writeback / entryPost.ts track a single authPath. If a verifier refreshes a Codex subscription, the rotated secret must be written back or the server-side chain breaks. Either extend the write-back to several auth homes, or require that a Codex subscription is not used by the main run and a verifier in the same run.

    M6: evaluation (before turning it on by default)

    • Use the setup the issue proposes: no panel, 1 verifier, 3 verifiers, and a same-cost extra pass on the main model. Run it on the Run Martian Review Bench #123 benchmark set and track precision, recall and how many single-model findings were dropped. Ship it labelled experimental until the data is in.

    Tests

    • Credential isolation: a verifier env contains exactly one provider credential and no GITHUB_* token. The main run's process.env and installed subscription are unchanged after a panel runs.
    • Pre-flight: it runs exactly once, is skipped when there are no inline comments or the panel is empty, and still posts when every verifier times out or fails.
    • Verdict parsing: valid output, malformed JSON, unknown finding ids, and partial answers.
    • Mapping verdicts to findings after resubmission with edited bodies or shifted lines.

    Open questions for the maintainers

    1. Should the panel check only inline findings, or also findings that appear only in the review body? This plan proposes inline only for v1.
    2. Should IncrementalReview runs use the panel? That raises cost on every push.
    3. Is a per-run panel cap (e.g. ≤3 verifiers, ≤N findings sent) needed to bound cost on large reviews?
    4. Badges on every comment, or only on refuted and confirmed ones? The issue's mock shows them on every finding.
    Task list (3/3 completed)
    • Check duplicates and gather context on review flow, credentials, subagents
    • Draft structured plan
    • Post plan via report_progress

    Pullfrog  | Implement plan ➔ | View workflow run | via Pullfrog | Using claude-opus-5-5 (free via Pullfrog for OSS) | 𝕏

  2. caiopizzol commented on Nov 3, 2026

    @caiopizzol
    Author

    @colinhacks curious to hear your thoughts on this one

  3. colinhacks commented on Nov 10, 2026

    @colinhacks
    Member

    This is out in 0.1.125, as a tool a prompt can use rather than a fixed panel. A run can now ask any model your account has a credential for, so your panel is a line in the review instructions

    Before posting a review, send each finding to gpt-sol and grok and ask them to refute it. Drop any finding you cannot re-verify after a refutation.

    Each ask is its own process with only that model's credential. It can't push or post, and it's capped at 12 calls per run and 9 minutes a call. The console lists what a run can ask. Docs

    We didn't build the verdict badges or anything that forces a panel on every review, and the main model still decides what posts. The tool route also covers second opinions on plans and fixes, which a review-only panel wouldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions