Skip to content

Explain Head Start and school meals without SNAP on the cliff chart - #48

Merged
MaxGhenis merged 7 commits into
mainfrom
claude/snap-month-program-note
Nov 13, 2026
Merged

MaxGhenis merged 7 commits into
mainfrom
claude/snap-month-program-note

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

If a household gets SNAP in any month, policyengine-us treats it as categorically eligible for Head Start, Early Head Start and free school meals for the whole year. is_head_start_categorically_eligible and meets_school_meal_categorical_eligibility both add up SNAP over the year, in 1.755.5, which production runs, and in 2.2.1, which #45 moves to. CliffWatch charts January's SNAP for all twelve months, and USDA updates SNAP's income limits and benefits each October. So just past SNAP's January limits, a household can get SNAP from October and a full year of these programs, with no SNAP on the chart. In PolicyEngine/policyengine-us#10766, we propose counting these programs from a household's first month of SNAP.

Until CliffWatch charts SNAP's annual sum or runs a policyengine-us release with that change, it adds a note under the cliff chart at those wages. For example, a Georgia single parent of a 4-year-old in ZIP 30303 sees this note:

From $27,500 to $28,000 of annual wages, you'll see Head Start without SNAP. This household gets no SNAP until October, when USDA updates SNAP's income limits and benefits. We count January's SNAP for all twelve months, and a full year of Head Start for any household that gets SNAP in any month.

snapMonthNote names the wages and programs that /api/series marks for that household. When SNAP starts in another month, the note leaves out the USDA clause. When the household gets SNAP in January, the note says only that it gets SNAP in part of the year.

Changes

  • Each /api/series point lists the months the household gets SNAP (snap_months) and the programs it gets for the whole year only through those months (part_year_snap_programs).
  • calculate_income_series marks a program at a point where the household gets it and gets SNAP in 1 to 11 months. It then turns SNAP off, reruns the engine and keeps the mark only where the program falls. In that run, policyengine-us still applies every other route into these programs, such as their income tests, TANF, SSI and a child's Head Start eligibility.
  • On a Vercel preview of this branch, a warm series call took a median 1.8 seconds with the rerun and 1.1 without. We timed eight pairs of calls for a Texas parent of children 7 and 10. So CliffWatch runs it only for a series with a point where a program on the chart could fall. Free school meals can't fall in the nine states that policyengine-us lists as serving them to every student in 2026, where it gives them with or without SNAP.
  • frontend/src/utils/snapMonthNote.js builds the note from those fields, and ResultsPanel renders it with the chart's other notes.
  • The README's scope notes describe the January read and the note.

With #45

#45 moves CliffWatch to pe.us.calculate_household, which returns yearly values only. There, point.snap holds SNAP's annual sum, and CliffWatch can't read SNAP by month, so it can't fill snap_months or part_year_snap_programs. For the household above, #45's chart shows $759.84 of SNAP beside $13,086 of Head Start at $27,500. tests/test_part_year_snap.py fails on #45 until we rework or drop the note.

Tests

  • tests/test_part_year_snap.py pins the household above from $26,500 to $29,000 on policyengine-us 1.755.5. The household gets SNAP all year at $27,000, SNAP from October with $13,086 of Head Start at $27,500 and $28,000, and neither from $28,500.
  • For nine households in Georgia, Nevada, Texas and California, the same file turns off SNAP and reruns the engine. Every mark from $0 to $80,000 in $500 steps matches that run.
  • Four of those households cover other routes into these programs. A Texas parent on SSDI keeps free meals without SNAP because the 4-year-old passes Head Start's income test, so no point gets a mark. policyengine-us counts any member's SSI toward Head Start but not toward school meals, and a child eligible for Head Start qualifies the household for free meals. So a Texas parent of a 4-year-old on SSI and an 8-year-old keeps both programs without SNAP, and no point gets a mark. Where an 8-year-old gets SSI and the household has no child aged 3 to 5, free meals rest on SNAP, and the file pins marks at $35,000 and $35,500. A Georgia parent of a 7-year-old gets free meals by income, and no point gets a mark.
  • We ran the same check over three more households, in Massachusetts, Alabama and Alaska, and found no mismatch. Every marked point in these twelve households gets SNAP from October to December.
  • Three engine tests cover the rerun's skips. A Texas parent of children 7 and 10 gets a free-meal mark at $42,500 and $43,000, and CliffWatch builds two simulations. With free school meals off the chart, no point gets a mark and CliffWatch builds one. At $30,000 a California parent of an 8-year-old gets SNAP in part of the year and free meals, and CliffWatch skips the rerun there too. In each of the nine states that serve free meals to every student, a parent of an 8-year-old gets the same free meals with and without SNAP from $0 to $80,000.
  • We also picked 79 households to reach the skips: some in those nine states, some with programs off the chart, and some with SSI, TANF or two parents. We reran every one of their series with SNAP off, whether or not CliffWatch skips it, and CliffWatch's marks matched that run at all 15,879 points. CliffWatch skips the rerun for 17 of those series.
  • tests/test_part_year_snap_rerun.py runs _part_year_snap_by_point on a stub engine, so it needs no policyengine-us release. It pins a mark at one month of SNAP and at eleven, and at a fall of 50 cents, but not at a fall under a cent. It also checks that the rerun changes nothing in the situation but SNAP take-up, leaves the caller's copy alone, and runs only where a program on the chart could fall. We made ten small changes to the function's month bounds, tolerance, take-up year, copy of the situation and skips, and each one fails at least one of these tests.
  • snapMonthNote.test.js checks the note against a series we captured for the household above, and against hand-built series for each program and for several wage ranges and patterns of SNAP months. A fast-check property confirms that the note appears if and only if some point marks a program it carries. It also confirms that the note:
    • names the first and last of those wages;
    • names Early Head Start or free school meals whenever, and only when, a marked point carries that program;
    • says "without SNAP" only when no marked point gets SNAP in January.
  • bunx vitest run: 109 passed, 4 skipped. pytest tests/test_part_year_snap.py tests/test_part_year_snap_rerun.py: 28 passed. CI at this head ran 315 Python tests and 109 frontend tests, and all passed.
  • In a local dev build of this branch, the note shows under the cliff chart's subtitle for the household above. It stays off for a California parent of an 8-year-old in ZIP 90012. The console logged no error from the app's files.

axiom: n/a: a UI note and API fields that change no policy rule

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits November 9, 2026 13:29
…ead Start and school meals

policyengine-us makes a family categorically eligible for Head Start, Early
Head Start and free school meals for the whole year once it gets SNAP in any
month, so CliffWatch counts a full year of each, including the months before
the family's SNAP starts. The chart now says so when a household gets SNAP and
one of these programs at the same earnings level. The note stays until
CliffWatch runs a policyengine-us release with
PolicyEngine/policyengine-us#10766, which counts these programs from the first
month of SNAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/api/series and buildSeriesDataFromResponse both put each program's
annual value under its own key on the point (point.snap,
point.head_start), the way chartModel reads them. The note looked under
point.programs, which neither returns, so it never showed. The tests now
build points in that shape, include two points from a real Georgia
series, and feed the note a series from buildSeriesDataFromResponse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cliff-watch Ready Ready Preview Nov 11, 2026 5:47pm UTC

Request Review

/api/series now lists each point's months of SNAP (snap_months) and the
programs the household gets for the whole year only through those months
(part_year_snap_programs). A program counts at a point with SNAP in 1 to
11 months and no TANF or SSI, where the household would miss it without
categorical eligibility: a child fails Head Start's income test, or the
household's income exceeds the free-meal limit in a state without
universal free meals.

The chart note now names those wages and programs, and says when the
household's SNAP starts. For a Georgia single parent of a 4-year-old in
ZIP 30303, SNAP starts in October from $27,500 to $28,000, beside $13,086
of Head Start, and the chart reads January's SNAP, so it shows Head Start
without SNAP there.

tests/test_part_year_snap.py pins that window on policyengine-us 1.755.5
and checks each mark against the engine rerun with categorical
eligibility turned off, for five households. The note's tests use a
series captured from this branch and a fast-check property. The README
explains the January read, and the builder test in policyengineApi.test.js
goes, since the app reads /api/series.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis MaxGhenis changed the title Note on the cliff chart that any month of SNAP gives a full year of Head Start and school meals Explain Head Start and school meals without SNAP on the cliff chart Nov 11, 2026
The part-year SNAP marks copied the engine's other eligibility routes by
hand and missed two of them. A child eligible for Head Start makes the
household categorically eligible for free school meals, and SSI gives no
categorical eligibility for school meals. When some point gets SNAP in 1 to
11 months, calculate_income_series now reruns the series with SNAP take-up
off and marks a program only where it falls.

The test compares every mark with that SNAP-off run and adds four
households: a parent on SSDI, an 8-year-old on SSI, a 4-year-old on SSI,
and a Georgia parent of a 7-year-old.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rerun adds most of a second to a series call. A program the user
left off the chart shows no mark, and free school meals can't fall where
state_has_universal_free_school_meals holds, so a series whose only
candidates are those now skips it.

tests/test_part_year_snap_rerun.py pins the marks, the rerun's situation
and the skips on a stub engine. New engine tests cover a deselected
program, a California series and, in each universal-meal state, free
meals that SNAP doesn't move. The SSI test comment and module docstring
take review r3's wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_part_year_snap_by_point's only caller passes included_programs, so the
argument loses a default that no code or test used. The stub test now
compares the rerun's situation with the caller's plus SNAP take-up off,
instead of checking two of its keys. The California test's docstring
names the two programs the household doesn't get.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 13, 2026 22:34
@MaxGhenis
MaxGhenis merged commit dce4f22 into main Nov 13, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 3a6705b6 Deployed Nov 11, 2026 by vercel[bot]
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