Repository navigation
Conversation
medicaid_optional_senior_or_disabled_countable_income and ssi_countable_income zeroed income for anyone who was not an SSI-eligible individual or spouse, and that status includes SSI's citizen and qualified-noncitizen test. Aged, blind, or disabled people who fail only that test (for example, LPRs with fewer than 40 quarters, or undocumented residents of states that cover them) therefore passed the optional ABD and medically needy Medicaid income tests, and CAPI, regardless of income. Gate the zero, and the spousal-deeming variables, on aged, blind, or disabled status instead. The zero still applies to a spouse who is not aged, blind, or disabled, whose income is deemed to the other spouse. SSI benefits are unchanged because is_ssi_eligible still applies the noncitizen test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n status Counting the own income of aged, blind or disabled people who fail SSI's noncitizen test exposed two downstream defects found in the 2026-10-19 review: - The California state supplement summed ssi_countable_income over the whole SPM unit, so a CAPI-eligible relative's income reduced an SSI recipient's supplement. CAPI budgets its own members' income (MPP 49-035), and SSI/SSP counts another member's income only when it is deemed (20 CFR 416.1160(a)), so CAPI-eligible members are left out of the sum. - Maryland PAA deemed spouse income and imputed federal SSI to people SSA cannot pay. For people who fail SSI's citizen or qualified-noncitizen test, PAA now counts only their own income and imputes no SSI (COMAR 07.03.07.07 and 07.03.07.09A). The CAPI test that encoded the federal-benefit-only standard is replaced with an over-income case that holds before and after the CAPI rework. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CAPI payment standards equal the SSI/SSP payment standards less $10 for an individual and $20 for a couple (MPP 49-050.1, .11-.13). The model instead used the federal benefit rate plus the SPM unit's state supplement payment, pooled every CAPI-eligible member's income against one unit standard, applied the $10/$20 offset once a year, and left the tax-unit spouse of a noncitizen couple out. - ca_capi_payment_standard: the SSI/SSP standard for an individual, or half the couple standard, built from the state supplement parameters, less the monthly offset. - ca_capi_person: the standard less the person's own countable income (MPP 49-055.3), with spouse-to-spouse deeming computed as POMS SI 01320.430 D prescribes (federal and state parts each the lesser of the individual and deeming amounts). - ca_capi sums ca_capi_person; ca_capi_income_eligible asks whether any member's income is below their standard (MPP 49-035.1). - Both members of a noncitizen couple, and the noncitizen spouse of a citizen, are CAPI-eligible (MPP 49-055.4, 49-050.13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uples, one standard per arrangement - Offsets are $0 from June 1, 2019 (WIC 18941; ACIN I-23-19); new mixed-couple offset (MPP 49-050.13) before then - Mixed couple: couple standard less the couple's countable income and the spouse's SSI/SSP (MPP 49-005(e)(3), 49-035.221) - Title XIX facility $62 and non-medical out-of-home care $1,626.07 replace the community standard; no-cooking allowance only on the aged or disabled amount - Floor the standards at the federal benefit rate while the CA SSP parameters hold 1991 totals (issue 7787) - No deeming for a Title XIX facility resident (20 CFR 416.1160(a)(1)) - candidates.yaml: us-ca:capi-payment-standard-offset (open, Pavel's sign-off) and us-ca:capi-spousal-deeming-method (unreviewed) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…countable-income Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # policyengine_us/tests/policy/baseline/gov/states/ca/cdss/capi/ca_capi.yaml
…tests, CAPI test pins - Maryland PAA keeps imputed SSI and spouse deeming for people who report SSI receipt - CA state supplement: mixed-couple case and the matching computed CAPI case; comment and reference fixes - CAPI tests from #10379: drop pins this PR now computes, keep the rest with accurate comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alien status COMAR 07.03.07.07 counts the individual's own income; only the imputed SSI keeps the receipt exception. Drop md_paa.yaml Case 13, which codified the deeming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-2025 floor a stopgap; LPR test personas - One-blind couple rate adds no food allowance (WIC 12200(b), (e)); candidates item us-ca:ssp-blind-couple-food-allowance (unreviewed) - Floor comment and pinned pre-2025 cases say the values are known-low; issue 10480 backfills the totals - Mixed-couple note gives the ineligible-spouse example (issue 10481) - CAPI test personas are aged permanent residents with 39 quarters (issue 10482) - PDF page comments without spaces Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…barred SSI reporters in Maryland PAA - Resolve the CAPI test conflicts with this branch's versions and switch their personas to permanent residents with 39 quarters - md_paa_imputed_federal_ssi: for a person who fails SSI's noncitizen test but reports SSI, impute the individual rate for the arrangement, or under deeming the lesser of the couple and individual computations (20 CFR 416.1163(d)-(e)); md_paa.yaml Case 13 gives $511 - CA state supplement Case 11 and the CAPI mixed-couple case use a permanent resident with 39 quarters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review
PR #10240, "Count income of aged, blind, or disabled people who fail SSI's noncitizen test" (hua7450). Round 1, full review.
IDs: C = critical, SA = should address, G = suggestion.
Paths: V/ = policyengine_us/variables/gov/, T/ = policyengine_us/tests/policy/baseline/gov/, IMP = V/states/md/dhs/fia/paa/md_paa_imputed_federal_ssi.py, CNT = V/states/md/dhs/fia/paa/md_paa_countable_income.py, SSP = V/states/ca/cdss/state_supplement/ca_state_supplement.py, MN = V/hhs/medicaid/eligibility/categories/medically_needy/is_medically_needy_for_medicaid.py, MDT = T/states/md/dhs/fia/paa/md_paa.yaml, SSPT = T/states/ca/cdss/state_supplement/ca_state_supplement.yaml. Line numbers refer to the reviewed head. Every PDF link uses the file page number.
Source Documents
- Reviewed head SHA: 77a9e5c
- Mode: full
- Scope: 34 files, +1,971 / -124 against the merge base
4a1a3cdeb7, including #10379's CAPI work. This PR's own change is 21 files (8 variables, 12 tests, 1 changelog fragment). - SSI law: 20 CFR 416.1131, 416.1142, 416.1160, 416.1161, 416.1163, 416.1165; 8 U.S.C. 1612 (a)(2)(E); 42 U.S.C. 1382(e)(1)(B).
- POMS: SI 01320.400 (A, B.1.e), SI 00835.210 (C.1), SI 01320.141 (A), SI 00830.175 (A.1), SI 01320.430 (D).
- Medicaid: 42 CFR 435.601 (b)(2), 435.602 (a)(2)(i), 435.406; 42 U.S.C. 1396d(p)(1)(B) for MSP.
- California: PDF MPP Chapter 49, CAPI regulations (pages 4, 10, 25, 30); WIC 18940, 18941.
- Maryland: COMAR 07.03.07.07 and 07.03.07.09 (A), and .01-.12 searched for spouse rules; PAA Manual 900 (link at
CNT:18). - South Carolina: S.C. Code Regs. 126-920(A)(4)-(5).
- Issues: #10243, #10481, #10482.
- Year: target 2026; probes for 2025 and 2026.
Changed since the analysis
The analysis ran at c4145b0b0e. Since then only source_conflicts/candidates.yaml changed in the PR files (a13747ee8c, the CAPI offset ruling, and a VA TANF entry from main). Every item below was checked again at the head.
Branch Status
- 19 commits ahead and 6 behind
main(8ea43422e6); MERGEABLE; only the required review blocks it. The 6maincommits share onlysource_conflicts/candidates.yamlwith this PR. - Merge order: #10379 and #10370 first, then this PR. The body says the same, but nothing in Git enforces it.
- After this PR: #10361 (it depends on this PR) and the ABD couple follow-up.
- #10146: the body's five port points are present in its monthly twins. It also rewrites
msp_countable_income(SA3) and theSSPline that SA2 changes. - #10332 is not in the body. It makes
ssi_countable_incomeMONTH and merges without a conflict marker at the gate (G5). - #10364: combine its Python conflict by hand, as the body says. #10386, #10391, #10394, #9732, #10374, #10375 and #10382 append to the same test files.
- #8017 (Iowa) requires a citizen or qualified noncitizen. With its files overlaid,
T/states/iapassed 765/765 with and without this PR. Run it again after both merge.
What the PR gets right
- The gate change is exact: the old and new gates differ only for ABD people who fail SSI's noncitizen test, and SSI does not change (
uncapped_ssikeepsdefined_for = "is_ssi_eligible"). - The legal premise holds: Medicaid's ABD methodology follows SSI's, with immigration as a separate test (42 CFR 435.601(b)(2), 435.406); CAPI counts its member's income and deems from an ineligible spouse (MPP 49-035.11, .71-.72); the MD PAA noncitizen branch matches COMAR 07.03.07.07 and .09A.
- Spousal income deeming now keys on ABD status, like parental income and spousal resource deeming. In a mixed ABD couple, the result no longer depends on which spouse is the tax-unit head.
- No hard-coded values (
IMPreadsgov.ssa.ssi.amount), correct periods, vectorized code, no new cycles. - Each new case fails under at least one of 26 code mutations. The body states its merge order, port list and limits. No partner test is edited; the changelog fragment is correct.
Critical (Must Fix)
C1. MD PAA: for an SSI reporter, the couple rate is not reduced by one third in another person's household.
- Where:
IMP:46-56.individual_rateapplies the one-third reduction forANOTHER_PERSONS_HOUSEHOLD, butcouple_ssi = p.couple - (countable_income + deemed_income)uses the full couple rate. - Rule: 20 CFR 416.1131(a) reduces the Federal benefit rate by one third in another person's household. Under deeming, POMS SI 01320.400 B.1.e says the FBR "is reduced by the value of the one-third reduction (VTR) for an eligible couple, if appropriate" (example: SI 00835.210 C.1). The model's own
V/ssa/ssi/ssi_amount_if_eligible.py:55-66does this. - Evidence (MD, January 2025, care home level D, aged LPR with 20 quarters who reports SSI, another person's household):
| Household | Head: imputed SSI / PAA | Law: imputed SSI / PAA | Citizen's SSI, same household |
|---|---|---|---|
| No own income; spouse wages $1,000 a month (deemed $457.50) | $644.67 / $833.33 | $509.17 / $968.83 | $509.17 |
| Own Social Security $100 a month; spouse wages $1,500 a month (deemed $717.50) | $564.67 / $833.33 | $169.17 / $1,228.83 | $169.17 |
PAA is understated by $135.50 and $395.50 a month. On main deeming never reached these people, so this is not a regression, but the new formula does not follow its own stated rule. A flat individual rate (no reduction, no medical-facility rate) passes every existing case: neither branch has a test.
- Why this severity: an incorrect formula in new code, confirmed by a case that fails at the head. The reach is near zero (a PAA resident seldom gets free food and shelter), which affects priority, not the category.
- Fix (ran at the head; passes
ruff format --check). ReplaceIMP:45-56with:
in_medical_facility = arrangement == arrangements.MEDICAL_TREATMENT_FACILITY
# The one-third reduction applies to the Federal benefit rate in use:
# the individual rate, or the couple rate under spouse deeming
# (20 CFR 416.1131; POMS SI 01320.400 B.1.e).
vtr_factor = where(
arrangement == arrangements.ANOTHER_PERSONS_HOUSEHOLD,
1 - p.one_third_reduction_rate,
1,
)
individual_rate = where(
in_medical_facility, p.medical_facility, p.individual * vtr_factor
)
individual_ssi = individual_rate - countable_income
deemed_income = person("ssi_income_deemed_from_ineligible_spouse", period)
couple_ssi = p.couple * vtr_factor - (countable_income + deemed_income)Optional: add "https://secure.ssa.gov/poms.nsf/lnx/0501320400" to the reference tuple; #10141's _ssi_living_arrangement_amount can later replace this block. Append to MDT after the SA3 Case 14 (the head fails Case 15 with 644.67; the fix passes both cases):
- name: Case 15, SSI reporter without 40 quarters under the one-third reduction with a working spouse.
period: 2025-01
absolute_error_margin: 0.01
input:
people:
person1:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 30
ssi_qualifying_quarters_earnings: 20
receives_ssi: true
ssi_countable_resources: 1_000
md_paa_living_arrangement: CARE_HOME_LEVEL_D
ssi_lives_in_another_persons_household: true
ssi_receives_shelter_from_others_in_household: true
ssi_others_pay_all_meals: true
person2:
age: 60
employment_income: 12_000 # 1,000 a month
marital_units:
marital_unit:
members: [person1, person2]
tax_units:
tax_unit:
members: [person1, person2]
spm_units:
spm_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: MD
output:
# No own income, so the $20 general exclusion goes to the wages:
# (1,000 - 20 - 65) x 0.5 = 457.50 deemed a month.
ssi_income_deemed_from_ineligible_spouse: [457.50, 0]
md_paa_countable_income: [0, 457.50]
# The one-third reduction applies to the couple rate under deeming
# (POMS SI 01320.400 B.1.e): min(1,450 x 2/3 - 457.50, 967 x 2/3 - 0) = 509.17.
md_paa_imputed_federal_ssi: [509.17, 0]
# PAA = 1,478 - 0 - 509.17 = 968.83.
md_paa: [968.83, 0]Case 16 ("SSI reporter without 40 quarters in an MDH Rehabilitative Residence gets the $30 medical-facility rate"), one person in MD, 2025-01: age 70, LEGAL_PERMANENT_RESIDENT, years_since_us_entry: 30, ssi_qualifying_quarters_earnings: 20, receives_ssi: true, social_security_survivors: 120, ssi_countable_resources: 1_000, md_paa_living_arrangement: REHAB_RESIDENCE, ssi_lives_in_medical_treatment_facility: true, ssi_medicaid_pays_majority_of_care: true. Output: md_paa_eligible: true, md_paa_countable_income: 0, md_paa_imputed_federal_ssi: 30 (42 U.S.C. 1382(e)(1)(B)), md_paa: 72 (the $102 PNA less 30).
Should Address
SA1. Medically needy: at this head a noncitizen dependent's income counts against another adult.
- Where:
MN:23-27sumsssi_countable_income - medical_expensesover the tax unit. This PR un-zeroes the income that the sum reads. - Rule: 42 CFR 435.602(a)(2)(i): apart from a spouse, or a parent of a child under 21 or blind or disabled, "the agency must not consider income and resources of any relative as available to an individual."
- Evidence (MA 2026; aged citizen head with a $20,000 pension and $15,000 of medical expenses; a dependent parent aged 90 with a $30,000 pension). Is the head medically needy?
| Dependent parent | Head | Merge-base code | Head plus #10370 |
|---|---|---|---|
| LPR, 20 quarters | False | True | True |
| Undocumented | False | True | True |
| Citizen | False | False | True |
main already over-counts citizen dependents. With #10370 overlaid, the medically needy folder passed 25/25.
- Why SA: the PR exposes more people to a regulatory mismatch, but the code is in a file it does not change, and #10370 fixes it. It is a merge gate.
- Fix (Case 5 fails at the head and passes with #10370):
- name: Case 5, an aged noncitizen dependent parent's pension does not count against the head.
period: 2026
input:
people:
head:
age: 70
immigration_status: CITIZEN
pension_income: 20_000
medicaid_medically_needy_medical_expenses: 15_000
ssi_countable_resources: 1_000
is_in_medicaid_medically_needy_category: true
is_optional_senior_or_disabled_for_medicaid: false
parent:
age: 90
is_tax_unit_dependent: true
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 10
ssi_qualifying_quarters_earnings: 20
pension_income: 30_000
ssi_countable_resources: 0
tax_units:
tax_unit:
members: [head, parent]
marital_units:
head_unit:
members: [head]
parent_unit:
members: [parent]
households:
household:
members: [head, parent]
state_code: MA
output:
# The parent's 30,000 - 240 = 29,760 now counts (this PR), but a parent's
# income is never deemed to an adult child aged 70 (42 CFR
# 435.602(a)(2)(i)). The head: 20,000 - 240 - 15,000 = 4,760 <= 522 x 12
# = 6,264.
ssi_countable_income: [19_760, 29_760]
is_medically_needy_for_medicaid: [true, false]SA2. The CA state supplement leaves out income by CAPI eligibility instead of by the rule it cites.
- Where:
SSP:27-31,where(capi_eligible, 0, person_countable_income). - Rule: 20 CFR 416.1160(a) deems income only from an ineligible spouse, an ineligible parent, a sponsor or an essential person. A sibling's income never reaches an SSI/SSP recipient.
- Evidence: today
V/states/ca/cdss/capi/eligibility/ca_capi_eligible_person.py:15-22is exactly the group whose income this PR un-zeroes, so results are correct. Issue #10482 will remove undocumented and TPS people from CAPI. Then a citizen sharing an SPM unit with an undocumented sibling gets $0 instead of $4,425.72 a year (-$368.81 a month). The test personas survive #10482; the mask does not. - Why SA: a proxy in place of the legal test in the PR's own comment, which a tracked change turns into a wrong value.
- Fix (ran; at the head it gives the same results, because in CA the two masks are the same set). Replace
SSP:20-32with:
person = spm_unit.members
# SSI/SSP counts another member's income only when it is deemed
# (20 CFR 416.1160(a)). A spouse's income already reaches the SSI
# recipient's own countable income through the couple computation or
# deeming, and CAPI budgets its own members' income (CAPI regulations
# MPP 49-035). So the countable income of a member who fails SSI's
# citizen or qualified-noncitizen test, whether or not CAPI-eligible,
# is not added again.
immigration_status = person("immigration_status", period.this_year)
is_citizen = immigration_status == immigration_status.possible_values.CITIZEN
is_qualified_noncitizen = person(
"is_ssi_qualified_noncitizen", period.this_year
)
meets_ssi_immigration_test = is_citizen | is_qualified_noncitizen
person_countable_income = person("ssi_countable_income", period)
countable_income = spm_unit.sum(
where(meets_ssi_immigration_test, person_countable_income, 0)
)
return max_(0, payment_standard - ssi - countable_income)Append to SSPT (the head fails it; the fix passes):
- name: Case 12, 2025 aged citizen sharing an SPM unit with an undocumented sibling who is not CAPI-eligible keeps the supplement.
period: 2025
absolute_error_margin: 0.01
input:
people:
person1:
age: 70
is_tax_unit_head: true
immigration_status: CITIZEN
social_security_retirement: 6_000 # 500 a month
person2:
age: 72
is_tax_unit_head: true
immigration_status: UNDOCUMENTED
pension_income: 6_000 # 500 a month
# WIC 18938 and MPP 49-020 bar undocumented people from CAPI (#10482).
ca_capi_eligible_person: false
tax_units:
tax_unit1:
members: [person1]
tax_unit2:
members: [person2]
marital_units:
marital_unit1:
members: [person1]
marital_unit2:
members: [person2]
spm_units:
spm_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: CA
output:
# Each has 500 - 20 = 480 a month of countable income.
ssi_countable_income: [5_760, 5_760]
ssi: [5_844, 0] # 487 * 12
ca_state_supplement_payment_standard: 16_029.72 # 1,335.81 * 12
# A sibling's income is never deemed to an SSI/SSP recipient
# (20 CFR 416.1160(a)), so the supplement stays 1,335.81 - 487 - 480 =
# 368.81 a month.
ca_state_supplement: 4_425.72 # 368.81 * 12SA3. No test pins the new results for MSP or for the MD deeming cap.
- Where:
msp_countable_incomereadsis_ssi_spousal_deeming_applies;IMP:57-63takes the lesser of the individual and couple computations. - Evidence: this PR changes both results for a new group. An aged LPR with 20 quarters, $1,000 a month of unearned income and a spouse earning $20,000 now has MSP countable income of $1,780.83 a month (QMB false, SLMB true), against $980 (QMB true) before. Putting back the old MSP behavior passes all 216 related cases. In
MDTCases 11-13 the individual computation always binds, so ignoring deeming passes too. - Why SA: missing edge cases for already-tested variables. #10146 rewrites
msp_countable_income, and nothing would catch a missed port. - Fix (both pass at the head and catch the change). Append to
T/hhs/medicare/savings_programs/income/msp_countable_income.yaml(5 cases, so this is Case 6):
- name: Case 6, spouse income is deemed to an aged permanent resident without 40 SSI quarters.
period: 2025-01
absolute_error_margin: 0.01
input:
people:
person1:
age: 70
is_tax_unit_head: true
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 10
ssi_qualifying_quarters_earnings: 20
ssi_unearned_income: 12_000
person2:
age: 55
is_tax_unit_spouse: true
ssi_earned_income: 20_000
tax_units:
tax_unit:
members: [person1, person2]
marital_units:
marital_unit:
members: [person1, person2]
output:
# SSI methodology deems the spouse's wages whether or not the person
# meets SSI's noncitizen test: 20,000 > (1,450 - 967) x 12 = 5,796.
# (1,000 - 20) + (1,666.67 - 65) / 2 = 980 + 800.83 = 1,780.83.
is_ssi_spousal_deeming_applies: [true, false]
msp_countable_income: [1_780.83, 790.83]Append to MDT (before the C1 cases):
- name: Case 14, SSI reporter without 40 quarters whose deemed spouse wages make the couple computation lower.
period: 2025-01
absolute_error_margin: 0.01
input:
people:
person1:
age: 70
immigration_status: LEGAL_PERMANENT_RESIDENT
years_since_us_entry: 30
ssi_qualifying_quarters_earnings: 20
receives_ssi: true
social_security_survivors: 6_000 # 500 a month
ssi_countable_resources: 1_000
md_paa_living_arrangement: CARE_HOME_LEVEL_D
person2:
age: 60
employment_income: 24_000 # 2,000 a month
marital_units:
marital_unit:
members: [person1, person2]
tax_units:
tax_unit:
members: [person1, person2]
spm_units:
spm_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: MD
output:
# Couple countable 480 + (2,000 - 65) x 0.5 = 1,447.50; deemed
# 1,447.50 - 480 = 967.50 a month.
ssi_income_deemed_from_ineligible_spouse: [967.50, 0]
md_paa_countable_income: [480, 957.50]
# SSA pays min(1,450 - 1,447.50, 967 - 480) = min(2.50, 487) = 2.50
# (20 CFR 416.1163(d)-(e)).
md_paa_imputed_federal_ssi: [2.50, 0]
# PAA = 1,478 - 480 - 2.50 = 995.50.
md_paa: [995.50, 0]Optional (ran): SC OSS Case 8 in T/states/sc/scdhhs/ssi_state_supplement/integration.yaml, a one-person SC household in 2026: age 70, LEGAL_PERMANENT_RESIDENT, years_since_us_entry: 10, ssi_qualifying_quarters_earnings: 20, pension_income: 24_000, is_in_residential_care_facility: true. Output: ssi_countable_income: 23_760 (above the 21,648 NIL), sc_ssi_state_supplement_eligible: false, sc_ssi_state_supplement: 0. Its result also holds for another reason (Out of scope).
Suggestions
G1. The MD PAA comment is false at the head.
- Where:
CNT:48-52. - Evidence: "The SSI cascade deems spouse income only to people SSA can pay" no longer holds ($467.50 is deemed to the LPR in
MDTCases 11 and 13). COMAR 07.03.07.07 and PAA Manual 900 have no spouse rule, yetCNT:57-61still adds deemed income for citizens: in Case 13's household a citizen gets PAA of $28, the LPR reporter $511, and COMAR gives both $511. - Why a suggestion: the citizen result is
main's, and the body lists it under Known limitations. Only the new comment is this PR's. - Fix (comment only; ran). Replace
CNT:48-52with:
# COMAR 07.03.07.07 counts the individual's own income and has no
# spousal deeming, so people who fail SSI's citizen or
# qualified-noncitizen test count their own income alone, including
# those who report SSI receipt.
# NOTE: for citizens and qualified noncitizens the SSI deemed amount is
# still added, although their imputed SSI already reflects it. This
# predates the noncitizen change and is a known limitation.Open an issue with the $28 / $511 example (the 416.1163(e)(2) cap from #10141 gives both $511).
G2. The Case 11 benchmark leaves out the public income-maintenance exclusion.
- Where:
SSPT:419-427; the body's Known limitations ("$470 + $368.81 = $838.81"); #10481 proposal step 1. - Rule: 20 CFR 416.1161(a)(2)-(3) excludes from deeming a public income-maintenance payment and the income counted in figuring it, "regardless of who receives that payment" (POMS SI 01320.141 A). CAPI is one (416.1142(a)(6); POMS SI 00830.175 A.1).
- Evidence: SSA deems none of the CAPI spouse's $500 and pays the citizen $487 SSI and $368.81 SSP, $855.81 in all. The model's $845.81 is $10 low, and the comment's $838.81 is $17 low. If #10481 follows the comment, it adds an error.
- Fix (comment only; ran). Replace
SSPT:419-427with:
# NOTE: SSA treats the noncitizen spouse as an ineligible spouse (20 CFR
# 416.1160(d)), but it deems none of the spouse's income. CAPI is state-funded
# assistance based on need, a public income-maintenance payment (20 CFR
# 416.1142(a)(6); POMS SI 00830.175), and income counted in figuring such a
# payment is not deemed, whoever receives it (20 CFR 416.1161(a)(2)-(3);
# POMS SI 01320.141 A). SSA pays SSI of 967 - 480 = 487 and a state
# supplement of 1,335.81 - 967 = 368.81, 855.81 in all. The model's couple
# computation for a mixed-status couple pays 235 + 610.81 = 845.81. This is
# a pre-existing ssi_claim_is_joint limitation (#10481): it counts aged,
# blind or disabled head/spouse status rather than SSI eligibility. The
# expected values below are the model's.In the body, write: "SSA deems none of the CAPI spouse's income, because income counted in figuring CAPI is excluded from deeming (20 CFR 416.1161(a)(2)-(3); POMS SI 01320.141 A), so it pays $487 + $368.81 = $855.81." Tell #10481 too.
G3. The ineligible-parent form of the couple-status gap is not tracked.
- Where:
V/ssa/ssi/eligibility/status/is_ssi_ineligible_parent.py:10-16returns~is_ssi_aged_blind_disabled & ...(not changed here). - Rule: 20 CFR 416.1160(d), an ineligible parent "is not eligible for SSI benefits"; 416.1165.
- Evidence (TX 2026, disabled citizen child aged 10, parent with $36,000 of wages): a parent who is not ABD deems $5,562 a year and the child gets $550.50 SSI in January. A disabled LPR parent with 20 quarters, or a disabled citizen parent with too much income, deems $0, and the child gets $994. #10243 and #10481 cover spouses only.
- Fix: add to Known limitations, and open an issue or extend #10243: "SSI parent-to-child deeming (
is_ssi_ineligible_parent) also keys on aged, blind or disabled status, so such a parent who is not eligible for SSI deems nothing to an eligible child (20 CFR 416.1160(d), 416.1165)."
G4. Bring the body up to date.
- The
--oursmerge step names #10379 head0e105dfb23; this branch carriesf1bed699be. #10364 is now45120fa173. - Add to the downstream list: IN RCAP for Medicaid-enrolled noncitizens (
V/states/in/fssa/ssp/in_ssp_rcap_eligible.py:20-34; $1,501.06 to $1,021.06 a month in one example), NE AABD, TX SSP, and CA SBD and OC General Relief (ca_capi > 0). CO OAP reads the deeming flag throughssi_in_kind_support_and_maintenance, for SSI reporters only. Say thatssi_amount_if_eligibleandssi_pmv_amountchange for this group, whilessidoes not.
G5. After #10332, read the gate with period.this_year.
- Where:
V/ssa/ssi/eligibility/income/ssi_countable_income.py:78. - Evidence: #10332 makes
ssi_countable_incomeMONTH without touching the gate lines, so the merge has no conflict marker, and the gate then reads a YEAR boolean with a month. Name #10332 in the merge section, with the rule the body gives for the #10146 twins.
G6. The #10379 changelog fragment can be released twice.
- Where:
changelog.d/ca-capi-ssi-ssp-standard.fixed.md. - Evidence: release commits delete fragments (for example
4a1a3cdeb7). If a release uses #10379's fragment before this branch mergesmain, the merge keeps this branch's copy. After that merge, delete it here if it is still present.
G7. Share the SSI immigration test, and align the KY copy of the old gate.
CNT:53-56andIMP:29-34add two inline copies ofcitizen | is_ssi_qualified_noncitizen(about ten files have it; SA2 adds one). A shared variable would keep them in step.V/states/ky/dcbs/ssp/ky_ssp_countable_income.py:40-42("Mirror ssi_countable_income") keeps the old gate. It has no effect, because KY SSP requiresis_ssi_eligible. Align it or add a NOTE.
Investigated and cleared
- Gates differ only for ABD people who fail the noncitizen test. Proved by Boolean reduction and microsimulation. The wider deeming
defined_foralso admits ABD couples, where nobody is an ineligible spouse, so no result changes. - The C1 amounts ($135.50 and $395.50). Two households; both reproduce to the cent.
- MSP, MS HMW and 209(b). MSP follows SSI methodology (42 U.S.C. 1396d(p)(1)(B)); SA3 adds its test. MS HMW and 209(b) code is unchanged, and the Medicaid countable-income cases cover their input.
- #10379's request for unpinned deeming and couple-income cases here. Done: the CAPI tests now compute both, and reversing either gate fails them.
- References. Every PR-own link supports its claim. CAPI PDF page 25 is MPP 49-035. 8 U.S.C. 1612(a)(2)(E) is "Aliens receiving SSI on August 22, 1996".
- Microsimulation (2026, at
c4145b0b0e, same code). 362,484 weighted ABD people fail the test (none in CA; no LPRs, because quarters default to 40). Their optional ABD flag falls by 44,490 and the medically needy flag by 7,563. Medicaid enrollment,ssi, MSP flags,md_paa, CAPI and net income do not change.
Out of scope / follow-up
- MD PAA citizen deeming (G1 issue).
- SC OSS has no SSI immigration gate, although S.C. Code Regs. 126-920(A)(5) requires SSI's criteria: an undocumented aged CRCF resident with a $900 a month pension gets $1,804 on
main, $924 here, and $0 by law. Open an issue. is_ssi_qualified_noncitizenhas no 7-year limit for refugees and asylees.- SSI deeming ignores 416.1161(a)(2)-(3) for any public income-maintenance payment, SNAP included from 9/30/2024; this PR extends deeming to more people. Sponsor deeming (416.1166a) is not modeled.
- Tracked: #10481 and #10243 (couple status), #10482 (CAPI exclusions), #10370 (medically needy unit).
Validation Summary
| Check | Result |
|---|---|
| CI | 77a9e5c9bc: 33 pass, 0 fail |
| Local tests | 14 changed YAML files 153/153 at both heads. At c4145b0b0e (same code): SSI 246, Medicaid 720, MSP/CA/MD 717, other readers 1,352, CA local 867, Python 90 |
| Fix runs | C1, SA2, SA3, G1, G2 on a copy of the head: the Next Steps folders, 2,992 passed, 0 failed. The head fails C1 Case 15 and SA2 Case 12; SA1 Case 5 passes with #10370 |
| Partner contract tests | None edited; 623 pass; no fix changes one |
| References and law | All PR-own references support their claims. C1 contradicts 20 CFR 416.1131 and POMS SI 01320.400 B.1.e |
| Code and mutation | No hard-coded values. 26 mutations: 21 caught; the new cases catch 4 of the other 5; the fifth changes no result |
| Branch | 19 ahead / 6 behind main; MERGEABLE; main shares only candidates.yaml |
| PR body | Gate claims accurate; G2, G3 and G4 corrections. axiom: line present (process note, not counted) |
| Other reviews | None |
Review Severity: REQUEST_CHANGES
One critical item (C1) and three should-address items (SA1-SA3) are open; seven suggestions are open.
Next Steps
To auto-fix issues: run the fix-pr workflow for this PR.
- Apply C1 (the reduction on the couple rate) with Cases 15 and 16.
- Apply SA2 (mask on SSI's immigration test) with Case 12.
- Add the SA3 cases (MSP Case 6 and MD Case 14; SC Case 8 is optional).
- Take the suggestions that you agree with, update the body, and open the G1, G3 and SC OSS issues.
- Run
make format, thenT/ssa/ssi,T/hhs/medicaid,T/hhs/medicare/savings_programs,T/states/ca/cdss,T/local/ca,T/states/mdandT/states/sc/scdhhs. - Merge #10379's final head here, wait for #10379 and #10370 to land, merge
main, add SA1 Case 5, and check the G6 fragment.
… gate, offset and floor cases - C1: the mixed-couple computation needs a spouse paid SSI/SSP (MPP 49-005(e)(3), 49-050.13); otherwise the spouse is an ineligible spouse and CAPI deems the couple's income (49-005(i)(2)); the payment standard follows the same gate; ca_capi_person Cases 8-9 - SA1: no-cooking default NOTE with amounts and issue 10296 - SA2: the state supplement's dependent amount needs the child to meet SSI's immigration and resource conditions; three cases - SA3/SA4: couple, mixed-couple, floor and 2019 deeming offset cases; mixed couple with the citizen's income - G1/G5: candidates entries list both programs; WIC 12200(g) cited - G3/G4/G7/G9: notes, Title XIX reads both inputs, shorter docstring, Case N names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…countable-income Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/categories/medically_needy/is_medically_needy_for_medicaid.yaml
…SSP immigration mask, new cases - C1: md_paa_imputed_federal_ssi reduces the couple rate by one third in another person's household (20 CFR 416.1131; POMS SI 01320.400 B.1.e); md_paa Cases 14-16 - SA1: medically needy Case 13 (a noncitizen dependent parent's pension does not count against the head), now that #10370 is on main - SA2: the CA state supplement leaves out a member who fails SSI's noncitizen test, except a spouse in an SSI couple computation; Case 12; Case 11 and the CAPI mixed-couple case restated - SA3: MSP Case 6 and SC OSS Case 8 - G1/G2/G7: MD PAA comment, Case 11 note on the public income-maintenance exclusion, KY SSP gate aligned Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…individuals; Case N names - ca_capi_couple_computation: SSI's couple computation, except when exactly one spouse is in a Title XIX facility by either input (20 CFR 416.414(b)(3)); used by the helper, the payment standard and ca_capi_person; Case 20 - ca_state_supplement_dependent_amount.yaml Cases 4 and 5 named Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…countable-income Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the KY gate with a NOTE; drop stale comments - ca_state_supplement: members who fail SSI's noncitizen test are left out; in an SSI couple computation with such a spouse, the citizen's own countable income counts, since SSA deems none of the CAPI-counted income (20 CFR 416.1160(d), 416.1161(a)(2)-(3)); Cases 11 and 13-14, CAPI Case 10 restated to the law's totals - ky_ssp_countable_income: SSI's eligibility gate kept, with a NOTE (an aligned gate broke KY Case 5) - Removed "until PR 10240" comments that this PR makes false Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es CAPI; otherwise deem The 416.1161(a)(2)-(3) exclusion covers income counted for a CAPI payment the spouse receives. When the spouse's income leaves no CAPI, it is deemed and the supplement is the lesser of the individual and couple computations (416.1163). The spouse test uses the tax-unit head or spouse. Case 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…als; cite POMS SI 01320.430 D The CAPI-receipt branch always equalled the deemed lesser-of, so it is dropped; results are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reply to review 5675568106. All items are addressed at head Paths:
The SA2 change. Your mask leaves out the CAPI spouse's half of a couple's income, but in the model the citizen's own
So for a citizen in an SSI couple computation with a spouse who fails the test (
The code takes max(own income, couple income − (couple standard − individual standard)). That is the lesser of the individual and couple totals, which equals own income whenever the spouse would receive CAPI. POMS SI 01320.430 D takes the lesser of each part separately. Using totals keeps CAPI at zero when the spouse's income is deemed, so only the SSI/supplement versus CAPI split can differ, not the couple's total; the code says so in a NOTE. The results:
Your Case 12 (undocumented sibling) and a new Case 13 (a married CAPI couple in the citizen's SPM unit) keep the $368.81 supplement. Only the SSI-supplement split in Case 11 still differs from SSA's; that is the joint-SSI part of #10481. Tests were not run locally; CI will run them. |
…t separates a CAPI couple Apply Pavel's SA5 fix (20 CFR 416.414(b)(3)) with Cases 14 and 15, name the state supplement change in the changelog (G11), and add a resource-test case for the dependent amount. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-countable-income # Conflicts: # policyengine_us/tests/policy/baseline/gov/hhs/medicaid/income/medicaid_optional_senior_or_disabled_countable_income.yaml # policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/income/msp_countable_income.yaml # policyengine_us/variables/gov/hhs/medicaid/income/medicaid_optional_senior_or_disabled_countable_income.py
…ng case for CAPI Pavel's G10 on PR 10379: with the CAPI member as tax-unit head, the state supplement counts the citizen's own income, so CAPI deems (Cases 16 and 17). Case 18 is Case 13 above the deeming threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Program Review
PR #10240, "Count income of aged, blind, or disabled people who fail SSI's noncitizen test" (hua7450). Round 2, incremental review of 77a9e5c9bc..2467454e79.
IDs: C = critical, SA = should address, G = suggestion. New items continue the numbering after the highest prior ID in each class.
Paths: V/ = policyengine_us/variables/gov/, T/ = policyengine_us/tests/policy/baseline/gov/, SSP = V/states/ca/cdss/state_supplement/ca_state_supplement.py, SSPT = T/states/ca/cdss/state_supplement/ca_state_supplement.yaml, CPT = T/states/ca/cdss/capi/ca_capi_person.yaml. Line numbers refer to the reviewed head.
Source Documents
- Reviewed head SHA: 2467454
- Mode: incremental (round 2)
- Scope: I isolated this PR's own work with
git diff 3b9dd3b34b HEAD(3b9dd3b34b, #10379's head, is an ancestor of the head) and compared it with the same diff at round 1 (f1bed699be..77a9e5c9bc). The PR's own work changed in 13 files:- Code:
SSP(+75: an immigration-test mask and a mixed-couple branch),md_paa_imputed_federal_ssi.py(C1),md_paa_countable_income.py(G1),ky_ssp_countable_income.py(a NOTE), andca_capi_person.py, where only a stale 3-line NOTE is removed. - Tests:
SSPTCases 11-15,T/states/ca/cdss/capi/ca_capi.yamlCases 9-10,CPTCases 16-18,md_paa.yamlCases 14-16, MSP Case 20, SC Case 8, medically needy Case 13, and one comment inis_optional_senior_or_disabled_for_medicaid.yaml. - Also the changelog fragment and the PR body.
- Main merges:
e3b765b1ceand5add59c8f0. Through #10379's merges, the branch also brings #10370, #10364, #10360, #10361, #10363 and #10373 frommain.
- Code:
- SSI law: 20 CFR 416.1161 (a)(2)-(3). Fetched this round: the exclusion covers public income-maintenance payments that the ineligible spouse "receives", and the income counted in figuring them. Also 416.2025 (b)(3), fetched: under deeming, the state supplement uses "the higher of the State supplementary rates for an eligible couple or an eligible individual". Also 416.1131, 416.1160(a), (d), 416.1163(d)-(e), 416.414(b)(3).
- POMS: SI 01320.400 B.1.e, SI 01320.430 D, SI 01320.141 A (checked in round 1).
- California: WIC 18938 (from #10482's text); CAPI MPP 49-005, 49-035, 49-055.32.
- Issues and comments: #10544 and #10545 (both opened 2026-10-29), the #10481 comment 6504203775, the #10243 comment 6504203026, and #10482 (body read; it does not mention
SSP).
Branch Status
- 36 commits ahead of
main(d983c32370) and 1 behind. The missing commit is a release commit (CHANGELOG.md,pyproject.toml,uv.lockand three other PRs' fragments), so it has no overlap. The PR is MERGEABLE; the requested changes block it. - CI at the head: 33 pass, 1 pending (
Contrib tests / Full Suite - Contrib (other-shard-1)). Wait for it or re-run it before merge. - #10379 moved after this head. Its head is now
7c380f66d6(6:22pm EDT), one commit past3b9dd3b34b, and that commit changes onlysource_conflicts/candidates.yaml. The body's own rule applies: merge #10379's final head here before the--oursstep. This is a process step, not a finding. - The #10379 fragment (
changelog.d/ca-capi-ssi-ssp-standard.fixed.md) is still here, and #10379 is still open, so the G6 step still applies at merge time.
Round 1 items
| ID | Status | Evidence |
|---|---|---|
| C1 | RESOLVED | md_paa_imputed_federal_ssi.py:50-60 applies vtr_factor to both the individual and the couple rate, as suggested, and :19 cites POMS SI 01320.400. md_paa.yaml Case 15 (:397): min(1,450 x 2/3 - 457.50, 967 x 2/3) = 509.17, PAA 1,478 - 509.17 = 968.83. Case 16 (:440): $30 imputed, PAA 102 - 30 = 72. Both pass. |
| SA1 | RESOLVED | #10370 is on main (e7f041c334) and merged here. Case 13 (is_medically_needy_for_medicaid.yaml:372) pins ssi_countable_income: [19_760, 29_760] (this PR's gate) and [true, false]. It passes. |
| SA2 | RESOLVED (author's correction accepted) | SSP:31-36, 85-87 masks the SPM-unit sum on SSI's immigration test. Case 12 (SSPT:469), the round-1 case unchanged, passes. The author is right that the round-1 fix alone was incomplete once #10379's unpaid-spouse rule landed: with only the mask, CPT Case 8 gives a supplement of $443.94 against $0, a mutation confirms it, and I withdraw that part of the suggested fix. The new mixed-couple branch (SSP:37-84) gives SSA's totals in SSPT Cases 11, 14 and 15 and in ca_capi.yaml Case 10 (hand-checked below). The author's claim holds: the lesser of the totals, min(I - own, C - couple), equals own income exactly when CAPI = C - I - spouse income > 0. Only the split between SSI and the supplement can differ from POMS D, not the couple's total. One gap in the branch's gate is new item SA4. |
| SA3 | RESOLVED | MSP Case 20 (msp_countable_income.yaml:431): 980 + (1,666.67 - 65)/2 = 1,780.83. MD Case 14 (md_paa.yaml:356): min(2.50, 487) = 2.50, PAA 995.50. SC Case 8 (integration.yaml:203): 23,760 > 1,804 x 12 = 21,648. All pass. |
| G1 | RESOLVED | md_paa_countable_income.py:48-54 has the suggested comment. #10544 is open with the $28 / $511 case. |
| G2 | RESOLVED | The NOTE at SSPT:413-423 and the ca_capi.yaml Case 10 NOTE use 416.1161(a)(2)-(3) and $855.81. The #10481 comment says the same. |
| G3 | RESOLVED | The body's Known limitations has the parent-deeming item. The #10243 comment has the TX example. |
| G4 | RESOLVED | The body names #10379 at 3b9dd3b34b (correct at this head; see Branch Status), #10364 as merged, and the full downstream list (IN RCAP, NE AABD, TX SSP, SBD and OC General Relief, CO OAP through ISM, and ssi_amount_if_eligible / ssi_pmv_amount). |
| G5 | RESOLVED | The merge section names #10332 with the period.this_year rule. |
| G6 | RESOLVED | The merge section says to delete the #10379 fragment after #10379 lands. |
| G7 | DEFERRED (accepted) | KY: the NOTE at ky_ssp_countable_income.py:40-42 is accurate, because ky_ssp_claim_type.py:30-34 requires is_ssi_eligible. KY passes 417/417. The shared immigration-test variable is left for a follow-up, with no issue number. That is acceptable for a suggestion. This round adds a third inline copy (SSP:31-36), so a tracking issue would help. |
| SC OSS (out of scope) | DEFERRED | #10545 is open. |
New findings
Critical
None.
Should address
SA4. The CA supplement's mixed-couple branch assumes that a spouse who fails SSI's noncitizen test can receive CAPI.
- Where:
SSP:49-56.spouse_fails_testuses~meets_ssi_immigration_test. When the spouse's income leaves room for CAPI, the branch then counts only the citizen's own income. - Rule: the branch's own comment (
SSP:37-43) cites 20 CFR 416.1161(a)(2)-(3). That exclusion covers a public income-maintenance payment that the ineligible spouse "receives". A spouse who cannot receive CAPI gets no exclusion, and the spouse's income is deemed under 416.1163 and 416.2025(b)(3). WIC 18938 bars undocumented people and TPS holders from CAPI (#10482). - Evidence (CA, January 2026; aged citizen with Social Security of $320 a month; aged undocumented spouse with a pension of $700 a month):
| Code | Citizen SSI + supplement | Spouse CAPI |
|---|---|---|
| Head (model's current CAPI eligibility) | 245.50 + 688.44 = 933.94 | 164.89 |
Head, spouse ca_capi_eligible_person: false (as after #10482) |
245.50 + 688.44 = 933.94 | 0 |
| Fix below, same input | 245.50 + 488.44 = 733.94 | 0 |
#10379 head 3b9dd3b34b, same input |
245.50 + 0 = 245.50 | 0 |
| Law: 700 > 497, so the income is deemed. SSI = min(994 - 300, 1,491 - 1,000) = 491; supplement = min(239.94, 607.83) = 239.94 | 730.94 | 0 |
- Today,
ca_capi_eligible_person(V/states/ca/cdss/capi/eligibility/ca_capi_eligible_person.py:15-22) is the same set as "aged, blind or disabled and fails the test". So the branch agrees with the model's own CAPI, and the couple's total ($1,098.83) is the same at both heads. - Once #10482 lands, the branch still excludes the spouse's income. The citizen is then overpaid $203 a month in this household, and by up to about $368 a month in general.
- The fix brings the citizen to $733.94. The $3 gap that remains is the joint SSI (#10481).
- #10482's proposed fix does not mention
SSP. - The microsimulation reach is zero today: round 1 found no CA residents in the group that fails the test.
- Why SA: the code uses a proxy for the legal test that its own comment states, and a tracked change turns the proxy into a wrong value. This is the same reason that made round-1 SA2 an SA.
- Fix (ran on a copy of the head:
T/states/ca/cdss459/459 with the new case,T/local/ca867/867,ruff format --checkpasses; no current case changes). ReplaceSSP:49-56with:
# The exclusion needs a spouse who can receive CAPI, so key on CAPI
# eligibility rather than on SSI's noncitizen test alone (issue 10482).
capi_eligible = person("ca_capi_eligible_person", period.this_year)
spouse_capi_eligible = (
person.marital_unit.sum(capi_eligible & head_or_spouse) > 0
)
in_mixed_couple = (
person("ssi_couple_computation_applies", period)
& meets_ssi_immigration_test
& spouse_capi_eligible
)This adds no dependency cycle: the round-1 head read ca_capi_eligible_person in SSP. Append to SSPT (the head fails it with 688.44; the fix passes):
- name: Case 16, 2026 citizen married to an aged spouse who fails SSI's noncitizen test and cannot receive CAPI, so the spouse's income is not excluded.
period: 2026-01
absolute_error_margin: 0.01
input:
people:
person1:
age: 72
immigration_status: CITIZEN
social_security: 3_840 # 320 a month
person2:
age: 70
immigration_status: UNDOCUMENTED
pension_income: 8_400 # 700 a month
# WIC 18938 bars undocumented people from CAPI (#10482).
ca_capi_eligible_person: false
marital_units:
marital_unit:
members: [person1, person2]
households:
household:
members: [person1, person2]
state_code: CA
living_arrangements_allow_for_food_preparation: true
output:
# The spouse receives no CAPI, so 20 CFR 416.1161(a)(2)-(3) does not
# apply and the spouse's 700 a month, above the 1,491 - 994 = 497
# threshold, is deemed (20 CFR 416.1163). The model's joint SSI gives each
# spouse (320 + 700 - 20) / 2 = 500: SSI 745.50 - 500 = 245.50 and a
# supplement of 1,233.94 - 245.50 - 500 = 488.44, 733.94 in all.
# NOTE: SSA pays min(994 - 300, 1,491 - 1,000) = 491 of SSI and 239.94 of
# supplement, 730.94 in all; the gap is the joint SSI (#10481).
ssi: [245.50, 0]
ca_state_supplement: 488.44
ca_capi_person: [0, 0]Alternative that also closes SA4: add SSP's mixed-couple gate to #10482's proposed fix list and put a NOTE at SSP:49.
Suggestions
G8. Cite the rules that the new branch applies.
- Where:
SSP:17-21. The tuple cites WIC 12200, 20 CFR 416.1160 and CAPI MPP 49-035. The branch also relies on 416.1161 (the exclusion) and 416.2025 (the supplement under deeming), which its comments name. - Fix: add
"https://www.law.cornell.edu/cfr/text/20/416.1161"and"https://www.law.cornell.edu/cfr/text/20/416.2025"to the tuple. Both resolve, and the second is "Optional supplementation: Countable income".
Investigated and cleared
- #10379's SA5 fix is carried correctly and is neither undone nor doubled.
ca_capi_person.py:30-49is the same as at3b9dd3b34b; this PR removes only the stale NOTE that was at the #10379 version's lines 105-107.- The separated path computes
own_alonefromssi_earned_incomeandssi_unearned_income. It never reads thessi_countable_incomethat this PR un-zeroes. ssi_income_deemed_from_ineligible_spousestays 0 for an aged, blind or disabled couple, becauseis_ssi_spousal_deeming_appliesis false for both spouses.- Probes give the same CAPI at both heads. #10379 Case 14 gives [62, 253.94]. A citizen with Social Security of $800 and an LPR spouse with a pension of $40 in a CA Title XIX facility gives [0, 42].
- In that second household, the citizen's total at the head (335.50 + 118.44 = 453.94) equals the law's 214 + 239.94. At #10379 it was 413.94. With a high-income facility spouse, the supplement is $0 at both heads, because the federal SSI ignores the CA-only facility input. That gap predates this PR.
- The separated path computes
- Role symmetry.
SSPTCase 14 with the LPR as tax-unit head gives the same 453.94 / 64.89 as Case 14 itself. At #10379 the swap gave 443.94 / 864.89, andCPTCases 16-17 pin the swap. - New cases are functional. Three mutations:
- Dropping the mixed-couple branch fails 8 cases:
CPT8, 9, 16 and 17,SSPT11, 14 and 15, andca_capi.yaml10. - Using own income only fails
SSPTCase 15. - Restoring the old deeming
defined_forfailsCPTCases 2-5, 7 and 18 and oneca_capi_income_eligible.yamlcase.
- Dropping the mixed-couple branch fails 8 cases:
- Periods in
SSP. YEAR booleans and enums are read withperiod.this_year.ssi_countable_incomeis read withperiod(÷12). The YEAR inputs passed to_apply_ssi_exclusionsare annual, and the result is divided by 12.ssi_couple_computation_appliesis MONTH. There are no hard-coded values. - Partner contract tests. None is edited, and 623/623 pass at the head.
Hand-checks of new cases (2026 FBR 994 / 1,491; SSI/SSP 1,233.94 / 2,098.83; state parts 239.94 / 607.83)
CPTCase 16: the joint SSI is 1,491 - 1,580 < 0, so SSI is 0. The citizen's own 1,580 exceeds 1,233.94, so the supplement is 0. The unpaid citizen is an ineligible spouse, so the income is deemed. Federal min(994, -89) gives 0. State min(239.94, 607.83 - 89) = 239.94. This matches the law: the LPR has no income to deem, and the citizen's own income bars SSI/SSP.CPTCase 17: state min(239.94, 607.83 - 489) = 118.83.CPTCase 18: (2,000 - 20 - 65)/2 = 957.50 is deemed, because 2,000 > 497. Federal min(994, 533.50) + state 239.94 = 773.44.SSPTCase 11: 1,335.81 - 235 - 480 = 620.81 (x 12 = 7,449.72). The law gives 487 + 368.81, the same 855.81 in all.SSPTCases 12 and 13: 1,335.81 - 487 - 480 = 368.81 (x 12 = 4,425.72).SSPTCase 14: 1,233.94 - 780 = 453.94; SSA gives 214 + 239.94. CAPI: 2,098.83 - 1,580 - 453.94 = 64.89.SSPTCase 15: max(0, 1,980 - 864.89) = 1,115.11, so the supplement is 118.83. The law gives federal 0 and state min(239.94, 118.83) = 118.83. CAPI is 0.ca_capi.yamlCase 10: 2,057.83 + 257.74 = 2,315.57 (x 12 = 27,786.84). CAPI: 2,315.57 - 980 - 855.81 = 479.76 (x 12 = 5,757.12).
Tests run
All at the head (2467454e79), one folder at a time, with the snapshot package confirmed on the import path:
T/ssa/ssi: 246 passed.T/states/ca/cdss: 458 passed.T/hhs/medicaid: 835 passed.T/hhs/medicare/savings_programs: 92 passed.T/states/md/dhs: 129 passed.T/states/sc/scdhhs: 32 passed.T/states/ky/dcbs: 417 passed.T/local/ca: 867 passed.tests/policy/baseline/partners: 623 passed.- SA4 fix on a copy:
T/states/ca/cdss459 passed (with Case 16),T/local/ca867 passed. The head fails Case 16 (688.44 against 488.44). - Mutations: 3 runs; results under Investigated and cleared. All copies are deleted. The probe scripts are in
b3-pr10240-ssi-noncitizen-income-scratch/probes/.
Verdict
REQUEST_CHANGES: ten of the eleven round-1 items are resolved, including C1 and SA1-SA3, and G7 is acceptably deferred. One new should-address item is open (SA4, the mixed-couple gate on CAPI eligibility). Either the one-line fix with Case 16, or a #10482 entry with a NOTE, closes it. G8 is optional.
…izen-countable-income # Conflicts: # policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_eligible.yaml # policyengine_us/tests/policy/baseline/gov/hhs/medicaid/income/medicaid_optional_senior_or_disabled_countable_income.yaml # policyengine_us/tests/policy/baseline/gov/states/ca/cdss/capi/ca_capi.yaml # policyengine_us/tests/policy/baseline/gov/states/ca/cdss/capi/ca_capi_person.yaml # policyengine_us/tests/policy/baseline/gov/states/ca/cdss/capi/eligibility/ca_capi_income_eligible.yaml # policyengine_us/variables/gov/states/ca/cdss/capi/ca_capi_person.py # source_conflicts/candidates.yaml
…ibility; cite 416.1161 and 416.2025 Pavel's SA4 on PR 10240: the 416.1161(a)(2)-(3) exclusion needs a spouse who can receive CAPI, so a spouse who fails SSI's noncitizen test but is barred from CAPI (WIC 18938) has income deemed (Case 16). G8 adds the two rules the branch applies to the reference tuple. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reply to review 5711668382. Both items are addressed at head Paths:
The
The merge needs no Tests were not run locally; CI will run them. Update (head |
…izen-countable-income # Conflicts: # policyengine_us/tests/policy/baseline/gov/states/ca/cdss/capi/ca_capi.yaml
Summary
medicaid_optional_senior_or_disabled_countable_incomeandssi_countable_incomereturned $0 for anyone who was notis_ssi_eligible_individualoris_ssi_eligible_spouse.is_ssi_eligible_individualincludes SSI's citizen and qualified-noncitizen test, including the 40-quarter rule for lawful permanent residents. An aged, blind, or disabled person who failed only that test therefore had all income ignored by every program that reuses SSI methodology.Examples on
main(2025):mainis_medicaid_eligibletrueFix
The zero was meant for the deeming role: a spouse who is not aged, blind, or disabled has their income deemed to the other spouse (20 CFR 416.1163), so their own countable income must be zero to avoid counting it twice. This PR gates that zero on
is_ssi_aged_blind_disabledinstead of SSI eligibility status:medicaid_optional_senior_or_disabled_countable_income: Medicaid's ABD financial methodology follows SSI's (42 CFR 435.601) and counts the applicant's own income whether or not they meet SSI's noncitizen rules.ssi_countable_income: the medically needy path (is_medically_needy_for_medicaid) reads this variable, so it had the same bypass.defined_foronis_ssi_spousal_deeming_applies,ssi_income_deemed_from_ineligible_spouseandmedicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spousemoves fromis_ssi_eligible_individualtois_ssi_aged_blind_disabled. Without this, a noncitizen married to a working spouse who is not aged, blind, or disabled would have the spouse's income ignored.For citizens and qualified noncitizens nothing changes: the old and new gates differ only for aged, blind, or disabled people who fail SSI's noncitizen test. This PR does not touch any income limit or limit parameter.
Downstream effects
uncapped_ssiisdefined_for = "is_ssi_eligible", which still applies the noncitizen test.ssi_amount_if_eligibleandssi_pmv_amountchange for this group, butssidoes not. New SSI-based supplements onmain(the shared_ssi_state_supplementhelper for Ohio, Oklahoma and New Jersey, and Maryland MEAP) gate on SSI eligibility or receipt and are unchanged.mainits income test never reduces the benefit. With this PR it counts income; Pay California CAPI from the SSI/SSP standard per person, with spouse-to-spouse deeming #10379 makes CAPI's standard, couples and deeming match the law first.ca_capi_eligible_person; WIC 18938 bars undocumented people and TPS holders, Exclude undocumented and TPS immigrants from California CAPI eligibility (WIC 18938, MPP 49-020) #10482) and does, none of the CAPI-counted income is deemed (20 CFR 416.1161(a)(2)-(3)), so the supplement counts the recipient's own countable income rather than half of the couple's. If the spouse's income leaves no CAPI, it is deemed and the supplement is the lesser of the individual and couple totals (Case 15). POMS SI 01320.430 D compares the federal and state parts separately; the totals keep CAPI at zero there, so only the split between the supplement and CAPI can differ. A spouse who cannot receive CAPI gets no exclusion, so that spouse's income is deemed (Case 16). This gives SSA's totals in Cases 11, 14 and 15 and in Pay California CAPI from the SSI/SSP standard per person, with spouse-to-spouse deeming #10379's Cases 8 and 9, where the citizen's own income leaves no supplement and CAPI deems. The model's SSI is still the couple computation (Treat an aged, blind or disabled spouse who fails SSI's noncitizen test as an ineligible spouse, and base CAPI's mixed couple on actual SSI/SSP receipt #10481).receives_ssi, for example under an exception the model does not encode) gets the SSI that SSA pays: the individual rate for the living arrangement less own income, and under spouse deeming the lesser of that and the couple computation (20 CFR 416.1163(d)-(e)). In another person's household the one-third reduction applies to the couple rate as well as the individual rate (20 CFR 416.1131; POMS SI 01320.400 B.1.e), and a medical treatment facility resident gets the $30 rate. Their PAA is unchanged frommain($511 a month in the test cases with and without a working spouse). Unchanged for citizens and qualified noncitizens.ssi_in_kind_support_and_maintenance, for SSI reporters. CA San Bernardino and Orange County general relief read whetherca_capi > 0. CO SSP (clients outside an SSI couple computation), Idaho AABD, NE AABD, TX SSP, and Indiana RCAP and SAPN readssi_countable_incomebut require SSI receipt (ssi > 0orreceives_ssi; Indiana RCAP also admits Medicaid enrollment, and SAPN requires both). They change only for a person who reports SSI receipt while failing the model's noncitizen test: that person's own countable income now reduces the payment. Indiana RCAP also admits Medicaid-enrolled noncitizens, whose payment can fall (in one review example from $1,501.06 to $1,021.06 a month). No YAML or partner case has such a person.Merge order and overlaps
main(squash-merged 2026-10-30 as7f736e8f3a) and merged here. The four Pay California CAPI from the SSI/SSP standard per person, with spouse-to-spouse deeming #10379 files this PR changes kept this PR's side, because theirmainversions equal Pay California CAPI from the SSI/SSP standard per person, with spouse-to-spouse deeming #10379's3b9dd3b34b, which this branch already had;source_conflicts/candidates.yamltookmain's side; andchangelog.d/ca-capi-ssi-ssp-standard.fixed.mdis deleted, becausemain's release already compiled it.main(merged 2026-10-29), so the medically needy test uses the individual or couple;is_medically_needy_for_medicaid.yamlCase 13 checks that a noncitizen dependent parent's pension does not count against the head.ssi_countable_income, the spousal-deeming variables and the Medicaid countable-income variables into monthly twins that keep the old SSI-eligible gates. Whichever of Limit SSI spousal-deeming child allocations to the couple's co-resident children #10146 and this PR merges second ports the aged/blind/disabled gate (is_ssi_aged_blind_disabled, read withperiod.this_yearfrom a MONTH formula) into these five places:ssi_countable_income_monthly: theis_ssi_eligible_individual | is_ssi_eligible_spousegate.medicaid_optional_senior_or_disabled_countable_income_monthly: the same gate.is_ssi_spousal_deeming_applies_monthly:is_ssi_eligible_individual & (...).ssi_income_deemed_from_ineligible_spouse_monthly:where(is_ssi_eligible_individual, result, 0).medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse_monthly:where(is_ssi_eligible_individual, ...).The three annual deeming wrappers merge without a conflict marker, so check them by hand. This PR's YAML cases fail if any gate is missed.
ssi_countable_incomeMONTH without touching the gate lines, so it merges without a conflict marker. Whichever merges second readsis_ssi_aged_blind_disabledwithperiod.this_year, as for the Limit SSI spousal-deeming child allocations to the couple's co-resident children #10146 twins.main(merged 2026-10-29) and merged here.medicaid_optional_senior_or_disabled_countable_incomekeeps Update Medicaid aged, blind and disabled pathway disregards and asset limits (CA, CT, MN, MO, AR, OK, SC) #10364's California deductions and this PR's aged/blind/disabled gate. Inmedicaid_optional_senior_or_disabled_countable_income.yamlthis PR's two cases follow Update Medicaid aged, blind and disabled pathway disregards and asset limits (CA, CT, MN, MO, AR, OK, SC) #10364's, and inmsp_countable_income.yamlthis PR's case is now Case 20, after Apply state Medicare Savings Program asset limits and income exclusions (WA, CA, MN, IL, MS) #10360's Cases 6-19.mainand merged here: this PR's twomedicaid_optional_senior_or_disabled_countable_income.yamlcases follow Limit Arkansas's Medicaid aged, blind and disabled pathway to aged people, and apply Maine's savings exclusion and couple disregard #10386's, and itsis_medicaid_eligible.yamlcases are now Cases 21-23, after Correct Rhode Island pregnancy Medicaid routing and postpartum coverage #10391's Cases 17-20. Limit SSI spousal-deeming child allocations to the couple's co-resident children #10146 still rewrites theca_state_supplementcountable-income line this PR changes.is_medically_needy_for_medicaid.yaml: this PR's cases follow Count blind people and use the individual or couple in the Medicaid medically needy test #10370's (Cases 11-13). Update Medicaid medically needy limits and switch on AR, IA, IL, NJ and ND #10374 and Lower California's non-MAGI Medi-Cal asset limit to $21,000 / $31,000 on July 1, 2027 #10375 append to the same file; keep all cases and renumber.Tests
Regression cases in the variable-named files:
medicaid_optional_senior_or_disabled_countable_income.yaml: single LPR with 20 quarters; mixed couple with deemed spouse wagesmedicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.yaml: mixed couplessi_countable_income.yaml: single LPR (SSI stays $0); mixed couplessi_income_deemed_from_ineligible_spouse.yaml: deeming applies to the noncitizen spouseis_medically_needy_for_medicaid.yaml: an over-limit case, a case that qualifies after spenddown, and a noncitizen dependent parent's pension that does not count against the headis_medicaid_eligible.yamlCases 21-23: the MA and DC examples above, plus a low-income LPR who stays eligibleca_capi.yaml: an aged LPR without 40 quarters whose $24,000 pension leaves no CAPI; a mixed couple with income whose CAPI the model now computes ($479.76 a month in 2025)ca_capi_person.yamlCases 16 and 17: Pay California CAPI from the SSI/SSP standard per person, with spouse-to-spouse deeming #10379's Cases 8 and 9 with the CAPI member as tax-unit head; the supplement counts the citizen's own income, so the citizen is paid nothing and CAPI deems ($239.94 and $118.83 a month); Case 18: a spouse who is not aged, blind or disabled earns $2,000 a month, above the deeming threshold, so CAPI is $773.44msp_countable_income.yamlCase 20: spouse wages are deemed to a permanent resident without 40 quarters; SC OSSintegration.yamlCase 8: a counted pension above the net income limitca_state_supplement.yamlCase 10: an aged citizen SSI recipient sharing an SPM unit with a CAPI-eligible sibling keeps the citizen-alone supplement ($368.81 a month in 2025); Case 11: an aged citizen married to a CAPI-eligible spouse, the citizen's own income counted ($620.81 a month); Case 12: an undocumented sibling who is not CAPI-eligible does not reduce the supplement; Case 13: nor does a married CAPI couple in the unit; Case 14: a mixed couple where both have income ($453.94 supplement, $64.89 CAPI); Case 15: a CAPI spouse whose $2,000 pension leaves no CAPI, so it is deemed ($118.83 supplement); Case 16: an undocumented spouse who cannot receive CAPI, whose $700 pension is deemed ($488.44 supplement)md_paa.yamlCase 11: an aged LPR without 40 quarters in CARE Home Level D with a working spouse gets $998 a month ($1,478 need less the person's own $480); Case 12: the same person reporting SSI receipt, with no spouse, gets the imputed SSI ($967 − $480 = $487; PAA $511); Case 13: with a working spouse, SSA pays min($1,450 − $947.50, $967 − $480) = $487, so PAA stays $511; Cases 14-16: the couple computation binds ($2.50 imputed), the one-third reduction on the couple rate ($509.17), and the $30 medical-facility ratessi_countable_incomeand deeming inputs this PR now computes are removed where the case has the underlying income; the remaining pins say they isolate the CAPI formulaca_sf_caap.yamlCase 15 is updated to the expectations its own comment predicted once CAPI counted income (budget unit size 2, countable income $2,000, grant $0).No partner contract test (
tests/policy/baseline/partners/**) is affected. I did not run the tests locally; CI will validate them.Local reviews
The 2026-10-19 review found six critical downstream defects that the old $0 had masked; a second review on 2026-10-26 checked the fixes and the main merge.
ca_state_supplement.py)Review round 1 (2026-10-27)
main, merged here); Case 13ca_capi_person.yamlCases 16-18Review round 2 (2026-10-30)
ca_capi_eligible_person;ca_state_supplement.yamlCase 16ca_state_supplement's referencesca_capi.yamlCase 5 takes #10519's $14,807.28 (cooking facilities by default);ca_capi.yamlCase 10 andca_state_supplement.yamlCases 10-13 setliving_arrangements_allow_for_food_preparation: false, keeping their no-cooking valuesKnown limitations (not changed here)
ssi_claim_is_joint,is_ssi_eligible_spouse) ignores the noncitizen test. A citizen married to an aged, blind, or disabled noncitizen who fails the test is treated as an eligible couple, not as an eligible individual with an ineligible spouse (Apply 416.1163(e)(2) to deemed SSI and identify SSI couples by marriage, not tax roles #10141 identifies SSI couples by marriage but keeps the aged/blind/disabled test). Inca_state_supplement.yamlCase 11 the model pays the citizen $235 SSI and $620.81 supplement; SSA pays $487 + $368.81. The total, $855.81, and CAPI ($479.76) are the same, because SSA deems none of the CAPI spouse's income (20 CFR 416.1161(a)(2)-(3); POMS SI 01320.141 A). Where the model's joint SSI exceeds the citizen's individual amount, the citizen's total is too high. Treat an aged, blind or disabled spouse who fails SSI's noncitizen test as an ineligible spouse, and base CAPI's mixed couple on actual SSI/SSP receipt #10481 tracks the fix.is_ssi_ineligible_parent) also keys on aged, blind or disabled status, so such a parent who is not eligible for SSI deems nothing to an eligible child (20 CFR 416.1160(d), 416.1165). Added to Fix SSI spousal deeming for in-kind support and for aged, blind or disabled spouses who are not eligible #10243.ssi_amount_if_eligible, which is the couple rate whenever spouse deeming applies, with no 20 CFR 416.1163(e)(2) cap (Apply 416.1163(e)(2) to deemed SSI and identify SSI couples by marriage, not tax roles #10141 adds it for SSI), and their PAA countable income includes the deemed income. This is unchanged here (Maryland PAA: drop spouse deeming and cap the imputed SSI for citizens (COMAR 07.03.07.07, .09A) #10544).axiom: TheAxiomFoundation/rulespec-us#1940 queued
🤖 Generated with Claude Code