Repository navigation
Conversation
SSI under spousal income deeming was capped at the individual Federal benefit rate. 20 CFR 416.1163(e)(2) makes it the lesser of the couple computation and the individual rate less the claimant's own countable income, so a claimant with income of their own could get more with deeming than without it, and lower income could lower SSI. Add uncapped_ssi_without_spousal_deeming and take the lesser in ssi_if_takes_up; deem nothing while the $30 rate applies (416.1163(f)(5)). Joint claims and the ineligible spouse whose income is deemed were tied to tax-unit head and spouse roles, which go to the two oldest adults of a tax unit. Use the co-resident spouse test that resource deeming already uses (416.1801(c), 416.1806, 416.1160(d)), require both members of a joint claim to meet the citizenship condition, and combine couple income and resources over the two spouses rather than the marital unit. Fixes #10138. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 12, 2026 09:36
Contributor
Author
|
Local results at
A real microsimulation of the impact (merge base |
This was referenced Oct 12, 2026
Review round 1 found three regressions. Requiring the citizenship condition in ssi_claim_is_joint broke California CAPI's couple rate and Medicaid's senior/disabled countable income, which read the joint claim as the SSI couple methodology, so the joint claim and ineligible-spouse status test only aged, blind or disabled status again (still through the co-resident spouse test). The resource test keeps #10040's treatment of a citizenship-ineligible spouse through _ssi_resource_couple. Alabama's supplement read uncapped_ssi > 0 and paid when SSI was zero, so the lesser-of rule moves into uncapped_ssi before the floor. The 416.1163(f)(5) facility rule covered only the payment and is dropped for a follow-up. The invariant test drops the citizenship axis, adds mixed household sizes, and suppresses Hypothesis's slow-data check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test omitted tax and marital units, so the model grouped all nine disabled people together and made person0 and person1 a head-and-spouse couple, which the co-resident spouse test now reads as a joint claim. The test checks citizenship status, so each person is single. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 found that a situation omitting marital units, with three aged adults, now pays more in MA and AK. The joint claim now covers only the head-and-spouse couple, but both supplements still summed the whole marital unit. _ssi_couple_total adds the co-resident spouse's value, which equals the marital-unit sum for units of one or two people. MA's maximum and payment, AK's payment, and AK's claim type now use it, so the household gets the same supplements as with explicit marital units ($100.86, $100.86, $128.82 in MA; $264, $264, $362 in AK). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
9 of 10 tasks
This was referenced Oct 26, 2026
One textual conflict, in ssi_amount_if_eligible.py: main corrected the medical treatment facility citation from 42 USC 1382(e)(1)(A) to (e)(1)(B) (#10283), while this branch moved the living-arrangement adjustment into _ssi_living_arrangement_amount.py. Keep the branch's helper call and carry main's citation into the helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exercise five state supplement budgets across two households and correct Connecticut and Pennsylvania source comments.
4 tasks done
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.
Fixes #10138.
Summary
Apply 20 CFR 416.1163(e)(2): SSI with spouse deeming cannot exceed the individual benefit after the claimant's own countable income. Previously the cap used the full individual rate, permitting overpayments and income monotonicity failures.
Identify SSI couples by marriage and co-residence under #10040's spouse test, rather than tax-unit roles. Sections 416.1801(c), 416.1806 and 416.1160(d) supply the relationship rules. Resource deeming under 416.1202/416.1205 remains from #10040.
What changes
uncapped_ssi_without_spousal_deemingapplies the same living-arrangement amount to the claimant's own countable income. When deeming applies,uncapped_ssitakes the lesser of that amount and the couple computation before zero-flooring inssi_if_takes_up. Downstream supplements and the Puerto Rico CTC therefore see the capped federal payment.ssi_claim_is_jointpairs co-resident aged/blind/disabled spouses through_ssi_spouse_index. As on main, citizenship is not a gate because CAPI, Medicaid and supplements use this methodology predicate.is_ssi_ineligible_spouseidentifies the co-resident non-ABD spouse of an ABD person._ssi_resource_coupleretains Deem SSI resources from ineligible spouses and parents (20 CFR 416.1202) #10040's ineligible-spouse resource exclusions when citizenship fails.is_ssi_eligible_spouselabels the tax-unit-spouse member of a joint claim; a married couple with no tax-unit spouse has neither person labelled. Payment calculations treat both alike.Worked cases
2026 rates are $994 for an individual and $1,491 for a couple; 1986 rates are $336 and $504 (SSA, "SSI Federal Payment Amounts"). Amounts are the claimant's monthly SSI.
These historical worked comparisons were measured before the main merge. Each row is a YAML case; the prior authoring run checked each value on the then-current
mainand PR branch. They are not new impact measurements at the continuation head.Invariants
policyengine_us/tests/core/test_ssi_spousal_deeming_invariants.pychecks:The original main comparison failed seven of eight tests; claimant-income monotonicity already held.
Tests
Regulation-based YAML covers SSI lesser-of cases, tax-role-independent couples, tax-dependent spouses, immigration-ineligible spouse resources, Alabama receipt gating, MA/AK third adults and the state calculations below. The qualified-noncitizen fixture now assigns unrelated people separate units; expectations are unchanged. Three #10040 cases retain their resource eligibility while joint resource combination replaces intermediate spouse deeming. Current validation appears below; historical broad local runs are superseded by exact-head checks.
Review
uncapped_ssifor downstream receipt gates, removed an incomplete facility exemption, and replaced MA/AK whole-unit sums with spouse totals. The complete reader audit supersedes earlier comparisons. Separately filed federal-shortfall and Puerto Rico CTC issues remain (State supplements under SSI spousal deeming should compare individual and couple state computations (POMS SI 01320.430) #10149/Puerto Rico refundable CTC subtracts SSI; Schedule 8812 line 24 is EITC plus excess Social Security/RRTA tax #10150).b6b014e49cfound MO medical-separation, VA initial-month and SD joint-entry regressions. Fixes preserve their state spouse budgets, apply the Oregon ruling and correct CT/PA citations.a53311ad7bis the hub's summary of an unfinished review, not approval. It found missing Iowa inventory/semantics after merging main, generated cases missing separated-care paths and surviving mutants, and a misleading eligible-spouse comment. This revision addresses all three with the Iowa audit/budgets, generated budget assertions and accurate tax-role-label comment. Current validation follows.Main merge and third-adult fixes
Earlier main merges retained the shared living-arrangement helper/corrected 42 USC 1382(e)(1)(B) citation, self-employed health-insurance deduction (#10109) and Maine student EITC (#10526).
Round 4 merges main
cce379ea001b6bc2f48298cc5cb55c999817f128as37448b77efe5fdc3f3fb4a8e58c54cca9c3d06c5, conflict-free: 399 files, +35,814/−688 lines. It brings Iowa SSA (#8017,52ffff9854), AK/MN/NM/TN energy assistance, Medicaid/tax/benefit updates and tests/releases. Iowa directly reads the changed spouse helper and marital budgets, so it joins this inventory/audit. Review-fix edits remain within the assigned supplement scope.Twenty-nine jurisdictions need spouse-only budgets; sixteen already use spouse/person/SPM formulas. The shared state helper retains declared two-person marriages for CO OAP, MO medical separation, VA/SD entry, OR community care and qualifying IA RCF entry; federal SSI retains co-residence. Default-unit comparisons preserve household/tax/SPM entities, varying only marital units. Separate-household properties check the additional state boundary.
Supplement reader audit
ak_ssp,ak_ssp_claim_typeuncapped_ssi,ssi_claim_is_joint; couple total/category_ssi_couple_totaland spouse index. Retained.al_ssp_eligibleuncapped_ssiPRIVATE_HOME_IHC, waiver, and SNF flags.ca_state_supplement,ca_capi, CAPI income/person eligibilityssi_amount_if_eligible,is_ssi_eligible_spouse; SPM sumsco_oap_deemed_income,co_oap_deeming_exempt,co_oap_own_countable_income, OAP eligibility/ISM and AND-CS countable incomessi_claim_is_joint,ssi_couple_computation_applies; spouse income, exemption, split disregardco_oap_couple_totalandco_oap_is_married: declared two-person marriages retain separated/out-of-state spouses under 9 CCR 2503-5 3.534(B)-(C); larger default groups use SSI's identified co-resident spouse pair. Existing separated-household cases retain the child allocation, Medicaid exemption and shared $20 disregard.ct_ssp_resource_eligible,ct_ssp_personal_needs_allowancessi_claim_is_joint,is_ssi_ineligible_spouse; resources_ssi_couple_total; PNA already person-level.dc_ossp_payment_amount,dc_osspssi_claim_is_joint,uncapped_ssi; eligibility/category countsde_sspssi_claim_is_joint,uncapped_ssi; eligible count and averaged supplement_ssi_couple_totalfor both. Care arrangement is Household/MONTH.fl_oss_couple_rate_appliesssi_claim_is_joint; eligibility/facility/track predicatesga_ssphi_oss_couple_rate_applies,hi_ossssi_claim_is_joint,uncapped_ssi; eligibility and shared care categoryia_ssa_has_spouse,ia_ssa_eligible,ia_ssa_federal,ia_ssa,ia_ssa_care_countable_income, IHHRC amount/participation, RCF couple budget and SMME income/helpers_ssi_spouse_index,ssi_couple_computation_applies; unit size, income/resources/cost/deduction sums, status/category counts, maximum/anyid_aabdil_aabd,il_aabd_person, non-financial eligibilityin_ssp_sapnssi_claim_is_joint; eligible count and SSI/countable budget sum_ssi_couple_totalfor both.ks_ssppky_ssp_claim_type,ky_ssp_countable_incomessi_marital_*,ssi_couple_computation_applies,is_ssi_eligible_spouse; eligible count/unit sizela_ossma_maximum_state_supplement,ma_state_supplementssi_claim_is_joint,uncapped_ssi; couple rate/payment totals_ssi_couple_total. Retained.md_paa_countable_income,md_paa_imputed_federal_ssissi_marital_*,ssi_couple_computation_applies,ssi_amount_if_eligibleme_ssp, couple/individual amountsssi_claim_is_joint,uncapped_ssi; eligibility count/category equalitymi_ssp_couple_eligible,mi_ssp_personssi_claim_is_joint,uncapped_ssi; eligibility/category countsssi_amount_if_eligible; couple income/resources/special needs/guardian/allowancemo_ssp_resource_eligiblemt_sspvia shared helperssi_couple_computation_applies,ssi_amount_if_eligible, countable/deemed income_ssi_couple_totalfix; activate certified care category.nc_sa_countable_income,nc_sa_eligiblessi_claim_is_joint,ssi_amount_if_eligiblene_aabd_couple_rate_applies,ne_aabdssi_claim_is_joint,ssi_amount_if_eligible; eligibility/independent-setting predicates_nh_ssp_couple,nh_sspnj_sspvia shared helper,nj_ssp_living_arrangementnm_ssi_state_supplementnv_ossvia shared helper_ssi_couple_totalfix.ny_sspvia shared helper,ny_ssp_living_arrangement,ny_ssp_is_minorssi_couple_computation_applies; household spouse subtractionoh_rss,oh_rss_countable_income,oh_rss_eligibleuncapped_ssi; eligible count, resources, earned/unearned/SSI sums_ssi_couple_totalthroughout.ok_ssp,_ok_ssp_incomessi_couple_computation_applies; eligible/ineligible spouse flags, income/SSI/shelter sumsor_ssppa_sspvia shared helper_ssi_couple_totalfix.ri_sspvia shared helperssi_couple_computation_appliesand shared reads_ssi_couple_totalfix.sc_ssi_state_supplementsd_ssp_independent,sd_ssp_caressi_claim_is_joint,uncapped_ssi; spouse eligibility, joint-entry/resources/incometx_ssi_state_supplementut_dws_ssp,ut_dws_ssp_eligibleuncapped_ssi; eligible countva_ag_eligible,va_ag_countable_incomeuncapped_ssi; initial-month pair flags, resources/income sumsvt_aabd_federalvia shared helper; Essential Person payment/income/resources/spouse variableswa_ssp_payment_categorywi_ssp_regular,wi_ssi_eis_ssi_ineligible_spouse; eligible/ineligible/certified countwy_sspAdditional direct readers outside supplements:
gov/hhs/medicare/savings_programs/income/msp_countable_income.pyssi_earned_income_deemed_from_ineligible_spouseandssi_unearned_income_deemed_from_ineligible_spouse; lines 50, 94 and 115–119 contain marital-unit Medicare counts, state exclusions and income sums.State rules and regression expectations
Separated spouses
Round 3 showed that the third-adult isolation fix had substituted present federal SSI co-residence for broader state rules.
gov/states/_spouses.pynow shares Colorado's established pattern: a declared two-person marital unit retains both spouses across households; a larger default group uses only SSI's identified pair. Federal SSI recognition is unchanged. The state-specific eligibility and entry-month flags continue to determine when each budget applies.va_ag_is_joint_initial_monthrecords marriage/co-residence at the first moment of the application month. Separate subsequent facilities do not erase it: ($1,200+$1,200−$20)/2=$1,190 each; $2,217−$1,190=$1,027 each. $1,600+$1,600=$3,200 exceeds joint $3,000 and denies both.sd_ssp_care_joint_entryretains the joint entry month despite separate care rooms/households. ($1,800+$1,200)/2=$1,500 income; $2,000−$1,500=$500 each. $1,600+$1,600=$3,200 exceeds joint $3,000 and denies both.Oregon reading: hub ruling
us-or:ssp-community-care-spouses-separate-facilitiesapplies the words of §0630(3), which impose no same-facility condition. The separate need-group rules (461-110-0410, -0530 and -0210) are compatible: the special payment already uses a one-person standard for each spouse. The rule and the general group rules need no conflicting-source override.Round 3's seven review probes remain in their matching variable-named state YAML files, with citations and hand computations. Existing three-adult cases remain unchanged except the corrected CT/PA source comments. Round 4 adds Iowa cases and extends the independent-simulation property to CO/MO/OR/SD/VA/IA. Generated cases turn on the care or entry path, add an unrelated adult to either separately housed spouse's household, and check the required retained budget as well as invariance to that adult.
Iowa event facts and remaining question:
ia_ssa_rcf_received_ssi_before_entryexplicitly records prior SSI for the separate-household entry path; current individual SSI after a move does not establish that fact.ia_ssa_rcf_shares_room_with_spouserecords the distinct same-room exception. The existing co-resident representation still infers prior receipt from current computed/reported SSI, an approximation retained for existing cases. The partial-entry flag records an earlier home, but cannot establish that a spouse shared it unless the retained-couple event facts do so. The texts do not expressly settle whether a spouse entering after the other spouse's original entry month gets a new couple budget in that later month when either received SSI. That staggered-entry question is left for the hub; this revision does not invent a rule.Iowa entry-month SSI: the retained state budget must also use the retained couple SSI amount. For pensions $175/$100, 6-B printed p.65/PDF p.69 retains $1,236 couple SSI; combined care income $1,511 is $755.50 per spouse. After the personal-needs and entry-home allowances, participation is $0 and 22 covered days pay $846.34 each (
ia_ssa.yamlCase 118). Pooling the static separate-household individual SSI amounts would instead underpay each care grant by $138.50. The state-local entry computation and low-income regression address that payment error without changing federal SSI transition formulas, parallel to Iowa's existing state-local individual computation after entry.The shared-room fact applies to both spouses when entered on either row. The apart exception requires distinct household entities; a co-resident parent/dependent-child pair rejected by SSI cannot enter it (Case 119). As in the shared state helper, a two-person marital unit spanning households declares a marriage; an unlabeled default two-person group cannot independently establish that relationship, so unrelated people should have explicit singleton marital units. Case 101 now explicitly supplies those units to preserve its unmarried-person scenario. Case 117 supplies calendar-year annual inputs for its April SMME test.
Other 24 jurisdictions
“Separate residences” below means separate program residences. Physical temporary absence can retain a common program household: POMS SI 00520.140 D.3 retains living arrangements, deeming and federally administered OSS during qualifying temporary institutionalization, and SI 02005.030 A.1/A.3/G governs separation-month timing. These formulas lack dates, expected-return/certification and retained-residence flags. The old unit sums accidentally retained some temporary-absence pairs but also pooled permanent separations; the present household test cannot infer which occurred. Unconditionally extending the helper would wrongly pool permanent separate households in programs that require common residence. This remaining input/timing limitation is disclosed below.
Historical validation
At
b6b014e49c, 206 YAML cases/17 files and 63 invariants/two files passed; 33 CI checks passed. Ata53311ad7b, all 210 requested YAML cases/seven files, 62 SSI invariants and formatting passed; 33 CI checks passed. The old equality property missed dropping spouses in both comparisons; cited YAML killed the MO, SD and helper mutants. Round 4 adds independent generated-budget assertions.Historical lane timings were 353.541 s/1.41 GiB for the old 57-test subset and 491.335 s/1.43 GiB for 62 tests. These are not matched benchmarks for this revision. Prior-head CI and YAML mutation results are not new-head validation.
Round-4 fix validation
Review-fix head:
9446b01a2a3941d0bf34dbf35546d40ec1b0d3e0(Iowa calculation commit6a3d5d2a2cbd8a1209662a3fba24e407e5fa3f22, followed by the generated property and comment correction).Local validation passed: all 358 requested YAML cases in 12 files and all 65 final invariants. Each file ran in a separate foreground process. All Python processes used four numeric threads, load1 ≤100 and the requested 4 GiB/1,800-second cap. Every final YAML file passed through the standard CLI; the no-clone fallback was not needed. Earlier Iowa runs exposed fixture assumptions (unmarried units and April annual-input periods); the corrected full file passed all 119 cases. CI at the final pushed head is recorded separately below.
make format9446b01a2a3941d0bf34dbf35546d40ec1b0d3e0; watched every 300 seconds from 05:20:49 to 06:56:07 UTC on October 30 (95 min 18 s), within the 100-minute limitThese are local lane timings, including startup and teardown; host load and I/O vary, so the difference is not an isolated CPU-cost estimate. Hypothesis retains two generated cases per parameterization. Iowa adds 44 small simulations; the independent budget assertions reuse existing simulations and the read-only model. The file remains in the existing Rest/core group, with no CI runner, matrix or timeout changes.
At this head, CI Python shard 6 passed. Its timing artifact records all 65 invariants passing with summed JUnit testcase time of 179.660 s, including 15.130 s for the six separated-spouse cases. This is recorded setup/call/teardown time in a shared process, excluding standalone import/collection and process overhead; it is not standalone wall time or a module memory measurement.
The three round-4 patches are tested one at a time in scratch copies under 2 GiB/900-second caps. The property run disables explicit examples so a failure demonstrates generated-case coverage; the complete unchanged-source invariant run exercises the same generated domain as well as the explicit examples. A process dying during import/collection or at a cap is unrun, not a killed mutant. No mutant enters the committed source.
The generated domain uses eligible ages, observable unequal pensions and low resources. Missouri places one spouse above its individual resource limit but the pair below the couple limit; Oregon keeps both SSI payments positive and checks the community-care amount; South Dakota checks half the combined income against entered care cost; Virginia checks the combined income after one general exclusion; Iowa checks its recorded prior-SSI RCF entry budget and averaged care income; Colorado checks the divided married disregard. These arithmetic checks use the rules directly and call no shared spouse helper.
mutant-va.patch[VA]case; 161 s process wall, exit 1mutant-sd-build-unchanged.patch[SD]case; 133 s process wall, exit 1mutant-helper-coresident.patch[CO]case; 188 s process wall, exit 1Known limitations (follow-ups)
gov/hhs/medicare/savings_programs/income/msp_countable_income.py:100,103reads the changed spouse-deemed earned/unearned income. Marital-unit aggregation appears at lines 50, 94 and 115–119: three Medicare-eligible adults can defeat the count-equals-two predicate or contaminate a pooled budget. These formulas are inherited from main, outside the supplement property and unchanged by these review fixes.ssi_amount_if_eligible.py:43–49still applies the individual rate tois_child(under 18), even for a recognized married 17-year-old. Marriage should end child treatment. This inherited rate override is separate from the spouse-recognition limitation below.main. Under 416.1801(c) and 416.1160(d) the spouse's income should be deemed instead. Fixing this needs a methodology-couple concept separate from SSI eligibility for CAPI, Medicaid and state supplements.main.main.is_ssi_eligible_spousestill uses the tax-unit spouse role to pick which member of a joint claim carries the label; the computations treat both alike.is_ssi_qualified_noncitizen.yamllisted nine unrelated disabled people this way and expected none of them to be a spouse, so it now gives each person their own units. Onmainthat case avoided the couple only becausessi_marital_both_eligiblerequired exactly two aged, blind or disabled people in the marital unit, whilessi_claim_is_jointwas true for all nine.Impact
Stale: measured at
56579ca544againstb2aaef3391on the default 2026 dataset. Main merges and supplement fixes invalidate it; the hub reruns impact at the landing head. No continuation microsimulation ran.Historical weighted annual SSI fell $29.3M across six records (weight 22,516), all through (e)(2); joint claims and measured benefits/supplements were unchanged. The ineligible-spouse label changed on 83,564 records. An earlier CAPI regression was removed before that result. Evidence remains in
~/reviews/us-hub/fixes/10141-impact/; none of these figures describes this head.axiom: TheAxiomFoundation/rulespec-us#1706 queued (20 CFR 416.1163(d)-(f), 416.1801(c), 416.1806, 416.1160(d); same corpus-release blocker as #1626). Resource deeming: TheAxiomFoundation/rulespec-us#1626 queued.