Repository navigation
Align shared DRDID estimators and preserve cross-package inference - #88
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This was referenced Oct 27, 2026
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.
Harmless changes to sampling-weight units can produce NA ATT estimates or incorrect aggregate inference. At weight scale
1e307, all 12 DR/IPW/regression × panel/RC × execution-mode routes can fail. Sparse float32 weights can lose positive mass, and squared cohort-mass denominators can corrupt aggregation derivatives. The shared-kernel audit also found int64 outcome subtraction wrapping before conversion to double, and float32 kernels disagreeing with their identical represented values in double precision.This repairs weight reductions and aggregation ratio derivatives when ordinary arithmetic becomes unreliable, and converts built-in numeric inputs before arithmetic/fitting. Raw user columns, custom-estimator inputs, cache behavior and ordinary float64 results are preserved. Independent ratio derivatives, aggregation nesting and closed-form difference-of-means cases verify the corrected behavior. The same R slow-path aggregation defect is corrected in did #280.
The coordinated candidates are CSDID 0.4.4 and Python DRDID 1.1.7. CSDID now requires exactly
drdid==1.1.7and locks its reviewed source commit. Local DR/IPW kernels and external regression dispatch are tested against standalone DRDID and R. Future backend upgrades must update the dependency and source lock together.Validation:
53a6b76. R did #280 passes all five R/OS jobs and build-check; its full local suite passes 5,896 assertions without failures/warnings/errors/skips.Both mandatory Python CI lanes now rebuild and jointly install the exact pair and rerun both suites and the kernel bridge. The existing required current-R job retains its fixtures, reviewed pins and numerical tolerances. Any unreviewed tracked R-tree change now requires review, including a source-only change whose numerical grid passes; a live probe verifies exit 3 after all 125 comparisons pass. CSDID's three main-branch checks remain mandatory with no bypass actors.
Publishing requires all three trusted successful main-push checks at the tested revision. CSDID also requires a published backend wheel matching every reviewed Python source byte and its PyPI digest. DRDID must be released first; no merge or publication has been performed. For subsequent exact-pin upgrades, validate both candidates, merge the reviewed CSDID lock/pin update first (publication safely blocks), rerun/release DRDID, then retry CSDID publication.
Retained numerical limitation: 36 raw aggregate-IF comparisons exceed the existing tolerance at outcome multiplier
1e10; the replay keeps exit 1. ATT, SE, confidence limits and Wald outputs pass in that audit. The largest violating difference is about 0.1288, or1.29e-11in original outcome units; R's fast/slow paths also miss 42 IF fields. No tolerance was widened or failing case removed. This establishes bounded compatibility for matched shared methods, not universal numerical equivalence. R-only pushes do not themselves trigger Python CI.See the compatibility record, paired-wheel receipt and audit replay instructions. These supersede the earlier release/dependency statements while preserving historical evidence.
All three final required CSDID checks pass at
b46de13: Python 3.8/3.12 and joint installed wheels, and fresh current-R parity. Each Python lane passes 2,933 non-slow tests and all 72 bridge cases using peer53a6b76; the local full run also includes both slow tests. The R runner was retried once after unusually slow Ubuntu mirror downloads, without a code or workflow change. The orphan backend R gitlink was removed; all runtime source bytes remain identical to the recorded full local proof.