Repository navigation
Restore the part-year facility-stay test cases now that SSI follows each month's facility status - #10856
Conversation
…ach month's facility status PR 10820 (38a3927) makes SSI combine a couple's income by each month's facility status, so the workarounds added while SSI used December's status can go: - msp_fpg.yaml Case 4: the stay runs from July through December again; expected values are unchanged. Delete the NOTE in _msp_spouse_income.py. - is_medically_needy_for_medicaid.yaml Case 45 (from PR 10640): assert ssi_countable_income again, as [14_320, 27_320], the reviewer's corrected figure (round-3 G12); 20,880 each was the figure with no stay. Also take the reviewer's optional round-3 suggestions on PRs 10633 and 10820: - Candidate us-tx:msp-spouse-deeming-allowance starts in 2025, from Revision 25-2 of Texas MEPD Appendix XXIX, and cites 42 U.S.C. 1396a(r)(2)(A). - The Maryland PAA and Medicaid optional pathway part-year cases give person1 12,000 of earned income, pinning each reader's earned line: [17_370, 5_760]. - Two SSI test names date the change from the first full month in a facility. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # policyengine_us/tests/policy/baseline/gov/hhs/medicaid/income/medicaid_optional_senior_or_disabled_countable_income.yaml
PR Review: Restore the part-year facility-stay test cases now that SSI follows each month's facility statusSummaryThis is a test-and-comment follow-up to #10633, #10640 and #10820 (the fix for #10818), at head What the PR does:
I checked every changed or restored expectation by hand against I found nothing critical and nothing that needs to change before merge. There are two optional suggestions. Critical (must fix)None. Should addressNone. Suggestions
Verified correctAll monthly figures below come from my hand traces of the formulas on Test inputs carry forward. 1.
2.
3.
4. Removing the NOTE in
5. No formula changed. Every non-test file in the diff:
6. Test renames. The 7. Texas candidate sources.
8. Other checks.
Axiom line assessment
The current head CI statusRe-checked near the end of the review: 28 pass, 10 pending, 0 failing.
Branch status0 commits behind Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Approving. The restored cases check by hand now that SSI follows each month's facility status: msp_fpg.yaml Case 4's stay runs through December again (June: two-person guideline, $2,480, no tier; July: one-person, $980 and $1,480), Case 45 asserts ssi_countable_income of [14,320, 27,320] month by month, and the Maryland PAA and Medicaid-optional cases now pin the earned line too. By my reading, each would fail on main before #10820. The removed NOTE in _msp_spouse_income.py is accurate to remove, no formula changed, and the three Axiom issues match. Two optional suggestions: rename Case 4 to "first full month", matching the SSI renames, and update the Texas candidate's "$497" note. CI was green on every changed file at 3c109bf46b, with the contributed-reform and microsimulation jobs still running.
Follows up #10633, #10640 and #10820 (the fix for #10818). No formula, parameter or variable changes.
What and why
#10633 ended the facility stay in
msp_fpg.yamlCase 4 before December and added a NOTE to_msp_spouse_income.py, because SSI then combined a couple's income by December's facility status for the whole year (#10818). Its description said both would go back once #10820 was onmain. #10820 merged as38a392741c, so this PR lets the stay run through December and deletes the NOTE.For the same reason, #10640 dropped the
ssi_countable_incomeassertion from Case 45 ofis_medically_needy_for_medicaid.yaml(New York, a stay from January to June) and said to restore it as 20,880 each. The reviewer's round-3 review of #10640 (G12) corrected that figure: 20,880 is the figure with no stay. This PR restores the assertion with the value the model gives, [14,320, 27,320], which matches the reviewer's arithmetic.It also takes four optional suggestions from the reviewer's approving round-3 reviews of #10633 and #10820. The carried-over suggestions from those reviews are not in this PR.
Changes
msp_fpg.yamlCase 4. person2's stay now runs from July through December: the two2026-12: falseinputs are gone, and the comment about the old SSI behavior is replaced by June's SSI arithmetic. Expected values are unchanged. In June both spouses are at home, so SSI combines their income (20 CFR 416.1802(b)(1)): $1,000 + $1,500 - $20 = $2,480, above the $1,491 couple rate, so neither spouse is eligible for SSI. Each spouse's income is then above the $497 rate difference and is deemed: $2,480, above the QI-1 couple limit of 1.35 x $21,640 / 12 = $2,434.50, so two-person guideline $1,803.33 and no tier. From July person2 is in the facility (416.414(b)(3)) and each spouse is tested alone: person1 $980, one-person $1,330, QMB; person2 $1,480 and not on Medicare._msp_spouse_income.py. Deletes the four-line NOTE that said SSI attributes a couple's income by the year's last month. Comment only.us-tx:msp-spouse-deeming-allowance(stillstate: open; no ruling, no marker):years.frommoves from 2026 to 2025. Revision 25-2 of Texas MEPD Handbook Appendix XXIX (effective June 1, 2025; "information is effective March 1, 2025") has the same steps with 2025 amounts: "Community MEPD $483, CAS $483, QMB $458, SLMB $550, QI-1 $619", against SSI's $1,450 - $967 = $483. The archived revision is added as a second manual source, and the question gives both years' amounts.md_paa_countable_income.yamlCase 4; the facility case at the end ofmedicaid_optional_senior_or_disabled_countable_income.yaml). person1 also hasssi_earned_income: 12_000, so each case now pins the earned-income line of its reader as well as the unearned one. Expected values go from [11,760, 5,760] to [17,370, 5,760]:ssi_marital_earned_incomeinstead, January to June would give person2 the couple's $1,000 a month of earnings, $6,000 for the year, and person2 would get $5,760 + ($500 - $65) / 2 x 12 = $8,370 (traced from the code, not run).is_medically_needy_for_medicaid.yamlCase 45 (from Apply each state's rule for a Medicaid applicant whose spouse is not aged, blind or disabled #10640; round-3 G12). The case assertsssi_countable_income: [14_320, 27_320]again, and the comment above it now gives that arithmetic instead of saying to restore 20,880 later.ssi_countable_incomefollows each month's status:ssi_marital_earned_income.yamlandssi_marital_unearned_income.yaml, "... before one spouse enters a medical facility" becomes "... before one spouse's first full month in a medical facility": the month of entry is still combined, and the separate computation starts with the first month the spouse is in the facility "as of the beginning of the month and stay[s] the entire month" (20 CFR 416.414(a)(1); POMS SI 02005.050 D.1). Inputs and expected values are unchanged.changelog.d/msp-post-merge-followups.changed.md.Expected values changed
md_paa_countable_income.yamlmd_paa_countable_incomemedicaid_optional_senior_or_disabled_countable_income.yamlmedicaid_optional_senior_or_disabled_countable_incomeis_medically_needy_for_medicaid.yamlssi_countable_incomeNo other expected value changes.
msp_fpg.yamlCase 4 keeps all six of its expected values with the longer stay, and Case 45 keeps its other five outputs.Test plan
mainat47c4e8720b(3c109bf46b): 125 cases (msp_fpg.yaml4,md_paa_countable_income.yaml4,medicaid_optional_senior_or_disabled_countable_income.yaml52,ssi_marital_earned_income.yaml5,ssi_marital_unearned_income.yaml5,is_medically_needy_for_medicaid.yaml55), one process, policyengine-core from the lockfile. That merge resolved one conflict inmedicaid_optional_senior_or_disabled_countable_income.yaml, keeping this PR's part-year case and the two California cases Deduct a California couple's dependents' premiums whatever their marital unit #10855 added after it. Before the merge, onmainat28009dbefa, the same files passed 123 cases. No other test file was run; CI covers the rest.test_source_conflicts.pywas not run locally. The editedcandidates.yamlparses, its 438 ids are unique, and the new sources have valid kinds and https links (read). CI runs the guard.ruff format --checkandruff check(0.15.5) pass on_msp_spouse_income.py.changelog.d/.Not in this PR
msp_fpg, a comment at the_ssi_spouse_indexcall, a case whose stay ends before December, a June assertion inky_ssp_countable_income.yaml, and the cost of the spouse test on every monthly call.axiom: TheAxiomFoundation/rulespec-us#2010 (Medicare Savings Program spouse rules, extended), TheAxiomFoundation/rulespec-us#2012 (Medicaid applicant with a spouse who is not aged, blind or disabled, extended) and TheAxiomFoundation/rulespec-us#2191 (SSI couple income around a facility stay, extended), queued
🤖 Generated with Claude Code