Repository navigation
Conversation
The SC TANF unearned income list was copied from the IRS gross income sources, so it counted only the taxable part of Social Security, unemployment compensation, pensions and interest. The TANF Policy Manual (Volume 67, Sections 7.1 and 7.7) defines income as money received from any source and counts SSA benefits at their gross amount. Rebuild the list from the Section 7.7 chart: gross Social Security, unemployment compensation, pensions and interest; add child support, alimony, veterans benefits, workers' compensation, disability insurance, survivor and railroad retirement benefits and cash contributions; drop retirement account distributions (Section 6.6 counts the balances as resources) and discharged debt; move farm income to earned income. Apply the $400 per benefit group annual exclusion of interest, dividends and royalties, and exclude SSI recipients' income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add YAML tests for gross Social Security and 2020 unemployment compensation, gross pensions, the non-taxable sources the chart counts, the excluded retirement distributions and discharged debt, farm income as earned income, the $400 interest and dividend exclusion and its sharing across the benefit group, and SSI recipients. Integration Case 5 now enters Social Security instead of its taxable part, and Case 9 works a full benefit from child support, a child's Social Security and interest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check, over generated benefit groups in one vectorized simulation, that gross unearned income matches a reference written from the manual's Section 7.7 chart, that the $400 interest and dividend exclusion is conserved across members and never exceeds a member's own interest and dividends, that retirement withdrawals, discharged debt and wages are ignored, that SSI recipients count nothing, and that unearned income is monotone in interest. YAML cannot express these identities over arbitrary member mixes. Locally: 25 s of test time, 976 MB peak RSS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address the independent review of 530cc15: - Section 3.6 (page 56) excludes an SSI recipient living with the benefit group, not only his or her income. Add sc_tanf_benefit_group_size and sc_tanf_need_standard (50% of the poverty guideline for that size, Section 8.15) and use the need standard in the payment, the need test and the gross income limit, so an SSI member's needs are no longer counted while their income is excluded. - Floor each member's interest and dividends at zero before the $400 exclusion, so negative interest cannot offset other income. - Read dividends through dividend_income, which also carries legacy dividend inputs. - Count guaranteed income and trust income, which are money received (Section 7.1); estate settlements remain resources. - Keep counting retirement account withdrawals, now at the gross amount: the manual counts IRA balances as resources but does not say periodic withdrawals are not income. Tests that set spm_unit_size now set the benefit group size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Volume 67's table lists the 2025 guideline; the January 2025 property test uses the October 2024 guideline from Volume 65 (PDF page 132). Docstring and comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10184 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 10 +6
Lines 76 147 +71
Branches 2 2
=========================================
+ Hits 76 147 +71
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:
|
Address the re-review of 39248f1: - Sections 3.6 and 7.7 exclude the SSI recipient's resources as well as income and needs. Add sc_tanf_countable_resources, which subtracts SSI recipients' own bank, stock and bond assets from spm_unit_cash_assets (as Missouri's TANF does), and use it in the resource test. An aggregate-only asset input is counted as given. - Count estate_income only when positive, through a positive_sources list: a pass-through loss is not money received (Section 7.1) and could otherwise offset a pension or another member's income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#9558 merged, so income flows read total_unemployment_compensation (reported UC, or modeled state UI when none is reported), and the unemployment reader guard now requires it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-3 review (approved 4b419e5) noted that the money-received reading behind the estate floor applies equally to the other net amounts in the list. Move capital gains, rental, farm rent, partnership/S-corp and miscellaneous income into positive_sources with estate income, so a net loss counts as zero instead of offsetting another source or another member's income (Section 7.1; Section 8.16 allows no such deduction). This netting predates the PR: main summed these sources with their signs. Also read each positive source with add() so any entity works, and put the property test's list comments above their lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off to the US + core hub.
|
Summary
gov.states.sc.tanf.income.unearnedwas copied from the IRS gross income sources (gov.irs.gross_income.sourcesminus its earned items). So South Carolina TANF counted only the federally taxable part of Social Security (taxable_social_security, usually $0 for TANF families), unemployment compensation (2020: up to $10,200 excluded under IRC 85(c)), pensions, interest and retirement account withdrawals. It also counted discharged debt. It left out child support, alimony, VA benefits, workers' compensation and other cash income the TANF Policy Manual counts.This PR rebuilds the list from the manual's Section 7.7 chart at gross amounts and applies the chart's two rules that touch unearned income:
What the manual says
SC DSS TANF Policy Manual, Volume 67 (effective August 1, 2026). Chapter 7 is word for word the same as Volume 65, which the repo cited before, apart from a one-page shift. PDF page numbers:
Changes
taxable_social_securitysocial_security(gross)taxable_unemployment_compensationtotal_unemployment_compensation(reported UC, or modeled state UI when none is reported, as in the other TANF lists since #9558)taxable_pension_incomepension_income(taxable + tax-exempt)taxable_retirement_distributionsretirement_distributions(gross)taxable_interest_incomeinterest_income(incl. tax-exempt), floored at zero, after the $400 exclusiondividend_incomedividend_income, floored at zero, after the $400 exclusiondebt_reliefchild_support_received,alimony_income,veterans_benefits,workers_compensation,disability_benefits,survivor_benefits,railroad_benefits,financial_assistance(cash contributions),gi_cash_assistanceandestate_income(settlements stay resources, p.92)illicit_incomecapital_gains,rental_income,farm_rent_income,partnership_s_corp_income,estate_incomeandmiscellaneous_incomemove tounearned/positive_sources.yaml. Each counts per person only when positive: a net loss is not money received, and §8.16 has no step that deducts onesc_tanf_ssi_recipient(SSI > 0 orreceives_ssi). Their earned and unearned income is excluded; they are left out of the newsc_tanf_benefit_group_size; and the newsc_tanf_countable_resourcessubtracts their own bank, stock and bond assets fromspm_unit_cash_assets, as Missouri's TANF does (an aggregate-only asset input is counted as given)tanf_fpg× 0.5 (whole SPM unit), computed in three placessc_tanf_need_standard: 50% of the guideline for the benefit group size, used by the payment, the need test and the gross income limitThe list moved from
income/unearned.yamltoincome/unearned/sources.yaml, besideincome/unearned/interest_and_dividends/{sources,exclusion}.yaml. Onlysc_tanf_gross_unearned_incomereads it.Judgment calls and known limits
rental_incomeholds rent and royalties together, and rent is counted in full (p.116).military_retirement_payis not added. The model treats it as a memo amount that is also entered in pension income: federal gross income never adds it, yet Connecticut and Iowa subtract it from AGI, and SC's retirement deduction nets it against the cap. Adding it would double-count.capital_gains, and gains against losses within one person'sestate_incomeall still net, because the inputs carry only the net amount.Overlap with #9687
#9687 (approved; #9558 merged on 2026-10-13) swaps only the two taxable items for
total_unemployment_compensationandsocial_security. This PR makes the same two choices and covers the rest of what #9677 asked for. The SC list has moved toincome/unearned/sources.yaml, so whichever PR lands second needs a small rebase: keep the moved file, and renumber the integration cases (both add a Case 9). Coordination comment: #9687 (comment).Invariants
These hold for every benefit group and month.
policyengine_us/tests/test_sc_tanf_unearned_income_invariants.pychecks them with Hypothesis over generated groups in one vectorized simulation, against a reference written from the manual rather than from the parameter list.Mutation checks: each of these is caught by the property test.
taxable_social_securityback in the list;Tests
sc_tanf_gross_unearned_income.yaml(18 cases): gross Social Security; 2020 unemployment; pensions; ten non-taxable sources; withdrawals vs discharged debt; farm income; the exclusion below, at and above $400, including tax-exempt interest; sharing across members; SSI recipients; negative interest; legacydividend_income; estate, partnership, capital and rental losses on the same and another member.sc_tanf_gross_earned_income.yaml,sc_tanf_ssi_recipient.yaml,sc_tanf_benefit_group_size.yaml,sc_tanf_need_standard.yaml(including the October update) andsc_tanf_countable_resources.yaml(an SSI child's bank assets, an SSI adult's stocks and bonds, an aggregate-only input).integration.yaml:spm_unit_sizenow setsc_tanf_benefit_group_size, with the same expected values.Local runs (macOS) at
4b419e5, plus96245b0's unearned YAML file (18 cases) and property test (2 passed):530cc15; the unemployment reader and person-adds guards still pass at4b419e5.CI cost (Linux, run 38330000257 at
91d0d3f, artifactrest-test-timings):remaininggroup, where the model is already loaded: 1.39 s plus 0.07 s.Review
Independent GPT-6.1 Sol review (Subfleet, hard tier, workspace-write, tests run in its own copy):
530cc15, changes requested. The blocking finding: SSI income was excluded while SSI members still counted in the need standard.39248f1fixed it, along with the negative-interest floor, the legacy dividend input, guaranteed income and trust income. It also reverted the retirement-withdrawal exclusion and answered the royalty and military-pay findings.39248f1, changes requested. SSI recipients' resources were still counted, and signed estate income let losses offset other income.f6340c2fixed both. The reviewer accepted royalties and military pay as limitations that predate the PR.4b419e5, approved. No blocking findings. The SSI resource and estate fixes were verified by execution and mutation. Its main non-blocking point was that the other net sources still let losses offset other income;96245b0fixed that.96245b0, approved (delta review).Findings and responses are kept on the hub host in
~/reviews/sc-tanf-unearned-2026-10/.Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
ef3fdff039against this PR's head96245b0f7a, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.sc_tanftanfsc_tanf_gross_unearned_incomesc_tanf_gross_earned_incomesc_tanf_countable_incomespm_unit_benefitsstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsReading the table:
sc_tanfis the benefit every eligible unit would get.tanfadds state TANF only for units flaggedtakes_up_tanf_if_eligible; its change comes from 9 South Carolina records.tanfin 2025 and $1.70M less in 2026, so other benefits rise by those amounts. This run doesn't break them out by program.96245b0raised the counted-income totals but left every benefit row unchanged from the4b419e5run.sc_tanf_*_incomerows sum monthly amounts over every South Carolina person or unit for the year, eligible or not; the formulas aren't gated on eligibility. They show how much more income now counts, not benefit dollars.sc_tanf_need_standardandsc_tanf_countable_resourcesare new, so they have no base to compare.Comparison files are in
fixes/10184-impact/on the hub host.axiom: TheAxiomFoundation/rulespec-us#1728 queued
🤖 Generated with Claude Code