Commit fbdfe55
Address CI codex round 1 findings on PR igerber#477
P2 (Methodology — missing PSD/finite warning on combined survey meat):
mirror `_compute_conley_meat`'s finite + negative-eigenvalue guard on
the combined `meat = meat_spatial + meat_serial` returned by the survey
panel-block orchestrator. Both the radial 1-D Bartlett spatial kernel
AND the Newey-West Bartlett serial kernel are practitioner specializations
that are NOT formally PSD-guaranteed; adding two non-PSD-guaranteed terms
can produce a more indefinite combined meat, so the diagnostic surface
matters more on the panel-block path than the no-survey baseline. Guard
fires after the saturation NaN-fail check (so genuinely-saturated meats
NaN-propagate without spurious warning).
P3 (Documentation — public docs missing effective-PSU restriction):
README.md, diff_diff/guides/llms.txt, and docs/api/spillover.rst now
mention the effective-PSU requirement for `conley_lag_cutoff > 0`
(weights-only / strata-only without cluster fallback raises
NotImplementedError). REGISTRY's Restrictions list already had the
caveat; the public-surface docs are now consistent.
P3 (Wording — single-stratum reduction overclaim): REGISTRY and CHANGELOG
single-stratum reduction descriptions clarified to "Conley sandwich on
within-stratum-CENTERED PSU totals" (NOT plain). The Binder TSL centering
is retained at H=1 — under survey weights the per-period stratum mean is
always subtracted from PSU scores before the kernel application, even
when the stratum is the entire sample. The cross-sectional Wave E.2
reduction wording was already correct (centered).
P3 (Documentation — test_a `full meat matrix` overclaim): tightened
test_a docstring to accurately describe what is pinned (ATT AND scalar
SE bit-identity via assert_array_equal), with an explicit note that
full meat-matrix equality is implied — not directly asserted — because
the meat matrix is not exposed on `SpilloverDiDResults`.
P3 (Tech debt — code duplication, DEFERRED): the serial Bartlett kernel
logic is duplicated between two_stage.py (survey path) and conley.py
(no-survey path). Factoring out a shared kernel helper + shared PSD/finite
guard is cosmetic and out of scope for this PR. Added a TODO.md row to
track the refactor follow-up.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 34a01c1 commit fbdfe55
8 files changed
Lines changed: 60 additions & 10 deletions
File tree
- diff_diff
- guides
- docs
- api
- methodology
- tests
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
841 | 871 | | |
842 | 872 | | |
843 | 873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
390 | 397 | | |
391 | 398 | | |
392 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
393 | 408 | | |
394 | 409 | | |
395 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3289 | 3289 | | |
3290 | 3290 | | |
3291 | 3291 | | |
3292 | | - | |
| 3292 | + | |
3293 | 3293 | | |
3294 | 3294 | | |
3295 | 3295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6481 | 6481 | | |
6482 | 6482 | | |
6483 | 6483 | | |
6484 | | - | |
6485 | | - | |
6486 | | - | |
6487 | | - | |
| 6484 | + | |
| 6485 | + | |
| 6486 | + | |
| 6487 | + | |
6488 | 6488 | | |
6489 | 6489 | | |
6490 | 6490 | | |
6491 | 6491 | | |
6492 | 6492 | | |
6493 | | - | |
| 6493 | + | |
| 6494 | + | |
| 6495 | + | |
| 6496 | + | |
| 6497 | + | |
6494 | 6498 | | |
6495 | 6499 | | |
6496 | 6500 | | |
| |||
0 commit comments