Review findings file

okproof verify-findings <file> (and the MCP tool okproof_verify_findings) checks a list of review findings against the code. It uses no model and spends no tokens. It answers one question per finding: is this real?

A finding is something a reviewer, human or machine, claims about a place in the code: "src/cart.ts:42 skips the last item". Reviews are wrong often enough that acting on every finding wastes time. This command separates the findings whose quoted code is still there from the ones that quote code that never existed.

Ingesting findings from a GitHub review or comment is out of scope. Convert them to this format first.

Format

Either JSON (a list, or an object with a findings list) or markdown. The JSON schema is schemas/review-findings.schema.json.

JSON

{
  "findings": [
    {
      "id": "F1",
      "title": "Loop skips the last item",
      "claim": "The loop stops one item early, so the total is too low.",
      "file": "src/cart.ts",
      "line": 42,
      "quote": "for (let i = 0; i < items.length - 1; i++)",
      "severity": "high",
      "rev": "3f2c9ab",
      "repro": { "command": "npm test -- cart" }
    }
  ]
}
FieldRequiredMeaning
idyesUnique within the file.
title, claimyesWhat the reviewer says.
filenoPath inside the repository. A path that leaves the repository is unverified.
lineno1-based line the quote starts on. Used to prefer the nearest match; a quote that moved is still found.
quotenoThe code the finding is about. Compared line by line with whitespace collapsed; blank lines in the file are ignored. At most 4000 characters are used.
severitynolow, medium, high or critical. Default medium.
revnoThe commit the review was written against. When given, the quote is checked at that commit.
reprono{ "command": "..." } (also written "test": "..."), or { "actions": [...], "baseUrl": "..." } with actions recorded by okproof verify (the same action list as .okproof/repro/<id>.json).

Markdown

One ## id: title section per finding, then - key: value lines. A quote may be wrapped in backticks, and a second - quote: line continues it.

## F1: Loop skips the last item
- claim: The loop stops one item early, so the total is too low.
- file: src/cart.ts
- line: 42
- quote: `for (let i = 0; i < items.length - 1; i++)`
- severity: high
- test: npm test -- cart

Verdicts

VerdictMeaning
confirmedThe quoted code is still in the file (at line, or moved), and, when a repro is given and allowed to run, it still fails. With a quote and no repro the claim itself was not run, and the reason says so.
fixedThe quote is no longer in the file, but it existed in the file's history (or at rev). Or the repro passes now.
false-positive-suspectThe quoted code never existed in that file (in its history, or at rev). The reviewer may have misread or invented it. It can also mean the file was renamed: check before dismissing.
outside-scope--base <ref> was given and the file is not in git diff <ref>...HEAD. Checked first.
unverifiedNothing to check against (no quote and no repro), a path outside the repository, a repro that was not allowed to run, or no git history to say whether a missing quote ever existed.

Repro commands are off by default

A findings file is untrusted input, and a command in it would run on your machine. Commands run only with --allow-commands. Over MCP both sides must agree: the person who starts the server passes okproof mcp --allow-commands (or sets OKPROOF_MCP_ALLOW_COMMANDS=1), and the agent passes allow_commands: true. An agent cannot switch commands on by itself. Without it a finding with a command repro is unverified and the reason says why. A command that exits non-zero counts as "still fails", so it is confirmed; exit 0 is fixed. Commands run through the shell in --cwd (default: the working directory) with a 5 minute limit.

Action-list repros are replayed in a fresh Chrome by the same engine as okproof verify --replay-only. They need --url (or repro.baseUrl), and must contain at least one assertion: a replay with no assertion proves nothing.

Command

okproof verify-findings <findings.json|findings.md>
    [--base <ref>] [--allow-commands] [--url <appUrl>]
    [--blocking-severity low|medium|high|critical]   default high
    [--cwd <dir>] [--fuzz <lines>]                   default 5
    [--json] [--json-out <file>] [--md-out <file>]

The markdown report goes to stdout (--json prints JSON instead). The JSON schema of the report is schemas/review-findings-report.schema.json.

Exit codes: 1 if any confirmed finding has severity at or above --blocking-severity, 2 for a bad file or option, otherwise 0. A finding with no severity counts as medium, so the default threshold ignores it; pass --blocking-severity low to block on every confirmed finding.

Limits

View source on GitHub