benchmarksPublic
benchmarksPublic
Commit b297e8a2
A
docs/adr/0009-baseline-comparison-eligibility.md
1+
# ADR-0009: Saved baseline identity and claim eligibility2+
3+
- Status: accepted4+
- Date: 2026-09-105+
6+
## Context7+
8+
A homogeneous candidate population can still be incomparable with its saved9+
baseline. Earlier book cells retained a median and uncertainty but omitted10+
semantics/fixture/runner identity and outcome denominators. Singleton bootstrap11+
intervals and missing noise floors could yield a diagnostic GREEN that looked12+
like public evidence. Counting rows also permitted duplicated trials to create13+
artificial precision.14+
15+
## Decision16+
17+
Baseline Books now emit schema version 2. Existing immutable version 1 books18+
remain readable for diagnostics; never rewrite them to imply evidence that was19+
not collected. Each new cell records:20+
21+
- `comparison_identity`, independently versioned as schema 1;22+
- `independent_n`, the number of distinct recorded `(bench_id, run)` trials;23+
- `attempted_n`, including skipped rows, and `failure_n`/`skipped_n`;24+
- the existing measured metric count `n`, confidence interval and noise floor,25+
plus the interval's recorded `confidence` level.26+
27+
`independent_n` is an operational distinct-trial count, not proof of statistical28+
independence. Repeated sessions and valid experiment design remain necessary.29+
Missing/empty campaign IDs or missing/noninteger trial indices leave this count30+
null. Candidate duplicate trial IDs are rejected for claims; a baseline's31+
distinct count must equal its metric sample count.32+
33+
Common identity includes command track/semantics, fixture/scenario/oracle34+
versions, environment isolation, runner class, cache/load state, remote35+
transport/server/shaping, token calibration, and controlled agent identity.36+
Actual nested fixture/instruction aliases are normalized. Subject binary hashes,37+
VCS versions and subject-specific prompt labels deliberately differ between38+
comparators and are not equality requirements. Within-subject population checks39+
still reject mixed binary identities. The full field list is centralized in40+
`oakbench.populations.COMPARISON_FIELDS`.41+
42+
Known-versus-missing or unequal common identity invalidates comparisons in both43+
modes. Books with duplicate cell keys or unknown identity versions fail loading.44+
Book construction rejects incompatible populations rather than silently pooling45+
them. It preserves failed/skipped/unmeasured outcome denominators alongside the46+
successful metric summary.47+
48+
The scorecard CLI defaults to `--mode claim`; `--mode diagnostic` is explicit.49+
The Python API retains its diagnostic default for existing local tooling.50+
Every result names its mode and `claim_eligible`; diagnostic results always set51+
that field false and carry a diagnostic-only notice. Existing diagnostic52+
GREEN/RED semantics remain useful locally but cannot establish a public claim.53+
54+
Claim mode requires complete applicable identity, at least 30 distinct trials55+
in both populations (100 for p99), no duplicate candidate trials, no hidden56+
failures/skips/unmeasured metrics, a measured finite nonnegative baseline noise57+
floor, and a valid baseline confidence interval. Unknown cache/load/model58+
sentinels are not measured identity. Recall/precision guards require versioned59+
output oracles; a `patch_apply_ok` guard requires a versioned patch oracle and60+
every successful row to explicitly pass it.61+
62+
Both candidate and recorded baseline confidence levels must be at least 0.9563+
and below 1. Legacy missing confidence does not imply 95%. Candidate results64+
retain their confidence level and bootstrap draw count. Nonfinite/out-of-range65+
confidence and nonpositive/noninteger draw counts are rejected before analysis.66+
No arbitrary bootstrap-draw floor substitutes for assessing precision.67+
68+
Absent eligibility evidence yields AMBER with explicit reasons and a nonzero69+
claim-mode CLI exit; missing inputs remain UNMEASURED and also exit nonzero.70+
Incompatible evidence is INVALID. Evidence eligibility does not force GREEN:71+
the existing statistical verdict still decides distance from the target.72+
73+
## Consequences and limits74+
75+
The eligibility floor is intentionally conservative even for exact resource76+
metrics. It is not a power calculation, tail-precision guarantee, multiplicity77+
correction, or claim that arbitrary row IDs prove independent sampling.78+
79+
`claim_eligible` means this scorecard's comparison-evidence prerequisites passed.80+
It does not replace publication gates, provenance/content attestation,81+
preregistered analysis, public failure reporting, or scientific review. A82+
baseline noise-floor value is a recorded measurement, not an authenticated83+
calibration provenance record. Cross-runner-class ratios still require a84+
separate same-run analysis; saved incompatible medians are rejected.85+
86+
Older rows missing required identity need a fresh measured campaign. The87+
baseline builder must not manufacture source-run identity from the host on88+
which an old JSONL file happens to be summarized. Human/agent study protocol,89+
hierarchical uncertainty and production FDR wiring remain separate work.90+
91+
`benchmark_stats.py` now prints all outcome denominators before its92+
success-conditioned statistics, including failure-only and unmeasured cells.93+
Unknown outcomes remain distinct from observed nonzero exits. Skips are94+
excluded from the attempts denominator and reported separately.
M
scripts/benchmark_stats.py
Loading diff…
M
scripts/oakbench/baseline_book.py
Loading diff…
M
scripts/oakbench/populations.py
Loading diff…
M
scripts/oakbench/scorecard.py
Loading diff…
M
scripts/oakbench/stats.py
Loading diff…
M
scripts/scorecard.py
Loading diff…
M
tests/test_baseline_book.py
Loading diff…
M
tests/test_baseline_campaign.py
Loading diff…
A
tests/test_claim_eligibility.py
Loading diff…
M
tests/test_scorecard.py
Loading diff…