Skip to content

feat: Broad-Side verify — a read-only-tools verification pass over a run's top findings - #331

Merged
TheAmericanMaker merged 1 commit into
mainfrom
feat/143-verify-pass
Sep 13, 2026
Merged

TheAmericanMaker merged 1 commit into
mainfrom
feat/143-verify-pass

Conversation

@TheAmericanMaker

@TheAmericanMaker TheAmericanMaker commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #143 — as the hybrid the issue and the roadmap converged on, built on today's comparison run rather than on the tool-using sweep the issue was filed for.

The evidence: on this repository, the top twelve findings by severity from a real Broad-Side sweep were two real defects and ten claims a look at the guard, the caller, or the tsconfig dismissed (17% precision). One sync-priced call per finding with read-only tools and the rubric below agreed with a reviewer's ground truth on all twelve, for $0.13.

The feature: codecarto_broadside {action: "verify", top, model?, run_id?, max_cost?} / /codecarto-broadside verify [--top=N] [--model=] [--run=] [--max-cost=].

  • Ranks the collected run's defect + security findings most severe first (truncated slices skipped), reads the top N (default 10).
  • Per finding: up to 8 calls to read_file (line ranges, 200 max), grep (40 matches max), list_dir, all confined to the repository's readable source files (same listing the lenses scan; credential stores and build output invisible; a path outside the repo is an error the model sees). Then a schema-forced verdict: confirmed (must name the trigger it found), not-a-defect (literally true, nothing reaches the failure), discarded (wrong about the code), unclear.
  • The run's model without its :batch suffix unless overridden; reasoning: {effort: "low"}; usage.cost accounted per call.
  • max_cost is a running cap (a sync call's cost is known only when it returns): stops before the next finding, reports partial. AbortSignal honoured. A provider error is the finding's verdict, not a throw.
  • Writes verified.md + verified.json beside triage.md; records run.verify (merged like the other slots; status prints it). The reading guide now says: read verified.md first.

Live (this repository, through the MCP handler, before merge)

Broad-Side verify — run 2026-09-13T20-00-19-293Z: completed
  12 of 24 verifiable finding(s) read on google/gemini-3.7-flash | cost: $0.1212
  confirmed 1 · not-a-defect 5 · discarded 6 · unclear 0
  ✓ [medium] Pipeline outcome resolved outside status lock @ core/amendment.ts:131 — confirmed
  ✗ [medium] Dangling AbortSignal abort listener if sleep timer expires @ core/broadside.ts:1096-1107 — discarded
  …
  – [medium] Unvalidated flag value indexing in codecarto-library-init @ extensions/codecarto/index.ts:748 — not-a-defect

11/12 agreement with the ground truth recorded before any verifier ran; the twelfth is a silently ignored trailing --namespace that the pass called not-a-defect after reading the caller — the borderline the rubric leaves to the reader.

Tests

tests/broadside-verify.test.mjs (9): ranking and the sync-model mapping; reader confinement (credential store unreadable and invisible to grep, ../absolute paths rejected, line ranges, invalid regex, prefix search, listing); the full pass with a scripted chat endpoint (rubric, low effort, usage accounting, tools, tool result round trip, verified.md/json, run.verify, status line, report); prose → one schema-forced follow-up; an endless tool-caller cut at the budget with a final no-tools call; the running cost cap and abort; a provider error as a verdict; nothing-verifiable and unknown-run refusals; MCP validation + structured content; the Pi command and widget. tests/broadside-flags.test.mjs: --top and the verify action rules. npm test 902/902.

🤖 Generated with Claude Code

…run's top findings

The hybrid #143 kept coming back to, built on the evidence the comparison
run produced today. The batch sweep is cheap and reads files without
being able to look anything up; its measured weakness is precision, not
coverage. On this repository the top twelve findings by severity were two
real defects and ten claims that a look at the guard, the caller, or the
tsconfig dismissed (17% precision). One sync-priced call per finding with
three read-only tools — read_file by line range, grep, list_dir, confined
to the repository's readable source files — and the rubric below agreed
with a reviewer's ground truth on all twelve for $0.13 (about a cent a
finding). The rubric mattered more than the model: a first draft without
the `not-a-defect` verdict "confirmed" two type casts every caller
satisfies, because they were literally true of the code.

core/broadside-verify.ts: `rankVerifiableFindings` (defect and security
findings with a location, most severe first, truncated slices skipped),
`createRepoReader` (the lenses' own file listing minus everything
isSlurpable keeps out — credential stores, build output — with a path
outside the repository or off the listing an error the model sees),
`verifyFinding` (up to eight tool calls, then a schema-forced verdict:
confirmed with the trigger it found, not-a-defect, discarded, or unclear;
a prose answer gets one forced follow-up; a provider error is the
finding's verdict, not a throw), `runBroadsideVerify` (top N, the run's
model without its :batch suffix unless overridden, low reasoning effort,
`maxCost` as a running cap that stops before the next finding and reports
partial, an AbortSignal, verified.md and verified.json beside triage.md,
`run.verify` recorded and merged like the other slots), and the report.

MCP: `action: "verify"` with `run_id`, `top`, `model`, `max_cost`. Pi:
`/codecarto-broadside verify [--top=N] [--model=] [--run=] [--max-cost=]`,
with the widget counting verdicts as they land. Docs: the reading guide
puts verified.md first; README, MCP quickstart, the agent-skill reference.

Verified live on this repository's run through the MCP handler: 12 read,
$0.12, 11/12 agreement with the ground truth (the twelfth is a
silently-ignored trailing flag that the pass called not-a-defect after
reading the caller — the borderline the rubric leaves to the reader).

Closes #143

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TheAmericanMaker
TheAmericanMaker merged commit 94a47ba into main Sep 13, 2026
5 checks passed
@TheAmericanMaker TheAmericanMaker mentioned this pull request Sep 13, 2026
@TheAmericanMaker
TheAmericanMaker deleted the feat/143-verify-pass branch September 13, 2026 20:53
@TheAmericanMaker TheAmericanMaker mentioned this pull request Sep 13, 2026
TheAmericanMaker added a commit that referenced this pull request Sep 13, 2026
Bumps the five version sites to 0.24.0 and adds the CHANGELOG entry for
#331: the Broad-Side verify action (#143).



Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
TheAmericanMaker added a commit that referenced this pull request Sep 14, 2026
The verify pass (#331) confirmed 2 of the 12 top findings a scan produced;
the other ten were casts every caller satisfied, guards one call away, or
environments the project does not target. The rubric the verifier applies
is now in the defect lens's own prompt: a finding is a reachable failure
with its trigger named, and type hygiene goes at severity low under the
pattern name `type-hygiene`.

Measured on this repository, two runs per arm on the same model, findings
judged by hand: half as many findings (24, 26 → 10, 13), medium-severity
precision roughly doubled (2/12, 3/13 → 1/4, 3/6), the same number of real
defects per run on average (2, 3 → 1, 4), same cost. The reading guide says
to read `type-hygiene` rows as notes.



Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

Broad-Side: lens queue via headless agent (@openrouter/agent) — sync-priced, tool-using variant

1 participant