Commit 35ab5fe
Address PR #393 R1 P1: multi-baseline trends_linear UserWarning
CI reviewer flagged that by_path + trends_linear was ungated on all
panels but only warned on F_g<3 exclusions, while the analogous
by_path + controls path warns on multi-baseline switcher panels
(D_{g,1} multiplicity) where R's per-path full-pipeline call diverges
from Python's global-then-disaggregate architecture. The by_path
docstring already acknowledged the "same multi-baseline divergence
pattern as controls" (line 461-462), but the runtime warning was
missing — a docstring-vs-implementation gap.
Fix: mirror the controls warning at chaisemartin_dhaultfoeuille.py
:1565-1584 inside the trends_linear block (right after the F_g<3
warning). Same predicate (switcher mask on first_switch_idx_arr,
unique baseline check). Different message naming the trends_linear
mechanism (full-pipeline including first-differencing per path
subset).
REGISTRY note updated to spell out the warning explicitly.
Three regression tests added in TestByPathTrendsLinear, mirroring
TestByPathControls:
- test_multi_baseline_panel_emits_r_deviation_warning: panel with
joiners and leavers must emit the warning
- test_single_baseline_panel_does_not_emit_r_deviation_warning:
single-baseline panel must not warn
- test_single_baseline_heterogeneous_F_g_does_not_warn: pins the
precise predicate (baseline multiplicity, NOT F_g multiplicity)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0a2783a commit 35ab5fe
3 files changed
Lines changed: 187 additions & 1 deletion
File tree
- diff_diff
- docs/methodology
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1653 | 1653 | | |
1654 | 1654 | | |
1655 | 1655 | | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1656 | 1691 | | |
1657 | 1692 | | |
1658 | 1693 | | |
| |||
0 commit comments