Skip to content

Rung-3 step 1a: policyengine.py parity harness and divergence catalog - #66

Merged
MaxGhenis merged 1 commit into
mainfrom
rung3-parity
Aug 15, 2026
Merged

MaxGhenis merged 1 commit into
mainfrom
rung3-parity

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

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 Microsimulation by YRMONTH with a 50-case pe.py spot check (50/50, max abs diff 2e-5); comparator is snap_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

@MaxGhenis
MaxGhenis merged commit 3f4e136 into main Aug 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant