# Provenance

This file records the true sequence of work on this study. Errors in the record are corrected here in the open, not scrubbed from git history.

## Timeline

| Date | Event | Evidence |
|---|---|---|
| 2026-07-14 | Pre-registration frozen, before any contact with the outcome data. | `PRE_REGISTRATION.md` Status line |
| 2026-07-15 | Stop 1: Mayhew spine built and completeness gates run. | `R/01_build_spine.py` (22:10), `docs/STOP1_REPORT.md` (22:13), stop-1 raw files (21:53) |
| 2026-07-15 | Amendment 01 decided: primary DV is Sweep-One-only across the 80th-118th Congresses (DV option b), with the mixed series and a pre/post-1990 regime indicator as a robustness DV. Decided before any model was fit. | `PRE_REGISTRATION_AMENDMENT_01.md` Date line and Blindness attestation |
| 2026-07-16 | Stop 2 modeling ran, after the amendment. | `R/02_build_panel.py`, `R/03_models.py`, `R/04_robustness_measures.py`, `data/derived/*.csv`, `docs/STOP2_REPORT.md`, all modified 2026-07-16 17:23-17:48 |

## Correction to the git record

The amendment commit made 2026-09-26 contains the line "Stop 2 has not been run as of this commit." That line is **false**. It was written that day without checking the working tree. The truth, recorded here, is that stop 2 ran 2026-07-16, after the amendment was decided 2026-07-15.

The commit is left unamended so that the error and its correction both stay visible.

## What the git dates do and do not show

The repository was created 2026-09-26. The two provenance commits made that day (the pre-registration, then the amendment) are a same-day reconstruction. Their commit dates carry no claim about the July sequence. For July, the evidence is the amendment's Blindness attestation plus the file modification timestamps listed below. From 2026-09-26 forward, git commit order is the record of sequence.

## File modification timestamps (as found 2026-09-26, before any re-run)

Local time, -0400. Captured before any file was committed or any script re-run.

| Modified | File |
|---|---|
| 2026-07-15 21:47:30 | `PRE_REGISTRATION.md` |
| 2026-09-16 11:18:42 | `PRE_REGISTRATION_AMENDMENT_01.md` (a later copy, not the decision time; the file was found in `Downloads\` and moved into the study unchanged on 2026-09-26) |
| 2026-07-15 21:53:37-21:53:48 | Stop-1 raw inputs: `data/raw/DWG_equation.xls`, `Enactments_1947_1990.docx`, `Info_Sweeps1and2_1947_1990.docx`, `arnold_1991_2014.pdf`, `laws_*.doc/.docx/.pdf` |
| 2026-07-15 22:10:33 | `R/01_build_spine.py` |
| 2026-07-15 22:13:58 | `docs/STOP1_REPORT.md` |
| 2026-07-16 17:23:18 | `data/raw/HSall_members.csv` |
| 2026-07-16 17:27:35 | `data/raw/cow_test.tmp` |
| 2026-07-16 17:28:01-17:28:08 | `data/raw/Inter-StateWarData_v4.0.csv`, `Intra-StateWarData_v4.1.csv`, `Intra-StateWarData_v5.1.csv`, `Extra-StateWarData_v4.0.csv` |
| 2026-07-16 17:32:07 | `R/02_build_panel.py` |
| 2026-07-16 17:36:54 | `R/03_models.py` |
| 2026-07-16 17:38:54-17:40:44 | `data/raw/aps_meta.json`, `APS_README.txt`, `APS_congress_data.tab`, `APS_congress_data_stathis.tab`, `APS_significant_legislation_database.tab`, `APS_Stathis_raw.tab` |
| 2026-07-16 17:41:29 | `data/raw/CL_LegSignificance.zip` |
| 2026-07-16 17:43:41 | `data/raw/CL_percongress_counts.csv` |
| 2026-07-16 17:44:26 | `R/04_robustness_measures.py` |
| 2026-07-16 17:47:12 | `docs/STOP2_REPORT.md` |
| 2026-07-16 17:47:41 | `data/derived/mayhew_spine.csv` |
| 2026-07-16 17:47:47 | `data/derived/analysis_panel.csv` |
| 2026-07-16 17:48:10 | `data/derived/robustness_measures_divided.csv` |
| 2010-08-11 | `data/raw/CL/` (contents of the Clinton-Lapinski zip; timestamps are the archive's own) |

## Observations from the timestamps, recorded without interpretation

- `PRE_REGISTRATION.md` was last modified 2026-07-15 21:47:30, a day after its stated freeze date of 2026-07-14 and six minutes before the first stop-1 raw file (21:53:37).
- `data/derived/mayhew_spine.csv`, the stop-1 spine, was last written 2026-07-16 17:47:41, during the stop-2 window.
- `docs/STOP2_REPORT.md` (17:47:12) was last modified before `analysis_panel.csv` (17:47:47) and `robustness_measures_divided.csv` (17:48:10) were last written.

## Line endings in the recovered July files

Five July files had CRLF line endings: `R/03_models.py`, `data/derived/analysis_panel.csv`, `data/derived/mayhew_spine.csv`, `data/derived/robustness_measures_divided.csv`, `data/raw/CL_percongress_counts.csv`. The machine-wide git setting `core.autocrlf=true` (shared by the other four study repos, none of which uses `.gitattributes`) stored them with LF line endings. No content was lost: converting each committed file's LF endings back to CRLF reproduces the original SHA-256 exactly.

| File | Original SHA-256 (CRLF, as found 2026-09-26) |
|---|---|
| `R/03_models.py` | `c48ccb3e4453077e61f5857c521b7059612e2b23e21d75cfb9963cea094d52a5` |
| `data/derived/analysis_panel.csv` | `465af8fd8ef7d547d3c0fae36a044d344a3c5ccfe8fd169ee36b157fef8c2052` |
| `data/derived/mayhew_spine.csv` | `ca748b8b7a89352541ca95d3ac09a03507f8c81d713695b83948b6a853607f8b` |
| `data/derived/robustness_measures_divided.csv` | `79ae7f0a1dd6fa8db3a0b9eb1d0bacdfc067354e5c98b04732852a2afdb23b21` |
| `data/raw/CL_percongress_counts.csv` | `ba457c47b2c56c080f7f06b101270ee92452bf9eeb978d45ec70a1bd089d0a66` |

## Reproduction check, 2026-09-26

`R/02`, `R/03` and `R/04` were re-run on 2026-09-26. The three derived CSVs they wrote are byte-identical to the July originals. Every statistic the scripts print matches `docs/STOP2_REPORT.md`. The re-run reset the modification times of the three derived CSVs to 2026-09-26; their July times are in the table above. Logs are in `docs/repro_2026-09-26/`.

## Corrected pass, 2026-09-30

On 2026-09-26 a review of the July scripts against the pre-registration found three deviations. All corrections below were decided 2026-09-30, blind to every corrected estimate. The rule was that the frozen spec wins over the July build, unless the spec was factually wrong. The July pass (`6be9641`: `R/01`-`R/04`, `data/derived/*.csv`, `docs/STOP2_REPORT.md`) is left exactly as found.

Commit order: raw sources and quarantine (`628b7dc`), then the corrected scripts and panel committed before any model was run (`5ba1a58`), then the model outputs.

### Changes relative to July

| Item | July | Corrected pass | Why |
|---|---|---|---|
| Estimator (Fix 1) | Poisson for every reported rate ratio; NB fit only for the dispersion test | NB2 primary for every rate ratio, with Poisson reported beside it. Fixed rule (`R/estimators.py`): accept NB only if the optimizer converges and the reported term's SE is finite; otherwise report the failure and let Poisson stand as a documented fallback | Spec sec. 6 makes NB primary |
| War (Fix 2) | COW inter-state v4.0 only (12 war Congresses) | COW inter-state v4.0 OR intra-state v4.1 (20 war Congresses); the inter-state-only coding is kept as the labeled sensitivity `war_inter` | Spec sec. 5 says inter- or intra-state |
| 117th president (Fix 3) | Trump (first voteview row) | Biden | Factual error: Biden was president from 20 January 2021 |
| Seat shares | Every member who served, replacements included | Start-of-Congress party divisions from the official House and Senate tables | Consistent with divided being fixed at the January organizing |
| Clinton-Lapinski counts | Hand-made CSV, no script | `R/05_cl_counts.py` regenerates them from `StatuteSignificance.xlsx`, with output identical to the July CSV. Frozen coding choice: top 1/2/5% of global `Rank` over all 37,767 ranked laws, all three reported | Reproducibility; "significant" is a coding choice (spec sec. 11) |
| Collinearity figures | corr -0.83, VIF 8.0, "97%" overlap, cited in the report with no script | Computed in `R/07` section [9]; the July figures are not carried forward | Only figures produced by code are reported |
| H2 polarization | House and Senate pooled | Unchanged (registered); chamber-split gaps added as a secondary check | Registered spec kept; pooling stated openly |

### Things the corrected pass found, recorded as-is

- For the primary specifications (parsimonious, full, HAC, H2), NB2 did not produce an accepted fit, because the dispersion estimate sits at the alpha = 0 boundary where the Hessian is singular. Under the fixed rule, Poisson stands for those specifications, and each failure's reason is printed in `docs/corrected_pass_2026-09-30/run_07_models_corrected.txt`.
- COW's current intra-state release, v5.1 (`data/raw/Intra-State-Wars-v5.1.zip`), codes US participation differently from v4.1 after 2006. It adds Somalia 2007-12, Second Waziristan 2008-ongoing, the Iraqi Sunni Revolt 2010-11, Libya (listed as "2001-2011", apparently a data error) and two 2014-ongoing wars. v5.1 ends in 2014 and cannot code the 114th-118th Congresses. It is used in no model. `R/06` prints the war coding v5.1 would imply, for the predictor only.
- Two July raw files were not data. They are quarantined as-is in `data/raw/_junk/`.
- `house_party_divisions.html` and `senate_party_divisions.html` had mixed line endings and were stored with LF by `core.autocrlf`. Original SHA-256: House `cd412a3e51f66edead35f58ebeca34b866fda6b9513ebd5e93825796eaf40220`, Senate `2c9f1c2c772154d118b320176e22e3249cea784d579a056447cbe4ce6fb0c8f9`.

Logs are in `docs/corrected_pass_2026-09-30/`, and outputs are in `data/derived/corrected/`.
