1# REPRODUCE — end-to-end instructions (UQO WP36)23## 0. Prerequisites4- macOS or Linux; Python 3.12 managed by `uv` (0.11+); TeX Live 2026 (`pdflatex`, `bibtex`, `latexmk`); SQLite ≥ 3.40; `zstd`.5- Hardware used: Apple M5 Max (18 cores, 48 GB). Full pipeline wall time ≈ 45 min (the robustness suite and the 200-replication dealer bootstrap dominate).6- Raw data: owner-authorised snapshot `data/raw/autoka-snapshot-20261101.db` (1.35 GB, SHA-256 `65c3dad229a402f89129c614111a8d6f7b583eb7b46a6014a34e0ebca8de0132`; **not distributed**, restricted fields). Also required: `data/raw/registry/sources.json` and `villes_gps.json` (public registry copied from the platform).7 Operator-only regeneration from the production node:8 ```bash9 ssh M4M64b 'cd ~/auto-ka && sqlite3 data/autoka.db ".backup /tmp/snap.db" && sqlite3 /tmp/snap.db "DROP TABLE IF EXISTS users; VACUUM;" && shasum -a 256 /tmp/snap.db && zstd -T0 -3 /tmp/snap.db'10 scp M4M64b:/tmp/snap.db.zst data/raw/ && zstd -d data/raw/snap.db.zst -o data/raw/autoka-snapshot-YYYYMMDD.db11 ```12 Without the snapshot, the pipeline and all tests run on the **clearly labelled synthetic fixture** (`python -m ucml.synthetic` → `data/synthetic/autoka-synthetic.db`; set `UCML_SNAPSHOT` to that path). Synthetic output is for code validation only and carries no empirical content.1314## 1. Environment15```bash16make env # uv venv + editable install (pinned versions in requirements-lock.txt)17make test # 14 unit/pipeline tests (pricepaths, cleaning rules, synthetic end-to-end, prediction helpers)18```1920## 2. Pipeline (in order; each script is idempotent and writes to results/, figures/, paper/tables/)21| Step | Script | Output |22|---|---|---|23| 01 | `scripts/01_ingest.py` | `data/interim/*.parquet`, `manifest.json` (row counts, time bounds, SHA-256) |24| 02 | `scripts/02_clean.py` | `data/processed/listings.parquet`, `price_events.parquet`, `exclusions.csv`, `sample_construction.csv`, `sources_registry.csv`, `cleaning_stats.json` |25| 03 | `scripts/03_features.py` | `data/processed/risk_set.parquet` (listing-days with competitor sets at 10/25/50 km) |26| 04 | `scripts/04_hedonic.py` | `results/hedonic/` (Models A1–A5, tests, region premia, residuals, surface, grouped CV incl. LightGBM) |27| 05 | `scripts/05_descriptives.py` | Figures 1, 3, 4; Tables 1–3; `results/descriptives/summary.json` |28| 06 | `scripts/06_hazards.py` | `results/hazards/` (cloglog B/C, Cox with dealer-clustered SEs, AFT, cut size, empirical hazards) |29| 07 | `scripts/07_competition.py`, `07b_competition_dow.py` | `results/competition/` (event studies, placebo, radii, dealer×weekday FE) |30| 08 | `scripts/08_prediction.py` | `results/prediction/`, Figure 10, Table 8 |31| 09 | `scripts/09_amli.py 200` | `results/amli/` (indices, weights, validation, dealer bootstrap) |32| 10 | `scripts/10_validation.py` | `results/validation/exit_validation.json` |33| 11 | `scripts/11_figures.py` | Figures 2, 5–9 |34| 12 | `scripts/12_robustness.py` | `results/robustness/`, Table 9, Holm-adjusted primary tests |35| 13 | `scripts/13_tables.py` | Tables 4–7 |36`make all` runs everything (`make data models tables figures paper`).3738## 3. Paper39```bash40cd paper && make # latexmk: pdflatex + bibtex (natbib, aer.bst) -> paper/main.pdf41```42Every number in the manuscript is traced in `CLAIMS_LEDGER.csv` to a results file; `EXPERIMENTS.md` logs each run; `DECISIONS.md` records amendments to the preregistered plan (`research/analysis_plan.md`).43