Repository navigation
Rung-3 step 1a: policyengine.py parity harness and divergence catalog - #66
Merged
Merged
Conversation
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.
First engine-parity baseline for the Microcosm migration: the recorded QC benefit chain (FSBEN, seven states, the margins replay's exact in-scope universe of 6,081 certified-recipient cases) versus policyengine-us 1.764.6 through the policyengine.py-certified runtime.
Verdict: NOT YET — 2,872/6,081 exact (47.23%), with every miss classified:
deduction_concept(2,393): first divergence in gross/shelter/net income — composition differences in the deduction tree (recorded UTIL is forced, so this is not SUA re-derivation). Next decomposition target.rounding_convention(814): PE-US retains fractional deductions and computes 30% of floored net income; the administrative chain floors the earned-income deduction and ceilings the benefit reduction. Same defect class the oracle caught in rulespec (#762) — candidate upstream fidelity fix in policyengine-us.engine_rule_difference(2): homeless-deduction conditional vs flat.Also recorded: the policyengine.py public route is annual-only, so the monthly harness runs batched
Microsimulationby YRMONTH with a 50-case pe.py spot check (50/50, max abs diff 2e-5); comparator issnap_normal_allotment(pre-takeup); eligibility forced true for the certified-recipient scope; pe-us 1.808.0 fails pe.py's provenance gate at import, so the manifest-pinned 1.764.6 is the locked runtime.Harness runs in 64s under the provisioned env; repo CI sees only fast artifact locks (9 tests, importorskip-guarded). Analysis-only.
🤖 Generated with Claude Code