# PF-002 reference-gain study, Stage 2 implementation audit

**Virtual lab - simulated experiment.** This document records implementation and fixture qualification only. It is not a result. No exploratory or confirmatory seed has been used, `execution_authorised` is false, and nothing here is a physical measurement or calibration. Forces are channel-domain nominal newtons.

Protocol: [PF002_REFERENCE_GAIN_V1.md](PF002_REFERENCE_GAIN_V1.md), revision 4, commit `e178cad`.

## What exists

| File | Role |
| --- | --- |
| `pf002_reference_gain_v1.py` | Forward model, controllers, estimators, design, decisions, record |
| `pf002_reference_gain_bounds_v1.py` | Pure finite evaluations, with no reading or seed |
| `pf002_reference_gain_oracle_v1.py` | Independent sample-wise oracle. It imports nothing from the study |
| `pf002_reference_gain_deadline_v1.py` | Deadline wrapper with separate result, stdout and stderr caps |
| `test_pf002_reference_gain_v1.py` | 72 tests |
| `pf002-reference-gain-v1.svg` | Static setup, objective and goal diagram, labelled proposed |

The wrapper reuses the reviewed supervisor's process tracking and cleanup helpers unchanged. It replaces the pump, because the reviewed pump shares one cap across streams. The result now travels on its own pipe.

## Commands and exits

Run from `experiments/pf-001`, one worker, no network.

| Command | Exit | Note |
| --- | --- | --- |
| `python3 -B -m unittest test_pf002_reference_gain_v1` | 0 | 72 tests, about 19 s |
| One-seed fixture pass over all 48 configurations, seed 9201, capped at 900 s | 0 | About 37 s, 0 operational failures |
| Mutation checks, 25 deliberate defects | All failed the tests | See below |
| `python3 scripts/check-repository.py` | 0 | Repository policy |

The fixture pass and mutation scripts were throwaway and are not committed. Not run: `ci-local.sh`, any cohort, any seed outside 9201 to 9206.

## Mutation checks

The first run of 19 mutants had 2 survivors and 1 invalid mutant. `drop T_k` and `drop carry in state` survived, because bound slack absorbed them, and the precedence mutant failed only on a syntax error. An attainment test and a metamorphic test were added, the precedence mutant was redone, and a further mutant, `dual ignores truth`, survived until an explicit test was added. All 25 are now caught, including both factors of `lam_m`, the filter factor, the R1 cross-product, `k*phi`, the actuator and `Khat` signs, and actuator heat. 23 of them last ran on the code just before the actuator heat fix, and the other 2 on the final code.

## Defects found

| # | Defect | Kind | Disposition |
| --- | --- | --- | --- |
| 1 | **Every R2 row is `negative` in fixtures, because the out-of-window audit row raises the flag** | **Protocol** | **Retained, not repaired. Amendment below** |
| 2 | Test threshold for `k*phi` was wrong by a factor of 10 | Test | Fixed to the exact value. The derivation was right |
| 3 | Flag on a mimic row was penalised where not required | Code | Fixed to section 7.3 |
| 4 | Spoof modelled as a DC radius, not a waveform of unknown sign | Code | Fixed to section 7.2. Bounds only |
| 5 | Heat was a held radius, not the exact response | Code | Fixed. Bounds only |
| 6 | B1 mimic and held terms were tighter than the inherited additive forms | Code | Fixed to stationarity section 6.1 and 6.8 |
| 7 | R1 spoof used the wrong projection gain | Code | Fixed: a force at tone frequency shares the tone's filter |
| 8 | Two hard-coded R1 constants, 0.005 and 0.002 | Code | Replaced by derived values |
| 9 | `E_Q` was computed nowhere in the bound | Code | Fixed |
| 10 | Dual decisions, evidence states, hypotheses and sweep were absent from the first draft | Code | Implemented and tested |

Items 2 to 10 were found by bound evaluation, tests or review of the code against the protocol. None moved a target, level, seed or threshold.

## Proposed prospective amendment

Everything above the heading **Stage 2 completion** is the original audit of commit `c20dacb`, kept as written. Later changes are recorded there.

**This is a proposal, not applied.** Section 7.3 says a flag on any non-mimic row fails condition 2. `Nbar` is derived over in-domain classes, with leakage at `S_max`. The out-of-window row carries about 50 pN through the reference, well above `T_RO`. So the rule fails by construction, and it would make every R2 row `negative` whatever its merit.

Proposed change: the flag expectation applies to in-domain rows only, and the out-of-window row's flag is reported and carries no condition. That row stays a large-stimulus audit, and it is never evidence for the detector. The alternative is to widen `Nbar` to the 1 nN force, which would make the detector useless.

## Fixture observations

These are design bounds and one fixture seed. They are qualification data and not results. Being deterministic, the bounds are now prior knowledge, and that must be disclosed in any later report.

| Row at S05 | `E_N`, pN | `E_S`, pN | `m_null`, pN | `m_sig`, pN | Hand expectation of `m_null` |
| --- | --- | --- | --- | --- | --- |
| B1 | 8.44 | 9.50 | -9.12 | -4.70 | -9.6 |
| R1, 1 nN | 5.10 | 5.45 | -1.73 | +3.41 | -0.5 |
| R1-2nN, over budget | 4.57 | 4.86 | -0.61 | +4.59 | -0.1 |
| R1-abs | 6.00 | 9.81 | -6.99 | -5.31 | -1.4 |
| R2, full class | 8.44 | 9.50 | -9.12 | -4.70 | -9.7 |
| R2-N, narrower class | 4.34 | 4.51 | -0.03 | +5.30 | +0.4 |
| R3, photon | 4.15 | 4.65 | +0.02 | +5.01 | +0.5 |
| R3-E | 4.47 | 5.07 | -0.72 | +4.18 | 0 |

- **R3 and R1 are both expected to miss the 1 pN requirement.** R3 sits about 1 pN short.
- R3 at S01 has `m_null` +0.97 pN and R1 has -0.29 pN, where B1 has +2.43 pN. The study's premise check would fire: added cost dominates at the floor.
- **The hand arithmetic was optimistic.** R1 is 1.2 pN worse than expected, and R1-abs is much worse.
- The envelope sweep on R3 `m_null` shows strong dependence on assumptions: `L_nl` 0.02 gives -1.70 pN, `k_b` 1e-3 gives +0.63 pN, `k_b` 5e-3 gives -1.22 pN, and `h_b` 0.1 pN gives -0.80 pN. It validates none of them.
- Classes at seed 9201: 22 `negative`, 20 `seeded_pass_not_robust`, 4 `reference_margin_positive_conditional`, 2 `inconclusive_invalid_envelope`. The four positive rows are all B1, in S01, S07, S08 and S09. R2's classes carry defect 1.
- Largest truth error over `B`: 0.35. All dual pairs were covered.
- Records stayed lean: at most 2,758 bytes and 255 nodes per configuration, and 112 KiB for a one-seed record.

### Unproved rows

| Row | Reason |
| --- | --- |
| R1 at S11 | Projection denominator guard: `B/Lambda > 0.25`, because within-window gain mixes with the tone |
| R3 at S02 | `rho` guard: slow drift across D0 gives a large relative gain |

Both are `inconclusive_invalid_envelope`. Neither was tuned away.

## Implementation choices the protocol does not fix

These need review, because a class should not be defined by code.

1. **R2 full-class seeds:** even seeds draw the transducer form, and odd seeds the chain form. The bound takes the larger.
2. **Slow class:** `x = 2*t/T - 1` with `T = 100 s`, so the amplitude factor 5/3 is unchanged and the path runs through D0.
3. **`phi` generator:** linear or sine, each at Lipschitz `L_nl`. Other maps in the class are not sampled.
4. **`h` in D0:** one draw for D0a and one for D0b, on both channels.
5. **R1 remainders** are cruder than the inherited enclosures: `B_mix` and `B_trans` use `sum|u|` with an in-window step and a settled tail, which is conservative but not validated by the enclosure gap rule.
6. **Dark heat** is zero in D0, so a thermal step arrives at dwell 1.
7. **Rank matrix** uses representative rational entries, because only its structure matters.

## Not implemented

- **The lag separation decision.** `Lambda_lag` and the early-window statistics are not computed, so section 7.2's lag rows are judged as mimics only.
- **Enclosure gap rows for R1.** Validated ranges come from reviewed cell code, but no gap table is retained.
- **The joint witness search.** Witnesses are a fixed set of six, so `pm` values are weak lower evidence.
- **The source-commit binding at run time** has no end-to-end test, because the study refuses to run while unauthorised. Its refusal and the wrapper's streams are tested.

## Assumptions and limits

All of protocol section 5's boxes stay assumed. No fixture validates one. Independent oracle agreement checks arithmetic and timing, not physics. Physical validation is absent.

## Stage 2 completion

Authority: root handoff review of `c20dacb`, which was not approval. Protocol revision 5 is commit `f1f4374`, made before this code, and it changed only the twin's structure digest pin in code. No cohort seed, full gate or inherited heavy gate was run.

### Changed criterion, with its evidence kept

The section above records that the original flag rule made every R2 row `negative` at fixture seed 9201. Revision 5 scopes that rule to in-domain rows. **This changed a criterion after sight of a fixture.** Its original test is at `c20dacb`, and `test_changed_criterion_keeps_the_original_failure_visible` keeps the failure testable: all 12 R2 rows still raise `out_of_window_flag`. The out-of-window tuple and `E_x` audit stay mandatory, with tests. Under the amended rule at seed 9201, R2 has 4 positive rows, 7 `seeded_pass_not_robust` and 1 `negative`, all outcomes of one seed.

### Root findings fixed

| Finding | Fix | Regression |
| --- | --- | --- |
| `1e999` parsed to infinity | Finite-float hook, plus a separate walk that refuses any non-finite value or null | Both signs, three fields, each layer directly |
| Deep input could reach recursive code | Byte prescan before any parser, depth 16, nodes 20,000, with hard constants the twin cannot raise | 200,000 brackets, nested objects, node flood, long integers |
| Wrong values passed if the structure matched | `check_values`: types, ranges, sequences, windows, counts, runtime | 37 wrong-value cases |
| `IMPLEMENTATION` missed inherited inputs | `pf002_reference_gain_inputs_v1.py`: sorted union of 26 relative names | Superset of the reviewed list, and every imported local module |
| Commit was only checked for syntax | `bound_run` verifies clean `HEAD` before and after, and input hashes at both ends | Temporary repository with an explicit fake child, including a changed commit, tracked and untracked changes, and changes during a run |

**A further gap:** `virtual_acquisition.py`, `virtual_campaign.py` and `whole_acquisition.py` are imported through inherited inputs but absent from the reviewed stationarity list. They are bound here. That released list and its evidence are unchanged, so the stationarity record does not bind them.

The fake child and the stubbed cohort are test tooling only. They never call the real cohort or any primary seed, and they are not evidence. `execution_authorised` stays false in the tree. One test replaces `study.PROTOCOL` in memory, with the cohort stubbed, to reach the commit check.

### Work finished

- Lag decision with early statistics, section 7.5, against independent stepping, with negative cases.
- R1 gap rows for five validated quantities, and `conservative_remainder` kept separate. A failed gap is invalid.
- Bounded joint witness search, at most 72 evaluations per configuration. The largest fixture error was 0.55 of `B`.
- A failure-heavy 16-seed configuration stays under its caps, and 48 copies stay under the record caps, with full failure counts retained.
- Wrapper: first error kept when cleanup fails, descriptors released, sources hashed before and after, finite flood and rapid exit covered.

### Defects found in this stage

| # | Defect | Disposition |
| --- | --- | --- |
| 11 | R3 early windows were applied to the anchor and commands | Fixed. Protocol wording replaced, because it would have required this |
| 12 | R1 projection divided by `S` twice | Fixed. This moved R1 at S05 from -1.73 to -1.46 pN, in R1's favour, and it is a correction of an arithmetic error, not a tuning |
| 13 | Failure lists had no cap on operational rows | Fixed, with counts retained |
| 14 | The reviewed failure record keeps stage and type, not the message | Kept. My test first expected a message |

### Mutation checks on final code

37 mutants on the suite as it stood, full suite each, in 915 s. 32 were caught and 5 survived. New tests then caught 4 of those 5. The last, `overflow accepted`, is equivalent by design: the separate walk refuses the same value, so behaviour cannot change, and each layer has a direct test. The 32 ran before the last 4 tests were added, and those tests only add coverage.

### Fixture observations after completion

Seed 9201, 48 configurations, in 50 s, with 0 operational failures. Largest record row 3,031 bytes and 279 nodes.

| Row at S05 | `m_null`, pN | `m_sig`, pN |
| --- | --- | --- |
| B1 | -9.12 | -4.70 |
| R1 | -1.46 | +3.71 |
| R3 | +0.02 | +5.01 |
| R3-E | -0.72 | +4.18 |
| R2-N, narrower class | -0.03 | +5.30 |

- Lag state: `rank_raised_not_resolved` in 45 rows, `unproved` in R2-N, which has no early class by protocol, and none in the 2 invalid rows.
- Unproved rows are unchanged: R1 at S11 and R3 at S02.
- All of this is qualification data, and being deterministic the bounds are prior knowledge.

### Still open

- Each `phi`, `k` and `h` box stays assumed, and seeds cover only the sampled `phi` subfamily.
- R1's `B_mix` and `B_trans` stay conservative and unvalidated.
- The early half-width in R1 uses late-window enclosures and early force spans.
- `Khat` guards use a fixed interval, and R1's tone projection guard uses nominal amplitude.
- The new pump is unreviewed code.
- No independent review of the science source has finished.

## Root review corrections after `bb59cd7`

Root review was not Stage 3 approval, and it did not accept the remainder of the source. Protocol revision 6 is commit `3936eea`, made before this code, and it changed only the digest pin and one test's revision literal in code.

### Slow-class coefficient

| # | Defect | Disposition |
| --- | --- | --- |
| 15 | `sequence_gain` used instantaneous sample time, but the generator holds the block midpoint. At B1 S02, klass none, late window, per unit amplitude, the primary was 6.46e-14 against a held maximum of 1.43e-13, and the reference 8.26e-14 against 1.62e-13, both at offset 5 | Fixed. **A demonstrated sub-term underbound. No total interval failure was demonstrated.** Found by root review, not by my tests |
| 16 | The wrapper's new containment branch set a fixed survivor count and never reaped the child, which caused the `ResourceWarning` root saw | Fixed: reviewed fallback, then reap, and survivors reported as unknown. Found by root review |

`held_x` is now the one function used by the generator and the bound. One offset is maximised over the sum of both channels. A test reproduces both review values and offset 5.

The evidence above this section and every earlier fixture number were made with the instantaneous form, and they stay as recorded. After the correction, 4 of 48 rows moved, by at most 0.01 pN, and no class changed:

| Row | `m_null` before, pN | `m_null` after, pN |
| --- | --- | --- |
| B1 S02, R2 S02 | +0.80635 | +0.79665 |
| B1 S10, R2 S10 | -2.10539 | -2.10677 |

R1 and R3 slow rows use the uniform amplitude `eps_b`, not this coefficient, so they did not move. S02 and S10 in B1 sit under 1 pN either way.

### Tests and mutants

`python3 -B -W always::ResourceWarning -m unittest test_pf002_reference_gain_v1` exits 0, and the log has no `ResourceWarning`. The fixture pass at seed 9201 exits 0, in 50 s, with 0 operational failures, on the code before the last two tests were added, and those tests touch no source.

8 targeted mutants ran on these corrections. 6 were caught, and 2 survived: a signed sum in place of absolute values, because every real case had the two coefficients on one sign, and dropping the term from the bound, because no test checked it arrived there. Direct tests then caught both. The earlier 37-mutant run predates this correction and was not repeated.

**This defect was found by root review after 37 mutants and 117 tests had passed.** It lay in a term with no independent attainment test, so passing tests here do not show that the remaining terms are sound. An attainment check of the rate, label and within-window branches of `sequence_gain` against generator samples has not been done.

## Root review corrections after `5c1be57`

Protocol revision 7 is commit `f5f2cda`, made before this code, and it changed only the digest pin in code. Root review found one product. A read-only probe, run before that amendment, found the rest.

| # | Defect | Excess per bin, pN | Found by |
| --- | --- | --- | --- |
| 17 | Blind radius omitted `b*f*c*C` | 0.00011, S10 | Root review |
| 18 | Leakage centred at the top of its box, so a smaller leak fell outside | 19.9 out-of-window, 0.17 to 0.30 held and lag | Probe |
| 19 | Mimic centred at `1/W_lo`, so a larger `w` fell outside | 0.96 | Probe |
| 20 | Phase-null shared the no-force class, but its heat and recoil lie outside the `+/-pi/2` ranges | 0.27 | Probe |
| 21 | The inherited within-dwell walk was never implemented, so all earlier seeded rows ran on dwell values only | Not a bound | Found while probing |
| 22 | `Nbar` omitted blind contrast altogether, and its gain term omitted `1 + b` | Not per bin | Checking the witness path |

**These are per-bin source-domain omissions, not demonstrated total interval failures.** Inherited additive paths were checked: `E_G`, `E_L` and `E_R` of B1 and R2 use their inherited forms, and R2-N's closed forms apply at S05 only, where `b = f = 0`. Structural allowance was not relied on.

Earlier fixture numbers in this audit stay as recorded. They predate these corrections.

### After correction

The probe at seeds 9201 to 9206, 1,452 rows over all 11 scenarios and all controls, shows zero excess on both channels. **It compares B1 states, so it does not cover R1 or R3 actuator states, and the class chooses the better sign per channel.** Seeds also sample only part of each box, so `test_simultaneous_extremes_of_every_product` drives `b`, `f`, leak and `w` to their bounds together through held transitions.

At seed 9201, 25 of 48 rows moved and no class changed:

| Row | `m_null` before, pN | `m_null` after, pN |
| --- | --- | --- |
| **R3 S05, co-primary** | **+0.02** | **-0.09** |
| R3-E | -0.72 | -0.75 |
| R3 S11 | -18.72 | -19.47 |
| R3 S03 | -9.18 | -9.73 |
| R1 S05 | -1.46 | -1.46 |
| B1 S05 | -9.12 | -9.12 |

R3's primary row changed because its mimic state grew with the correct centring.

### Tests and mutants

`python3 -B -W always::ResourceWarning -m unittest test_pf002_reference_gain_v1` exits 0, with no `ResourceWarning`. The fixture pass at seed 9201 exits 0, in 52 s, with 0 operational failures. That pass ran before the last two tests were added, and those tests touch no source.

10 targeted mutants ran on the envelope. 8 were caught, and 2 survived: phase-null left out of `E_N`, and the walk not reaching forces. Direct tests then caught both. The earlier 37-mutant run was not repeated.

### Open from this review

The probe's result is limited to generator against envelope. `sequence_gain`'s rate, label and within-window branches still lack attainment tests. R1 and R3 class constants have not been checked against their actuator states by a sample-envelope test, although R3's state bounds are checked against the oracle on bespoke cases.

## Root review corrections after `8e5b4ca`

Protocol revision 8 is commit `3f9e75c`, and revision 9 is `d1db855`, each made before the code it governs. In code, each changed only the digest pin. No target, level, threshold or seed moved.

| # | Defect | Found by | Disposition |
| --- | --- | --- | --- |
| 23 | `dk` used `tauhat*(1 +/- 0.05)`, though the true value lies in `[tauhat/1.05, tauhat/0.95]`. At `xi_p = -0.05`, 0.0029657 against 0.0031319, and in R1 0.0046910 against 0.0049494 | Root review | Fixed. **A coefficient underbound, not a demonstrated `Lambda` interval failure** |
| 24 | `Xbar_r` omitted the tone's window mean and memory, at 1.00004 of the bound on one row | Qualification check | Fixed |
| 25 | The even part of the Lipschitz class gives the tone a mean force up to `L_nl*A`, about 1 pN, which no bound charged and no seed samples | Checking the term against the whole class | Fixed. Tests now run an even `phi` in R1 and R3 |
| 26 | `E_mix` was listed in the protocol for R1 and absent from the code | Same check | Fixed. **This is the largest effect in this batch** |
| 27 | H11 could be supported from missing or invalid rows, and hypotheses had no declared rows | Root review | Fixed: section 9 completeness |

`dk` now rests on a proof, not an endpoint assumption: outward interval forward sensitivity gives a strictly negative derivative of `C_early/C_late` on all 64 cells, for both orders and both window sets. A straddling cell returns no direction, and the lag state is then `unproved`.

### Qualification checks finished

These were disclosed as open, and they ran before any correction in this batch.

- **Rate, label and within-window attainment.** A generator path reaches at least 0.99 of each bound and never exceeds it, on both channels. The rate path comes from an independent dynamic programme with traceback, and is checked against the slew and amplitude class. `rate_bound` also matches brute force.
- **R3 actuator states.** Under adverse in-class realisations, with every actuator quantity at a bound, states, commands and anchor error stayed inside their bounds: commands at 0.99, states at 0.91 and anchor error at 0.62 of the bound. An even `phi` and the electrostatic row are also covered.
- **R1 ratio and state.** The ratio stayed at 0.28 of its bound. One state row exceeded its bound by 0.004 percent, which is defect 24.

One early R1 result of 2.56 was my probe's error, because it left out the injected gain step. It was not a defect.

### Effect at seed 9201

12 rows moved, all R1, and **one class changed for the first time: R1 at S10 went from `seeded_pass_not_robust` to `negative`**.

| Row | `m_null` before, pN | `m_null` after, pN |
| --- | --- | --- |
| R1 S05, co-primary | -1.46 | -1.53 |
| R1 S01 | -0.03 | -0.10 |
| R1 S10 | -8.63 | -10.70 |
| R1 S04 | -3.16 | -4.61 |
| R1 S03 | -29.07 | -46.49 |
| R1 S02 | -15.15 | -21.63 |

R3 and B1 did not move. R3 at S05 stays at -0.09 pN.

**With completeness, H8, H9 and H11 are `inconclusive` at this fixture**, because R1 at S11 and R3 at S02 are unproved. While those rows stay invalid, H11 can only be `inconclusive` or `refuted`, and H8 and H9 cannot be supported. The scoped fact `s11_no_certified_rows` reports them literally: 4 present, 3 valid, 0 positive.

### Tests and mutants

`python3 -B -W always::ResourceWarning -m unittest test_pf002_reference_gain_v1` exits 0, with 165 tests in 36 s. The fixture pass at seed 9201 exits 0, in 53 s, with 0 operational failures.

Mutation on the code at each point: 63 mutants were planned, and the capped run caught 50, had 4 survivors and did not reach 8. A second run caught 17 more on final code, and 1 that had not applied was fixed and caught. The earlier survivors `proof accepts a mixed sign`, `E_mix dropped` and `tone swing dropped` were real gaps, closed with direct tests. `overflow accepted` stays equivalent by design. The 50 ran before the hypothesis code and the `r1_mix` refactor, and the anchor of one, `E_mix dropped`, moved with it.

**One failure of mine:** a first attempt at this run died on a quoting error in a throwaway script, with no mutant run.

### Open

- Whether `E_mix`'s large effect on R1 S02 to S04 is fair or merely crude. It uses one worst-case step on the whole tone swing, and `B_mix` is similarly crude.
- R3 at S02 and R1 at S11 stay unproved, which now blocks H8, H9 and H11.
- Root source review is still in progress.

## Final bounded check after `3632e06`

Protocol revision 10 is commit `dfafa5c`, made before this code, with one sentence corrected in the same change as the code below. No target, level, threshold, seed or floor moved.

R1's early statistic did rest on late-window constants, as root review suspected. Deriving it found three real problems, and direct stepping found one more:

| # | Defect | Disposition |
| --- | --- | --- |
| 28 | `tone_mean` and `a**80` are late-window constants, used for the early statistic, where a change at a dwell boundary has decayed to about 0.135, not 0.005 | Fixed: `S_ij`, `C_ij`, `B_ij` by direct sum of the actual sample weights for each contrast window |
| 29 | The early evaluation fed early force spans to a late projection | Fixed. A test shows the projection is identical on both statistics |
| 30 | A late `g_i` on an early reading was uncharged where gain moves inside a dwell | Fixed: `E_split` |
| 31 | Revision 10 claimed the periodic state was exactly equal across dwells. Independent stepping found a cold-start remainder of about 2.3e-8 of the tone amplitude | Fixed: the spread is charged, and the protocol sentence is corrected |

R1's early lag audit is therefore **derived, not marked unproved**. If an early design refuses, the lag state is `unproved`, the late row stays valid and no attribution is made. A test covers that path.

This is a conditional, hand-derived numerical bound, checked by direct stepping. It is not a formal proof, and it says nothing physical.

### Independent checks

Direct stepping in the oracle covers both windows, cold start, `K_0` at both ends, odd, even and sine `phi`, and label-locked, alternating and random `k`, `tau` and `h`. The deviation reaches more than 5 percent of its bound and never exceeds it. The adverse early error stays inside `B_early`, including anchor-step and even `phi`, and instant and 0.1 s rows do not separate in R1.

### Effect at seed 9201

The added level also enters the late `Xbar_r`, so 12 R1 rows moved, and no class changed. R1 at S05 went from -1.53 to -1.62 pN, and R1 at S01 from -0.10 to -0.17 pN. R3 and B1 did not move. All 12 valid R1 rows have lag state `rank_raised_not_resolved`, and R1 at S11 stays unproved.

### Checks run

`python3 -B -W always::ResourceWarning -m unittest test_pf002_reference_gain_v1` exits 0, with 176 tests. The fixture pass at seed 9201 exits 0, in 54 s, with 0 operational failures. Per root direction, no repeated mutation campaign was run on this change, so the new tests have not been mutation-checked.

## Exploratory run and diagnostics after it

The one exploratory run is spent: commit `da41c07`, seeds 401 to 404, record sha256 `71cd2aac6b98e7cffe3be8493dc45e337b4704a64d9428275615229b59a63331`. Its evidence is preserved byte-exact in `pf002-reference-gain-v1-exploratory-evidence/`, with its receipt, at commit `3fc63f2`. It is never rerun, replayed or substituted. Root review verified the record.

**R2 at S03 stays `inconclusive_invalid_envelope`, and its condition 5 cause is unknown.** The record's generic failure list was capped, and an `E_x` breach left no note. It is not inferred and not relabelled.

Protocol revision 12 is commit `dee24a7`, made before this code. It adds `condition_causes` and `missing_causes`, and a budget ledger stating that the mode gate does not enforce one-shot use. These are diagnostics only: no formula, bound, classifier predicate, target, threshold, level or seed changed, and the exploratory record does not carry them. Any confirmatory run would be unchanged science under a later diagnostic revision, not an identical protocol replication.

Synthetic faults cover every declared cause. A case with the generic list full shows a mimic failure still recorded, and every cause at once on 16 seeds and all 48 configurations fits the 24 KiB, 2,800 node, 2 MiB and 200,000 node caps. No primary seed ran, and no mutation campaign was run on this change.

## Confirmatory run and publication preparation

The one confirmatory run is spent: commit `94ca290`, seeds 3001 to 3016, record sha256 `dd6bc82195cdcd20cd7e16fe2a0ce66be1025387e6ea1ab64365399a488ab520`. Its evidence is preserved byte-exact at commit `a8f850d`. [The results document](PF002_REFERENCE_GAIN_V1_RESULTS.md) holds the findings and the spent-budget ledger, because the bound protocol stays frozen.

**The study's inputs and both evidence directories changed in no publication step.** The diagram was rewritten with static tags only, because the publication tool refuses `style`, `defs` and `marker`. It is not a study input.

**A preparation slip was caught before commit.** A generator script added `protocol_revision_at_run` to the preserved exploratory receipt in the working tree. That broke the byte-exact rule. The file was restored from `HEAD` and compared byte for byte, and the change never reached a commit. The field now sits in a separate publication index, which is not a run receipt and which binds the preserved receipt's digest. The publication tool was not changed, and its predecessor proof still comes from git objects.

**The Atlas catalogue entry limit rose from 128 to 160, on measured need.** This slice took the count to 154 entries, because a file shared by two slices counts twice, and 126 are unique. The 16 MiB byte limit is unchanged, at 9.85 MB used. The archive's separate limit of 128 unique objects is unchanged, so 2 remain. A later slice will need a reviewed decision on it.

## Failed full gate at `83f2a2b`

**One serial `./scripts/ci-local.sh` failed.** It ran on clean, pushed commit `83f2a2bfee213a05a1d878ee3da5966e25cee26e`, from 14:44:40 to 16:45:04 UTC on 2026-11-01, as PID 51699, and exited 1. The head was unchanged afterwards with no changed paths. Its log has sha256 `86b1e40b55cd9800ad32745103cc1fe4f47768991938344c177506f81d61964d`. The log and receipt stay outside the repository, because the traceback holds machine paths.

**What passed:** repository policy, the PF-001 preregistration check, the worker boundary, 21 deposition tests, and 782 of 783 tests in `experiments/pf-001`.

**What never ran on that commit:** `ci-local.sh` stops at the first failure, so nothing after line 38 ran. That is the seven PF-001 script checks, Rust format, check, clippy, test and doc, the frozen install, typecheck, Atlas and oracle tests, the build, brand validation, `pnpm audit`, and both fixture comparisons. Typecheck, Atlas tests and the build passed in separate focused runs, which do not stand in for the gate. This commit has no passing gate.

**The failure was in the test, not the study.** `test_every_local_imported_module_is_bound` scanned `sys.modules`, and `unittest discover` loads every test file into one process. Run alone, it found 21 local modules, all bound. After discovery's imports it found 97, of which 75 are outside the bound set and come from other test files. The test had only ever been run in isolation before this gate.

**The test was replaced, and no study input changed.** It now imports the test module in a fresh interpreter under the reviewed bounded runner, so nothing is filtered out of the result. Regressions show that:

- a stray module in the shared process does not count
- a real unbound import is rejected, in the study and in a transitive module
- a failed or timed-out import fails the check

The 26 inputs, the evidence and the predicates are unchanged. The test file is not one of the inputs.

## Scope correction to the results document

**Review found that "on valid rows" was wrong.** The 5888 dual pairs cover the 46 design-evaluated configurations, which include R2 at S03, whose final row is invalid. The 45 final-valid configurations contribute 5760. The truth and witness aggregates had the same label, and their maxima are the same over either population. The document also omitted that fixed witnesses reach 0.56 of `B`, above the search's 0.55. No retained value changed.

The results document and this audit are bound publication sources, so their changes need a new envelope. The envelope prepared at `83f2a2b` was never published, and its release, definition and diagram are retained byte-exact under `research/publications/superseded/`. The new envelope was prepared with the no-clobber tool.
