Fix Head Start categorical eligibility: split person/family aggregation#7905
Merged
PavelMakarchuk merged 5 commits intoPolicyEngine:mainfrom Apr 1, 2026
Merged
Conversation
…gibility Head Start categorical eligibility (45 CFR 1302.12(b)) requires actually receiving SNAP/TANF/SSI, but PolicyEngine computes eligibility and uses computed amounts as a proxy. This adds a head_start_use_reported_programs toggle plus receives_snap, receives_tanf, receives_ssi input booleans so API partners can indicate actual program receipt. Default behavior (toggle off) is fully preserved. Also switches aggregation entity from tax_unit to spm_unit, which better represents the economic family unit for benefit program receipt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7905 +/- ##
===========================================
+ Coverage 97.26% 100.00% +2.73%
===========================================
Files 5 1 -4
Lines 73 11 -62
Branches 2 0 -2
===========================================
- Hits 71 11 -60
+ Misses 1 0 -1
+ Partials 1 0 -1
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:
|
…egation Person-level conditions (was_in_foster_care, is_homeless) are no longer aggregated across the family — only the specific child qualifies. Family- level conditions (TANF, SSI, SNAP) remain aggregated at the spm_unit so all family members benefit. Removes parameter files in favor of inline variable lists for clarity. Fixes pre-existing reference tuple bug. Adds edge case tests for foster care isolation and the 140% FPL scenario demonstrating the toggle fix end-to-end. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After regulatory research (45 CFR 1302.12(c), ACF-IM-HS-22-03), the regulation says "eligible for" public assistance, not "receives" — so the computed approach is correct. Removes the toggle and receives_* variables. Keeps the person/family split fix: foster care and homeless status stay per-child while TANF/SSI/SNAP aggregate across the spm_unit. Updates references to cite section (c) and the new headstart.gov URL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The formula now inlines variable names directly to support the person/family aggregation split. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add `parameters` to formula signature for codebase consistency - Rename changelog .added → .fixed, update text to describe the actual aggregation fix (not the removed toggle) - Add 3 single-path isolation tests: SSI alone, SNAP alone, homeless alone — each path now tested as sole qualifier Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PavelMakarchuk
approved these changes
Apr 1, 2026
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
Fixes a bug where Head Start categorical eligibility incorrectly aggregated person-level conditions (foster care, homelessness) across the entire tax unit. Under the old formula, if one child was in foster care, all children in the tax unit were shown as categorically eligible.
Changes:
spm_unit— if the family is eligible for public assistance, all members qualify [(c)(1)(ii)]was_in_foster_care): not aggregated — only the specific child qualifies [(c)(1)(iv)]is_homeless): projected from household — all members in a homeless household qualify [(c)(1)(iii)]tax_unittospm_unit(better represents "family" for benefit eligibility)categorical_eligibility.yamlwith updated references including ACF-IM-HS-22-03 (SNAP as public assistance, April 2022)Closes #7904
Regulatory basis
Test plan
🤖 Generated with Claude Code