Skip to content

feat(bench): Cw control + verification metrics, per-scenario, Holm, oracle (#116/#105)#123

Merged
Connorrmcd6 merged 1 commit into
mainfrom
feat/105-116-verification-metrics-cw
Jun 14, 2026
Merged

feat(bench): Cw control + verification metrics, per-scenario, Holm, oracle (#116/#105)#123
Connorrmcd6 merged 1 commit into
mainfrom
feat/105-116-verification-metrics-cw

Conversation

@Connorrmcd6

Copy link
Copy Markdown
Owner

Summary

Phases 5 + 6 of the v2 multi-turn track — the offline analysis layer. Grouped into one PR because they're coupled: the Cw control only means anything once the metrics compute the C3-vs-Cw contrast. Branches off main; independent of the open adapter PRs (#121/#122).

Phase 5 — Cw warning-only control (#116)

  • prompts.py: a fifth condition Cw = stale doc + a generic "may be out of date" note with no corrected code, file, line, or value. It isolates whether C3's recovery comes from Surface's concrete fix (H6: C3 > Cw) or merely the suspicion any drift signal would raise. Kept deliberately content-free so it can't leak the truth and collapse the contrast.

Phase 6 — verification metrics + reporting + oracle (#105)

  • metrics.py: the multi-turn headline — verification_rate + verified_then_correct; the H4 suppression delta (C0−C1 verification) and the H5 C1 mediation (verifiers correct vs non-verifiers misled); a per-scenario breakdown; the C3-Cw / Cw-C1 success pairs; a bootstrap p-value per success delta; and Holm-Bonferroni across the whole delta family.
  • oracle.py (new): post-run tripwires — C2-fresh ≈100% per scenario, and cascade C1 must mislead at least sometimes — exiting non-zero so a run can be gated in CI. (This is the guard against the Pilot smoke test (haiku×2): success-rate ceiling, but a real wasted-token signal surface-bench#9 authoring-bug failure mode.)
  • report.py: a Verification section, a per-scenario success table, Cw labels/gloss, a Holm flag on each delta, and a verification_rate.png hero figure.

Verification

  • uv run pytest (in bench/) — 30 passed (6 new), no network.
  • cargo fmt --all --check — clean.
  • End-to-end smoke (mock · --mode multi · 2 scenarios): run emits all 5 conditions; report renders the Verification + Per-scenario sections and summary.json carries verification/by_scenario/mediation; oracle correctly fires (mock can't solve cascades, so C2-fresh=0% and C1-never-misleads both trip — the tripwires working as designed).

Scope

Closes the metrics/reporting half of #105 and implements #116. Remaining: scenario authoring (#104) and the pre-registration + staged run (#117/#106).

🤖 Generated with Claude Code

…racle (#116/#105)

Phases 5 + 6 of the v2 multi-turn track — the offline analysis layer.
Both are coupled (the Cw control only has meaning once the metrics compute
the C3-vs-Cw contrast), so they ship together.

Phase 5 — Cw warning-only control (#116):
- prompts.py: a fifth condition Cw = stale doc + a generic "may be out of
  date" note with NO corrected code / file / line / value. Isolates whether
  C3's recovery is Surface's concrete fix (H6: C3 > Cw) or merely the
  suspicion any drift signal would raise. Deliberately content-free so it
  can't leak the truth and collapse the contrast.

Phase 6 — verification metrics + reporting + oracle (#105):
- metrics.py: verification_rate + verified_then_correct (multi-turn rows),
  the H4 suppression delta (C0−C1 verification) and the H5 C1 mediation
  (verifiers correct vs non-verifiers misled), a per-scenario breakdown,
  the C3-Cw / Cw-C1 success pairs, a bootstrap p-value on each success
  delta, and Holm-Bonferroni across the whole delta family.
- oracle.py: post-run tripwires (C2-fresh ≈100% per scenario; cascade C1
  must mislead at least sometimes), exit non-zero so a run can be gated.
- report.py: a Verification section (the multi-turn headline), a
  per-scenario success table, Cw labels/gloss, a Holm flag on each delta,
  and a verification_rate.png hero figure.
- tests: 6 offline tests (Cw prompt, verification/mediation, Holm + Cw
  pairs, per-scenario, oracle pass + trip). Suite: 30 passing. Verified
  end-to-end via a mock multi run -> report -> oracle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Connorrmcd6 Connorrmcd6 merged commit 8c7dcce into main Jun 14, 2026
5 checks passed
@Connorrmcd6 Connorrmcd6 deleted the feat/105-116-verification-metrics-cw branch June 14, 2026 20:08
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