Fix TANF asset modeling and immigration timing#7989
Open
MaxGhenis wants to merge 6 commits intoPolicyEngine:mainfrom
Open
Fix TANF asset modeling and immigration timing#7989MaxGhenis wants to merge 6 commits intoPolicyEngine:mainfrom
MaxGhenis wants to merge 6 commits intoPolicyEngine:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7989 +/- ##
===========================================
- Coverage 100.00% 90.71% -9.29%
===========================================
Files 2 85 +83
Lines 33 1152 +1119
===========================================
+ Hits 33 1045 +1012
- Misses 0 107 +107
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:
|
- Restore work requirement as eligibility gate for non-enrolled applicants while enrolled recipients get a benefit sanction (per DC Code § 4-205.19b vs § 4-205.19f) - Remove redundant min_() in dc_tanf benefit formula - Update sanction references to cite DC Code sections - Fix Idaho TAFI immigration period (period → period.this_year) - Add bias documentation to WA/MT vehicle approximation comments - Add enrolled sanction pathway test case Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
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
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
This PR tightens TANF baseline modeling in three areas:
What changed
dc_tanf_eligiblerequires work compliance for non-enrolled applicants (per DC Code § 4-205.19b), preserving the POWER routing for work-noncompliant applicantsdc_tanfapplies the sanction rate: 6% from 2017-10-01 (30% of the 20% adult portion) and 25% from 2026-10-01 (D.C. Law 26-55)highest_vehicle_valueinput would allow the exact ruleperiod.this_yearwhen reading annual immigration variables across the state TANF formulas touched here, plus Idaho TAFI.Validation
policyengine-core test policyengine_us/tests/policy/baseline/gov/states/dc/dhs/ -c policyengine_us(170 tests pass)uv run pytest -q policyengine_us/tests/core/test_dc_tanf_work_sanction.pyuv run ruff check $(git diff --name-only -- '*.py')Known limitations
immigration_statusEnum period bug (SNAP, CCAP, AABD, CCFA, etc.) — fixed in Fix immigration_status period access in non-TANF monthly formulas #7990.Remaining gap work
This PR does not solve the larger TANF eligibility miss in CPS baseline construction. That follow-up is tracked in #7988.
Current worst remaining FY2024 admin-vs-modeled average monthly recipient gaps after this patch:
0vs18,1960vs2,9334,852vs12,91997,049vs128,3354,852vs2,499DC is now close enough that it no longer belongs in that blocker set:
4,852vs5,056The remaining problem is structural, not takeup priors: TANF application-month income and assistance-unit modeling on CPS still need a deeper pass.