Repository navigation
Conversation
…e tax unit 20 CFR 416.1165 deems an eligible child's ineligible parents' income: a natural or adoptive parent, or the spouse of one, who lives with the child (416.1160(d)). Resolve those parents with the deemor-set logic of parental resource deeming (now shared in resources/deemed/_ssi_parents.py), drop the ones who meet the SSI status conditions, allocate only for the child's siblings, give the living allowance per POMS SI 01320.500 B.4, and divide among the eligible children who share the same parents. Mirror in the Medicaid copy with Missouri's natural-parent-only rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Differential against an oracle written from 416.1160(d), 416.1165 and the parent-link contract, with Missouri's MHDC rules in the Medicaid copy; conservation of each pool's deemed income, order independence, monotonicity in children's and adults' income, and bounds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
… add README and source cases Fixed blended households (two natural parents, the mother's husband and the father's wife) join every Hypothesis batch, so the POMS SI 01320.500 B.4 allowance and split deemor pools are always tested. Add the 416.1165(h) examples with parent ids, a teen mother without ids, and make two scope cases differ from the tax-unit rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Excluding a person from their own tax-unit proxy set split a disabled teen mother from her disabled brother, whose proxy set presumes her a parent, so their parents' income was not divided between them. The old resource code kept the person in their own set, which keeps such siblings in one pool; income deeming drops the person anyway because a deeming child meets the SSI status conditions. Add cases for the teen mother and her brother and for a teen mother who deems in her parents' tax unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n gate from Medicaid deeming Review round 1 (GPT-6.1 Sol). POMS SI 00501.010 B.2.d keeps the ineligible-child allocation for the children of a stepparent who has permanently left, so the spouse of a co-resident parent who lives elsewhere (a two-person marital unit across households) now counts in the sibling scope, by person_id for children with ids and by tax unit for the proxy. The Medicaid copy no longer requires the SSI citizenship or qualified-noncitizen condition of the child, as Medicaid applies its own immigration rules, and a disabled child who shares the deemed income takes no allocation there. The generator adds an absent stepparent and a no-ids household with three deemors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…riants Seeded mutants that ignored an absent stepparent's children or allocated for Medicaid deeming children survived the random batches; fixed households now reach both, once in each state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…parent ids correctly Review round 2 (GPT-6.1 Sol). A person is never their own ineligible parent, which the Medicaid copy relied on SSI eligibility to ensure. A second parent id that repeats the first is no second parent, so it is not matched against an absent stepparent. The proxy may presume a child is an absent stepparent's when that stepparent is an unlinked parent. Add the three reproductions and update the docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld married to a spouse elsewhere as married Review round 3 (GPT-6.1 Sol). An unlinked absent stepparent now lends the tax-unit proxy only his own tax unit, so a cousin claimed by the mother is not allocated. A child in a two-person marital unit whose spouse lives in another household is married (416.1856(b), 416.1806) and so is no deeming child. Add both reproductions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le parents Review round 4 (GPT-6.1 Sol). The division pool was keyed on all of a child's parents, so half-siblings with the same ineligible mother were each deemed her whole remainder when one also lived with an SSI-eligible father. Pools are now keyed on the ineligible parents, whose income is divided (416.1165(e)(2)), and the children of one pool share one set of ineligible-child allocations, those of the deeming household, so their shares add up to the parents' net income. Add the reproduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seeded mutants keying pools on all parents or allocating per child survived the random batches; a YAML case (an SSI-eligible father's daughter allocated once for both boys who share the mother's income) and a fixed household per state now catch both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 13, 2026 00:54
Contributor
Author
|
Hand-off to the US + core hub.
|
This branch has not been deployed
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
20 CFR 416.1165 deems an eligible child's ineligible parents' income to the child. 416.1160(d) defines an ineligible parent as "a natural or adoptive parent, or the spouse ... of a natural or adoptive parent, who lives with you and is not eligible for SSI benefits". The ineligible children allocated against that income are "the natural or adopted child of your parent or of your parent's spouse ... who lives in the same household with you".
Before this PR, PolicyEngine-US grouped all of this by the child's tax unit:
This PR resolves the child's parents, siblings and pool from relationships. #10146 did the same for the spouse-to-spouse side. This PR is stacked on #10146: its diff is only this change, and GitHub retargets it to
mainwhen #10146 merges.What changes
Who deems (
is_ssi_ineligible_parent, rows fromresources/deemed/_ssi_parents.py):_parent_links.py: the unlinked parents in the child's tax unit who live with the child, and their spouses._ssi_parents.py, with awith_spousesswitch added, and both sides now call it. Resource deeming results are unchanged: the reviewer compared 1,000 random households against the base.Eligible child (new
is_ssi_income_deeming_child; POMS SI 01310.115 A.2, 416.1856): under 18, aged, blind or disabled, a citizen or qualified noncitizen, not married, not the head of a household, and living with at least one ineligible parent.Ineligible children (new
ssi_parental_deeming_child_allocations; 416.1160(d), POMS SI 01310.115 A.3, SI 01310.140 A, SI 00501.010 B.2) are:Cousins and grandchildren are not allocated. Each child's 416.1163(b) amount still comes from
ssi_ineligible_child_allocation(#10146).Living allowance (new
ssi_parental_deeming_parent_allocation, replacing the per-parentssi_ineligible_parent_allocation): the individual rate for one ineligible parent, the couple rate for two, and both rates for two natural parents and a stepparent (416.1165(d)(3), POMS SI 01320.500 B.4 and Example F.5).maingave the per-parent variable to each parent as a share of a tax-unit total. It cannot be defined per parent once one parent deems to children with different parent sets, so the allowance now lives on the child. Nothing outside the two deeming formulas read the old variable.Division (416.1165(e)(2), SI 01320.500 C step 9): the remainder is divided among the eligible children who share the same ineligible parents.
Student exclusion. The child's own student earned income exclusion (416.1112(c)(3)) is no longer subtracted from the parents' earnings.
maindid that; 416.1161(a) does not.Medicaid copy (
medicaid_optional_senior_or_disabled_unearned_income_deemed_from_ineligible_parent): the same rules with each state's disregards, except:Living arrangement.
ssi_federal_living_arrangementputs a child in a parental household whenis_ssi_income_deeming_childholds, instead of when the tax unit has an "ineligible parent".Worked cases
All amounts are annual. Base is #10146's head (
9d14d23db3), which this PR is stacked on, with this PR's new variables removed from the expectations. Each row is a YAML case whose expectation is computed by hand from the cited source.The other source cases, whose relationships the tax unit already got right, give the same amounts on both. These are 416.1165(h) Examples 1, 2 and 4 (with and without parent ids), SI 01320.500 F.1–F.3, SI 01320.550 D.3 (both months), D.7 after the adoption, Missouri manual Examples 1 and 2, and the existing Medicaid Cases 1–3.
Invariants
policyengine_us/tests/core/test_ssi_parental_deeming_invariants.pyruns three derandomized Hypothesis batches. Each has 30 random households plus 13 fixed ones:Households contain a mother, a father (married, unmarried, away or absent), a stepparent (who may live elsewhere), a stepmother, an aunt and a grandparent. Children cover every relationship. Some are disabled, some lack qualifying immigration status, and some live elsewhere. They are filed in assorted tax units, with parent ids on everyone, no one or some people. Half the households are in Missouri and half in DC.
is_ssi_income_deeming_child,is_ssi_ineligible_parent, child allocations, parent allowance and deemed income equal an oracle. The oracle is written from 416.1160(d), 416.1165, the POMS and the parent-link contract, without the model.Mutation checks. 25 seeded bugs were run against the property test and YAML; every one that changes an output is caught:
The one survivor excluded a person's own spouse from their proxy set. It changes no output, since a deeming child is unmarried, and that exclusion was dropped to keep the shared helper identical to resource deeming.
Tests run locally
from_ineligible_parent/ssi_unearned_income_deemed_from_ineligible_parent.yaml, and 10 Medicaid cases (3 existing, 7 new).gov/ssa/ssi,gov/hhs/medicaidand the state supplement, OSS, MSA, PAA and NY HEAP folders, which read these variables: all 2,156 cases pass atc7fa16172c. They ran in batches of 20 underheavy_run.sh.test_ssi_resource_deeming_invariants.py,test_ssi_spousal_deeming_child_allocations.py,test_ssi_state_supplement_medicaid_dependency.pyandtest_ssi_disability_criteria_inputs.pypass.test_parameter_yaml_keystest_reference_urlstest_known_dead_reference_urlstest_no_concatenated_reference_urlstest_no_builtin_sum_over_entity_callstest_no_group_variables_in_person_addstest_rest_python_groupstest_input_variable_definitionstest_org_input_variablestest_aggregate_list_integritytest_formulas_do_not_write_into_cached_arraysis left to CI.Impact
Run: one full-file 2026 run on each side.
9d14d23db3; this PR isc7fa16172c.populace_us_2024.h5@populace-us-2024-spm-20260909.lockrun.shandcompare.py.parent_1_idis zero for every record in the file, so every household goes through the tax-unit proxy, not parent ids.Parental deemed income. 61 child records (132,175 weighted children) have parental deemed income at base.
Medicaid deemed component. The same +$0.93 million, across 8 records.
Benefits and taxes. Unchanged for every record:
medicaid,is_medicaid_eligible, federal and state income tax, household benefits and household net income all stay the same.These are the only numbers stated here, and they come from these two runs.
Independent review
Five rounds of GPT-6.1 Sol review (
subfleet run --task review --tier hard). Rounds 1–4 found 9 defects, each fixed with the reviewer's reproduction added as a YAML case:Round 5 approved
c7fa16172cwith no findings. Reports are in~/reviews/ssi-parent-deeming-10159/.Known limitations
is_ssi_ineligible_child(Limit SSI spousal-deeming child allocations to the couple's co-resident children #10146) andis_ssi_resource_deeming_child. Separate follow-up.axiom: TheAxiomFoundation/rulespec-us#1714 queued (20 CFR 416.1165 and the 416.1160(d) parent and child definitions; same corpus-release blocker as #1626 and #1706); TheAxiomFoundation/rulespec-us#1715 queued (Missouri MHABD Manual 0805.020.15)
🤖 Generated with Claude Code