Repository navigation
Conversation
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
…-flow-integration
…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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…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
|
Waiting for #9558 to merge first, then I’ll approve this one. |
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
|
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"):
It doesn't depend on #9558, so it uses Whichever lands second can be rebased:
Merge order is up to you and the US hub; I'm not pushing to this branch. |
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
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
|
@hua7450 #9558 has merged. This branch now merges current Heads-up: Max's #10184 rewrites the same unearned list from the July 2026 manual, so whichever merges second will need a small rebase. |
|
The two failing tests in the Python/variables CI job also fail on |
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
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 ingov.states.sc.tanf.income.unearnedfor the gross variables:taxable_unemployment_compensation→total_unemployment_compensation(reported UC, or modeled state UI when none is reported, from Integrate modeled state unemployment insurance into income flows #9558)taxable_social_security→social_security(sum of retirement, disability, survivors, and dependents benefits; excludes SSI)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:
I added both pages to the parameter's references.
Before and after (monthly
sc_tanf)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:social_security: 3_600as input instead oftaxable_social_security, since taxable SS is no longer read. The expected $223.20 does not change.sc_tanf_gross_unearned_income,sc_tanf_countable_income,sc_tanf_income_eligible, andsc_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