Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

@MaxGhenis MaxGhenis commented Jan 31, 2026

Summary

Add ma_tafdc_noncountable_income variable implementing 106 CMR 704.250.

Uses a parameter-driven list (gov.states.ma.dta.tcap.tafdc.income.noncountable.sources) for unconditionally excluded benefit types:

  • (C) SNAP (snap)
  • (D)/(F) School lunch (spm_unit_school_lunch_subsidy), WIC (wic)
  • (J) Financial aid / Pell Grants (spm_unit_pell_grant)
  • (S) Housing subsidies (spm_unit_capped_housing_subsidy)
  • (BB) LIHEAP (ma_liheap)

Conditional exclusions (not in adds list — need dedicated variable logic)

  • (A) All income of SSI recipients (not just SSI benefit — requires identifying recipients and excluding their total income)
  • (B) First $600 of lump sum income (capped exclusion)
  • (GG) First $50 child support (already handled in ma_tafdc_child_support_deduction)
  • (II) EITC received as refund income (not the credit amount)
  • (L) Irregular gifts <$30/quarter (capped)
  • (U) Dependent child earned income (conditional on age/student status)

Not yet modeled (no PE-US variables exist)

Sections (D) USDA surplus, (E) elderly nutrition, (G) home-produced food, (H)/(I) training stipends, (M) Census earnings, (N) volunteer payments, (O)/(P)/(Q) Native American payments, (R) relocation, (T) loans, (V) foster parent payments, (AA) contributions, (CC) agency assistance, (DD) TAFDC corrections, (EE) utility refunds, (FF) settlement payments, (JJ)/(KK)/(MM)/(OO)/(QQ) restitution payments, (LL) reverse mortgage, (NN) FSS escrow, (PP) YouthBuild/AmeriCorps.

Fixes #5754

Test plan

  • 3 unit tests (multiple sources, SNAP only, zero)
  • All 23 existing MA TAFDC tests pass

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits January 31, 2026 11:28
Implements 106 CMR 704.250, which defines income sources excluded from
TAFDC eligibility and benefit calculations. Tracks SNAP, housing
subsidies, and LIHEAP as noncountable income.

Fixes #5754

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (66ccff2) to head (93adbcf).
⚠️ Report is 445 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #7308       +/-   ##
============================================
+ Coverage   72.72%   100.00%   +27.27%     
============================================
  Files        3757        13     -3744     
  Lines       54115       192    -53923     
  Branches      267         0      -267     
============================================
- Hits        39353       192    -39161     
+ Misses      14742         0    -14742     
+ Partials       20         0       -20     
Flag Coverage Δ
unittests 100.00% <100.00%> (+27.27%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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 MaxGhenis requested review from hua7450 and removed request for hua7450 January 31, 2026 19:19
@MaxGhenis MaxGhenis marked this pull request as draft January 31, 2026 19:38
MaxGhenis and others added 5 commits January 31, 2026 14:49
Add parameter-driven list of noncountable income sources covering:
- (A) SSI
- (C) SNAP
- (D)/(F) School lunch subsidies, WIC
- (BB) LIHEAP
- (II) EITC
- (J) Pell Grants
- (S) Housing subsidies

Use parameter list at gov.states.ma.dta.tcap.tafdc.income.noncountable.sources
so additional sources can be added via YAML without code changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SSI (A) excludes ALL income of SSI recipients, not just the SSI
benefit — requires identifying recipients and excluding their total
income, which can't be a simple adds entry.

EITC (II) refers to the credit received as income (refund), not the
credit amount itself — including the eitc variable double-counts.

Keep only unconditionally excluded benefit types in the parameter
list (SNAP, school lunch, WIC, Pell Grants, housing, LIHEAP).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add conditional exclusions per 106 CMR 704.250:
- (A) SSI recipient income exclusion: all earned and unearned
  income of SSI recipients is noncountable
- (U) Dependent child earned income exclusion: earned income of
  children under 16 or 16+ full-time students is noncountable
- (B) Lump sum income exclusion: first $600/month is noncountable

Wire exclusions into countable income pipeline:
- New ma_tafdc_gross_earned_income subtracts SSI and child exclusions
- New ma_tafdc_gross_unearned_income subtracts SSI and lump sum
- Existing countable income variables now use TAFDC-specific gross
  income instead of raw TCAP gross income

Add parameters for child earned income age threshold (16) and
lump sum cap ($600).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The options=[DIVIDE] pattern triggers a microsimulation bug in
policyengine_core's calculate_divide method. Using period.this_year
to access the YEAR-period ssi_reported variable from a MONTH context
avoids this issue while still correctly checking SSI receipt.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

Massachusetts TAFDC Noncountable Income

2 participants