# Reproduce the RF1b-er stability comparison

Work from a copy of this directory and retain the surrounding workspace paths. The original ZL study is `../golf_published_stability_20261016/`. No baseline files are overwritten. The original frozen scientific functions are imported directly; the new scripts implement input replacement, paired execution, comparison and presentation.

1. Restore the temporary runtime in this directory: `python -m pip install --no-deps --target _deps elpigraph-python==0.3.4 numba==0.60.0 llvmlite==0.43.0 networkx==3.2.1 igraph==0.11.8 shapely==2.0.7 texttable==1.7.0`. Base libraries match the original Python 3.9 / NumPy 2.0.2 / SciPy 1.13.1 environment. Complete versions are recorded in `execution_verification.json`.
2. Run `python prepare_data.py`. This first reproduces the ZL transition counts and distances, then builds RF basic-EVA matrices and MDS. The public RF1b-er input is included; its original URL and hash are recorded in `inputs.json`. Paragraph cohort, physical-sheet membership and Golf labels are fixed from the original study.
3. Run `python run_ensemble.py --pilot`. It checks native versus explicit-mask RF growth, exactly replays one original ZL fit, and checks two RF production configurations. These five verification growth calls are not uncertainty samples.
4. Run `python run_ensemble.py --workers 6`. It executes 4,800 new fits with one BLAS thread per process. The runner checkpoints every 100 completions and resumes missing tasks only when all frozen input/code hashes still match. Do not edit `run_ensemble.py`, `prepare_data.py` or `DESIGN.md` during a run.
5. Run `python verify_completed.py`, `python summarize.py`, `python plot_comparison.py`, then `python build_report.py`. These use retained results, without new model fits. The production verification compares two records against the pre-production RF checks, including full-dimensional node hashes. The summaries call the same original accounting audit, retained-row frequency summary and within-mask objective competition code. The six PNG/SVG pairs include individual-page and whole-bifolium sampling views.

`inputs.npz` is a small count/geometry archive below 10 MB, not an ensemble of model checkpoints. Six result JSONs retain row projections, diagnostics and first-three-coordinate nodes. Full-dimensional model arrays are temporary. The combined histogram gives the two representations equal weight for each row; the side-by-side view preserves their separate contributions. Matching masks does not make different starts or representations independent observations.

The individual-observation inspector added on 17 October uses those retained results only: run `python individuals/build.py`, optionally `node individuals/verify_ui.cjs`, and then `python build_report.py`. It verifies the original histograms and best-per-sample winners, counts jointly retained pairwise orderings with the original 1e-7 tie tolerance, and provides a descriptive consensus sort. It does not fit a new route, score chronological likelihoods, or infer direct edges between adjacent rows.

Before removing `_deps`, complete numerical verification and record its versions and pinned source hashes. Runtime removal does not affect plotting from the final results. Some original audit source checks require restoring the matching runtime. Run `python tools/artifact_storage.py --check` from the workspace root after completion.
