Commit b2bfdd0
Address PR #402 R8 review (1 P3, to_dict() docstring drift)
P3 doc drift: PR #402 R3 fixed llms-full.txt, R5 fixed the dataclass
field docstrings, but HeterogeneousAdoptionDiDResults.to_dict() still
described variance_formula as continuous-only ("pweight" /
"survey_binder_tsl") and omitted the mass-point Wald-IV
effective_dose_mean semantics. Three internal source-of-truth surfaces
were now disagreeing about the same public result object's
to_dict() output shape.
Updated to_dict() docstring to enumerate all four variance_formula
labels (pweight, survey_binder_tsl, pweight_2sls,
survey_binder_tsl_2sls) and to describe the per-design
effective_dose_mean semantics (continuous mean of D / D - d_lower vs
mass-point weighted Wald-IV dose gap mean(D | Z=1, w) -
mean(D | Z=0, w)). Mirrors the field-docstring contract from R5.
Tests added (1 new, 95 total):
- test_had_results_to_dict_docstring_matches_weighted_mass_point_contract:
reads HeterogeneousAdoptionDiDResults.to_dict.__doc__ and asserts it
enumerates all four variance_formula labels and the mass-point
Wald-IV effective_dose_mean semantics. Mirrors the existing
dataclass-field-docstring lock.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4a24758 commit b2bfdd0
2 files changed
Lines changed: 51 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
487 | 495 | | |
488 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
489 | 500 | | |
490 | 501 | | |
491 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
733 | 771 | | |
734 | 772 | | |
735 | 773 | | |
| |||
0 commit comments