# validator-fix result Base commit: `79f068cef81dadee171531f3381e207c193c959a` (verified with `git rev-parse HEAD`). This is a source repair of the whole-kit structural/provenance validator. No banks, evidence, ammfast sources, pins or configuration files were changed. No simulator or engine seeds were run. Results describe this checkout only. ## Changes, by line in the resulting files - `validate_kit.py:600`: read `gates384` and use that name in diagnostic messages. - `validate_kit.py:601`: read `spots576` and use that name in diagnostic messages. There is no fallback to the old evidence names. These are the only two changed implementation lines. All other checks, the 1e-9 bound, and the summary keys `gates`, `spots`, `worst_gate_abs_error`, `worst_spot_abs_error` remain unchanged. - `tests/test_validate_kit.py:91`: construct the gate fixture under `gates384`. - `tests/test_validate_kit.py:92`: construct the spot fixture under `spots576`. - Lines 289–301: add the negative test. Line 290 selects gate-only, spot-only and both-key renaming cases; line 291 identifies each subtest; line 292 resets the fixture; lines 293–295 move evidence to the old key(s); line 296 saves bindings; line 297 requires bad-validation; lines 298–299 require failed replica status and zero verified rows; lines 300–301 require the missing new-key diagnostic. - Lines 304, 308, 322: existing gate mutation/boundary/coverage tests now access `gates384`. - Lines 342, 347, 354: existing spot shape/rounding/coverage tests now access `spots576`. - Lines 507–509: the real-tree test now requires exit 0, PASS and no findings. - Lines 510–512: require exactly the six named parts, each passing. - Line 513 obtains coverage; lines 514–515 require expected and verified totals of 14848; lines 516–519 select replica, HA and engine banks separately; lines 520–521 require nonempty passing banks; lines 522–523 require expected and well-formed counts of 12288, 2048 and 512 respectively. - Lines 524–525 require the unchanged summary keys to report 384 gates and 576 spots. The previous conditional accepting incomplete or failing real trees is removed. - `docs/validation.md:23`: replace the stale wave-2 subset comment with a generic part-selection comment. - Line 30: replace the non-working module import test command with unittest discovery. - Lines 81–82: correct the two evidence schema keys to `gates384` and `spots576`. - Lines 94–95: use those same keys in the exact seed-coverage requirements. - Lines 104–117: replace obsolete missing-file status and timing claims with the measured repaired-tree status, counts, worst errors and timings. Explain that summary keys remain `gates` and `spots` and that no simulator ran. - Line 128: use `python -B baselines/engine/validate.py --output scratch/engine-validation.json` in the engine command (with the existing environment activation and timeout). - Lines 131–133: explain that default `--output` rewrites the timing fields of committed `baselines/engine/validation.json`. - Line 137: use the corrected evidence keys in the future independent-sample guidance. - This result file records the change and checks. Existing Taylor credit headers are retained in all three source files; this report has the same credit and pin. ## Benchmark, plan and checks Benchmarked the existing validator before editing. Its subsecond runtime allowed this bounded key repair, the targeted standard-library test suite and documentation review to fit comfortably inside the 50-minute budget. All test/validator commands were bounded by `timeout 470`; mutable check state was kept under `scratch/`. No dependencies, runtime setup, reference materialization or Rust were needed for these offline structural checks. 1. `/usr/bin/time -p timeout 470 python3 -B validate_kit.py` before editing: exit **1**, **FAIL**, one replica finding `bad-validation`, `baselines/replica/validation.json`: `gates must be a list` (reader at the original `validate_kit.py:600`). Coverage **2560/14848**. Other five parts pass. Wall/user/system times: **0.57/0.48/0.08 seconds**. 2. `/usr/bin/time -p timeout 470 python3 -B validate_kit.py --out scratch/kit-validator/fixed-report.json --timing` after repair: exit **0**, **PASS**, no findings. Wall/user/system times: **0.62/0.50/0.11 seconds**. Full real-tree results are below. 3. `timeout 470 python3 -B -m unittest tests.test_validate_kit -v > scratch/kit-validator/unittest.log 2>&1` initially failed at module loading: unittest reported **1 loader test, 1 error, 0 actual test cases run**, `ModuleNotFoundError: No module named 'tests.test_validate_kit'`. Traceback names `/usr/lib/python3.12/unittest/loader.py:137`. The surrounding shell's subsequent `tail` returned 0; the unittest log itself reported FAILED. Repaired the documented invocation to discovery without adding package files. 4. `timeout 470 python3 -B -m unittest discover -s tests -p test_validate_kit.py -v > scratch/kit-validator/unittest-discover.log 2>&1` exited **0**: **58 tests in 17.419 seconds, OK**, no failures, errors or skips. Includes strict real-tree CLI success, all three legacy-key rejection subtests, unchanged parity-boundary tests, and the existing adversarial checks. 5. `git diff --check`: exit **0**, no whitespace errors. Reviewed `git diff -- validate_kit.py tests/test_validate_kit.py docs/validation.md`. Used `rg`, `sed`, `nl`, and `tail` to inspect relevant source and check logs. 6. `sha256sum validate_kit.py tests/test_validate_kit.py docs/validation.md`: final hashes below. `git status --short` confirms scope below. ## Real-tree validator result Exit code **0**; status **PASS**; findings **[]**. | Part | Status | Evidence summary | Part seconds | |---|---|---|---| | reference | pass | 35 envelopes verified | 0.1031 | | kit | pass | 3 files | 0.0072 | | ammfast | pass | 4 sources | 0.0335 | | engine | pass | 512 rows, 512 audits, 5 committed reruns | 0.0579 | | ha | pass | 2048 rows, 8192 source rows | 0.1899 | | replica | pass | 9 banks, 384 gates, 576 spots | 0.1067 | Coverage: **14848 verified / 14848 expected**, comprising replica **12288**, HA **2048**, engine **512**. Every bank has part status `pass`. Worst gate absolute error: **1.1937117960769683e-11**. Worst spot absolute error: **1.1937117960769683e-11**. Both are below the unchanged **1e-9** bound. These errors are recomputed from committed comparison evidence, not from new simulator runs; PASS is not independent parity proof. Nothing remains failing in the repaired validator or the 58-test discovery suite. The original module-style unittest invocation remains unsuitable on this checkout; the documented discovery command succeeds. ## SHA256 of delivered source files ```text d308d3d22228b04a266d955808bb1be017154dcf15c4caf2ecde59b031e09200 validate_kit.py 2713e490e0950b7a192790a7f30a4d7e8af0de61fa34055d697c6628fc0578bc tests/test_validate_kit.py 1a7f0f6d0550b1b6f8bcc5c3dd9d6efe29076923884f3f624713a958b417b44e docs/validation.md ``` ## Final scope `git status --short`: ```text M docs/validation.md M tests/test_validate_kit.py M validate_kit.py ``` Only the three permitted tracked files changed. The required result is left untracked and has not been staged or force-added.