Skip to content

Keep one spm_unit_benefits list so reforms that add a benefit stop dropping baseline programs #10226

Open

Description

@hua7450

Problem

spm_unit_benefits keeps its list of programs directly in Python, in policyengine_us/variables/household/income/spm_unit/spm_unit_benefits.py, not in a parameter. A reform that adds a benefit to SPM resources can't append to that list, so four reforms replace the whole variable with their own copy of it:

  • reforms/states/tx/rebate/tx_rebate.py (Add Texas $1,500 per-household rebate as a contributed reform #9037) is described as a "verbatim copy of current baseline + tx_rebate". Main has since gained ca_state_supplement, and the copy doesn't have it.
  • reforms/congress/tlaib/end_child_poverty_act.py, reforms/congress/tlaib/boost/boost_middle_class_tax_credit.py and reforms/congress/tlaib/economic_dignity_for_all_agenda/edaa_end_child_poverty_act.py are older copies.
    • They lack 28 to 29 of main's entries: every state supplement except Colorado's and Massachusetts's, the Washington and West Virginia programs, and ak_energy_relief (missing from two of the three).
    • They still list acp and ebb, and they use aca_ptc where main uses assigned_aca_ptc.

When one of these reforms is in effect, its copy replaces spm_unit_benefits for every household in the simulation. Any program missing from the copy then drops out of SPM resources in every state, not only in the reform's target group. The reform's SPM net income and poverty results include losses unrelated to the reform.

Example (from the review of #10174): once wy_ssp is in main, a Wyoming aged SSI-only single in 2027 has spm_unit_benefits of 13,202.26 at baseline and 12,962.26 under the Texas rebate reform. The $240 Wyoming supplement disappears.

tests/test_aggregate_list_integrity.py checks the reform copies only for contributed programs (added with the Trump dividend fix in ff71e66), so missing state programs aren't caught.

Proposed fix

  • Keep the list in one place that both the baseline variable and the reforms read. That could be a module-level list or helper next to spm_unit_benefits, or a parameter like gov.household.household_benefits.
  • Each reform appends only its own program (tx_rebate, ecpa_child_benefit, boost_middle_class_tax_credit) instead of keeping a copy.
  • Before replacing the Tlaib copies, check whether their other differences (acp, ebb, aca_ptc) are intended, and keep any intended difference explicit.
  • Update tests/test_aggregate_list_integrity.py to match, or drop its copy check once no copies remain.

Open PRs that rely on this

The open state SSP PRs add their programs to the baseline spm_unit_benefits only, and leave the reform copies to this fix:

🤖 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