Medicaid MAGI household composition from co-resident parent ids (fixes #9404) - #9406
Draft
MaxGhenis wants to merge 4 commits into
Draft
Medicaid MAGI household composition from co-resident parent ids (fixes #9404)#9406MaxGhenis wants to merge 4 commits into
MaxGhenis wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9406 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 3 10 +7
Lines 33 187 +154
Branches 0 5 +5
==========================================
+ Hits 33 187 +154
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes policyengine-us#9404.
Use optional
parent_1_idandparent_2_idperson inputs to identify co-resident parents and siblings for Medicaid MAGI household rules. The three-generation Ohio 2026 regression now gives the 30-year-old's four children a five-person household with $23,334 income and the 27-year-old's child a two-person household with $24,010 income. Those five children qualify for Medicaid; the 17- and 16-year-olds use the 56-year-old's three-person tax household with $94,504 income and remain ineligible. All seven use tax-filer household rules.Fallback contract: when every parent ID in a household is zero, outputs remain bit-identical to the existing model. The zero-ID regression retains size 10 and income $141,848 for all seven children. Medicaid formulas fall back per person when both IDs are zero; parent status switches to links only in households containing a nonzero parent ID. Breastfeeding still independently identifies mothers.
Outputs change only once a dataset or situation supplies parent IDs, including the planned Microcosm export in microcosm#884. Parent pointers use
person_id, with zero reserved for unknown; they resolve only within actual household membership. Both-parent exceptions require two distinct resolving parents who are not the head and spouse of one joint-filing tax unit. Non-filer child households count self, co-resident parents, and child-age siblings once each, including half siblings.Validation (all final commands exited 0):
.venv/bin/policyengine-core test policyengine_us/tests/policy/baseline/gov/hhs/medicaid policyengine_us/tests/policy/baseline/gov/hhs/chip policyengine_us/tests/policy/baseline/household/demographic -c policyengine_us: 792 passed, covering all 128 YAML files plus the demographic Python file..venv/bin/pytest policyengine_us/tests/core/test_parent_links.py -q: 2 passed; interleaved linked/unlinked households, repeated IDs across households, and exact zero/omitted-input equality..venv/bin/pytest policyengine_us/tests/policy/baseline/household/demographic/geographic/test_three_digit_zip_code.py -q: 9 passed.1ca1d4eec, including decimal incomes.REPORT.mdfor dispatcher review.No parameter YAML, partner contract, model version, data-release pin, or
medicaid_person_is_required_to_filechanges. The offline lane reconstructed the issue fixture from the assignment; original issue text was unavailable. Local commits are ready for the dispatcher to push and open as a draft.Dispatcher note. Implemented by an Astra lane working offline in a pre-provisioned clone; reviewed and pushed by the dispatching session. The three-generation YAML fixture is a stylized reconstruction of Microcosm Build P household 1009324 (the 56-year-old's income is set to the $94,504 residual that reproduces the pre-fix $141,848 pooled household income; child ages are placeholders), not the record itself. The data-side export that will populate the new ids is microcosm#884. Companion disclosure in the paper: obbba-paper#2.
🤖 Generated with Claude Code