Skip to content

Limit school meal categorical eligibility to each qualifying child - #10838

Merged
MaxGhenis merged 11 commits into
mainfrom
fix-school-meals-head-start-enrollment
Nov 15, 2026
Merged

MaxGhenis merged 11 commits into
mainfrom
fix-school-meals-head-start-enrollment

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Limit school-meal child categories to each qualifying child and require Head Start enrollment. Main sums Head Start eligibility, past foster care, runaway status and migrant status across the SPM unit, which gives siblings free meals.

Congress and USDA separate household assistance from individual child categories in 42 U.S.C. 1758(b)(12)(A) and 7 CFR 245.6(b)(7)-(8):

Category Reach Citation Model input
SNAP Every child in the family 1758(b)(12)(A)(i); 245.6(b)(7) snap, receives_snap
Qualifying TANF Every child in the family 1758(b)(12)(A)(ii); 245.6(b)(7) tanf, receives_tanf
FDPIR Every child in the family 245.2; 245.6(b)(7) fdpir
Head Start Enrolled child 1758(b)(12)(A)(iii); 245.6(b)(8) is_enrolled_in_head_start
Homeless Qualifying child 1758(b)(12)(A)(iv); 245.6(b)(8) is_homeless_child; is_homeless for a whole household
Runaway Qualifying child 1758(b)(12)(A)(v); 245.6(b)(8) is_runaway_child
Migrant Qualifying child 1758(b)(12)(A)(vi); 245.6(b)(8) is_migratory_child
Foster Child in agency or court placement, from October 1, 2010 1758(b)(12)(A)(vii); 245.6(b)(8) is_in_foster_care

Congress qualifies a child whom Head Start enrolls on the basis of 42 U.S.C. 9840(a)(1)(B). Under 9840(a)(1)(B)(iii), programs may enroll children above the income limit, so the model applies no income test to an enrollee. The existing is_enrolled_in_head_start input records enrollment in Head Start or Early Head Start and defaults to false.

is_head_start_eligible counts a family's SSI receipt as public assistance. Congress lists no SSI category in 1758(b)(12)(A), so a child in that family qualifies through Head Start only by enrolling.

meets_school_meal_categorical_eligibility holds the household-wide categories for the SPM unit, and school_meal_tier reads it. is_school_meal_categorically_eligible combines that result with each person's own categories, which the new child_categorical_eligibility parameter lists. school_meal_child_breakfast_tier and school_meal_child_lunch_tier give the FREE tier to a child with an own category and the SPM unit's tier to every other child. The SPM unit's daily subsidy averages each K-12 child's rates, and its free and reduced-price values follow each child's tiers.

is_school_meal_categorically_eligible reads each listed input in that input's own period and counts every month of a monthly one. It passes Core no period option, because a population run fails on one: given options=[ADD], Core 3.36.0's Population passes decode_enums to Microsimulation.calculate_add, which accepts no such argument.

For example, an Alabama household has wages of $26,000, rental income of $20,000 and children aged four and ten in 2026. School-meal income totals $46,000, between the three-person free limit of $35,516 and the reduced-price limit of $50,542. PolicyEngine's Head Start income test counts the wages and not the rental income, and the wages fall below the $27,320 poverty guideline. Main therefore treats the four-year-old as eligible for Head Start and gives the ten-year-old free meals worth (2.46 + 4.60 - 0.40 - 0.44) × 180 = $1,119.60 a year. Nobody in the household enrolls in Head Start, so the ten-year-old now receives reduced-price meals worth (2.16 + 4.20 - 0.40 - 0.44) × 180 = $993.60.

#9789 tracks broader school-meal coverage, and #10801 tracks countable income.

Invariants

policyengine_us/tests/core/test_school_meal_categorical_eligibility_invariants.py checks these across generated sibling configurations and across every state and DC:

  • A household category qualifies every child in the SPM unit: SNAP, TANF, FDPIR, reported SNAP or TANF receipt, or household homelessness. With computed tiers, every child's breakfast and lunch tiers read FREE.
  • A child's own category qualifies that child and changes no sibling's eligibility or tier: Head Start enrollment, foster care in any month, child homelessness, runaway status or migrant status.
  • Modeled Head Start eligibility without enrollment qualifies nobody, and neither does past foster care.
  • An explicit SPM-unit tier input stays in force for every child without an own category, including under a household category. A child's own category still gives that child the FREE tier.
  • Each K-12 child counts once, children outside K-12 add no value, and free plus reduced-price value equals the net subsidy.

YAML cases pin the foster start date: is_in_foster_care qualifies a child in 2011 and not in 2010.

Methodology choices

  • Household homelessness qualifies every child in the household. Congress defines a homeless child as one who lacks a fixed, regular and adequate nighttime residence (42 U.S.C. 11434a(2)(A)), and is_homeless describes the whole household. is_homeless therefore stays in the household-wide list, as on main, and the SPM unit's school_meal_tier reads FREE for that household. USDA's definition also has a school district liaison or shelter director identify each homeless child (7 CFR 245.2), and the model assumes that step for a homeless household.
  • is_homeless_child, a new input that defaults to false, qualifies one child in a housed household.
  • The model counts every Head Start enrollee and has no input for the basis of enrollment. It cannot separate a child whom a program enrolls under 9840(a)(2), in a community of 1,000 or fewer people, or under selection criteria that tribal and migrant or seasonal programs set under Pub. L. 118-47. Under 1758(b)(12)(A)(iii), Congress covers an enrollee whose program enrolled the child on a determination under 9840(a)(1)(B), while USDA defines a Head Start child in 7 CFR 245.2 as any child a Head Start program enrolls. This change records that conflict as an open candidate, us:school-meals-head-start-categorical-basis, for the project lead to rule on.
  • Head Start uses reported enrollment in place of takes_up_head_start_if_eligible, which defaults to true and describes hypothetical take-up.
  • One month of is_in_foster_care gives the child the annual category. Core answers an annual request for a monthly true-or-false input with December's value, so the formula reads all twelve months. The model reads each list on January 1, so the foster category starts in calendar 2011 although Congress made it effective on October 1, 2010 (Pub. L. 111-296, sections 102(b) and 445).
  • is_in_foster_care keeps its label and its other readers. The school-meal helper treats it as the agency or court placement that 1758(b)(12)(A)(vii) names.
  • SPM units stand in for USDA's economic family, as on main.
  • Explicit SPM-unit tier inputs stay in force for people without an own category, even when a household category applies.
  • Units without K-12 children keep the SPM unit's common daily rate and a zero annual value.
  • The statute and the regulation give each category they share the same reach within a family, and FDPIR's household-wide reach comes from the regulation. They differ on which Head Start enrollees qualify, and this change records that one source conflict, us:school-meals-head-start-categorical-basis.

Overlapping work

Three open pull requests change the same school-meal files. #10834 adds take-up to free_school_meals and reduced_price_school_meals. #10766 changes free_school_meals, reduced_price_school_meals, school_meal_daily_subsidy and school_meal_tier for qualifying months. #10264 changes school_meal_tier for the territories. Whichever lands later must keep both changes.

Tests

Pull request run 43645292457 at 731e0b9440 passed all 38 jobs on GitHub's merge with main 94054aa57e.

YAML cases cover each category's reach, the Alabama example, a homeless household above the income limits, a Head Start enrollee above the Head Start income limit, and a foster placement in March alone. The property tests check the invariants above. The YAML and property cases build household simulations, and in a population run Core routes a formula's variable calls through Microsimulation's own methods. A Python test therefore builds a six-person Microsimulation and checks each child's own category and meal tiers there, with a foster placement in July alone. In CI that test's call phase takes 0.08 s (Linux, run 43629025115), and on macOS a process that runs it alone peaks at 1.3 GB. In the full suite it runs in the Rest Python core group. This change edits no partner contract test.

Microsimulation impact

We estimate that this branch lowers the value of free school meals by $186.2m in 2026 on the default dataset, for 73 sampled SPM units (89,213 weighted). The value of reduced-price meals rises by $36.5m, and net school meal subsidies fall by $149.7m. We compared main at 935b24ff4f with this branch at 731e0b9440.

Output Main total Change Records changed (weighted)
free_school_meals $35.58bn -$186.2m 73 (89,213)
reduced_price_school_meals $1.48bn +$36.5m 16 (14,190)
school_meal_daily_subsidy $473.6m -$710,569 99 (129,916)
school_meal_net_subsidy $37.07bn -$149.7m 73 (89,213)
state_income_tax $577.2bn $0 0 (0)
income_tax $2,594.9bn $0 0 (0)
household_benefits $2,060.4bn -$149.7m 73 (89,213)
household_net_income $17,199.2bn -$149.7m 73 (89,213)

axiom: TheAxiomFoundation/rulespec-us#2245 queued (42 U.S.C. 1758(b)(12)(A) and 7 CFR 245.2 and 245.6(b)(7)-(8); the corpus holds neither 42 U.S.C. 1758 nor 7 CFR part 245, so the signed encoder can't run yet)

🤖 Generated with Claude Code

MaxGhenis and others added 6 commits November 12, 2026 00:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 2 commits November 13, 2026 19:35
Congress defines a homeless child as one who lacks a fixed, regular and
adequate nighttime residence (42 U.S.C. 11434a(2)(A)), so every child in
a household that lacks one qualifies. is_homeless returns to the
household-wide list, and the SPM unit's meal tier reads FREE for that
household again. is_homeless_child stays the route for one child in a
housed household.

Move the child-specific categories into a parameter list. Congress added
the foster clause in Pub. L. 111-296, effective October 1, 2010, so
is_in_foster_care joins the list on that date.

Cite uscode.house.gov and eCFR with section anchors, drop the dead FNS
memo link, and restore the program-neutral is_in_foster_care label.
Add cases for a homeless household and for a Head Start enrollee above
the Head Start income limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 14, 2026 16:40
MaxGhenis and others added 3 commits November 14, 2026 13:39
Core's Population passes decode_enums to calculate_add whenever a formula
gives options=[ADD], and Microsimulation.calculate_add accepts no such
argument. The child-category helper gave that option, so a
Microsimulation that calculated school meal eligibility raised a
TypeError.

The helper now reads each listed input in its own definition period and
counts every month of a monthly one. Core answers an annual request for
a monthly true-or-false input such as is_in_foster_care with December's
value, so a plain annual read would drop a placement that ends before
December.

Add a Microsimulation test on a six-person dataset and a YAML case with
a foster placement in March and no other month.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Core carries a monthly input forward to later months that have none, so
December read as true in the March case and in the July Microsimulation
test, and both passed under a plain annual read of the input. Each now
sets the next month to false, so the placement covers one month alone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Congress limits automatic free school meals to a child whom a Head Start
program enrolls on a determination under 42 U.S.C. 9840(a)(1)(B)
(42 U.S.C. 1758(b)(12)(A)(iii)). USDA defines a Head Start child as any
child enrolled in a Head Start program (7 CFR 245.2). The model counts
every enrollee and has no input for the basis of enrollment.

Record the question as an open candidate in
source_conflicts/candidates.yaml for the project lead to rule on.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#10838 at 731e0b9440ea63c645119604482b82b12c12c9ac (squash): Limit school meal categorical eligibility to each qualifying child.

  • Reviews:
    • The PR has no GitHub reviews. Three independent review rounds ran outside GitHub, with a fix round before the second and another before the third.
    • The first round, at 386df66670, read 42 U.S.C. 1758(b)(12)(A) and 9840(a)(1)(B) and 7 CFR 245.2 and 245.6(b)(7) and (8). It ran 12 households on the head and on the merge base 935b24ff4f, and checked the Alabama example, a Head Start enrollee and a mixed-tier family by hand. It ran the two changed YAML files, the property tests, nine unchanged school-meal files and the partner school-meal files.
    • It found that a partner contract case failed. The PR had moved is_homeless out of the household list, so a homeless Texas household's SPM unit lost the free tier while each child still ate free. It also found a dead link to an FNS memo behind the Head Start rule, no impact estimate and an axiom: line that named a campaign issue.
    • Two of its five minor findings covered a school-meal definition written onto the shared is_in_foster_care input and the lack of a YAML case for an enrollee above the Head Start income limit. The others covered a changelog without the foster change or the new input, a #b_5 anchor with law.cornell.edu links, and child categories fixed in code.
    • The fix round, in 480e931957, returned is_homeless to the household list and kept is_homeless_child for one child in a housed household. It cited 1758(b)(12)(A)(iii) and 9840(a)(1)(B) in place of the memo and restored is_in_foster_care.py to main's text. It moved the child categories into a child_categorical_eligibility parameter list that adds foster care from October 1, 2010.
    • That round added cases for a homeless household at 300% of the poverty guideline, an enrollee whose family earns $100,000, and foster care in 2010 and 2011. The partner file passed again, and each of six mutants failed a case. 266b356bf9 adds one arithmetic comment to a YAML case.
    • The second round, at 266b356bf9, found no defect in the code. The partner file had failed one case on the earlier head and passed all 12 there. It fetched 42 U.S.C. 1758, 9840 and 11434a, 7 CFR 245.2 and 245.6, Pub. L. 111-296, USDA's 2025-26 rate notice and the 2026 poverty guidelines. It hand-checked the homeless household, the over-income enrollee, the foster dates and the description's Alabama example.
    • In that round the changed test files passed: 16 and 12 YAML cases and 2 property tests. school_meal_tier.yaml, free_school_meals.yaml, integration.yaml and three code-health files passed too, and each of seven mutants failed a case by value.
    • It asked for two changes to the description, an impact estimate and a queued axiom: line, and I made both before merge. It left two minor notes on tests, listed under Next.
    • CI first ran at 266b356bf9, since every job skips on a draft. Its Rest shard 3 and Microsimulation jobs failed with one error: Microsimulation.calculate_add() rejected the decode_enums argument that policyengine-core passes when the new helper sums its list with options=[ADD]. Neither review round could run a Microsimulation.
    • The CI fix round, in 903c29f31f, dropped options=[ADD]. The helper now reads each listed input in that input's own periods, so it still counts every month of foster care. The round added a YAML case with foster care in March alone and a test that builds a six-person Microsimulation.
    • At 903c29f31f, both new cases still passed under a plain annual read, because Core carries the latest earlier monthly input forward. 5f40ecfde0 sets the month after each placement to false, and both cases then failed under that read.
    • The third round approved 5f40ecfde0 with no blocking finding. It read policyengine-core 3.33.2, 3.34.2 and 3.36.0, and confirmed that options=[ADD] raises CI's error in a Microsimulation and that a plain annual read returns December's foster value.
    • With the old line pasted back, the new Microsimulation test failed with CI's error. A plain annual read failed the March case, the new test and both property tests. It hand-checked children placed in December, March or July alone, or never, in both simulation types.
    • In that round the invariants file passed all 3 tests and the child YAML file all 17 cases. It read the CI logs at 5f40ecfde0: all 36 jobs passed, including the Rest and Microsimulation jobs that failed at 266b356bf9.
    • Its one minor finding asked the description to name the CI group that runs the new test, and I added it. It carried over the second round's two test notes.
    • After the third round, a check of the description found a source conflict that the PR had not recorded. The model counts every Head Start enrollee. In 7 CFR 245.2 USDA defines a Head Start child as any enrollee, while in 1758(b)(12)(A)(iii) Congress names the 9840(a)(1)(B) basis of enrollment.
    • 731e0b9440 records that conflict as an open candidate in source_conflicts/candidates.yaml and changes no other file. Run 43645292457 passed all 38 jobs at that head, and the register guard passed 103 tests.
  • Methodology choices for maintainers:
    • is_homeless qualifies every child in the household and gives the SPM unit the free tier, as on main. Under 42 U.S.C. 11434a(2)(A), a homeless child lacks a fixed, regular and adequate nighttime residence, so each child in such a household holds clause (iv). 7 CFR 245.2 also has a school district liaison or shelter director identify each child, and the model assumes that step.
    • The annual variables read each category list on January 1, so foster care first qualifies a child in calendar 2011. Congress made clause (vii) effective on October 1, 2010, so the model leaves out a child placed in the last three months of 2010. The model holds no school meal rate before July 2015, so no value moves.
    • One month of is_in_foster_care gives the child the category for the year. Core answers an annual read of a monthly true-or-false input with December's value, so the helper reads each month.
    • The model counts every Head Start enrollee, with no income test. It has no input for the basis of enrollment, so it also counts a child whom a program enrolls under 9840(a)(2) or under selection criteria that tribal and migrant or seasonal programs set under Pub. L. 118-47. Under 1758(b)(12)(A)(iii), Congress covers an enrollee whose program enrolled the child on a determination under 9840(a)(1)(B), while in 7 CFR 245.2 USDA defines a Head Start child as any enrollee. The PR records that conflict as an open candidate, us:school-meals-head-start-categorical-basis, for the project lead to rule on. The is_enrolled_in_head_start input, from main, covers Early Head Start as well.
    • FDPIR reaches every child in the family under 7 CFR 245.2 and 245.6(b)(7). Section 1758(b)(12)(A) names no FDPIR clause, and main already treats FDPIR this way.
    • The SPM unit's school_meal_tier covers household-wide categories only, so it can read PAID for a family where one child eats free through an own category. school_meal_child_breakfast_tier and school_meal_child_lunch_tier hold each child's tier, and the free and reduced-price values follow them.
    • An explicit SPM-unit tier input stays in force for every child without an own category, even under a household category.
    • SPM units stand in for USDA's family, as on main.
  • Gates checked live at merge:
    • gh pr checks exits 0;
    • the latest Pull request run at the head, 43645292457, passed and tested this head merged into main at 94054aa57e;
    • MERGEABLE;
    • not a draft;
    • no reviewer's latest review requests changes;
    • the semantic-overlap guard: since 94054aa57e, main has changed one file this PR touches, source_conflicts/candidates.yaml, where other landings added or edited entries. In the file merged with main at 32392735e8, each of the 478 entries matches the side that changed it, and the 195 tests in the files that read it pass on the merged tree. Between the PR's merge base 935b24ff4f and main at a29c73d587, main changed one file this PR touches, source_conflicts/candidates.yaml. There main added 35 entries and edited 16, and none of them names Head Start or school meals. In Use one unadjusted BLS CPI-U series #10648, main moved the 2028 CPI-projected rates in four school-meal test files: free_school_meals.yaml, integration.yaml, reduced_price_school_meals.yaml and school_meal_daily_subsidy.yaml. This PR's tests use 2010, 2011, 2022, 2024, 2025 and 2026. Main changed nothing under the school-meal or Head Start variables and parameters, the poverty guidelines or the inputs this PR reads. Add a school meal take-up input #10834, Count Head Start and school meal values from the first qualifying month #10766 and Correct territory school-meal income tiers for Guam, Puerto Rico and the Virgin Islands #10264, which change the same school-meal variables, haven't landed. The branch merges into main at a29c73d587 and at 32392735e8 without conflict;
    • the merge pins the head.
  • Impact: we estimate that this branch lowers the value of free school meals by $186.2m in 2026 on the default dataset (73 SPM units, 89,213 weighted), and net school meal subsidies by $149.7m. Main 935b24ff4f against 731e0b9440.
  • Next:
    • us:school-meals-head-start-categorical-basis stays open until the project lead answers it. The statute's reading would need a new input for enrollment on the 9840(a)(1)(B) basis.
    • The case "Foster care does not qualify a child before the foster clause took effect." places the child in December 2010, after October 1, 2010. A June 2010 input keeps its false and fits the name.
    • The case "Household homelessness qualifies every child." keeps is_migratory_child: true, so its person-level assertion would pass without homelessness. Setting it to false fixes the case.
    • The US system carries the latest earlier input forward, so a YAML case that sets one month of an input-only monthly variable gives every later month that value. An issue can find such cases and set the next month wherever a case means that month alone.
    • meets_school_meal_categorical_eligibility reads receives_snap and receives_tanf, two monthly true-or-false inputs, through adds, so a year's result takes December's value, as on main. Reported receipt that ends before December gives no household category on its own, while one month of foster care qualifies a child.
    • After this squash, Count Head Start and school meal values from the first qualifying month #10766, a draft, conflicts with main in free_school_meals.py, reduced_price_school_meals.py, school_meal_daily_subsidy.py and school_meal_tier.py. Its school_meal_categorical_eligibility_months reads the household-wide list, so whoever merges main into it should decide how each child's own category counts by month.
    • Add a school meal take-up input #10834, a draft, merges with this change without a textual conflict. It adds take-up to free_school_meals and reduced_price_school_meals, whose formulas this PR rewrites, so its tests should run again on the merged code.
    • Correct territory school-meal income tiers for Guam, Puerto Rico and the Virgin Islands #10264 already conflicts with main in school_meal_tier.py, where this PR edits the documentation.
    • is_runaway_child, from main, describes any child under 18 who leaves home without permission, while clause (v) and 7 CFR 245.2 cover a child whom a Runaway and Homeless Youth Act program serves. The input's breadth needs an issue.
    • School-meal files from main cite law.cornell.edu in 17 places, 8 in four variable files and 9 in eight parameter files, and is_runaway_child.py and is_migratory_child.py cite it too. An issue can move them to uscode.house.gov and ecfr.gov.
  • Axiom: Encode automatic eligibility for free school meals: household assistance and each child's own category (42 U.S.C. 1758(b)(12)(A); 7 CFR 245.2 and 245.6(b)(7)-(8)) (PE-US #10838) TheAxiomFoundation/rulespec-us#2245 queued, a new pe-parity issue for 42 U.S.C. 1758(b)(12)(A) and 7 CFR 245.2 and 245.6(b)(7)-(8), with companion rows from this PR's YAML. The signed encoder can't run yet: the corpus holds no 42 U.S.C. 1758 or 11434a, no 7 CFR part 245 and no Pub. L. 111-296.

🤖 Generated with Claude Code

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.

1 participant