Skip to content

The CSFP registry entry names a variable the model doesn't define and lists groups CSFP no longer serves #11075

Open

Description

@MaxGhenis

The program registry lists CSFP with variable: csfp and the notes "Nutritious foods for low-income pregnant/postpartum women, infants, children, and seniors" (programs.yaml L326-L337).

The model defines no csfp variable. It computes the benefit in commodity_supplemental_food_program, and its eligibility formula requires an age of at least min_age, which min_age.yaml sets at 60. test_programs_registry.py checks that each entry's variable exists, but it lists ("csfp", "variable") in KNOWN_UNRESOLVED and skips this entry. system.py points modelled_policies at the registry, the /us/metadata API serves it, and the model coverage page shows each entry's notes and builds a computation-tree link from its variable name.

What the law says

Section 4102 of the Agricultural Act of 2014 limits CSFP to "low-income persons aged 60 and older". Women, infants and children receiving CSFP on February 6, 2014 kept their benefits until they lost eligibility under the old rules. USDA's 2020 final rule reports that the last of them had left by February 2020, and it amends 7 CFR part 247 "to remove all remaining references to women, infants, and children". Under 7 CFR 247.9(a), "individuals must be at least 60 years of age and meet the income eligibility requirements".

Where the registry and the law differ

For example, take a pregnant 25-year-old whose household income equals the poverty guideline. The notes say CSFP serves them. Under 247.9(a) they can't qualify, and the model agrees: 25 >= 60 fails, so commodity_supplemental_food_program returns $0. The model computes the right amount, while the notes describe the program as it stood before 2014, in an entry that marks 2024 through 2026 as verified.

What would fix it

Change lines 333 and 337 of programs.yaml so the entry reads:

    variable: commodity_supplemental_food_program
    parameter_prefix: gov.usda.csfp
    verified_start_year: 2024
    verified_end_year: 2026
    notes: Nutritious foods for low-income people aged 60 and older

Then delete ("csfp", "variable"), (line 27) from KNOWN_UNRESOLVED, or test_known_unresolved_references_are_still_unresolved fails once the variable resolves. The fix changes no formula, parameter or test expectation.

Comments in the partner CSFP tests also name the old income base. Line 5 of federal.yaml reads:

# NOTE: school_meal_countable_income (the CSFP income base) includes computed

Since #10873, CSFP eligibility reads csfp_countable_income, so the comment should name that variable. Its point still holds, because csfp_countable_income counts ssi (income/sources.yaml L15). Four more comments call CSFP's income base "the school-meal income base". The ones in federal.yaml L223-L224 and L301-L302 and ma.yaml L43-L44 should name csfp_countable_income, and tx.yaml L5-L6 should name Texas's measure, tx_dta_csfp_countable_income. The repository's rule for partner API contract tests calls for one designated editor per file, so each file's editor should make its edits. They change no expected value.

Related: #9495 makes the same variable change, but it leaves the notes and doesn't delete the KNOWN_UNRESOLVED key.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions