|
| 1 | +# P-022 / #263-A — calibration reproducibility policy, PROPOSAL |
| 2 | + |
| 3 | +**Status: PROPOSAL. Nothing here is ratified, and nothing here is a number.** |
| 4 | + |
| 5 | +This document freezes the *mechanism* by which two calibration runs are judged |
| 6 | +to agree. It deliberately contains no constant values. Every quantity that will |
| 7 | +eventually carry a number is named, given units and a sign convention, and left |
| 8 | +empty, because a document that fixes a mechanism and a value in the same breath |
| 9 | +is a document where the value was chosen by whoever was holding the pen. |
| 10 | + |
| 11 | +No clock authority is claimed or implied. No measurement is proposed here. |
| 12 | + |
| 13 | +## Why this document exists, in the frozen brief's own terms |
| 14 | + |
| 15 | +#263-A §13 asks for an instrument, a `CALIBRATION_ONLY` validation report and a |
| 16 | +fresh exact-head PASS. The instrument exists and passes. But §7 requires a |
| 17 | +mechanical noise and outlier policy fixed **in advance**, together with a |
| 18 | +determinism check, and §9 says that a second run on the same environment must |
| 19 | +reproduce within that policy — otherwise the instrument is **not yet frozen**. |
| 20 | + |
| 21 | +The repository's own record says plainly that this is not satisfied: the |
| 22 | +committed sizing pairs do not reproduce reliably, the report-of-record glob is |
| 23 | +empty, and `n=5` has passed and failed on this machine in no pattern. Reading |
| 24 | +§13 while treating §9 as a decorative paragraph would be a very human way |
| 25 | +through the gate, and dismantling exactly that move is what the last twelve |
| 26 | +rounds were for. |
| 27 | + |
| 28 | +So the blockage is not a missing file with the right name. **We need an |
| 29 | +instrument that says compatible things twice**, and a written, mechanical |
| 30 | +definition of "compatible" that was fixed before it was applied. |
| 31 | + |
| 32 | +## 1. The object of admissibility |
| 33 | + |
| 34 | +The policy decides exactly one question, about exactly one kind of input: |
| 35 | + |
| 36 | +> Given **two calibration runs** of the **same instrument** on the **same |
| 37 | +> environment** over the **same cell universe**, is the pair |
| 38 | +> `reproducible`, `inconclusive`, or `invalid`? |
| 39 | +
|
| 40 | +It does **not** decide whether any engine is fast enough, whether a change is a |
| 41 | +regression, or whether any workload meets any budget. Those are D7 questions and |
| 42 | +§6 keeps them in a different document, behind a different freeze. See §7 below, |
| 43 | +which states the separation as a rule rather than a hope. |
| 44 | + |
| 45 | +The three verdicts are not interchangeable: |
| 46 | + |
| 47 | +| verdict | meaning | |
| 48 | +|---|---| |
| 49 | +| `reproducible` | the two runs agree within the frozen policy; the instrument is behaving as an instrument | |
| 50 | +| `inconclusive` | the runs are comparable and their agreement is neither clearly inside nor clearly outside the policy | |
| 51 | +| `invalid` | the two runs are **not comparable**, so no statement about agreement is available at all | |
| 52 | + |
| 53 | +`invalid` is not a bad score. It is a refusal to score, and it must never be |
| 54 | +reported as a failure to reproduce — an incomparable pair says nothing about |
| 55 | +the instrument, and calling it a failure would invite fixing it by re-running. |
| 56 | + |
| 57 | +## 2. The frozen form |
| 58 | + |
| 59 | +### 2.1 Statistic and granularity |
| 60 | + |
| 61 | +- **Granularity: the cell.** A cell is the existing four-part identity |
| 62 | + `(rung, engine, workload, regime)`. No coarser unit, so a well-behaved cell |
| 63 | + cannot average away a badly behaved one; no finer unit, so nothing new has to |
| 64 | + be recorded. |
| 65 | +- **Statistic: the cell's median** of its retained samples, in nanoseconds — |
| 66 | + the quantity the instrument already computes and commits as `median_ns`. |
| 67 | +- **Retention** is governed by §6 below and by nothing else. |
| 68 | + |
| 69 | +### 2.2 The comparison must be symmetric, and today it is not |
| 70 | + |
| 71 | +Reproducibility is a **symmetric relation**: if run A agrees with run B, run B |
| 72 | +agrees with run A. The incumbent rule is not symmetric. It computes |
| 73 | + |
| 74 | + rel = |m_B − m_A| / m_A |
| 75 | + |
| 76 | +dividing by whichever run happens to have been recorded first. For a tolerance |
| 77 | +`T` and a ratio `r = m_B / m_A`, the forward direction refuses when `r > 1 + T` |
| 78 | +and the reversed direction refuses when `r > 1 / (1 − T)`. Since |
| 79 | +`1 / (1 − T) > 1 + T` for every `T > 0`, there is always a non-empty band |
| 80 | + |
| 81 | + 1 + T < r < 1 / (1 − T) |
| 82 | + |
| 83 | +in which **the verdict depends on which run was recorded first**. That is a |
| 84 | +structural property of the form, true for any positive tolerance, and it does |
| 85 | +not depend on the incumbent constant's value. |
| 86 | + |
| 87 | +Nothing in the committed record turns on this — no verdict has been shown to sit |
| 88 | +in that band — and this document does not go looking, because hunting through |
| 89 | +recorded pairs for one that flips is selection on outcome wearing a lab coat. It |
| 90 | +is reported as a defect of the *form*, and the replacement form removes it by |
| 91 | +construction. |
| 92 | + |
| 93 | +**The proposed comparison is symmetric in both terms:** |
| 94 | + |
| 95 | + Δ(c) = |m_B(c) − m_A(c)| the observed change |
| 96 | + t(c) = (m_A(c) + m_B(c)) / 2 the reference duration |
| 97 | + bound(t) = A_abs + R_rel · t the admissible change |
| 98 | + |
| 99 | +`t` is the midpoint precisely so that swapping the runs changes nothing. Using |
| 100 | +either run alone reintroduces the asymmetry; using the minimum would make the |
| 101 | +bound depend on which run was slower, which is the same disease. |
| 102 | + |
| 103 | +### 2.3 Why hybrid, and the honesty cost of saying so |
| 104 | + |
| 105 | +A purely relative bound applies one fraction across a population spanning three |
| 106 | +orders of magnitude. Round 6's exploratory reading — formally **O3, |
| 107 | +inconclusive**, licensing nothing — observed that relative shift rises sharply |
| 108 | +at the short end of the ladder while absolute drift does not stay constant |
| 109 | +either. Round 7 then showed that a minimal real-process witness does not |
| 110 | +reproduce the historical instability at all. |
| 111 | + |
| 112 | +So the hybrid form is **chosen on data that has already been seen**. That is |
| 113 | +permitted for choosing a *form* and forbidden for fixing *constants*, and it is |
| 114 | +the whole reason §4's holdout firewall exists. This document states the |
| 115 | +dependency rather than hiding it: if the form is wrong, the holdout is what will |
| 116 | +say so, and the response to a failed holdout is §4, not a better fit. |
| 117 | + |
| 118 | +`A_abs` carries nanoseconds. `R_rel` is dimensionless. Neither has a value here. |
| 119 | + |
| 120 | +### 2.4 The three-way per-cell rule, and its inequalities |
| 121 | + |
| 122 | + Δ(c) ≤ bound(t(c)) → cell reproducible |
| 123 | + Δ(c) > M · bound(t(c)) → cell NOT reproducible |
| 124 | + otherwise → cell inconclusive |
| 125 | + |
| 126 | +with `M > 1` a single dimensionless widening factor. One factor rather than a |
| 127 | +second independent pair of constants, because every extra constant is another |
| 128 | +place a result can be steered. |
| 129 | + |
| 130 | +The inequalities are fixed here and are not adjustable: the reproducible branch |
| 131 | +is **inclusive** (`≤`) and the refusing branch is **strict** (`>`). A value |
| 132 | +landing exactly on a boundary is therefore decided by the written rule and never |
| 133 | +by a rounding direction. |
| 134 | + |
| 135 | +Comparisons are performed in exact rational arithmetic, as `classify.py` already |
| 136 | +does, so that an edge is decided by the rule rather than by binary floating |
| 137 | +point. |
| 138 | + |
| 139 | +### 2.5 Aggregation: precedence, never counting |
| 140 | + |
| 141 | +A run pair's verdict is determined by strict precedence over its cells: |
| 142 | + |
| 143 | +1. any cell `invalid`, or any pair-level invalidating condition in §6 → **pair `invalid`** |
| 144 | +2. else any cell **not reproducible** → **pair NOT reproducible** |
| 145 | +3. else any cell `inconclusive` → **pair `inconclusive`** |
| 146 | +4. else → **pair `reproducible`** |
| 147 | + |
| 148 | +**There is deliberately no tolerated-failure count.** A rule of the form "at most |
| 149 | +`K` cells may fail" introduces a constant whose only function is to decide how |
| 150 | +much disagreement to forgive, and it will be adjusted the first time `K + 1` |
| 151 | +cells fail. The multiplicity problem this creates is real and is named rather |
| 152 | +than solved by a knob: requiring every cell to agree over a large universe is a |
| 153 | +strict family-wise condition, and the correct response is a bound that honestly |
| 154 | +describes the instrument's own dispersion, not a budget of permitted failures. |
| 155 | +If that proves impossible, the honest outcome is a failed policy under §4 and a |
| 156 | +conversation with the owner, not a `K` that grows until the gate opens. |
| 157 | + |
| 158 | +## 3. How the constants will be obtained |
| 159 | + |
| 160 | +### 3.1 Design evidence and validation evidence are different corpora |
| 161 | + |
| 162 | +**Design / training evidence** — already-seen calibration data, admissible for |
| 163 | +choosing the form and fitting the constants: |
| 164 | + |
| 165 | +- the Round 6 ladder and its full dataset |
| 166 | +- the Round 7 dataset, every retained observation and accounting field |
| 167 | +- the four committed sizing halves, stale and marked stale |
| 168 | +- the preserved pre-contract artifacts under `docs/evidence/historical/` |
| 169 | + |
| 170 | +**Validation evidence** — does not exist yet, is specified in §4, and may not be |
| 171 | +drawn from anything above. |
| 172 | + |
| 173 | +Using the training corpus to fit the constants and then citing the same corpus as |
| 174 | +independent evidence that the policy works is the single move this document |
| 175 | +exists to make impossible. |
| 176 | + |
| 177 | +### 3.2 The fit consumes dispersion, never pass/fail labels |
| 178 | + |
| 179 | +This is the load-bearing rule of the whole proposal. |
| 180 | + |
| 181 | +The constants must be fitted to **the instrument's own observed variation as a |
| 182 | +function of duration**, and to nothing else. They must **not** be fitted to |
| 183 | +which historical pairs anyone believes should have passed. |
| 184 | + |
| 185 | +The reason is that "which pairs should have passed" is a label applied after the |
| 186 | +outcomes were seen. Fitting a tolerance to such labels is tolerance shopping |
| 187 | +performed in a single step, and it would produce a constant that is guaranteed to |
| 188 | +ratify the history it was derived from while predicting nothing. |
| 189 | + |
| 190 | +Fitting to dispersion has no such property: the bound describes how much this |
| 191 | +instrument moves when measuring the same thing twice, which is a claim about the |
| 192 | +instrument that a fresh pair can falsify. |
| 193 | + |
| 194 | +Concretely, the preregistered fitting procedure must state, before it is run: |
| 195 | + |
| 196 | +- the exact subset of the training corpus it consumes, by committed file and sha256 |
| 197 | +- the response variable — observed `|Δ|` between comparable repeated measurements |
| 198 | +- the predictor — the reference duration `t` |
| 199 | +- the model — the `bound(t) = A_abs + R_rel · t` form frozen in §2 |
| 200 | +- the estimator — a **quantile** of the dispersion at level `q`, so the bound is |
| 201 | + an explicit coverage statement about the instrument rather than a best fit |
| 202 | +- that the procedure is **deterministic**: same inputs, same constants, no seed, |
| 203 | + no manual adjustment, no re-run |
| 204 | +- that its output is committed **before** any validation pair is recorded |
| 205 | + |
| 206 | +`q` is a constant and has no value here. |
| 207 | + |
| 208 | +### 3.3 Choosing N without escalating until it passes |
| 209 | + |
| 210 | +The policy also fixes how the repetition count `N` is selected, and this is where |
| 211 | +the obvious mistake lives. |
| 212 | + |
| 213 | +**Forbidden:** "N is the smallest count at which the pair reproduces." That is |
| 214 | +literally escalate-until-pass, and it converts the stop rule into a starting gun. |
| 215 | + |
| 216 | +**Required:** `N` is chosen **before** the validation pair, from the fitted |
| 217 | +dispersion model, as the smallest count on a preregistered ladder whose |
| 218 | +*predicted* dispersion falls within `bound(t)` for every cell. The prediction is |
| 219 | +made once, from training evidence, and committed. The validation pair then tests |
| 220 | +that choice exactly once. |
| 221 | + |
| 222 | +If the validation pair fails, `N` is **not** increased. §4 applies. |
| 223 | + |
| 224 | +The ladder's values and its maximum are constants and have no values here. |
| 225 | + |
| 226 | +## 4. The holdout firewall |
| 227 | + |
| 228 | +After the mechanism is frozen and the constants are frozen by §3, and **before** |
| 229 | +any validation measurement exists, a validation protocol is committed that fixes: |
| 230 | + |
| 231 | +- the environment, by the recorded fingerprint of §6.5 |
| 232 | +- the cell universe |
| 233 | +- `N` and the warmup discards |
| 234 | +- that the pair is **exactly two runs**, recorded back to back |
| 235 | +- that both halves are committed, pass or fail |
| 236 | +- the verdict procedure, which is §2 applied mechanically |
| 237 | + |
| 238 | +Then it is run **once**. |
| 239 | + |
| 240 | + validation pair reproducible → §7's gate may proceed |
| 241 | + validation pair inconclusive → reported as inconclusive; the gate does NOT open |
| 242 | + validation pair not reproducible → FAILED POLICY, returned to the owner |
| 243 | + validation pair invalid → the pair was not comparable; diagnose the |
| 244 | + incomparability, do not rescore it |
| 245 | + |
| 246 | +**On a failure, the constants are not adjusted.** Not widened, not refitted, not |
| 247 | +"re-estimated with the new data included". The policy is returned to the owner as |
| 248 | +failed, with the evidence, and the next step is a design decision they make. |
| 249 | +Refitting after seeing the holdout is tolerance shopping in a good suit, and it |
| 250 | +is the exact failure mode this entire PR was built to prevent. |
| 251 | + |
| 252 | +A second validation pair requires a separate authorisation, and a policy that |
| 253 | +needed several attempts must say so in its own record. |
| 254 | + |
| 255 | +## 5. What the instrument already fixes, and is carried forward unchanged |
| 256 | + |
| 257 | +Stated so that the §7 contract below is complete rather than implied: |
| 258 | + |
| 259 | +- **Warmup discards** are a policy default enforced by a control, not a knob, and |
| 260 | + the `warm` regime's discards are not retained in the dataset because discarding |
| 261 | + them is what the regime is. |
| 262 | +- **Pair identity** is the existing ten-axis contract, and a mismatch raises |
| 263 | + rather than reporting a verdict. |
| 264 | +- **Outcome identity precedes timing.** Two runs that agree to the nanosecond |
| 265 | + while exiting differently reproduced a coincidence, not a measurement. |
| 266 | +- **Both halves of a pair are committed**, each naming the other, so a verdict can |
| 267 | + be recomputed instead of trusted. |
| 268 | + |
| 269 | +## 6. The complete §7 contract |
| 270 | + |
| 271 | +Every item below must carry an explicit decision, including an explicit "none". |
| 272 | +A silently absent policy is the thing §7 forbids. |
| 273 | + |
| 274 | +### 6.1 Warmup discards |
| 275 | + |
| 276 | +Per regime, fixed in advance, enforced by a control, not tunable per run. The |
| 277 | +current values are already policy and are carried forward. |
| 278 | + |
| 279 | +### 6.2 Trimming and winsorizing: **none** |
| 280 | + |
| 281 | +Stated as an explicit decision, not an omission. No trimmed mean, no winsorizing, |
| 282 | +no outlier rejection of any kind on retained samples. |
| 283 | + |
| 284 | +Every trimming rule carries a constant — how much to cut — and that constant is a |
| 285 | +place to steer the result from. The statistic is already the median, which is |
| 286 | +robust without discarding anything, and a sample that is genuinely wrong is the |
| 287 | +business of §6.4's invalidating conditions, which refuse the run rather than |
| 288 | +quietly improving it. |
| 289 | + |
| 290 | +### 6.3 Noise floor |
| 291 | + |
| 292 | +The existing opening and closing noise probes are carried forward as |
| 293 | +**run-invalidating conditions**, not as reproducibility conditions. They bound |
| 294 | +dispersion within one probe and drift between the opening and closing probes. |
| 295 | +They are different statistical quantities from the reproducibility bound and are |
| 296 | +not refitted by §3; this document does not propose new values for them. |
| 297 | + |
| 298 | +### 6.4 Run-invalidating conditions |
| 299 | + |
| 300 | +A run is `invalid`, and is never scored for reproducibility, when any of: |
| 301 | + |
| 302 | +- an identity contract breach — the candidate, the arms, or the harness digest |
| 303 | + moved during the run |
| 304 | +- an outcome contract breach — any spawn exited outside its declared contract |
| 305 | +- a noise probe outside §6.3 |
| 306 | +- a required cell missing, unknown, or named twice |
| 307 | +- a recorded field absent where the platform should have produced it |
| 308 | + |
| 309 | +Each condition must name itself in the record, with the cell or spawn that |
| 310 | +triggered it, and the run must leave a durable artifact saying so. |
| 311 | + |
| 312 | +### 6.5 Same environment |
| 313 | + |
| 314 | +A pair is comparable only if both halves carry the identical **environment |
| 315 | +fingerprint**: the existing ten pair-identity axes, plus the recorded machine and |
| 316 | +OS identity. |
| 317 | + |
| 318 | +A fingerprint mismatch makes the pair `invalid`, **never** "not reproducible". |
| 319 | +The instrument cannot cryptographically prove two runs happened on one machine; |
| 320 | +it can record what it observed, and it must refuse rather than guess. |
| 321 | + |
| 322 | +A GitHub-hosted Windows runner is already recorded as not measurement-grade — |
| 323 | +two runs minutes apart on one commit disagreed about their own environment — so |
| 324 | +the validation environment must be named explicitly in §4's protocol. |
| 325 | + |
| 326 | +### 6.6 Determinism and the re-run rule |
| 327 | + |
| 328 | +The verdict function is pure: same two committed reports in, same verdict out, |
| 329 | +recomputable by anyone from the committed evidence. No clock, no network, no |
| 330 | +filesystem state, no randomness. |
| 331 | + |
| 332 | +§9's re-run rule is satisfied by §4's validation pair and by nothing else. In |
| 333 | +particular it is **not** satisfied by any pair already in the repository, all of |
| 334 | +which predate this policy. |
| 335 | + |
| 336 | +## 7. Separation from D7, stated as a rule |
| 337 | + |
| 338 | +| this policy decides | this policy never decides | |
| 339 | +|---|---| |
| 340 | +| whether two calibration runs agree | whether any engine is fast enough | |
| 341 | +| whether the instrument may be frozen | any performance budget or regression bound | |
| 342 | +| which `N` the instrument uses | any G3 metric's pass or fail | |
| 343 | +| when a run is invalid | anything about a decisive workload | |
| 344 | + |
| 345 | +Three consequences, binding: |
| 346 | + |
| 347 | +1. No constant defined by this policy may be read by, copied into, or derived |
| 348 | + from any D7 threshold, and none may be used as one. |
| 349 | +2. The output of this policy is **never** an input to a G3 verdict. It gates the |
| 350 | + instrument, not the result. |
| 351 | +3. The incumbent reproducibility constant is **not** carried forward by |
| 352 | + assumption. It remains in force until §3 freezes a replacement and §4 |
| 353 | + validates it; at that point its retirement is an owner decision, recorded. |
| 354 | + |
| 355 | +## 8. The gate |
| 356 | + |
| 357 | +```text |
| 358 | +policy mechanism frozen (this document, ratified) |
| 359 | + ↓ |
| 360 | +constants frozen by preregistered calibration procedure (§3, no holdout data) |
| 361 | + ↓ |
| 362 | +validation protocol committed (§4, before measuring) |
| 363 | + ↓ |
| 364 | +fresh validation pair, run once |
| 365 | + ↓ |
| 366 | +reproducible under §7 contract? |
| 367 | + yes no / inconclusive |
| 368 | + ↓ ↓ |
| 369 | +#263-A PASS owner decision / redesign |
| 370 | + (constants are NOT adjusted) |
| 371 | +``` |
| 372 | + |
| 373 | +## 9. Every deferred constant, with no value |
| 374 | + |
| 375 | +| name | unit | what it bounds | fixed by | |
| 376 | +|---|---|---|---| |
| 377 | +| `A_abs` | nanoseconds | the duration-independent part of the admissible change | §3.2 | |
| 378 | +| `R_rel` | dimensionless | the duration-proportional part | §3.2 | |
| 379 | +| `q` | quantile level | the coverage the bound claims over the instrument's dispersion | §3.2 | |
| 380 | +| `M` | dimensionless, `> 1` | the width of the inconclusive band | §3.2 | |
| 381 | +| the `N` ladder | counts | the repetition counts the instrument may use | §3.3 | |
| 382 | +| `N_max` | count | the ladder's mandatory stop | §3.3 | |
| 383 | + |
| 384 | +Six names, no numbers. If a later revision of this document contains a value that |
| 385 | +did not come from §3's procedure, that value was invented, and this table is |
| 386 | +where it will be visible. |
| 387 | + |
| 388 | +## 10. What this proposal does not do |
| 389 | + |
| 390 | +It does not authorise any measurement, any re-record of the stale sizing pairs, |
| 391 | +any calibration of record, the D7 freeze, #263-B, merge, Stage 3 or Stage 4. It |
| 392 | +does not move the incumbent constants. It does not claim the instrument is |
| 393 | +frozen — that is precisely what it is a plan to find out. |
| 394 | + |
| 395 | +It is a mechanism awaiting ratification, and every number it will eventually need |
| 396 | +is still missing on purpose. |
0 commit comments