# Reproducing the v5e result from the original sources

Result to reproduce (v5e, final 15 October 2026, amendment A7): per-child relative risk 0.973, random-effects 95% CI 0.836 to 1.131, 40 countries, 39,753 stacks (comparisons).

This package contains manifests, hashes and code only. It does not contain the raw or processed data. Every claim below is traceable to a file named in `pins_v5e.json`, `sources_v5e.csv` or the project's amendment record (`AMENDMENTS_9160.md`, entries A4 pins, A7 pre-declaration, A7 pins, A7 refit record).

Files in this package: `sources_v5e.csv` (one row per source part and raw file), `sources_v5e_by_source.csv` (one row per source part), `events_v5e.csv`, `code_manifest_v5e.csv`, `code_bundle_v5e.zip`, `code_bundle_exclusions.csv`, `environment_v5e.json`, `pins_v5e.json`, `expected_layout_v5e.csv`, `SUMMARY.json`, `NOTES.md`, and the `build_*.py` scripts that wrote them.

On the website the CSV files are served gzip-compressed, with `.csv.gz` added to the names below.

## 1. Obtain the sources

1. Open `sources_v5e_by_source.csv`. It has 609 source parts. Roles: 389 primary, 31 continuation, 88 sensitivity, 55 descriptive, and 46 excluded (31 pending, 6 superseded, 9 not admitted).
2. The headline needs the primary and continuation parts. Sensitivity parts enter only the maximal-inclusion supplement (A6). Descriptive parts never enter a fit. Excluded parts enter nothing; their reason is in `exclusion_reason`.
3. For each raw file, open `sources_v5e.csv`. Download `original_url`. Compare the SHA-256 of what you get with `raw_sha256`.
4. A hash that differs means the publisher changed the file. Record the new hash. Expect small numeric differences from that source.
5. `url_level` says how specific the recorded URL is. `file` is a URL recorded for exactly that file, in the manifest kept next to it (for DATASUS, the upstream `.dbc` file the aggregate was built from). `none` means no file-level URL is recorded. Published copy: URL matches at catalog, catalog-directory and folder level were removed from the published manifests after a check found them crossing sources (for example a Brazilian MANIFEST.json matched to a Quebec page). Only file-level URLs remain.
6. 80.0% of rows (23,097 of 28,865) have a file-level URL. 5,768 rows have none. See section 6.
7. Wayback URLs are kept as recorded (1,531 rows). The access type is written only where the record evidences it. Most rows say `not recorded`.
8. Brazilian hospital files (DATASUS, about 17,500 rows) are listed as the derived per-file aggregate (`RDxxYYMM.dbc.parquet`). The URL is that of the upstream `.dbc` file on the DATASUS FTP. The `raw_sha256` in those rows is the hash of the derived aggregate, not of the `.dbc`.
9. Some rows are not raw files. `file_kind` marks them: `derived_table` (tables from earlier analyses, 298 rows), `factory_or_design_table` (68), `script` (24), `other_local_file` (49). Their provenance is another script, not a download.
10. No source in `sources_v5e.csv` is evidenced as request-only. Request-only, paywalled, account-only and blocked sources are listed in the published `UNOBTAINABLE_SOURCES.csv` (694 rows). They are not part of v5e. To request one, use its `url_or_route` and `author_action` columns. Nobody was contacted.

## 2. Folder layout the adapters expect

1. Create a project root. All paths in the factory metadata are relative to it.
2. `expected_layout_v5e.csv` lists the 770 directories the adapters read, with file counts and the source parts that use each.
3. Top-level groups of the 28,858 file entries: `qa/` (17,811 entries, mostly `qa/completeness_20260907/brazil_raw` and `brazil_pre2008`), `raw/` (10,725 entries, for example `raw/expansion_20261008/<ISO3>/<source_id>/`, `raw/us/...`, `raw/vaccine_coverage/...`), project-root files (earlier derived CSVs), `project_results/`, `processed/`, and `07_analysis_code/`.
4. Most raw folders under `raw/expansion_20261008/` hold a `MANIFEST.json` (some hold `MANIFEST.csv`). It records the URL, the retrieval time, the HTTP code and the SHA-256 of each file. Use it to check your download.
5. Put the code from `code_bundle_v5e.zip` at the same relative paths (`07_analysis_code/...`, `processed/...`, `qa/completeness_20260907/brazil_raw/...`).
6. Adapters write each part to `qa/claude_factory_20261008/data/parts/<source_id>/` (`cells.parquet`, `exposure.parquet`, `events.parquet`, `meta.json`). `meta.json` holds the inventory, the numeric checks (name, expected, observed, reference) and the hashes of the source files.

## 3. Command sequence

Use `python -I -X utf8 <script>` for every step. All scripts are in `07_analysis_code/`. Items marked (not recorded) are inferred from the script's own command-line interface, not copied from a log.

1. Build each part. Run its adapter, named in `adapter_script` of `sources_v5e.csv` (for example `9755_usa_tx_tea_district_ext2.py`). Adapters of the earlier tags are numbered 9001 to 9750. The 107 v5e parts use adapters in the ranges 9751-9798, 9812-9817, 9820-9838, 9840-9858, 9860-9878, 9880-9898, 9903-9923, 9925-9948 and 9954-9995 (`V5_TAG_RANGES['v5e']` in 9109). Command line per adapter: not recorded.
2. Test the parts. `python -I -X utf8 9799_test_v5e_parts.py` and `python -I -X utf8 9999_test_v5e_gpt_parts.py`. Run them without `--quick`: A7 admits only parts with a full-mode pass (two-run determinism, numeric checks against printed totals, a personal-data screen). `--only <source_id> ...` limits the run. 107 parts passed before the cutoff; one candidate (`TZA_BEST_SECONDARY_FORM`) failed.
3. Merge the factory tables. `python -I -X utf8 9109_factory_build_data.py --v5-tag v5e --merge-only` (not recorded; the log `factory_v5e.log` shows tag v5e and the 107 new parts). It writes the `*_v5e` tables in `qa/claude_factory_20261008/data/`. Check their hashes against section 5.
4. Prepare the design. `python -I -X utf8 9523_v5e_fit.py --final --tag v5e`. It writes the declared tables, the design frames, `RULE_9160_v5c_inputs.sha256` and `design_pins_v5c.json`. It ran twice on 14 to 15 October. Run 1 stopped at a consistency check. Run 2 completed.
5. Record the pins. The fit refuses to run unless `AMENDMENTS_9160.md` contains an entry headed `A7 pins (pre-refit)`. `9997_a7_pins_record.py` drafts that entry.
6. Fit. `python -I -X utf8 9523_v5e_fit.py --fit --workers 14 --tag v5e --reuse-from work_v5c_v5d` (as in the A7 refit record). Without the reuse folder, or with `V5D_NO_REUSE=1`, every unit is refitted. The check stage first re-hashes the 149 manifest files and the four design frames.
7. Post-fit stages, in the order of `work_v5c_v5e/logs/post_chain.status` (script names from the logs and the scripts' argparse; full command lines not recorded):
   1. country weights: `9504_v5c_weight_chart.py`
   2. headline chart: `9514_v5c_a3_headline_chart.py --root <work_v5c_v5e> --version A7`
   3. post-hoc variants and tipping points: `9515_v5c_posthoc.py --root <work_v5c_v5e>` (`--tipping-only`)
   4. co-primary contrast points and release figures: `9515_v5c_posthoc.py --contrast-chart`, `9514_v5c_a3_headline_chart.py --extra-figs`
   5. robustness battery A5: `9710_a5_battery.py --root <work_v5c_v5e>`
   6. maximal-inclusion supplement A6: `9523_v5e_fit.py --max-incl-fit --workers 14`, then `9515_v5c_posthoc.py --max-incl` and `--max-incl-ramp`
   7. numbers: `9505_v5c_numbers.py --root <work_v5c_v5e> --out qa/claude_release_v4/v5e_numbers.json` with `--v5d-root`, `--a3-root` and `--a2-root` pointing at the earlier runs
   8. results text: `9998_v5e_results.py`
8. The estimator code is the 9150 to 9160 chain plus 9500 to 9523 (42 files pinned in `RULE_9160_v5c_inputs.sha256`). The A7 table pins 14 files. All 42 and all 14 match the files on disk (`code_pins_compare.json`).

## 4. Expected outputs and tolerances

Headline (key `headline.*` in `qa/claude_release_v4/v5e_numbers.json`):

| Quantity | Value |
|---|---|
| Per-child RR | 0.972606 (shown 0.973) |
| Random-effects 95% CI | 0.836147 to 1.131335 |
| Placebo-calibrated interval | 0.854501 to 1.107035 |
| Shared-bias allowance interval | 0.698820 to 1.353656 |
| Between-country SD (tau) | 0.33 |
| K_eff | 26.04 |
| Countries / stacks | 40 / 39,753 |
| Distinct schedule changes (lead events) | 404 |
| Primary design before profile filtering | 11,169 units, 95,462 stacks, 41 countries |

Gates (all pass): planted x1.25 and x1.5 effects recovered within 10% (scaled: -8.3% and -6.7%; recovery factor 0.925); placebo coverage 6 of 6 (country placebo coverage 0.80 of 187); ramp validated. Robustness battery A5: 6 of 7 checks pass; M1 fails (intercept +0.18). Maximal-inclusion supplement: RR 0.961 (0.835 to 1.107), 44 countries, 48,939 stacks.

Tolerance. The records state no numeric tolerance for the headline. The release text uses three decimals. Pooling run twice gave byte-identical output (pool hash `a79e6c48...`, contrast hash `d874657d...`). Expect bit-identical profiles on the same inputs and code. Expect small floating-point differences on other machines or library versions. The worker count does not change the profiles.

Pins to confirm (all re-computed on 15 October 2026 and equal to the recorded values; full list in `pins_v5e.json`):

| Pin | SHA-256 |
|---|---|
| `cells_primary_v5e.parquet` | `411fcdcdb84e5739f4268370626f3ca648d7d9ff48aca37e2273f0bab6d99875` |
| `exposure_preferred_v5e.parquet` | `46fd2ddbb9fa338f25b4464029ec93da8e32946a36e59c1fa52480085ecde153` |
| `events_primary_v5e.parquet` | `ae9d3862996027537e33998ea1941f40e72cbc7fed03ee2dd943f7626d1ab02e` |
| `VALIDATION_v5e.json` | `8c8c62e5131939173c003dfc8ee2fc3743de2932b0ddb20fa8f348ab8013e592` (in the manifest only) |
| design frame `units` | `7ec6e1a16b0164101f7254a355cd0af2cca71c9efb8d31277d9e18c0daf74355` |
| design frame `stacks` | `1f10146a04a6b450d7a5c27372bd3871d444e0cc754f7fa7ff80a6d3d08ce7e8` |
| design frame `placebo` | `d30da77f9ad6f9a3e87dd01ad2217d61c5116ff5cbaa1712fc9d04f0c61b91bc` |
| design frame `ppath` | `43929303da7e71c4da0fbae6c7546b012776ae9422ad35146e23d2374ce8d1fa` |
| design pins file | `3743d032747b6c346745eb7d95aeafd39471b68f7e59f55faec53b87b5667ebf` |
| fit chain (code key) | `7ffc6ae84f8f946e29cfd16dcafd6e55dd746428115680c2bfb2c35695dccde4` |
| `v5e_numbers.json` | `b323171ca4e4117993d7bfb5ee3c3cbcdcf0bb99bd68b2c5aa3057de326d2e63` (computed; not pinned in the amendments) |
| `AMENDMENTS_9160.md`, first 104,743 bytes | `6306813fce1a2ed27ba4b940041706d1b2342bcdb290fb37f0adbfebc89e51b5` |

The amendment file is append-only. Its whole-file hash (`55922d30...`, 126,299 bytes at packaging) is not pinned and changes when entries are added. Only the prefix hash is stable.

## 5. Runtime and hardware

1. Fit machine: Windows 11 workstation, 32 logical cores, 125 GB RAM (recorded in the A4 pins addendum and the 9520 docstring).
2. Fit run, 15 October 01:17:41 to 01:58:46 (41 minutes) with 14 profile workers and reuse of 171,440 of 190,665 design rows from the sealed v5d run. Stage seconds: check 28, profiles 505, pooling 346, chart 281, ramp 1,303.
3. Peak process-tree memory was 13.13 GB. Without reuse the profile stage is much longer (time not recorded for v5e).
4. Design preparation (`--final` run 2) took about 2 h 11 min (23:05 to 01:16).
5. A6 supplement: about 20 min for the profile stage and 43 min for its ramp. A5 battery: about 2 min.
6. Factory merge: about 4 minutes. Adapter and test run times were not recorded in a single place.
7. Package versions used by the fit are not recorded. `environment_v5e.json` lists the versions in the interpreter that built this package (Python 3.12.3, numpy 2.4.2, pandas 2.3.3, scipy 1.16.3, pyarrow 25.0.0). Compare pins, not versions.

## 6. What is not reproducible from public sources, and why

1. Rows without a recorded URL (5,768 of 28,865). Most are older US state school and health files (`raw/us`, `raw/vaccine_coverage`, `raw/subnational_frontier`) whose folders hold no per-file manifest. The part and file name are known. The source page must be found by hand.
2. Wayback snapshots (1,531 rows). They need the archive to serve the same capture.
3. Sources that are not open: request, paid, account, blocked and unreachable sources are listed in `UNOBTAINABLE_SOURCES.csv`. By class: paid 213, request 151, host unreachable 117, captcha or WAF 83, account 50, certificate 27, other 26, browser only 25, geo-block 2. None enters v5e.
4. Excluded parts. 31 pending parts have no data, 6 are superseded, 9 were not admitted (including `TZA_BEST_SECONDARY_FORM`, which failed its lane test).
5. Literature parts digitised from published figures (for example `AUS_LIT_BOURKE2024`). Reproduction requires the paper and the same digitisation.
6. Live portals change. Hashes in `raw_sha256` are those of the files as retrieved on the dates in `retrieved`. A later download may differ.
7. Derived tables from earlier analyses (`file_kind=derived_table`). Their upstream is a separate script chain, not a download.
8. Two scripts were withheld from the code bundle by the secret scan: `9202_download_usa_coverage.py` (a UUID literal named `ND_KEY`, documented in the script as a public embed key) and `9569_ita_pat_coverage_24m.py` (an institutional e-mail address in a string). See `code_bundle_exclusions.csv`. They must be obtained from the project owner or rewritten.
9. Post-fit command lines are not recorded verbatim (section 3, items 3 and 7).
10. The result is about recorded diagnoses in administrative systems, not biological incidence. That is a property of the sources, not of the reproduction.
