Skip to content

Commit 3b3fcd0

Browse files
authored
docs: expand the S1 calibration to 140 replays and correct the reading (#18)
* docs: expand the S1 calibration to 140 replays and correct the reading Four exams at thirty-five replays each, up from three at ten. The larger sample changes three published claims. Dispersion was understated on every exam at n=10, because tails need samples. Leading with max-over-min was the wrong statistic; by coefficient of variation and p90/p10 the only outlier is the exam where many implementations are correct. Exam D is the control that separates the explanations: it costs four times exam A and takes three times the turns, yet disperses barely more. Cost variance tracks how many shapes a correct answer can take, not how much work it takes. Ten replays observed no failures and suggested the exams were uniformly too easy. At thirty-five a genuine failure appeared, on the moderate exam rather than either exam built to be hard. It is a true positive: the replay passed its own fail-to-pass test and broke an existing one by changing code it was not asked to touch. Only the no-regression suite caught it -- the file footprint was identical to every passing replay, so a footprint-based scope check would not have. The bar is still met on point estimates, but only two of four exams have a 95% lower bound at or above 90%, and the README now says so. Three of exam D's replays were lost to permission stalls, which is the sole reason it misses the floor -- an instrument limitation rather than model behaviour. * docs: correct the calibration reading after an audit against the raw data An audit of the published claims against sittings.csv found four errors. Three were arithmetic or provenance; the first was an overclaim. The count of exams establishing a 90% floor was two; it is one. Exam C's Wilson lower bound is 89.848%, which the table rounded to 90% and the prose then treated as clearing. Rounding a lower bound up is the one direction this measurement cannot afford. Bounds now print to three decimals. Exam D's ten-replay dispersion figure was computed over a different window than A, B and C -- nine scored rows rather than replays n<=10. Corrected from 1.46x to 1.36x, which strengthens rather than weakens the argument it supported. Exam D did not exist when the ten-replay reading was published, so its before-and-after pair is a retrospective comparison and is now labelled as one rather than presented as a correction. analyze.py computed none of the confidence bounds or dispersion statistics the documents published, so 'regenerates with this script' was false and the tables could drift from the data unnoticed. It now computes every published figure. Two claims were also too strong for four data points from one repository. 'Cost variance tracks ambiguity, not effort' is now stated as a hypothesis the calibration is consistent with, noting that exam C is a single point carrying most of the contrast. And attributing exam D's missed floor to its three permission stalls assumed those replays would have passed, which is unknowable: they produced no verdict, and exam C misses the floor having lost one replay.
1 parent 6b8dc94 commit 3b3fcd0

5 files changed

Lines changed: 656 additions & 209 deletions

File tree

README.md

Lines changed: 55 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ shipping an instrument if it will not hold its own first measurement to the
4949
standard it asks of everyone else's.
5050

5151
That measurement has now been taken, and the numbers are in [Calibration
52-
numbers](#calibration-numbers) below. Thirty replays across three exams
53-
reproduced their deterministic assertions every time, at a median cost of $0.15
54-
to $0.43 per replay depending on the task. The bar is met on every clause as a
55-
point estimate — with the caveat, stated there rather than omitted, that ten
56-
replays cannot establish a 90% floor however they come out.
52+
numbers](#calibration-numbers) below. Across four exams replayed thirty-five
53+
times each, deterministic assertions reproduced in 131 of 132 scored replays, at
54+
a median cost of $0.15 to $0.57 per replay depending on the task. The bar is met
55+
on every clause as a point estimate. Stated there rather than omitted: only one
56+
of the four exams has a 95% lower bound at or above 90%, so this establishes a
57+
high reproduction rate and not a 90% floor for every exam.
5758

5859
The scaffolding that produced them is committed under `spikes/`. It is not
5960
product code and is held to a lower standard than the rest of this repository,
@@ -218,39 +219,55 @@ recorded because each one is individually tempting to remove.
218219

219220
## Calibration numbers
220221

221-
Measured 2026-07-25. Three exams, ten replays each, fixed conditions:
222-
`claude-opus-4-8`, one git worktree per replay at a pinned commit, one
223-
fail-to-pass assertion plus an 82-file no-regression suite. Method, raw rows,
224-
and the full reading are under [`spikes/s1/`](spikes/s1/); the table below
225-
regenerates with `python3 spikes/s1/analyze.py`.
226-
227-
| Exam | Scored | Errors | Assertions reproduced | Cost per replay (median) | Cost spread | Turns |
228-
| --- | --- | --- | --- | --- | --- | --- |
229-
| A — bounded fix | 10 | 0 | 10 of 10 | $0.147 | 1.08× | 6 every time |
230-
| B — feature slice | 9 | 1 | 9 of 9 | $0.234 | 1.28× | 6–8 |
231-
| C — design latitude | 10 | 0 | 10 of 10 | $0.426 | 2.70× | 10–19 |
232-
233-
Thirty replays cost $8.65 in total. The one error was a permission stall; it is
234-
excluded from the counts above rather than recorded as a failure.
235-
236-
**What this supports.** No replay failed its deterministic assertions, and the
237-
file footprint was identical across all thirty. Effort was a different matter:
238-
the cost spread widened with how much latitude the task allowed, and on the
239-
most open-ended exam the same task ran from 10 to 19 turns and varied 2.7-fold
240-
in cost. Outcome-level assertions look stable enough to build on; token-level
241-
ones do not.
242-
243-
**What this does not support.** Ten replays cannot establish a 90% floor. A
244-
result of ten out of ten carries a 95% interval of 72% to 100%, so these numbers
245-
say "no failure observed in ten replays" and not "at least 90%". Separating 90%
246-
from 99% needs more replays than this measurement bought.
247-
248-
The pre-registered bar in [Status](#status) is met on every clause as a point
249-
estimate, with that caveat attached. Two consequences already follow: a
250-
cost band cannot use one global multiple across exams of different latitude, and
251-
a single session is a weak cost anchor — on exam C the golden session happened
252-
to fall at the 10th percentile of its own replays, which accounts for most of
253-
its apparent cost growth.
222+
Measured 2026-07-25. Four exams, thirty-five replays each, fixed conditions:
223+
`claude-opus-4-8`, one git worktree per replay at a pinned commit, exam-supplied
224+
fail-to-pass tests plus an 82-file no-regression suite. Method, raw rows, and
225+
the full reading are under [`spikes/s1/`](spikes/s1/); the table regenerates
226+
with `python3 spikes/s1/analyze.py`.
227+
228+
| Exam | Replays | Errors | Scored | Reproduced | Rate | 95% lower bound | Cost per replay |
229+
| --- | --- | --- | --- | --- | --- | --- | --- |
230+
| A — bounded fix, pointed | 35 | 0 | 35 | 35 | 100% | **90.11%** | $0.147 |
231+
| B — feature slice, pointed | 35 | 4 | 31 | 30 | 96.8% | 83.81% | $0.243 |
232+
| C — design latitude | 35 | 1 | 34 | 34 | 100% | 89.85% | $0.328 |
233+
| D — discovery, unpointed | 35 | 3 | 32 | 32 | 100% | 89.28% | $0.573 |
234+
235+
140 replays cost $48.50 in total. Eight ended in a permission stall and are
236+
recorded as errors, excluded from the counts rather than charged to the model.
237+
238+
**What this supports.** Deterministic assertions reproduced in 131 of 132 scored
239+
replays. The one failure is a true positive: that replay passed its own
240+
fail-to-pass test and broke an existing test by changing code it had not been
241+
asked to touch. Only the broad no-regression suite caught it — its file
242+
footprint was identical to every passing replay of the same exam, so a
243+
footprint-based scope check would have missed it.
244+
245+
**What this does not support.** The pre-registered bar in [Status](#status) is
246+
met on every clause as a point estimate, but only **one** of the four exams has
247+
a 95% lower bound at or above 90%. The bounds are given to two decimals because
248+
C's is 89.85%, which rounds to 90% and is not 90%; rounding a lower bound up is
249+
the one direction this measurement cannot afford. A point estimate meeting a
250+
floor is not the same as establishing it. These numbers establish that
251+
assertions reproduce at a high rate, and only exam A supports the stronger
252+
claim.
253+
254+
**Cost dispersion appears to track ambiguity more than effort.** Exam C, where
255+
many different implementations are correct, is the outlier on every measure: a
256+
coefficient of variation of 0.38 against 0.07–0.15 for the others, and a p90/p10
257+
cost ratio of 2.58 against 1.20–1.35. Exam D is the control — it costs four
258+
times exam A and takes three times the turns, and disperses more than A but far
259+
less than C. Stated as a hypothesis rather than a result: four exams in one
260+
repository is thin evidence, and C is a single point carrying most of the
261+
contrast.
262+
263+
Two consequences follow for the design: a baseline-relative cost band cannot use
264+
one global multiple, and an exam's band does not appear predictable from its
265+
cost or difficulty, so it has to be calibrated from that exam's own series.
266+
267+
An earlier version of this section reported ten replays of three exams. That
268+
sample understated dispersion on every exam and observed no failures at all;
269+
both errors ran optimistic. A ten-replay series is enough to detect a gross
270+
regression and not enough to characterise a distribution.
254271

255272
The exams were written to be single-goal because no such session existed in the
256273
available history, so these figures are an optimistic bound. The full list of

spikes/s1/analyze.py

Lines changed: 94 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@
1212
counted on their own line: a harness crash, a spend cap, or a broken
1313
environment is not evidence about the model.
1414
15+
Every statistic published in the README or in `results/summary.md` is computed
16+
here, so the documents can be regenerated rather than transcribed. Confidence
17+
bounds print to three decimal places on purpose: a lower bound rounded up to a
18+
whole percent reads as clearing a floor it does not clear.
19+
1520
Standard library only, by design — this runs anywhere the spike does.
1621
"""
1722

1823
from __future__ import annotations
1924

2025
import csv
2126
import json
27+
import math
2228
import pathlib
2329
import statistics
2430
import sys
@@ -27,6 +33,37 @@
2733
PER_EXAM_FLOOR = 0.90
2834
ABSOLUTE_FLOOR = 0.70
2935
COST_MULTIPLE = 2.0
36+
Z = 1.96
37+
38+
39+
def wilson(k: int, n: int) -> tuple[float, float]:
40+
"""Wilson score interval. Preferred over the normal approximation, which
41+
returns a degenerate zero-width interval when every trial passes."""
42+
if n == 0:
43+
return (0.0, 0.0)
44+
p = k / n
45+
denom = 1 + Z * Z / n
46+
centre = (p + Z * Z / (2 * n)) / denom
47+
half = Z * math.sqrt(p * (1 - p) / n + Z * Z / (4 * n * n)) / denom
48+
return (max(0.0, centre - half), min(1.0, centre + half))
49+
50+
51+
def dispersion(costs: list[float]) -> dict[str, float]:
52+
"""Robust spread measures. Max-over-min is reported last because a single
53+
outlying replay moves it; it is not a description of the distribution.
54+
55+
Quantiles use the exclusive method (the standard library default). Other
56+
conventions give different p90/p10 figures, so the choice is stated rather
57+
than assumed."""
58+
quart = statistics.quantiles(costs, n=4, method="exclusive")
59+
pcts = statistics.quantiles(costs, n=100, method="exclusive")
60+
med = statistics.median(costs)
61+
return {
62+
"cv": statistics.stdev(costs) / statistics.mean(costs),
63+
"iqr_med": (quart[2] - quart[0]) / med,
64+
"p90_p10": pcts[89] / pcts[9],
65+
"max_min": max(costs) / min(costs),
66+
}
3067

3168

3269
def main() -> int:
@@ -35,57 +72,81 @@ def main() -> int:
3572
print("no sittings recorded", file=sys.stderr)
3673
return 2
3774

75+
exams = sorted({r["exam"] for r in rows})
76+
clause_90 = clause_70 = clause_cost = True
77+
clearing_floor = []
78+
79+
print("REPRODUCTION")
3880
print(
39-
f"{'exam':<6}{'n':<4}{'err':<5}{'tier1/2':<10}"
40-
f"{'cost med':<11}{'golden':<11}{'ratio':<8}{'spread':<9}{'turns':<9}{'touched'}"
81+
f" {'exam':<6}{'replays':<9}{'err':<5}{'scored':<8}{'passed':<8}"
82+
f"{'rate':<9}{'95% lower':<11}{'95% upper'}"
4183
)
42-
43-
clause_90 = True
44-
clause_70 = True
45-
clause_cost = True
46-
47-
for exam in sorted({r["exam"] for r in rows}):
84+
for exam in exams:
4885
ex = [r for r in rows if r["exam"] == exam]
49-
errored = [r for r in ex if r["is_error"] == "1"]
50-
# ERROR is not FAIL. An errored sitting produced no verdict, so it
51-
# leaves the denominator rather than counting against the model.
86+
# ERROR is not FAIL. An errored replay produced no verdict, so it leaves
87+
# the denominator rather than counting against the model.
5288
scored = [r for r in ex if r["is_error"] != "1"]
5389
passed = [r for r in scored if r["f2p_pass"] == "1" and r["p2p_pass"] == "1"]
54-
5590
rate = len(passed) / len(scored) if scored else 0.0
56-
costs = [float(r["cost_usd"]) for r in scored]
57-
median = statistics.median(costs) if costs else 0.0
58-
golden = json.loads((SPIKE / f"exams/{exam}/golden.json").read_text())["cost_usd"]
59-
ratio = median / golden if golden else float("inf")
60-
turns = sorted(int(r["num_turns"]) for r in scored)
61-
touched = sorted({r["touched_files"] for r in scored})
62-
spread = max(costs) / min(costs) if costs and min(costs) else 0.0
63-
64-
turn_range = f"{turns[0]}" if turns[0] == turns[-1] else f"{turns[0]}-{turns[-1]}"
65-
print(
66-
f"{exam:<6}{len(ex):<4}{len(errored):<5}{rate:<10.0%}"
67-
f"{median:<11.4f}{golden:<11.4f}{ratio:<8.2f}"
68-
f"{spread:<9.2f}{turn_range:<9}{','.join(touched)}"
69-
)
70-
91+
lo, hi = wilson(len(passed), len(scored))
92+
if lo >= PER_EXAM_FLOOR:
93+
clearing_floor.append(exam)
7194
if rate < PER_EXAM_FLOOR:
7295
clause_90 = False
7396
if rate < ABSOLUTE_FLOOR:
7497
clause_70 = False
98+
print(
99+
f" {exam:<6}{len(ex):<9}{len(ex) - len(scored):<5}{len(scored):<8}"
100+
f"{len(passed):<8}{rate:<9.1%}{lo:<11.3%}{hi:.3%}"
101+
)
102+
103+
print()
104+
print("COST")
105+
print(
106+
f" {'exam':<6}{'median':<10}{'golden':<10}{'ratio':<9}"
107+
f"{'CV':<9}{'IQR/med':<10}{'p90/p10':<10}{'max/min'}"
108+
)
109+
for exam in exams:
110+
scored = [r for r in rows if r["exam"] == exam and r["is_error"] != "1"]
111+
costs = [float(r["cost_usd"]) for r in scored]
112+
median = statistics.median(costs)
113+
golden = json.loads((SPIKE / f"exams/{exam}/golden.json").read_text())["cost_usd"]
114+
ratio = median / golden if golden else float("inf")
75115
if ratio > COST_MULTIPLE:
76116
clause_cost = False
117+
d = dispersion(costs)
118+
print(
119+
f" {exam:<6}{median:<10.4f}{golden:<10.4f}{ratio:<9.2f}"
120+
f"{d['cv']:<9.3f}{d['iqr_med']:<10.3f}{d['p90_p10']:<10.2f}{d['max_min']:.2f}"
121+
)
77122

78-
def verdict(ok: bool) -> str:
79-
return "MET" if ok else "MISSED"
123+
scored_all = [r for r in rows if r["is_error"] != "1"]
124+
passed_all = [r for r in scored_all if r["f2p_pass"] == "1" and r["p2p_pass"] == "1"]
125+
errors = len(rows) - len(scored_all)
126+
total = sum(float(r["cost_usd"]) for r in rows)
80127

81128
print()
82-
print(f" every exam >= 90% ......... {verdict(clause_90)}")
83-
print(f" no exam below 70% ......... {verdict(clause_70)}")
84-
print(f" median cost <= 2x golden .. {verdict(clause_cost)}")
129+
print(
130+
f" {len(rows)} replays, {errors} errors ({errors / len(rows):.1%}), "
131+
f"{len(passed_all)} of {len(scored_all)} scored reproduced, ${total:.2f} total"
132+
)
133+
134+
print()
135+
print("THE PRE-REGISTERED BAR, on point estimates")
136+
print(f" every exam >= 90% ......... {'MET' if clause_90 else 'MISSED'}")
137+
print(f" no exam below 70% ......... {'MET' if clause_70 else 'MISSED'}")
138+
print(f" median cost <= 2x golden .. {'MET' if clause_cost else 'MISSED'}")
85139
print()
140+
print(
141+
f" Exams whose 95% LOWER BOUND also reaches 90%: "
142+
f"{len(clearing_floor)} of {len(exams)}"
143+
+ (f" ({', '.join(clearing_floor)})" if clearing_floor else "")
144+
)
145+
print(" A point estimate meeting the floor is not the same as establishing it.")
86146

147+
print()
87148
if clause_90 and clause_70 and clause_cost:
88-
print("BAR MET")
149+
print("BAR MET (point estimates)")
89150
return 0
90151
print("BAR MISSED — the design pivots before any product code is written")
91152
return 1

0 commit comments

Comments
 (0)