Skip to content

Commit ce2b91c

Browse files
igerberclaude
andcommitted
Address PR #432 R4: align class docstring to the smoke + wired-in coverage
P3: TestStuteStratifiedSurveyBootstrap class docstring at L5465-5476 described the non-strata calibration test as a "direction pin" with locked direction, but the actual test (after R1 rename) is a finite + range smoke. The contradiction was the last cosmetic carryover from the R1-R3 narrow-the-overclaim cascade. Update the class docstring to (a) describe the smoke honestly and (b) add the previously-undocumented call-site wiring regression bullet (test_stute_call_sites_invoke_apply_stratum_centering, added in R2) to the coverage list. Both the smoke and the wiring regression exist; the docstring now reflects what the suite actually contains. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f8aff3b commit ce2b91c

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

tests/test_had_pretests.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5470,10 +5470,20 @@ class TestStuteStratifiedSurveyBootstrap:
54705470
survey-aware; verdict carries the C0 deferral substring.
54715471
- Trivial-stratum reduction: ``SurveyDesign(strata="all_ones")``
54725472
≡ ``SurveyDesign(strata=None)`` at atol=1e-12.
5473-
- Calibration-shift direction pin: non-strata Stute p-values
5474-
shifted vs pre-PR (the existing path was under-corrected by
5475-
sqrt(n_psu/(n_psu-1))). Direction is locked here so a future
5476-
revert of the centering would be caught.
5473+
- Non-strata calibration-shift end-to-end smoke: finite + range
5474+
check that the non-strata Stute path runs after the
5475+
single-implicit-stratum centering lands. A direction-pin via
5476+
pre-PR baseline capture was considered but is redundant with
5477+
the helper-level bit-parity regression at atol=1e-14 (which
5478+
catches any revert of apply_stratum_centering's algebra) AND
5479+
the call-site wiring regression below (which catches
5480+
disconnection of the helper from the Stute call sites).
5481+
- Stute call-site wiring regression: monkey-patches
5482+
``apply_stratum_centering`` and asserts both Stute call sites
5483+
(``stute_test`` at had_pretests.py:1985,
5484+
``stute_joint_pretest`` at :3312) invoke it with psu_axis=1.
5485+
Catches the disconnection case the helper bit-parity test
5486+
cannot.
54775487
- MC oracle consistency (``@pytest.mark.slow``): empirical Type
54785488
I error under a stratified null DGP at α=0.05 sits in
54795489
[0.0, 0.10] (3σ at 200 draws).

0 commit comments

Comments
 (0)