Count reported SNAP and WIC receipt in categorical eligibility lists - #9248
Count reported SNAP and WIC receipt in categorical eligibility lists#9248hua7450 wants to merge 3 commits into
Conversation
Categorical-eligibility parameter lists referenced only the modeled benefit amounts (snap, wic), omitting the reported-receipt bare inputs (receives_snap, receives_wic). Households reporting receipt whose modeled amount is $0 were dropped from categorical eligibility, unlike the hardcoded formulas (Head Start, WIC, Medicaid community engagement) which OR both arms. Fixes #9247 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Program Review — multi-agent auditPR #9248 — Reported-receipt flags ( Scope
Verified correct (checks that passed)
Critical (must fix)None. Should addressBoth items are test-robustness gaps flagged by the test-coverage agent. Every wired program already has an isolated positive case and a negative control (no correctness gap), so these are hardening, not blockers.
Suggestions
Validation summary
Review severity: APPROVE0 criticals; completeness verified (exactly the 7 snap/wic bool lists fixed, all 5 dollar-sum lists correctly left alone, none missed); entity and period aggregation confirmed for all 7 consumers including the SPMUnit→Person MBTA/DART projection. Strong, well-scoped bug fix — the two should-address items are test hardening, not correctness. Next steps
🤖 Generated by /review-program (Claude Code) |
Isolate the DART WIC case by zeroing every other qualifying program, and add multi-person SPM unit cases to both cross-entity consumers (DART and MBTA) so the SPMUnit-to-Person projection of receives_snap is locked in for units with more than one member. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…into receives-flags-categorical-eligibility
|
Thanks for the thorough audit. Applied both should-address items. 1. DART WIC case isolation. The "mother" case now zeroes every other qualifier — 2. Multi-person SPMUnit→Person projection. Added a 2-person case to both cross-entity consumers, not just DART: a parent + child SPM unit with 19 tests pass across the two files. Branch is merged up to current On Suggestion 1 — already done, and slightly wider than proposed. #9251 / #9252 cover the same bug class for Worth noting one thing your review surfaced that #9252 does not cover: IHWAP's list also carries Also flagging an asymmetry for #9252 rather than here: Suggestions 2–5 noted; leaving them as-is since the existing negative controls cover the Pell case. |
Summary
Categorical-eligibility parameter lists referenced only the modeled benefit amounts (
snap,wic) and omitted the reported-receipt bare inputs (receives_snap,receives_wic). A household that reports receiving SNAP or WIC but whose modeled amount is $0 was therefore dropped from categorical eligibility in seven programs.Fixes #9247
Mechanism
receives_snapis a bare input:bool,SPMUnit, MONTH, no formula.receives_wicis the same atPersonlevel.snapisdefined_for = "takes_up_snap_if_eligible";wicisdefined_for = "takes_up_wic_if_eligible".So the modeled amount is $0 for a reporting household whenever the takeup draw is negative, income lands just over the limit, or member composition makes it ineligible. Formulas that hardcode the check already handle this by ORing both arms —
is_head_start_categorically_eligible.py:26-31,meets_wic_categorical_eligibility.py:16-17,medicaid_community_engagement_pass_through_eligible.py:31-32. The parameter lists carried only the amount variable.Precedent for a receipt flag in a parameter list:
receives_medicaidingov/aca/qualifying_non_marketplace_health_coverage.yamlandgov/hhs/chip/disqualifying_health_coverage.yaml.Changes
receives_snapadded to six lists,receives_wicto four:gov/usda/school_meals/categorical_eligibility.yamlreceives_snapmeets_school_meal_categorical_eligibilitygov/fcc/lifeline/categorical_eligibility.yamlreceives_snapis_lifeline_eligible,is_acp_eligiblegov/fcc/acp/categorical_eligibility.yamlreceives_wicis_acp_eligiblegov/states/ma/dot/mbta/.../applicable_programs.yamlreceives_snapma_mbta_enrolled_in_applicable_programsgov/states/ca/cpuc/care/eligibility/categorical.yamlca_care_categorically_eligiblegov/states/tx/dart/qualifying_programs.yamltx_dart_reduced_fare_program_eligiblegov/ed/pell_grant/efc/simplified/benefits.yamlpell_grant_simplified_formula_appliesEntity aggregation was checked per file:
receives_wicisPerson-entity and every consumer aggregates person → SPMUnit / Household / TaxUnit;receives_snapisSPMUnit-entity and the two Person-entity consumers (MBTA, DART) project SPMUnit → Person. All consumers are YEAR-defined while both flags are MONTH, soaddsums up to 12 monthly bools; every consumer either thresholds with> 0or casts into aboolvariable, so the result is correct in all cases.The DART variable's own docstring already described its list as "(SNAP, Medicaid, Medicare, CHIP, TANF, WIC, etc.)", so receipt was the intent.
Deliberately not changed
These lists sum dollars, so a bool would contribute $1 of phantom income:
gov/states/ca/cpuc/income_sources.yaml(SNAP and WIC as counted income for CARE/FERA)gov/local/ca/la/dwp/ez_save/income_sources.yaml(SNAP)gov/states/ma/tax/income/credits/senior_circuit_breaker/income/disallowed_deductions.yaml(consumed byma_scb_total_income)Reporting aggregates (
gov/household/household_benefits.yaml,cbo_means_tested_transfers.yaml,spm_unit_benefits.py) are also unchanged — their consumers are net-income and display variables, not program eligibility tests.Impact
This expands categorical eligibility in microsimulation for households that report receipt but model to $0. No partner contract test expectations were edited. The MBTA partner edge-case file (
tests/policy/baseline/partners/analytics_coverage/edge_cases/state/ma/mbta.yaml) passes unchanged, and the full 630-test partner suite passes with no expectations edited.Test plan
ma_mbta_enrolled_in_applicable_programs, which previously had nonetests/.../partners/.../state/ma/mbta.yamlpasses unchanged