# HA bank result Delivered the imported HA calibration bank, deterministic offline exporter, audit evidence, usage documentation, and 15 passing offline tests. Foundation checkout: `4a02cd145745a9d1c45d2ca8d669b650dce619f8`. Work completed within the 55-minute item cap. No engine or policy simulations, tuning, dependency changes, foundation changes, or submodules. Every shell command was bounded below 480 s. Installations, download caches, materialized originals, checkpoints and test logs are under `scratch/`. This required result is left untracked for upload. ## Delivered paths - `baselines/ha/HA-10000-12047.json`: backend replica, policy HA, first `_credit`, complete import provenance and 2048 unique ascending seeds 10000–12047 with finite six-decimal edge strings. - `baselines/ha/export.py`: standard-library CLI; pinned SHA256 check before parsing/export; strict validation of all 8192 source rows; canonical export and byte-exact `--check`. No network, simulator or unseen wave dependency. - `baselines/ha/audit.md`: source semantics, source hashes, runtime measurements, coverage, reproducible benchmark, and historical provenance limits. - `tests/test_ha.py`: offline tests using locally materialized committed envelopes. - `docs/ha.md`: exact setup, export, validation, test and resume commands. - `artifacts/goal/batches/e02-evaluation/items/ha-bank/result.md`: this report. ## Mapping and metric evidence Source is Taylor's pinned [calib_out_2048.json](https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/solved/calib_out_2048.json), 2,948,144 bytes, SHA256 `fdf24c7aa2b604d770336a5783276da8ed4d50bca9dbcc02e98b4da58f608d26`. Its 8192 records explicitly identify `kind`, `seed`, and `edge`; each of four kinds has exactly 2048 seeds. Select `kind == "HA"`, pair by the explicit integer seed, and serialize `format(row['edge'], '.6f')`. Do not infer seed from position. Pinned `research/solved/evalpol.py:11,92–100` reads this file, maps by kind/seed, uses seeds 10000–12047, and compares `ref[k][s]['edge']`, including HA. Pinned `replica2.py:37,74,85,110,129,134` accumulates and returns the policy pool's trade edge as `edge=e1`; `norm=e2` is the rival pool. We neither subtract norm nor average rows. Original HA mean 529.5574342875143 corroborates the pinned README's 529.557, but no average is used to generate the bank. The pinned tree and `research/replica.py` were inspected. A standalone original calibration-generation driver, original invocation and original Python version are absent. The explicit data and pinned consumer establish this import mapping; the provenance does not claim an original generation-command reconstruction or a simulation rerun. This is Taylor calibration, not ammfast output. ## Commands and measurements Initial materialization (35 verified originals, tool wall time 0.178 s): ```sh timeout 30s bash -c 'mkdir -p scratch/ha; PYTHONDONTWRITEBYTECODE=1 python3 reference/materialize.py --out scratch/ha/reference; rg --files scratch/ha/reference | rg "calib|solved"' ``` Small real workload benchmark BEFORE implementation/full validation, CPython 3.12.3: source read/parse 0.053949 s; selecting HA and formatting/serializing the first 64 rows 0.002990 s. Source hash matched. Exact benchmark operations: ```sh timeout 30s python3 -B - <<'PY' import json,time,hashlib from pathlib import Path p=Path('scratch/ha/reference/taylor/calib_out_2048.json'); t=time.perf_counter(); b=p.read_bytes(); rows=json.loads(b); parsed=time.perf_counter(); small=[{'seed':r['seed'],'edge':format(r['edge'],'.6f')} for r in rows if r['kind']=='HA'][:64]; out=json.dumps(small); end=time.perf_counter() r={'bytes':len(b),'sha256':hashlib.sha256(b).hexdigest(),'parse_s':parsed-t,'select_and_export_64_s':end-parsed,'source_rows':len(rows),'sample_rows':len(small)} Path('scratch/ha/benchmark.json').write_text(json.dumps(r,indent=2)+'\n'); print(r) PY ``` Pinned setup, no smoke simulations: ```sh timeout 450s bash setup_fast.sh --platform linux-x86_64 --replica-only --cache scratch/cache --deadline 420 > scratch/ha/setup.log 2>&1 ``` Passed: CPython 3.12.16, cold setup 9.515 s (fetch 2.146, install 5.272, verify 2.069); four downloads, 114,819,511 bytes. No Rust or engine setup. Source investigation downloads (only research data, neither executed): ```sh curl -fsSL --max-time 45 'https://api.github.com/repos/gtmcknight/amm-sim/git/trees/4812a6382311624e1506aca131ca35c378f930d9?recursive=1' -o scratch/ha/tree.json curl -fsSL --max-time 45 https://raw.githubusercontent.com/gtmcknight/amm-sim/4812a6382311624e1506aca131ca35c378f930d9/research/replica.py -o scratch/ha/replica.py ``` Both ran inside 60-second shell timeouts and succeeded. The inventory showed only `research/solved/calib_out_2048.json` matching `calib`; the research Python files provided no separate generator. Materialized pinned sources were inspected with `rg` and numbered line reads; original byte hashes were tested offline. Export, tests, final validation: ```sh timeout 30s scratch/venv/bin/python -B baselines/ha/export.py --source scratch/ha/reference/taylor/calib_out_2048.json --out baselines/ha/HA-10000-12047.json timeout 60s scratch/venv/bin/python -B -m unittest discover -s tests -p test_ha.py -v > scratch/ha/tests.log 2>&1 timeout 30s scratch/venv/bin/python -B baselines/ha/export.py --source scratch/ha/reference/taylor/calib_out_2048.json --check baselines/ha/HA-10000-12047.json ``` All succeeded. 15 tests in 5.851 s; zero failures, errors or skips. Every exported row (2048/2048) was compared independently against its exact source value; all 8192 source records were validated. Tests also cover deterministic export, committed bank bytes, source/evidence hashes, endpoints/cardinality, shuffled source order, missing fields/rows, duplicates, bad types/ranges, malformed JSON, duplicate object keys, nonfinite/overflow numbers, hash mismatch, bad bank values and provenance, CLI failures and source preservation. Expected rejection tests passed; these are functional checks, not a line-coverage measurement. Ten full exports on CPython 3.12.16 were byte-identical: 0.801574 s total, 0.080157 s/export. Full canonical validation: 0.075190 s. Exact benchmark code is in `baselines/ha/audit.md`; it was extracted to `scratch/ha/benchmark_full.py` and rerun with: ```sh timeout 30s scratch/venv/bin/python -B scratch/ha/benchmark_full.py ``` Documented-command recheck: ten exports 0.844098 s, validation 0.080476 s. Source and test syntax were checked with Python `compile()` (no bytecode files). `git diff --check` reported no tracked whitespace problems; `git status --short --untracked-files=all` showed only the five intended new source/doc/test files before creation of this required report. ## Hashes and endpoints | Delivered file | SHA256 | | --- | --- | | `baselines/ha/HA-10000-12047.json` | `09719da22be28598e9c1d0bb1eb935d7b0b4eeafef3321e0fabe4f3ec9e2b7a9` | | `baselines/ha/export.py` | `d392b7bbab02a25eb8e50517412e7c9d579ccfcd9a96f0fe620a157826c700f2` | | `baselines/ha/audit.md` | `428f3dcb35b392b8e79ce84a9d437aec6c311ee4e139648c66a14fe8ea38a8c6` | | `tests/test_ha.py` | `1aee1654cfc5caeebb74c773584f9d9ec298f15421ae3286ae7fea57b4923e18` | | `docs/ha.md` | `35d0c10cf6aedc03e234de3a5cf1a63d73adc3f3e29c3424ed960c47cebde316` | Bank size: 127,347 bytes. First row: seed 10000, `440.443361`; last row: seed 12047, `409.823332`. Evidence hashes for `evalpol.py` and `replica2.py` appear in the bank and audit and are verified by tests against committed envelopes. ## Failures, limits and resume No test, setup or validation failures. One shell heredoc quoting warning (`exports: line 147`, wanted delimiter `MD`) truncated the draft audit's benchmark block. It was repaired using a patch, inspected, extracted and successfully executed. No data/code repair was needed. Only Linux x86_64 CPython 3.12.16 received the full suite. CPython 3.12.3 was used for initial parsing/materialization only. macOS arm64 and other runtimes are untested. This import performs no simulator parity or engine screening checks. Resume by rerunning the setup command (verified cache reused), materialization, export, check and test commands in `docs/ha.md`. For a complete offline resume, pass `--offline` to setup after its cache is populated. Export/check/tests need no network even without setup when a Python 3 interpreter is already available. No requester input or uncompleted simulation is pending.