-
Notifications
You must be signed in to change notification settings - Fork 201
Add Massachusetts TAFDC noncountable income variable #7308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
MaxGhenis
wants to merge
7
commits into
main
Choose a base branch
from
fix/ma-tafdc-noncountable-income
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add
ma_tafdc_noncountable_incomevariable implementing 106 CMR 704.250.Uses a parameter-driven list (
gov.states.ma.dta.tcap.tafdc.income.noncountable.sources) for unconditionally excluded benefit types:snap)spm_unit_school_lunch_subsidy), WIC (wic)spm_unit_pell_grant)spm_unit_capped_housing_subsidy)ma_liheap)Conditional exclusions (not in adds list — need dedicated variable logic)
ma_tafdc_child_support_deduction)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
🤖 Generated with Claude Code