Skip to content

Fix individual_eitc reform not responding to parameter changes#7780

Open
DTrim99 wants to merge 2 commits intoPolicyEngine:mainfrom
DTrim99:fix-individual-eitc-reform
Open

Fix individual_eitc reform not responding to parameter changes#7780
DTrim99 wants to merge 2 commits intoPolicyEngine:mainfrom
DTrim99:fix-individual-eitc-reform

Conversation

@DTrim99
Copy link
Collaborator

@DTrim99 DTrim99 commented Mar 13, 2026

Summary

Fixes the individual_eitc (Winship) reform which was not responding to parameter changes in the app.

Root cause: The reform checked enabled at creation time, not simulation time. Since structural reforms are created with base parameters before user modifications, setting enabled: true in the app had no effect.

Solution: Restructured the reform to follow modern patterns:

  • Check in_effect inside the formula using where() (like GA SB520, NJ budget reforms)
  • Renamed enabledin_effect for consistency
  • Added missing takes_up_eitc multiplier
  • Changed AGI limit behavior: 0 now means "no limit" instead of "no EITC"

Changes

  • policyengine_us/reforms/winship.py - Restructured to check in_effect inside formula
  • policyengine_us/parameters/gov/contrib/individual_eitc/in_effect.yaml - New parameter (replaces enabled.yaml)
  • policyengine_us/parameters/gov/contrib/individual_eitc/agi_eitc_limit.yaml - Updated description
  • policyengine_us/tests/policy/reform/winship.yaml - Updated tests with proper structure

Test plan

  • Tests set in_effect: true to verify reform activates
  • Tests verify baseline EITC when in_effect: false
  • Tests verify AGI limit = 0 means no limit
  • Tests verify AGI limit blocks EITC when exceeded

Closes #7779

🤖 Generated with Claude Code

- Restructure reform to check `in_effect` inside formula using `where()`,
  following modern reform patterns (like GA SB520, NJ budget reforms)
- Rename `enabled` parameter to `in_effect` for consistency
- Add `takes_up_eitc` multiplier that was missing from reform
- Change AGI limit behavior: 0 now means "no limit" instead of "no EITC"
- Update tests to set `in_effect: true` and use proper naming conventions
- Add backward compatibility aliases for existing code

Closes PolicyEngine#7779

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@DTrim99 DTrim99 force-pushed the fix-individual-eitc-reform branch from dc05f03 to a8b2b85 Compare March 13, 2026 16:00
Instead of using simulation branches (which had caching issues),
compute the EITC formula directly for each spouse's individual
earnings using the EITC parameters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@DTrim99 DTrim99 force-pushed the fix-individual-eitc-reform branch from 722064f to a727a7a Compare March 13, 2026 16:12
@DTrim99 DTrim99 requested a review from PavelMakarchuk March 13, 2026 19:08
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.

Fix individual_eitc reform not responding to parameter changes

1 participant