Fix false childcare cycle: use correct CO CCAP income, switch 24 TANF states and SNAP to childcare_expenses#7412
Closed
MaxGhenis wants to merge 14 commits intoPolicyEngine:mainfrom
Closed
Conversation
…-circuit
- Add `takes_up_tanf_if_eligible` variable (bool, SPMUnit, default True)
- Wire all 39 implemented state TANF programs into tanf.py:
26 with standard naming ({st}_tanf) and 13 with program-specific
names (ak_atap, ct_tfa, fl_tca, ia_fip, md_tca, mi_fip, mn_mfip,
nj_wfnj, nm_works, ri_works, vt_reach_up, wi_works, wv_works)
- Apply takeup in TANF formula: value * takes_up
- Remove tanf_reported short-circuit that blocked reform microsimulations
- Update tests for new behavior
Companion to PolicyEngine/policyengine-us-data#536 which adds
state-level TANF takeup rates to microdata construction.
Closes PolicyEngine#7400
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL TCA's payment standard depends on housing_cost, which cycles back through rent → housing_assistance → hud_annual_income → tanf. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL TCA payment standard now uses pre_subsidy_rent instead of housing_cost, avoiding the cycle: tanf -> fl_tca -> housing_cost -> rent -> housing_assistance -> hud_annual_income -> tanf. This is more accurate: TANF agencies assess shelter obligation based on what applicants owe, not the net amount after housing subsidies from a separate agency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All FL TCA tests now use pre_subsidy_rent instead of rent/housing_cost, matching the formula change in fl_tca_payment_standard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same pattern as FL TCA fix: use pre_subsidy_rent + other housing components instead of housing_cost to break the cycle tanf -> az_tanf -> housing_cost -> rent -> housing_assistance -> hud_annual_income -> tanf. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The baseline test used FL because it had no TANF implementation, but now that fl_tca is wired up, this household receives TANF. Set takes_up_tanf_if_eligible to false since this test is about ECPA, not TANF. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MI household resources includes tanf. Now that mi_fip is wired up, this family receives TANF which increases their household resources and changes the home heating credit. Suppress TANF since this test is about the home heating credit, not TANF. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rams Changed 22 state TANF childcare deduction formulas to use spm_unit_pre_subsidy_childcare_expenses instead of childcare_expenses, breaking the cycle: TANF → childcare_expenses → childcare subsidies → SNAP → tanf. Also fixed VT Reach Up housing allowance to use pre_subsidy_rent instead of housing_cost, breaking the same type of cycle as FL TCA and AZ TANF. States affected (childcare): AL, AK, AZ, DC, DE, GA, HI, IL, KY, MD, ME, MN, MO, NH, NM, OK, RI, TN, TX, VA, VT, WV States affected (housing): VT Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…NH broadcast - Add ky_ktap, mt_tanf, nh_fanf, tn_ff to STATE_TANF_VARIABLES (39 → 43) - Fix MT TANF childcare deduction to use spm_unit_pre_subsidy_childcare_expenses - Fix NH FANF childcare deduction entity broadcast (any_full_time SPMUnit→Person) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…43 → 51) All 51 US jurisdictions now have TANF programs wired up. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The childcare "cycle" (TANF → childcare_expenses → childcare subsidies → SNAP → TANF) was an implementation artifact, not a real policy interaction. Root cause: CO CCAP's co_ccap_countable_income used SNAP income variables as a placeholder (with a TODO comment), creating a false dependency chain. California, Nebraska, and Massachusetts childcare subsidies never included SNAP in their income definitions. Changes: - Replace CO CCAP placeholder with actual income sources per 8 CCR 1403-1 - Switch 24 state TANF programs from spm_unit_pre_subsidy_childcare_expenses to childcare_expenses (the accurate post-subsidy amount) - Switch SNAP dependent care deduction from pre_subsidy_childcare_expenses to childcare_expenses (workaround no longer needed) - Update 65+ test files to match Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7412 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 31 16 -15
Lines 408 274 -134
Branches 1 1
==========================================
- Hits 408 274 -134
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:
|
Extract hardcoded income source list from co_ccap_countable_income.py into a YAML parameter at gov.states.co.ccap.income.countable_income.sources, following the same pattern as MA CCFA and federal TANF income definitions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Merged into #7401 — single PR now covers both TANF wiring and the childcare cycle fix. |
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
co_ccap_countable_incomeused SNAP income variables as a placeholder (with a TODO), creating a false dependency chain through the static graph. Replaced with actual income sources per 8 CCR 1403-1 Section 7.105.spm_unit_pre_subsidy_childcare_expensesworkaround tochildcare_expenses(the accurate post-subsidy amount). States: AK, AL, AZ, DC, DE, GA, HI, IL, KS, KY, MD, ME, MN, MO, MT, NH, NM, OK, RI, TN, TX, VA, VT, WV.pre_subsidy_childcare_expensestochildcare_expenses— the workaround is no longer needed since no childcare subsidy program (CA, CO, NE, MA) depends on SNAP income.Why the cycle was false
The suspected cycle ran:
tanf→ state TANF → childcare deduction →childcare_expenses→ childcare subsidies → SNAP →tanf. An audit found:snap_earned_income+snap_unearned_incomeas a placeholderWith CO CCAP fixed to use the correct statutory income sources, the cycle no longer exists.
Test plan
Microsimulation()succeeds)make formatapplied🤖 Generated with Claude Code