test(callaway): fold ipw R yardsticks into regenerated golden; record no-cov ipw document-only decision#638
Conversation
… record no-cov ipw document-only decision csdid_golden_values.json regenerated with R 4.5.2 / did 2.5.1 / DRDID 1.3.0: all pre-existing data and result blocks reproduced byte-identically (462/462 floats), and the with_covariates_ipw scenario now carries the aggte simple/dynamic/group blocks — identical to the previously hardcoded 2026-07-05 yardsticks, which test_golden_ipw_aggregation_se_vs_r_did_251 now reads from the JSON. The no-covariate ipw unconditional-propensity treatment is recorded as a document-only decision in REGISTRY (R did's intercept-only logit is deliberately not mirrored — its estimation-effect correction is identically zero at the MLE), locked by a new bit-identity test (no-cov ipw == reg per cell and aggregated). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Overall Assessment✅ Looks good — no unmitigated P0/P1 findings. Executive Summary
Methodology
Code QualityNo findings. The test rewrite cleanly replaces hardcoded IPW aggregation yardsticks with JSON-backed expected values and keeps explicit skip guards for older fixtures: PerformanceNo findings. The PR changes fixtures, tests, docs, and the R generator comments/output shape; no runtime estimator hot path is modified. MaintainabilityNo findings. The generator now emits the same IPW aggregation blocks consumed by the Python test, reducing duplicated hardcoded values: Tech DebtNo findings. The removed TODO rows correspond to work completed or converted into a documented Registry decision: SecurityNo findings. The changed files contain simulation data, docs, tests, and generator code; no credible secret material was introduced. Documentation/TestsNo blocking findings. The fixture contains the new Validation note: targeted test execution was attempted with |
Summary
benchmarks/data/csdid_golden_values.json; R 4.5.2, did 2.5.1, DRDID 1.3.0 — exactly the provenance stack of the hardcoded yardsticks): all pre-existing data blocks and result values reproduced byte-identically (462/462 floats), and thewith_covariates_ipwscenario now carries theaggtesimple/dynamic/groupblocks the generator already emitted. The committed diff is +18 JSON lines, nothing else.test_golden_ipw_aggregation_se_vs_r_did_251now reads the yardsticks from the JSON (values identical to the previously hardcoded 2026-07-05 numbers; same 1e-6 tolerance, observed agreement ~1e-10), with a skip guard for pre-regeneration fixtures.didfits an intercept-only logit whose estimation-effect correction is identically zero at the MLE; mirroring it would add a per-cell IRLS solve (and non-convergence failure surface) for zero numerical change. REGISTRY § CallawaySantAnna now carries an explicit**Note:**; a newTestDRNoCovariateSEUniformity::test_ipw_no_cov_per_cell_identical_to_reglocks no-cov ipw == reg bit-identical per cell and on aggregated surfaces.Methodology references (required if estimator / math changes)
std_ipw_did_panel). No estimator code changed — fixture, tests, and REGISTRY documentation only.did2.5.1 / DRDID 1.3.0 as the parity reference.**Note:**, decided document-only) — numerically identical to R, structurally simpler, locked by a bit-identity test.Validation
tests/test_csdid_ported.py(golden-reading rewrite),tests/test_methodology_callaway.py(new ipw/reg bit-identity test).tests/test_csdid_ported.py+tests/test_methodology_callaway.pypass locally (145 tests, both backends' dispatch unchanged).Security / privacy
Generated with Claude Code