Skip to content

Apply 416.1163(e)(2) to deemed SSI and identify SSI couples by marriage, not tax roles - #10141

Open
MaxGhenis wants to merge 26 commits into
mainfrom
ssi-couples-and-deeming-cap
Open

MaxGhenis wants to merge 26 commits into
mainfrom
ssi-couples-and-deeming-cap

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10138.

Summary

Apply 20 CFR 416.1163(e)(2): SSI with spousal deeming is the lesser of the couple computation and the individual benefit after the claimant's own countable income. Apply the cap inside uncapped_ssi, so state supplements and other downstream readers receive the corrected federal shortfall.

Identify SSI couples by the existing resource-deeming test for marriage and co-residence, rather than tax-unit head/spouse roles. Joint claims, couple income/resources, deemed income and facility checks use the identified spouse. The methodology predicate retains main's citizenship treatment because CAPI, Medicaid and supplements depend on it. is_ssi_eligible_spouse remains a tax-unit-spouse label; payment calculations treat both spouses alike.

Review

Round 7: the hub's independent review at the new head, pending

Round 5 fixes

  • The shared state retained-pair helper now preserves SSI's parent-link and tax-dependent exclusions across households. Existing parent-link resolution runs within the marital unit, including across tax units, while preserving a known co-resident parent identity if an ID repeats in another household. A possible default two-person unit cannot turn known nonspouses into a retained marriage. CO, MO, OR, SD, VA and IA receive this shared correction; genuine recorded marriages apart retain their program-specific budgets.
  • Iowa's separated 96-year-old parent and 66-year-old dependent child, with explicit parent IDs and $1,800 resources each, receive individual RCF budgets with omitted marital units and explicit singletons alike: $1,192.57 each. Generated parent-only and dependent-only cases independently test both exclusions across the five states.
  • Both requested 2026 SSI: deemed benefit is capped at the individual rate instead of the no-deeming amount, and couples are identified by tax roles #10138 cases are pinned: claimant age 67 with $12,000 wages, spouse age 45 with self-employment income of $6,000 (deeming active) or $5,900 (inactive), annual SSI $6,438 in both. The independent oracle now varies claimant wages; generated cases check continuity at $496/$497/$498 monthly spouse income.
  • Three narrow tests call the shared helpers through actual simulation populations, isolating separated-marriage retention, cross-household parent exclusion and co-resident parent identity when an ID repeats across households. The first two isolate the requested mutation checks.

Main merge and added SSI readers

Merged main cbe322b51c6c9f791a318a32f0b093abee683fab as 3765b00cde without conflicts: 554 files, +36,583/-627 lines since the previous merged main cce379ea00. Main brings per-person California CAPI, California food-preparation defaults and blind-rate corrections, eight heating programs (LA/ME/MO/MT/NV/PA/VT/WI), South Carolina TANF SSI exclusions, state tax-role invariance, Social Security PIA and student-loan changes, plus test/performance updates. #10532 is not pre-merged.

The new CAPI readers now use the identified spouse for facility/category/payment-standard counts, CAPI membership, countable income and spouse SSI/SSP receipts. Six third-adult cases isolate each reader. The existing California supplement attribution assumes spouses share an SPM unit and retains its pro rata child-share approximation. New energy programs intentionally count household SSI receipts; SC TANF intentionally excludes individual SSI recipients and their income/resources. Corrected capped payments feed those readers consistently. Montana LIHEAP's categorical gate and SSI-standard counts now use the identified spouse; see below.

Medicaid

This PR changes Missouri's deemed-income reader only (medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.py): its married-couple gross-income exception reads the identified spouse, so an unrelated singleton or another couple's ineligible spouse no longer enters it. The other non-MAGI readers keep main's marital-unit relationship rules, so an unrelated adult left in a default marital unit still counts there, as on main; state family-premium, resource-responsibility and needs-standard rules need a state-by-state design in a separate PR.

Montana, California WDP and Mississippi HMW

  • Montana LIHEAP. With SSI paying only the actual spouses, mt_liheap_categorical_eligibility extended a recipient's categorical coverage to everyone in the default marital unit. It now covers only the identified spouse of a recipient, and mt_liheap_benefit_income counts only the couple's recipients for the couple standard. An aged married couple with no income sharing a heating household with an unrelated adult on a $60,000 pension, marital units omitted, received $641 at the previous head and now receives $0, as with explicit units and on main. New cases cover a couple both on SSI with omitted units ($17,400), a couple plus an unrelated SSI recipient ($29,004: couple plus individual standard), and a spouse with no SSI of their own who stays covered.
  • California WDP. ca_wdp_income_eligible added the whole marital unit's income once deeming applied, which this PR makes reachable in an oversized default unit. It now adds only the identified spouse's income: a blind and disabled worker with $60,000 wages, a spouse with a $6,000 pension and an unrelated adult with a $100,000 pension is WDP eligible with omitted or explicit marital units.
  • Mississippi HMW. ms_hmw_income_eligible gated the couple on a two-person marital unit, so in an oversized default unit each spouse's half of the couple computation was tested alone against the one-person limit. It now tests the identified spouses together: two blind spouses with a $30,000 pension beside an unrelated adult are ineligible ($29,760 > $29,214), as with explicit units and on main.

Iowa facts and false defaults

ia_ssa_rcf_shares_room_with_spouse and ia_ssa_rcf_received_ssi_before_entry both default to false. No repository data builder sets or imputes either. Same-month entry does not establish a shared room; SSI awarded after separation does not establish receipt before entry. These defaults implement the supplied Iowa rulings and 441 IAC 51.4(3) / 6-B, printed p.60.

For co-resident legacy situations, current or reported SSI still approximates pre-entry receipt. Separated spouses require the explicit prior-SSI fact.

January 2026, both spouses aged 70, 22 covered entry-month days:

Scenario Previous main cce379ea00 This revision
Co-resident, monthly pensions $1,800/$100; neither fact supplied Couple budget; $771.84 each Individual budgets; care income $1,800/$100, payments $667.34/$846.34
Same, explicit shared room — Couple budget; care income $950 each, payments $771.84 each
Separate households, pensions $175/$100; neither fact supplied Individual budgets; care income $793/$718, payments $846.34 each Individual budgets; care income $1,014 each, payments $846.34 each
Same, explicit prior SSI Input absent Retained couple budget; care income $755.50 each, payments $846.34 each

The retained entry calculation uses couple SSI $1,491 - ($175 + $100 - $20) = $1,236 once, giving ($275 + $1,236) / 2 = $755.50 care income each. The later entrant retains the couple budget in their own qualifying entry month while the spouse already resident remains individual, as the supplied staggered-entry ruling directs.

Validation

Validation head: 5ed98e3a7ce7fe4025c47d263c3308b2e64d6f2d.

551 tests passed in serial foreground runs, one file per process, after ruff format. No microsimulation or full local suite ran.

File Passed
test_ssi_spousal_deeming_invariants.py 79
ia_ssa.yaml 121
mo_ssp.yaml / va_ag.yaml / sd_ssp.yaml / or_ssp.yaml 35 / 32 / 39 / 38
ssi_state_supplement_three_adult.yaml 37
ssi_claim_is_joint.yaml 9
co_oap_deemed_income.yaml 20
ca_capi_three_adult.yaml / ca_capi_person.yaml / ca_capi_payment_standard.yaml 6 / 15 / 20
medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.yaml (Missouri three-adult cases moved here) 6
Montana LIHEAP, 8 files 67
California WDP, 4 files (ca_wdp_income_eligible.yaml new) 16
ms_hmw_income_eligible.yaml / ms_hmw_eligible.yaml 7 / 4

The six restored Medicaid readers are byte-identical to merge base cbe322b51c6c. Round 6's Medicaid witnesses (California child premiums, New Hampshire family expenses, North Dakota and Missouri initial separation, California's two-person resource allowance, West Virginia's needs standard, North Dakota home equity) give main's Medicaid results at this head.

CI: Pull request run 41347426278 concluded success at the validation head (34 of 34 jobs).

Mutation checks

Each mutant restores one replaced marital_unit line and runs one YAML file in its own process; each patch was reversed afterwards.

Mutant Killed by
Montana spouse_of_ssi_recipient = person.marital_unit.any(receives_ssi) mt_liheap_categorical_eligibility.yaml Case 13 and mt_liheap.yaml Case 16
Montana marital_recipients = person.marital_unit.sum(receives_ssi) mt_liheap_benefit_income.yaml Case 8
California WDP person.marital_unit.sum(personal_income) - personal_income ca_wdp_income_eligible.yaml Case 1
Mississippi HMW marital_unit.nb_persons() == 2 gate and sum ms_hmw_income_eligible.yaml Case 6 and ms_hmw_eligible.yaml Case 4

Limits and follow-ups

  • Impact remains for the hub to recompute. Residence/separation timing, sponsored-noncitizen allocations, married-minor rate treatment, mixed-citizenship income methodology, Medicaid citizenship gating, the facility deeming exception and the SSI two-month lag retain the disclosed limitations from the earlier rounds.
  • MSP's own whole-unit budgets and Florida's OSS maximum are unchanged. Ordinary state supplement budgets use the actual co-resident pair; CO/MO/OR/SD/VA/IA retain only their existing program-specific separated-spouse rules. Missing temporary-absence/event facts remain an inherited representation limit.
  • A lone married pair with one spouse inferred as the other's tax dependent remains indistinguishable from a possible default group; explicit appropriate tax roles are required. Unlabelled default groups can still infer a marriage; parent/dependent facts now rule out known nonspouses even apart.
  • A couple plus an unrelated aged adult with marital units omitted: main pays federal SSI and the state rate because deeming stays off; this PR correctly pays no federal SSI, but the Delaware, DC and Hawaii supplements then take the individual rate less the federal shortfall, the amount explicit-unit households already get on main. Net payments move closer to the right answer. State supplements under SSI spousal deeming should compare individual and couple state computations (POMS SI 01320.430) #10149 tracks the supplement comparison.
  • California's non-MAGI premium deduction (medicaid_optional_senior_or_disabled_countable_income, restored to main) still sums premiums over the whole marital unit, while this PR's ssi_marital_unearned_income now pools only the spouses. A couple with $36,000/$24,000 pensions beside an unrelated adult with $12,000 income and $12,000 premiums gets $23,880 each here, against $29,880 on main (where the outsider's income and premiums offset) and $29,880 with explicit units. Left for the state-by-state Medicaid PR.
  • ms_hmw_resource_eligible and the Mississippi Working Disabled readers keep main's marital-unit gates; their inputs do not change in this PR, so they give main's results.

Impact

impact: pending (hub)

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.


Generated by Claude Code

MaxGhenis and others added 2 commits October 12, 2026 05:12
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
MaxGhenis marked this pull request as ready for review October 12, 2026 09:36
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Local results at 2924cd90da (macOS, not Linux CI):

  • policyengine_us/tests/core/test_ssi_spousal_deeming_invariants.py: 8 passed. 19 s user CPU, 1.0 GB peak RSS.
  • test_ssi_resource_deeming_invariants.py and test_ssi_state_supplement_medicaid_dependency.py: 24 passed. 73 s user CPU, 4.9 GB peak RSS (mostly the dependency module).
  • All 33 YAML files under tests/policy/baseline/gov/ssa/ssi, run one process at a time: pass, after the three is_ssi_spousal_resource_deeming_applies.yaml updates described in the body. The new cases in ssi_if_takes_up.yaml (10), ssi_claim_is_joint.yaml (10) and the deemed-income file (7) also pass.
  • The same invariant module, with the new variable replaced by the oracle's no-deeming amount, fails 7 of 8 tests on main.

A real microsimulation of the impact (merge base b2aaef3391 against this head, 2026, default dataset) is queued under the shared heavy lock and will be added to the body.

MaxGhenis and others added 3 commits October 12, 2026 08:09
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>
MaxGhenis and others added 9 commits October 28, 2026 00:13
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.
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Picking this up for the US hub. I'll post a hand-off comment here when it's ready.


Generated by Claude Code

One SSI spouse test cannot stand in for each state's non-MAGI family,
resource and needs-standard rules, so six readers go back to their
merge-base content; a state-by-state design follows in a separate PR.
Missouri's deemed-income reader keeps the identified spouse, and its two
three-adult cases move into that variable's YAML file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With SSI now paying only the actual spouses, a default marital unit let an
unrelated adult share the couple's categorical coverage, so an aged couple
living with an adult on a $60,000 pension got $641. Cover only the
identified spouse of a recipient and count only the couple's recipients
for the couple standard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e budgets

Corrected spouse deeming made California's WDP add an unrelated adult's
income from an oversized default marital unit, and Mississippi's HMW size
gate tested a couple's halves separately against the one-person limit.
Both now use the identified co-resident spouse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready for hub review

Head: 5ed98e3a7ce7fe4025c47d263c3308b2e64d6f2d (fast-forward from 4e4136e6ea, which matched the item; nobody else had pushed since 2026-10-31T06:33Z; GitHub reported no conflict, so main was not merged).

One stop condition hit, reported rather than patched (step 3): California's premium deduction. See the six-reader table. The restored medicaid_optional_senior_or_disabled_countable_income sums premiums over the whole marital unit again. But this PR's ssi_marital_unearned_income now pools only the spouses. So in round 5's own witness the couple gets $23,880 each at this head, where main gives $29,880 and explicit units give $29,880. On main the outsider's $12,000 income and $12,000 premiums both enter and cancel. Here only the premiums enter. The result is worse than main for any outsider whose countable income is under twice their premiums. It is better than main whenever the outsider has income but no premiums: for example, outsider income without premiums gives $29,880 here and $35,880 on main. I left the reader as main has it, per the brief. The hub needs to decide whether that is acceptable until the state-by-state PR lands.

Steps

  1. Six readers restored to cbe322b51c6c. git diff cbe322b51c6c HEAD -- <file> prints nothing for all six: is_209b_ssi_recipient_income_eligible_for_medicaid.py, is_optional_senior_or_disabled_asset_eligible.py, is_optional_senior_or_disabled_income_eligible.py, medicaid_optional_senior_or_disabled_income_limit.py, is_medically_needy_for_medicaid.py and medicaid_optional_senior_or_disabled_countable_income.py. medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.py is unchanged from 4e4136e6ea.
  2. Tests trimmed. I deleted the four cases for restored readers and removed medicaid_ssi_couple_three_adult.yaml. Its two Missouri cases moved into the variable-named file tests/.../medicaid/income/deemed/from_ineligible_spouse/medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.yaml. Judgment call: CLAUDE.md asks for variable-named YAML, so I moved the cases into that file rather than renaming the old one. No other test this PR changed names a restored reader or is_medicaid_eligible / medicaid_category; I grepped every test file changed since the merge base.
  3. Against main. I reran the witnesses at this head and at a cbe322b51c6c worktree. Each run printed its import path. See the tables below.
  4. Montana. mt_liheap_categorical_eligibility.py:56-61 covers a spouse of a recipient only when the identified co-resident spouse receives SSI: _ssi_couple_total(person, period, receives_ssi.astype(int)) - receives_ssi > 0. mt_liheap_benefit_income.py:37-42 counts recipients with _ssi_couple_total instead of marital_unit.sum. I wrote no new identity logic.
    4a. California WDP. ca_wdp_income_eligible.py:25-30 sets spouse_income = _ssi_couple_total(person, period.this_year, personal_income) - personal_income. Both variables are YEAR, so period.this_year equals period. personal_income is the person-length ca_wdp_countable_income array. ca_wdp_ssi_ssp_income_eligible.py is untouched; the step-5 search found no defect there.
  5. Search. See the pattern table. I fixed only Montana and California, plus Mississippi HMW income, where I built a demographically eligible witness.
  6. Body. The Medicaid section is now one paragraph, and a new section covers Montana, WDP and Mississippi with the $641 → $0 case. The status line reads "Round 7: the hub's independent review at the new head, pending". impact: pending (hub) and the axiom: line are unchanged. Counts are updated. GitHub's readback matches my file except for the footer the server appended.
    6a. The Delaware/DC/Hawaii limit was added to the body's limits and cites State supplements under SSI spousal deeming should compare individual and couple state computations (POMS SI 01320.430) #10149. The body also notes the California premium interaction above and the unchanged Mississippi resource and WD readers.
  7. Tests. All pass; counts are below. ruff format and ruff check are clean on the changed files. make format itself was not run; I ran uv run ruff format / ruff check on the changed .py files, which the brief allows. I pushed once.

Changelog fragment: its second sentence now names Missouri's deeming, CAPI, Montana LIHEAP, California WDP and Mississippi HMW. It no longer claims that all non-MAGI budgets use the identified spouse.

Witness table (round 6, Medicaid results)

Witness Main cbe322b51c6c This head Note
CA premiums, dependent child 10 / student 20, omitted units $23,880 each $23,880 each Match. ssi_couple_computation_applies for the child is true on main and false here (SSI change), with no effect on the parents.
Same, explicit units $29,880 $29,880 Match
NH family expenses, parent $100,000 pension, child $99,000 expenses, default group medically needy [T, F], Medicaid [T, T] same Match
Same, singletons [F, F], [F, T] same Match
ND initial separation, $1,000 / $1M asset eligible [F, F], Medicaid [F, F] same Match. Federal SSI for the applicant goes $0 → $11,928 under this PR's SSI change (spouses apart are individuals); Medicaid is unmoved.
MO, same [F, F], [F, F] same Same note as ND
ND temporary absence, $4,000 asset eligible [T, T] same Match
CA parent $150,000, child 10/20, default group income limit $29,863.20, asset eligible T, optional ABD [T, F] same Match ($195,000 two-person allowance applies)
Same, singletons $22,024.80, asset F same Match
WV third adult, default group limit $11,928 ×3, income eligible F same Match
WV explicit pair $17,892 / $17,892 / $11,928 same Match
ND $2M home equity, default group family exception [T, F], LTC [F, F] same Match
Same, singletons [F, F], [F, F] same Match
MS ms_hmw_income_eligible, WDP household, omitted units [F, F, F] [F, T, F] before the fix; [F, F, F] after, with explicit units [F, F, F] The spouse's own countable income is $0 under corrected SSI. Fixed in step 5.

I did not have Sol's ssi-10138-probe.py or medicaid-va-adult-child-probe.py; the brief's appendix doesn't include them, so I didn't run them. I re-typed the other probes from the appendix with fewer printed outputs; the inputs are unchanged.

Six-reader table: spouses plus outsider, omitted units (round 6's deleted cases)

Reader Case Main Head Why
medicaid_optional_senior_or_disabled_countable_income CA $36k/$24k + outsider $12k income, $12k premiums 29,880 ×3 23,880 / 23,880 / 0 Differs. This PR's ssi_marital_unearned_income and couple computation drop the outsider's income and the outsider's own row; the restored premium sum still adds the outsider's $12,000. (60,000 − 240 − 12,000) / 2 = 23,880. Stop condition, see top.
medicaid_optional_senior_or_disabled_income_limit WV $8,946 each + outsider $50k 11,928 ×3 11,928 ×3 Same: size gate fails on both
is_optional_senior_or_disabled_income_eligible same F, F, F F, F, F Same
is_optional_senior_or_disabled_asset_eligible same F, F, F F, F, F Same
is_209b_ssi_recipient_income_eligible_for_medicaid IL, supplied inputs T, T, T T, T, T Same
is_medically_needy_for_medicaid MA, supplied inputs F, F, F F, F, F Same

Montana

montana-probe.py, Sol's witness: an aged couple with no income, an outsider with a $60,000 pension, MT 2026.

Case Main Previous head 4e4136e6ea This head
Endogenous, omitted units NONE, $0 SSI_TANF, $641 NONE, $0; countable $75,457.20 > $54,470
Explicit couple/singleton NONE, $0 NONE, $0 NONE, $0
Receipt flags fixed, omitted units SSI_TANF, $641 (main's own limitation) SSI_TANF, $641 NONE, $0

At this head, omitted units now equal explicit units. I couldn't rebuild the comparison's spouse_pension_high row (main $17,400, head $11,604, explicit $30,300) because its template isn't in the brief. The fix makes a default-unit outsider count only through their own receipt, and that is how explicit units are treated. The hub should rerun that template at this head.

Sources: I could not fetch ARM 37.70.401 or the LIHEAP manual. web.archive.org, dphhs.mt.gov and rules.mt.gov are all refused by this session's network policy. The fix follows the provisions the code already cites (spouse of a recipient; couple standard only for married recipients). I quoted nothing new.

Mutants (each restores one marital_unit line, own process, then restored)

Mutant Killed by
MT person.marital_unit.any(receives_ssi) mt_liheap_categorical_eligibility.yaml Case 13 (1 failed / 12 passed); mt_liheap.yaml Case 16 (1/15)
MT person.marital_unit.sum(receives_ssi) mt_liheap_benefit_income.yaml Case 8 (1/7)
CA WDP person.marital_unit.sum(personal_income) - personal_income ca_wdp_income_eligible.yaml Case 1 (1/2)
MS HMW nb_persons() == 2 gate + marital_unit.sum ms_hmw_income_eligible.yaml Case 6 (1/6); ms_hmw_eligible.yaml Case 4 (1/3)

New YAML cases

  • Montana: mt_liheap.yaml Case 16 (the $641 witness, now $0). mt_liheap_benefit_income.yaml Case 7 (couple both on SSI, omitted units, $17,400) and Case 8 (couple plus unrelated SSI recipient, (1,450 + 967) × 12 = $29,004). mt_liheap_categorical_eligibility.yaml Case 12 (spouse with no SSI stays covered) and Case 13 (outsider without SSI defeats coverage).
  • California WDP, new ca_wdp_income_eligible.yaml: Case 1 is the witness with omitted units (True / True / WORKING_DISABLED_BUY_IN for the worker); Case 2 the same people with explicit units; Case 3 a couple alone whose deemed $24,760 pushes 29,490 + 24,760 = 54,250 over 2.5 × 21,640 = 54,100.
  • Mississippi: ms_hmw_income_eligible.yaml Cases 6–7 and ms_hmw_eligible.yaml Case 4.

Hand computations:

  • WDP worker: (60,000 − 240 − 780) / 2 = 29,490. Spouse: 6,000 − 240 = 5,760. Limit: 2.5 × (15,960 + 5,680) = 54,100.
  • HMW: each spouse (30,000 − 240) / 2 = 14,880. Couple total 29,760 > 1.35 × 21,640 = 29,214. Each alone ≤ 1.35 × 15,960 = 21,546, which is why the unfixed reader passed them.

Pattern search (step 5)

Reader Pattern PR-reachable defect?
mt/.../mt_liheap_categorical_eligibility.py marital_unit.any(receives_ssi) Yes, fixed
mt/.../mt_liheap_benefit_income.py marital_unit.sum(receives_ssi) Yes, fixed
ca/chhs/wdp/.../ca_wdp_income_eligible.py marital_unit.sum gated on is_ssi_spousal_deeming_applies Yes, fixed
ms/dom/hmw/.../ms_hmw_income_eligible.py nb_persons()==2 gate over medicaid_optional_senior_or_disabled_countable_income Yes, fixed. Witness: two blind spouses aged 50 (pension $30,000) beside an unrelated 70-year-old (pension $100,000), omitted units. ms_hmw_eligible is [T, T, F] before the fix, [F, F, F] on main, with explicit units, and now.
ms/dom/hmw/.../ms_hmw_resource_eligible.py nb_persons()==2 over ssi_countable_resources No: the input isn't changed by this PR, so the result equals main's. Main's own default-unit limitation remains.
ms/dom/wd/* (resource, earned/unearned income, FPG size, premium) marital-unit sums and sizes over ms_wd_gross_* and ssi_countable_resources No: inputs unchanged by this PR, so results equal main's
ca/chhs/wdp/.../ca_wdp_ssi_ssp_income_eligible.py deeming selects the couple standard; no aggregate No
ny/otda/ssp/ny_ssp.py, ia/hhs/ssa/ia_ssa.py, ca/cdss/capi/ca_capi_person.py, nj/.../nj_ssp_living_arrangement.py, wi/.../wi_ssp_regular.py, ct/.../ct_ssp_resource_eligible.py, ia_ssa_smme_spousal_deeming_applies.py read deeming or ineligible-spouse flags No: any aggregates they take already use _ssi_couple_total, or they only choose a size or standard
hhs/medicare/savings_programs/income/msp_countable_income.py deeming selects SSI's spouse-identified deemed amounts; whole-unit sums are gated on marital_unit.sum(is_medicare_eligible) == 2, which is unchanged No PR-reachable change (inherited MSP limitation, already in the body)
ut/dwf/heat/.../ut_heat_eligible_person.py marital_unit.any(is_veteran | is_military) Not SSI; unchanged
AR, NC and NM tax readers, TX FPP, CA Medi-Cal pregnancies marital-unit sums Not SSI-gated; unchanged

No marital_unit.any or marital_unit.sum of an SSI receipt remains under variables/gov/states/.

Tests run (this head, one file per process): 551 passed, 0 failed

test_ssi_spousal_deeming_invariants.py 79. ia_ssa.yaml 121. mo_ssp 35, va_ag 32, sd_ssp 39, or_ssp 38. ssi_state_supplement_three_adult 37. ssi_claim_is_joint 9. co_oap_deemed_income 20. ca_capi_three_adult 6, ca_capi_person 15, ca_capi_payment_standard 20. Missouri deemed-income file 6. Montana LIHEAP: 8 files, 67 (13 + 6 + 2 + 13 + 16 + 2 + 8 + 7). California WDP: 4 files, 16 (10 + 3 + 1 + 2). ms_hmw_income_eligible 7, ms_hmw_eligible 4.

hypothesis was missing from the venv; I installed it for the invariants file. No microsimulation and no full suite.

CI

Latest Pull request run at this head: 41347426278, completed / success, 34 of 34 jobs succeeded. None were cancelled or failed, and other-shard-1 passed.

Judgment calls

  • I moved the Missouri cases into the variable-named YAML file instead of renaming the old file.
  • I fixed Mississippi HMW income but not HMW resources: the resource reader's input is unchanged, so it still matches main, and changing it would reach beyond what this PR made reachable.
  • The California premium interaction hit the brief's stop condition, so I report it rather than patch it.
  • I pushed the same head to claude/ssi-couples-deeming-round-7-zqr0i4 as well; that branch has no PR.

Proposed follow-ups

  • Apply state non-MAGI family rules to Medicaid premiums, resources and needs standards. The state-by-state design the hub scoped out, starting with California's premium deduction, which now deducts an outsider's premiums without their income.
  • Identify actual spouses in Mississippi HMW resources and Working Disabled budgets. Those readers still pool an oversized default marital unit, as on main. They should switch to the identified spouse together with explicit-unit regressions.

Generated by Claude Code

This branch has not been deployed

No deployments
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.

SSI: deemed benefit is capped at the individual rate instead of the no-deeming amount, and couples are identified by tax roles

2 participants