report/run.cpp is the end-to-end fit: load data, build the model and parameters, fit each system with its floor,
compute predictions, errors, widths and diagnostics, print them and write the
record. Details worth copying:
A sweep is a list of jobs, each a set of qs fit options. The runner starts them as separate processes of a
frozen copy of the binary, so one failing fit cannot take down the rest and rebuilding during a run cannot mix
versions. A job is finished when its JSON exists, which makes every sweep resumable with no state file:
--8<-- "src/analysis/sweeps.cpp:run_one"
Later sweeps read earlier records for starting points. qs sweep stop kills the process group.
records reads the JSON files and defines the configurations and the physical set. selection applies the
rule to them: pure functions from records to verdicts, so it can be tested on stored
inputs. report, tables and validity write CSV and Markdown; root/figures draws, if ROOT is there.
These modules replaced Python scripts. The method was parity: run both on the same records and compare outputs, byte for byte where possible. The remaining differences (eigenvector sign convention, number formatting, round-off) are listed in the development log. The statistics that had come from SciPy (Shapiro–Wilk, incomplete beta, quantiles) were written out and tested against reference values.