Fix individual_eitc reform not responding to parameter changes#7780
Open
DTrim99 wants to merge 2 commits intoPolicyEngine:mainfrom
Open
Fix individual_eitc reform not responding to parameter changes#7780DTrim99 wants to merge 2 commits intoPolicyEngine:mainfrom
DTrim99 wants to merge 2 commits intoPolicyEngine:mainfrom
Conversation
- 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>
dc05f03 to
a8b2b85
Compare
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>
722064f to
a727a7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
individual_eitc(Winship) reform which was not responding to parameter changes in the app.Root cause: The reform checked
enabledat creation time, not simulation time. Since structural reforms are created with base parameters before user modifications, settingenabled: truein the app had no effect.Solution: Restructured the reform to follow modern patterns:
in_effectinside the formula usingwhere()(like GA SB520, NJ budget reforms)enabled→in_effectfor consistencytakes_up_eitcmultiplierChanges
policyengine_us/reforms/winship.py- Restructured to checkin_effectinside formulapolicyengine_us/parameters/gov/contrib/individual_eitc/in_effect.yaml- New parameter (replacesenabled.yaml)policyengine_us/parameters/gov/contrib/individual_eitc/agi_eitc_limit.yaml- Updated descriptionpolicyengine_us/tests/policy/reform/winship.yaml- Updated tests with proper structureTest plan
in_effect: trueto verify reform activatesin_effect: falseCloses #7779
🤖 Generated with Claude Code