Skip to content

Apply resource and immigration eligibility rules to South Carolina’s Optional State Supplementation - #11514

Draft
MaxGhenis wants to merge 4 commits into
mainfrom
sc-oss-resource-and-immigration-tests
Draft

MaxGhenis wants to merge 4 commits into
mainfrom
sc-oss-resource-and-immigration-tests

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Agent-written for Max, by a Codex cloud task and Claude Code for Max Ghenis; no person has reviewed it yet.

What and why

South Carolina’s Optional State Supplementation program tests countable resources at the first moment of each month and applies SSI citizenship and immigration rules. The individual ceiling is $2,000. When a co-resident spouse does not apply, that spouse’s countable resources count toward the applicant’s, and the $3,000 couple ceiling applies. Two spouses who live in the facility and both apply are each held to the individual ceiling. Apply these tests in sc_ssi_state_supplement_eligible.py:31–:55. Reg. 126-920(A)(3) and (5) adopt the SSI resource limits and other SSI eligibility criteria, and Reg. 126-920(B) treats two resident applicants as individuals. MPPM §403.06 gives the individual ceiling, and §402.27.02 counts unrestricted bank balances. South Carolina regulation, PDF pp. 28–29 · MPPM Chapter 403 · MPPM Chapter 402 · 20 CFR §416.1205

sc_ssi_state_supplement_countable_resources.py counts each person’s bank accounts, stocks, bonds and second home equity at the start of the month. A monthly balance carries forward within its calendar year. Before the first monthly balance, the model uses the annual balance, or zero when none is reported. A negative balance counts as $0 and does not offset other assets. Secured debt reduces second home equity. A supplied ssi_countable_resources value replaces this estimate, so adjudicated exclusions and ownership rules can be entered directly. The eligibility test rounds the resource total to cents before comparing it with the ceiling. Deeming leaves out the spouse’s excluded military resources. Facility residents count as applicants unless sc_ssi_state_supplement_applies is false. sc_ssi_state_supplement_spousal_deeming_exempt takes the institutional deeming exception as an input. The model does not encode that exception’s criteria. MPPM Chapter 402 · 20 CFR §§416.1201, 416.1202 and 416.1207

Core keeps one value per year for annual asset inputs such as bank_account_assets, and the situation builder fills omitted quarters with 40. sc_oss_inputs.py copies dated asset balances and supplied quarters into separate OSS inputs, and social_security_inputs.py calls it when it builds a situation from household inputs.

sc_ssi_state_supplement_immigration_eligible.py requires a noncitizen to hold a qualified status and an SSI eligibility pathway. A lawful permanent resident passes with at least five years in qualified status and at least 40 credited quarters. Refugees, asylees, people granted withholding of deportation and Cuban or Haitian entrants pass within seven years of the status grant. A qualified noncitizen with an explicit is_veteran input of true passes under the military exception. Other qualified statuses, such as one-year parole, pass only through that exception. Undocumented, DACA and TPS statuses fail. Omitted status defaults to citizen at immigration_status_str.py:10. Omitted quarters count as zero for OSS. Time in status comes from years_since_us_entry, which defaults to five. Exact grant dates, status histories the inputs do not describe, and other military or grandfathering pathways need the adjudicated result supplied as sc_ssi_state_supplement_immigration_eligible. SCDHHS OSS program eligibility · MPPM §102.04 · S.C. Code §8-29-10 · SSA POMS SI 00502.100 · SI 00502.106 · SI 00502.135 · SI 00502.140

#10639 and #10532 change zero OSS files. #10639 rounds the federal resource test, and #10532 changes federal SSI income calculations. #11432 changes OSS income and payment. It overlaps this PR in the eligibility formula and its citations, and it adds its own policyengine_us/tools/sc_oss_inputs.py with income-input helpers. Combining the two should keep #11432’s state countable income in eligibility and payment alongside these resource and immigration tests, and should keep both PRs’ helpers in that file.

Test plan

The January 2026 cases use the $20 general income disregard in MPPM §403.05.03A, and the $1,804 net income limit and $105 other-income personal needs allowance in bulletin 26-001. MPPM Chapter 403 · SCDHHS 2026 COLA bulletin, CRCFs

Case Main eligibility and monthly payment Branch eligibility and monthly payment
Exactly $2,000 in countable resources Eligible, $324.00 Eligible, $324.00
$2,001 in countable resources Eligible, $324.00 Ineligible, $0.00
Undocumented facility resident Eligible, $330.20 Ineligible, $0.00
  • All 23 resource and immigration cases pass, including the three in the table. The others cover a $2,000 total split across three assets, a one-cent excess, separate January and February balances, a checking overdraft, second home equity with and without secured debt, spousal deeming and its exemption, two resident applicants, the LPR five-year and 40-quarter tests, the refugee seven-year window, one-year parole, the veteran exception and omitted quarters.
  • Disabling any one of 12 rules, from the cent comparison to the OSS quarters input, makes its regression case fail.
  • The existing OSS payment, integration, eligibility and PNA files pass (32 cases). The South Carolina LIHEAP countable income file and the school meal countable income file pass (47 cases).
  • The source-conflict guard and the core input builder test pass. The OSS regulation and manual support both eligibility tests.
  • test_social_security_input_state_machine.py fails with a NameError. Its test backend loads the definitions in social_security_inputs.py but not that file's imports, so the call to preserve_sc_oss_inputs has no definition there. All other Python tests pass.
  • make format and ruff check pass.
  • Changelog fragment added.

axiom: needed

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits December 1, 2026 02:58
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.22222% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.45%. Comparing base (8999568) to head (57cdfa8).
⚠️ Report is 414 commits behind head on main.

Files with missing lines Patch % Lines
...ent/sc_ssi_state_supplement_countable_resources.py 92.85% 1 Missing and 1 partial ⚠️
...ement/sc_ssi_state_supplement_credited_quarters.py 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main   #11514      +/-   ##
===========================================
- Coverage   100.00%   97.45%   -2.55%     
===========================================
  Files            1       10       +9     
  Lines           24      157     +133     
  Branches         0        2       +2     
===========================================
+ Hits            24      153     +129     
- Misses           0        2       +2     
- Partials         0        2       +2     
Flag Coverage Δ
unittests 97.45% <97.22%> (-2.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

MaxGhenis and others added 2 commits December 1, 2026 16:11
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

1 participant