Skip to content

Count gross unemployment compensation and Social Security in South Carolina TANF - #9687

Open
DTrim99 wants to merge 21 commits into
mainfrom
sc-tanf-gross-ui-ss
Open

DTrim99 wants to merge 21 commits into
mainfrom
sc-tanf-gross-ui-ss

Conversation

@DTrim99

@DTrim99 DTrim99 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #9677

South Carolina TANF counted only the federally taxable parts of unemployment compensation (taxable_unemployment_compensation) and Social Security (taxable_social_security). SC DSS counts both at their gross amounts. This PR swaps the two entries in gov.states.sc.tanf.income.unearned for the gross variables:

These are the same variables the federal TANF list and the CO, DC, IL, ME, MO, MT, NC, ND, and TX TANF lists use. SC CCAP already uses them too. No other SC TANF variable reads UC or Social Security, and nothing else in the list overlaps with either variable, so nothing is counted twice.

Stacked on #9558 (merge that first) — the diff includes #9558's commits until it merges.

Sources

SC DSS TANF Policy Manual (Volume 65), Section 7.7, Sources of Income chart:

  • SSA benefits: unearned, "Count gross amount. This includes Medicare premium but does not include recoupments."
  • Unemployment compensation benefits (UCB): unearned, Count = Y, "This includes Pandemic Emergency Unemployment Compensation and/or Pandemic Unemployment Assistance." The manual makes no carve-out for the federally taxable share.

I added both pages to the parameter's references.

Before and after (monthly sc_tanf)

Household Before After Arithmetic (after)
2020, parent + child, $6,000 UC (below the $10,200 exclusion) $237.59 $68.99 (704.58 − 500) × 0.3372
2020, parent + 3 children, $12,000 UC (taxable $1,800) $311.21 $24.59 (1,072.92 − 1,000) × 0.3372
2025, parent + child, $6,000 SSDI (taxable SS $0) $344.58 $142.28 (851.67 − 500) × 0.4046
2025, parent + child, $12,000 SSDI (taxable SS $0) $344.58 $0 1,000 ≥ 851.67 need standard
2025, parent + 2 children, $3,600 SSDI + $2,400 UC $354.36 $232.98 (1,075.83 − 500) × 0.4046

The UC change only matters in tax year 2020, when §85(c) excluded up to $10,200 of UC. In every other year, taxable UC equals gross UC for these households. The Social Security change matters in every year. Low-income TANF households almost always have provisional income below the $25,000 base amount, so their taxable Social Security is $0 and SC TANF used to ignore their benefits entirely. Expect lower SC TANF benefits and fewer eligible units in microsimulation. I did not run microsim locally.

Tests

policyengine_us/tests/policy/baseline/gov/states/sc/tanf/integration.yaml:

  • Case 5 now takes social_security: 3_600 as input instead of taxable_social_security, since taxable SS is no longer read. The expected $223.20 does not change.
  • New Cases 9–13, appended at the bottom, cover the five households in the table. Each checks taxable vs gross UC/SS, sc_tanf_gross_unearned_income, sc_tanf_countable_income, sc_tanf_income_eligible, and sc_tanf, with the arithmetic in inline comments.

The SC TANF folder passes locally (40/40).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH

DTrim99 and others added 6 commits September 21, 2026 14:28
Rebase of PR #8303 onto current main under new ownership (original
author has left PolicyEngine). Adds modeled_state_unemployment_compensation
(sums al_ui, nj_unemployment_insurance, ny_ui, ok_ui, pa_uc, ut_ui) and
total_unemployment_compensation (reported-wins fallback), repoints the
direct consumers of unemployment_compensation - including the
household_benefits parameter list - and extends the five state UI
integration suites with income-flow, reported-preservation, and
no-double-count cases.

Resolves the uprating/adds computation-mode conflict Pavel flagged on
#8303 via Option A: unemployment_compensation stays a pure uprated
survey input, so CPS-reported values and future-year uprating are
untouched and modeled UI reaches income flows only when no reported
amount is present. NJ UI, modeled on main after #8303 was opened, is
included in the modeled aggregate as part of the rebase.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…sation

Per review: migrate every income-source list under parameters/gov/ (SNAP,
TANF, SSI, WIC, school meals, Head Start, HUD, CBO, CCAP, state tax lists
and the VA subtraction) and four contrib reform benefit lists from the
reported unemployment_compensation input to total_unemployment_compensation.
Document the reported-zero rule, fold two always-true source appends into
direct substitutions, and add low-income SNAP, NJ, asymmetric-household,
monthly and reported-zero tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Sum modeled state UI through a year-gated parameter list so each program
counts from its first verified year. Before 2022 the list is empty, so
pre-2015 simulations (e.g. the 2010 Alabama SSP cases reached via SSI
unearned income) no longer reach state UI parameters that start later.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…s through

Add year-gate tests for states before and after they enter the
modeled-UI list (AL 2023 and 2010, NY 2024, OK 2022, and PA/UT/NJ
excluded years), SSI/TANF and taxable-SS-MAGI flow tests, and treat any
nonzero reported unemployment compensation (including negative amounts)
as reported, as on main. Have Virginia subtract taxable UC, count strike
benefits in Hawaii child care, fix a reference comma, and clarify the
year-gate docs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
The SC TANF unearned income list now reads total_unemployment_compensation
and social_security instead of the taxable amounts, per SC DSS TANF Policy
Manual Section 7.7 (SSA benefits count at the gross amount; unemployment
benefits count in full).

Closes #9677

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (aef5707).
⚠️ Report is 436 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9687   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         2    -2     
  Lines           76        26   -50     
  Branches         2         0    -2     
=========================================
- Hits            76        26   -50     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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.

@DTrim99
DTrim99 marked this pull request as ready for review September 30, 2026 00:44
@DTrim99
DTrim99 requested a review from hua7450 September 30, 2026 00:44
DTrim99 and others added 4 commits October 5, 2026 09:49
…nd SNAP UI paths

Resolve conflicts with main's restructured dependent gross income
(#9691) and SNAP months-of-receipt UI exemption (#9716): use main's
structure, reading total_unemployment_compensation (reported, or modeled
state UI when none is reported) in DEPENDENT_GROSS_INCOME_SOURCE_OVERRIDES
and unemployment_compensation_months.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
…nd SNAP UI paths

Resolve conflicts with main's restructured dependent gross income
(#9691) and SNAP months-of-receipt UI exemption (#9716): use main's
structure, reading total_unemployment_compensation (reported, or modeled
state UI when none is reported) in DEPENDENT_GROSS_INCOME_SOURCE_OVERRIDES
and unemployment_compensation_months.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Main's #9716 limits the SNAP work-registration UI exemption to the months
of receipt (26 weeks -> 6 months), so outside those months the PA adults
in these cases hit the ABAWD time limit and 7 CFR 273.11(c)(2)(ii)
prorates their income. Update the two expectations with the arithmetic;
no code change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Same expectation updates as #9558 (this branch carries #9558's modeled
state UI change): main's #9716 limits the SNAP work-registration UI
exemption to the months of receipt, so the PA adults hit the ABAWD time
limit outside them. No code change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Resolve the Arkansas gross income source lists and the Michigan household
resources list against main's restructured lists (estate, Schedule F and
gambling income; MI-1040CR line comments), keeping this branch's
total_unemployment_compensation in place of unemployment_compensation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
@hua7450

hua7450 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Waiting for #9558 to merge first, then I’ll approve this one.

DTrim99 and others added 2 commits October 12, 2026 15:27
Resolve the Arkansas gross income source lists and the Michigan household
resources list against main's restructured lists, keeping
total_unemployment_compensation in place of unemployment_compensation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
@MaxGhenis

Copy link
Copy Markdown
Contributor

Heads-up on overlap: #10184 (opened today) also fixes the South Carolina TANF unearned income list, and it touches the same lines as this PR.

It rebuilds the whole list from the Section 7.7 chart in the TANF Policy Manual (Volume 67, July 2026; chapter 7 is unchanged from Volume 65 apart from a one-page shift). It covers this PR's Social Security and UC swap plus the rest of what #9677 asked about ("check the manual for any SSA-specific exclusions"):

  • gross pensions and interest;
  • adds child support, alimony, VA, workers' compensation, disability insurance, survivor and railroad retirement benefits, and cash contributions;
  • drops IRA/401(k) withdrawals, since Section 6.6 counts those balances as resources, and drops discharged debt;
  • moves farm income to earned;
  • applies the $400-a-year interest and dividend exclusion;
  • excludes SSI recipients' income.

It doesn't depend on #9558, so it uses unemployment_compensation (gross reported UC, the gross amount on main today). It also moves the file to income/unearned/sources.yaml.

Whichever lands second can be rebased:

Merge order is up to you and the US hub; I'm not pushing to this branch.

DTrim99 and others added 4 commits October 12, 2026 22:25
Main's code-health test pins the AR1000F line for every Arkansas gross
income source; the unemployment line (21 from 2018) now reads
total_unemployment_compensation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Thirteen readers that later merges of main brought in still read the
reported-only unemployment_compensation input, so they missed modeled state
UI when nothing was reported:

- the student loan interest ALD MAGI and the two IRA deduction MAGI
  formulas (ira_219g_magi, ira_219g_taxable_social_security), which now
  append total_unemployment_compensation. The total never reaches AGI, so
  there is no cycle;
- ten parameter source lists: NY HEAP, NJ LIHEAP, IN EAP, KS LIEAP,
  KY LIHEAP, MD MEAP, MO SAB, MS LIHEAP, NC LIEAP and OR LIHEAP.

Each reader gets regression cases in its own test file: a modeled-UI case
plus a reported-UI control where the state models UI (PA for the federal
MAGI formulas, NY, NJ), and a reported-UI control elsewhere. The two IRA
variables get new test files named for them.

Add a code-health guard that fails when a parameter list entry or a Python
string constant names the raw input, with an allowlist for uprating, the
TAXSIM generator and the total's own formula. Add a microsimulation guard
that modeled state UI is zero on the certified default build in 2025.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
DTrim99 and others added 3 commits October 13, 2026 13:51
Keep main's California SSP values in spm_unit_benefits.yaml alongside the
modeled-UI case, and route the two unemployment compensation readers that
main added through total_unemployment_compensation: the Montana dependent
gross income subtraction (#9585) and the Montana elderly credit add-back,
so they match dependent_gross_income and count modeled state UI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
#9558 is merged. Drop its two changelog fragments, which main's release
already consumed, so this PR's diff is only the South Carolina TANF
change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
@DTrim99

DTrim99 commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

@hua7450 #9558 has merged. This branch now merges current main (360c432) and drops #9558's two changelog fragments, which main's release had already consumed. The diff is now only the South Carolina TANF change: sc/tanf/income/unearned.yaml (gross total_unemployment_compensation and social_security, per TANF Policy Manual § 7.7), its integration cases, and this PR's changelog fragment. The 40 SC TANF cases and the unemployment-reader guard pass locally.

Heads-up: Max's #10184 rewrites the same unearned list from the July 2026 manual, so whichever merges second will need a small rebase.

@hua7450

hua7450 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

The two failing tests in the Python/variables CI job also fail on main and are unrelated to this PR's South Carolina TANF changes. I've opened #10221 to fix both separately; all 222 focused tests pass locally with those fixes.

Pick up main's fix for the CMS health-input uprating test that main briefly
broke when #10084 and #10085 landed separately.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH

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.

South Carolina TANF counts taxable UC and taxable Social Security instead of gross amounts

3 participants