# Reproduce this

No network in the recompute path. Two data files, three scripts, Python with pyarrow
(and pandas + numpy for one of the two implementations). Everything below was run in a
clean directory containing only these files before it was written down.

## 1. Get the corpus

From Hugging Face, `OpenHands/openhands-index` at revision
`db6504dfbb2ac2c905c71f73f430bf9cfdc55018`:

    test.parquet        44,323 bytes
      sha256 966544ad62ba160fec79c73bdd5295df521743c733f9fbcca1ed0f82833d827a
    instances.parquet  435,757 bytes
      sha256 f456e937771bdd45815cacd6458433e0e750be0a2a6bcd5daf91670b151968a5

Check the hashes before going further. If they differ, the corpus has moved and nothing
below is a comparison against what we measured.

## 2. Put the pieces in one directory

`test.parquet`, `instances.parquet`, `source_hash.txt`, `impl_A.py`, `impl_B.py`,
`compare_impls.py`. The scripts read from the working directory and write one JSON each.

## 3. Run both implementations

    python impl_A.py A1.json      # pandas + numpy
    python impl_B.py B1.json      # pyarrow read, pure-Python aggregation

## 4. Check determinism yourself

    python impl_A.py A2.json && cmp A1.json A2.json
    python impl_B.py B2.json && cmp B1.json B2.json

Separate OS processes, byte-identical output. If `cmp` reports a difference, that is a
finding about the instrument and we would want to know.

## 5. Check the two implementations against each other

    python compare_impls.py A1.json B1.json

Expected: `mismatches: 0` and `P7 GATE: PASS`. They share no code, no imports and no
helper functions; agreement is evidence the arithmetic is not one implementation's bug.

## 6. Read the census

`A1.json` carries `cells.by_column`, which classifies every one of the 1,292 cells, and
`columns`, which holds every declared policy — including the ones that did not fit — with
per-row deviations and the permutation nulls. `RESULTS_A2-id_2026-07-25.txt` is the same
material as a flat transcript.

## 7. Re-run the positive controls

`CALIBRATION_score_prereg.json` and `CALIBRATION_cost_prereg.json` each name the exact
rows to perturb, the change to apply, and the deviation predicted before the run. Apply
one to a **copy** of `instances.parquet`, re-run both implementations, and compare against
the prediction. Measured results are in `CALIBRATION_results.md`.

## If you disagree

The declared policies are in the preregistration, in full, including the ones that
failed. If a policy we did not declare reproduces a column we recorded as divergent,
that is a real correction and we would rather have it than not. The reproduction path
above is the whole of what is needed to demonstrate it.
