test(se-audit): CI-lock flagship + previously-unasserted SE parity (G2 + C1-C3/C5)#624
Merged
Conversation
…2 + C1-C3/C5) Commit standard-error assertions for surfaces that already matched R but had no CI lock pinning them (the latent-risk pattern that once hid the CallawaySantAnna reg-method gap). No source (diff_diff/) changes. - G2: new fixest DiD/TWFE golden (benchmarks/data/fixest_did_twfe_golden.json + benchmarks/R/generate_fixest_did_twfe_golden.R + tests/test_fixest_did_twfe_parity.py). The flagship 2x2 DiD and TWFE classical/iid ATT+SE match fixest::feols to ~1e-16 in CI without R at test time (the prior live-Rscript tests asserted only att at rtol=1e-3 and skipped in CI); the TWFE lock also pins the D4 full-K within-transform rescale. - C2: TWFE(hc2_bm) default CR2-clustered-at-unit SE + the one-way HC2-BM SE (prior tests asserted only the Satterthwaite DOF) + MultiPeriodDiD average-effect CR2 SE (prior test only checked finite). - C1: StackedDiD event-study coefficient point estimates. - C3: PlaceboTests leave-one-out t_stat / p_value. - C5: DIDHAD QUG order-statistic test t_stat / p_value (was untested vs golden). All at ~1e-10 (coverage) / ~1e-16 (fixest classical iid). 232 tests pass across the touched files, no regressions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178r8ZK6VRiXbaBiknrWjQB
Overall Assessment✅ Looks good Executive Summary
MethodologyNo P0/P1 findings. P3 informational: Cluster SE parity and other “fiddly bits” are deferred but tracked.
Code QualityNo findings. PerformanceNo findings. MaintainabilityNo findings. Tech DebtP3 informational: Follow-up coverage debt is properly recorded.
SecurityNo findings. No secrets or credential-like content observed in the changed files. Documentation/TestsNo P0/P1 findings. The added tests cover the intended previously-unasserted fields:
Verification note: I attempted to run the touched tests, but this environment lacks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
diff_diff/) changes — tests, a newfixestgolden, and changelog/TODO only. These surfaces already computed SEs matching R but had no CI assertion pinning them (the latent-risk pattern that once hid the CallawaySantAnna reg-method gap).fixestDiD/TWFE golden (benchmarks/data/fixest_did_twfe_golden.json+benchmarks/R/generate_fixest_did_twfe_golden.R+tests/test_fixest_did_twfe_parity.py). The flagship 2×2 DiD and TWFE classical/iid ATT and SE matchfixest::feolsto ~1e-16 in CI without R at test time (the prior live-Rscripttests asserted onlyattat rtol=1e-3 and skipped in CI). The TWFE lock also pins the D4 full-K within-transform rescale.TwoWayFixedEffects(vcov_type="hc2_bm")'s default CR2-clustered-at-unit SE + the one-way HC2-BM SE (both were DOF-only) +MultiPeriodDiDaverage-effect CR2 SE (was finite-only).t_stat/p_value.t_stat/p_value(was entirely untested vs the golden).Methodology references (required if estimator / math changes)
fixest::feols(2×2 DiD, TWFE); clubSandwich CR2 / Bell-McCaffrey (TWFE/MPDhc2_bm); StackedDiD; PlaceboTests leave-one-out; de Chaisemartin–D'Haultfœuille DIDHAD QUG.docs/methodology/REGISTRY.md(TWFE full-K within-transform; CR2/HC2-BM; StackedDiD CR1S/CR2; QUG). No methodology behavior changed — this PR only pins existing, R-matching SEs.df, Yatchewp/sigma2) is tracked inTODO.md.Validation
tests/test_fixest_did_twfe_parity.py(new),test_methodology_twfe.py,test_estimators_vcov_type.py,test_methodology_stacked_did.py,test_methodology_placebo.py,test_did_had_parity.py; new goldenbenchmarks/data/fixest_did_twfe_golden.json(+ generator). 232 tests pass across the touched files; classical/iidfixestSE parity to ~1e-16, coverage locks to ~1e-10.Security / privacy
🤖 Generated with Claude Code
https://claude.ai/code/session_0178r8ZK6VRiXbaBiknrWjQB