Repository navigation
Keep one spm_unit_benefits list so reforms that add a benefit stop dropping baseline programs #10226
Description
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 gainedca_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.pyandreforms/congress/tlaib/economic_dignity_for_all_agenda/edaa_end_child_poverty_act.pyare 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
acpandebb, and they useaca_ptcwhere main usesassigned_aca_ptc.
- 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
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 likegov.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.pyto 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:
- Add Nevada optional state supplementation for 2026 #10001 (NV), Add New Hampshire state supplementation for 2026 #10156 (NH), Add New Jersey state supplementation for 2026 #10157 (NJ), Add New York state supplementation for 2026 #10158 (NY), Add North Carolina state supplementation for 2026 #10160 (NC), Add Ohio state supplementation for 2026 #10164 (OH)
- Add Oklahoma state supplementation for 2026 #10165 (OK), Add Oregon state supplementation for 2026 #10166 (OR), Add Pennsylvania state supplementation for 2026 #10167 (PA), Add Rhode Island state supplementation for 2026 #10168 (RI), Add South Dakota state supplementation for 2026 #10169 (SD), Add Utah state supplementation for 2026 #10170 (UT)
- Add Vermont state supplementation for 2026 #10171 (VT), Add Virginia state supplementation for 2026 #10172 (VA), Add Wisconsin state supplementation for 2026 #10173 (WI), Add Wyoming state supplementation for 2026 #10174 (WY)
🤖 Generated with Claude Code
Activity