Commit def6503
Round-4 CI: document terminal-missingness carve-out + end-to-end regression
Addresses the CI round-3 P1 (docs overclaiming support relative to the
newly-added `_unroll_target_to_cells` guard) and P2 (no end-to-end
fit() regression for terminal missingness + varying PSU + bootstrap).
**P1 (docs contract consistency):**
The cell-level bootstrap now hard-fails on the terminal-missingness
mass-leak regime, but the surrounding docs still advertised full
support. Added a "Bootstrap + terminal-missingness scope note" to:
- `REGISTRY.md` "terminal missingness retained" Note — describes
the cohort-recentering leakage mechanism and directs users to
`n_bootstrap=0` for affected panels.
- `REGISTRY.md` Survey + bootstrap contract Note — same carve-out,
also clarifies that PSU-within-group-constant regimes are
unaffected (dispatcher routes to the legacy path).
- `CHANGELOG.md` (PR-4 entry) — explicit scope note after the
"closes the last NotImplementedError gate" claim.
- `fit()` docstring `survey_design` paragraph — scope note directs
users to `n_bootstrap=0` as the documented workaround.
**P2 (end-to-end fit() regression):**
Added `test_bootstrap_fit_raises_on_terminal_missingness_with_varying_psu`
in TestBootstrapCellPeriod. Fixture: 10 groups with joiners cohort
(at period 3), leavers cohort (at period 4), and never-treated
controls; group 2 is terminally missing at periods 4-5. At period 4
the other joiners serve as stable_1 controls for the leavers,
producing non-zero cohort mean in cohort A — `_cohort_recenter_per_period`
leaks `-col_mean` onto group 2's missing cell. Varying PSU
(period parity per group) routes the bootstrap to the cell-level
path. Test asserts:
- `fit(..., n_bootstrap=50)` raises `ValueError` with the
documented "no positive-weight observations" message.
- `fit(..., n_bootstrap=0)` succeeds on the same panel — analytical
TSL supports this regime (the contract the scope note preserves).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9ebb682 commit def6503
4 files changed
Lines changed: 92 additions & 8 deletions
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
674 | 681 | | |
675 | 682 | | |
676 | 683 | | |
| |||
0 commit comments