Commit da2a7bd
Address R6 review (2 P3) on PreTrendsPower PR-B
R6 codex verdict ✅ "Looks good" but with two P3 polish items.
**P3 — `_infer_cov_source` docstring drifted from new MPD special-case**
R5 added an explicit MPD branch to ``_infer_cov_source`` that returns
``"diag_fallback"`` when ``interaction_indices`` is absent, but the
docstring's ``"full_pre_period_vcov"`` bullet still claimed all
non-event-study types (including MPD) "always" expose full pre-period
covariance. Fix: update the docstring so the
``"full_pre_period_vcov"`` bullet excludes MPD (with a forward
pointer to the explicit MPD branch below), and the
``"diag_fallback"`` bullet enumerates the MPD-without-
``interaction_indices`` case.
**P3 — BR no-downgrade live regression was conditionally bypassed**
The R5-fixed ``test_full_vcov_path_no_downgrade_on_real_cs_fit``
gated the well-powered phrasing assertions on
``if block["tier"] == "well_powered"``, which silently skipped the
key prose assertion if a future regression reintroduced the
conservative downgrade (the test then passes trivially). Fix: pin
the expected tier deterministically on the ``cs_fit`` fixture, which
produces ``mdv/|att| ≈ 0.053`` (well under the ``0.25`` well_powered
threshold) on ``seed=7`` + ``treatment_effect=1.5``. New assertions:
- ``block["covariance_source"] == "full_pre_period_vcov"`` (asserted,
not guarded)
- ``block["mdv_share_of_att"] < 0.25`` (asserts the raw ratio is in
the well_powered range so the no-downgrade assertion below is
meaningful)
- ``block["tier"] == "well_powered"`` (locks the no-downgrade
contract — a regression reintroducing the downgrade would fail
here, not silently bypass)
The well-powered / moderately-informative prose contracts on
``summary()`` and ``full_report()`` are now also unconditionally
asserted.
Tests: 125 pass on the impacted classes (BR centralized-downgrade +
all methodology + all DR). No regressions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5fb4aa7 commit da2a7bd
2 files changed
Lines changed: 64 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1525 | 1525 | | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
1533 | 1535 | | |
1534 | 1536 | | |
1535 | 1537 | | |
| |||
1543 | 1545 | | |
1544 | 1546 | | |
1545 | 1547 | | |
1546 | | - | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
1547 | 1552 | | |
1548 | 1553 | | |
1549 | 1554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2425 | 2425 | | |
2426 | 2426 | | |
2427 | 2427 | | |
2428 | | - | |
2429 | | - | |
2430 | | - | |
2431 | | - | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2441 | 2443 | | |
2442 | 2444 | | |
2443 | 2445 | | |
| |||
2452 | 2454 | | |
2453 | 2455 | | |
2454 | 2456 | | |
2455 | | - | |
2456 | | - | |
2457 | | - | |
2458 | | - | |
2459 | | - | |
2460 | | - | |
2461 | | - | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
2462 | 2477 | | |
2463 | | - | |
2464 | | - | |
2465 | | - | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
2466 | 2482 | | |
2467 | 2483 | | |
2468 | 2484 | | |
2469 | | - | |
2470 | | - | |
2471 | | - | |
2472 | | - | |
2473 | | - | |
2474 | | - | |
2475 | | - | |
2476 | | - | |
2477 | | - | |
2478 | | - | |
2479 | | - | |
2480 | | - | |
2481 | | - | |
2482 | | - | |
2483 | | - | |
2484 | | - | |
2485 | | - | |
2486 | | - | |
2487 | | - | |
2488 | | - | |
2489 | | - | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
2490 | 2499 | | |
2491 | 2500 | | |
2492 | 2501 | | |
| |||
0 commit comments