Skip to content

feat(analyze): proof-carrying findings — analyst findings verified by executed replay, with receipts - #77

Merged
drewstone merged 1 commit into
mainfrom
frontier/proof-carrying-findings
Aug 3, 2026
Merged

feat(analyze): proof-carrying findings — analyst findings verified by executed replay, with receipts#77
drewstone merged 1 commit into
mainfrom
frontier/proof-carrying-findings

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

What this is

The product moat, wired: traces verify-findings (standalone) and traces analyze --verify-findings execute each analyst finding's accused step in a real sandbox and attach a verdict — reproduced / fix-flipped / divergent / not-replayable — with a receipt directory per finding (commands, exit codes, signature match, timings). A finding stops being a cited claim and becomes an executed proof. No shipped trace-analysis product does this.

Executed proof (all four verdicts live, real sandbox, real recorded findings, $0 LLM)

Findings extracted from the certified holdout-2 run (cert-g-h2/result.json):

  • reproduced — ponyc-2532 step 12 (git apply wrong strip level): arm A exit 1 == recorded rc, error signature matched, 11 prefix steps 0 divergences, 5.9s. Re-verified independently by the operator post-build: same verdict, 1 execution.
  • fix-flipped — same finding with the claimed correction as --fix-command: arm B exit 0, failure vanished, 9.1s.
  • divergent — element-web step 17: exit code matched but signature absent (agrees with the prior replay-batch verdict for the same case — cross-run consistency).
  • not-replayable — submit-step finding: honest reason, zero sandbox calls.

Fail-loud: analyze --verify-findings without a replay corpus exits 1 with the reason (harness sessions carry no docker image); with a corpus it appends a "Verified findings" section to the analyze report.

Design

New module only (src/analyze-verify.ts, 700 lines + 19 tests) — zero edits to the in-flight replay-batch/fix/loop files. Matches the analyst's real emit shape; findings sharing (case, step, fix) share one execution but keep individual receipts. Verification is execution, not generation — no LLM in the path.

Battery: tsc clean, 606/606 tests, build + package checks green, merge-tree clean.

…lyst findings as sandbox replays

Every analyst finding can now ship with an executed verdict instead of a
prose claim. New src/analyze-verify.ts maps a finding (incorrect-step-<n>
subject, metadata.block_first_step, trace:// evidence) onto the replay wire,
replays the trajectory prefix in a real sandbox, re-runs the accused step,
and classifies the outcome:

  reproduced      recorded failure signature reproduced (returncode + output substring)
  fix-flipped     reproduced AND a supplied corrected command made it vanish
  divergent       executed but the recorded failure did not reproduce
  not-replayable  precise reason (no step subject, unknown trajectory, submit step, ...)

Surfaces:
- traces verify-findings --findings f.json (--steps/--image/--cwd | --corpus ...) --out DIR
  for findings recorded earlier (eval result.json extractions); corpus mode
  resolves trajectories by trace:// evidence and derives uid-1000 images via
  the batch preparer.
- traces analyze --verify-findings --replay-corpus ... appends a Verified
  findings section marking each finding VERIFIED (receipt path) or
  UNVERIFIABLE (reason).

One receipt directory per finding (receipt.json + replay-verdict.json +
report.md when executed); findings accusing the same step share one executed
proof. Sandbox absence while a finding is replayable is an error, never a
silent skip. Verification is execution — no LLM unless --fix-command is given.

Proven live against recorded cert findings on holdout-2: reproduced
(ponyc-2532 step 12, exit 1 + 'No such file or directory' signature, 0/11
prefix divergences), fix-flipped (the claim's own -p1 correction, arm B exit
0), divergent (element-web step 17), not-replayable (submit step 22).
@drewstone
drewstone merged commit 034a14a into main Aug 3, 2026
1 check passed
@drewstone
drewstone deleted the frontier/proof-carrying-findings branch August 3, 2026 06:53
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