Skip to content

Comments

Fix bug described in issue #405#408

Merged
martinholmer merged 2 commits intomasterfrom
fix-bug
Feb 19, 2026
Merged

Fix bug described in issue #405#408
martinholmer merged 2 commits intomasterfrom
fix-bug

Conversation

@martinholmer
Copy link
Collaborator

@martinholmer martinholmer commented Feb 19, 2026

Fixes #405 by using correct PolicyEngine-US name for PUF variable E09900.

The following test failures will be fixed in a subsequent pull request:

E           ValueError: 
E           WEIGHT VARIABLE ACT-vs-EXP DIFFS:
E           WEIGHT_DIFF:sdev,act,exp,atol,rtol= 1142.5726988805463 1140.202438 0.0 0.0005
E tests/test_weights.py:34: ValueError

E           ValueError: 
E           ACT-vs-EXP TAX EXPENDITURE DIFFERENCES:
E           *** actual
E           --- expect
E           ***************
E           *** 1,3 ****
E           ! YR,KIND,EST= 2023 paytax 1385.3
E           ! YR,KIND,EST= 2023 iitax 2236.4
E           ! YR,KIND,EST= 2023 ctc 128.8
E           --- 1,3 ----
E           ! YR,KIND,EST= 2023 paytax 1386.6
E           ! YR,KIND,EST= 2023 iitax 2238.9
E           ! YR,KIND,EST= 2023 ctc 129.1
E           ***************
E           *** 5,7 ****
E           ! YR,KIND,EST= 2023 social_security_partial_taxability 57.3
E           ! YR,KIND,EST= 2023 niit -43.8
E           ! YR,KIND,EST= 2023 cgqd_tax_preference 175.9
E           --- 5,7 ----
E           ! YR,KIND,EST= 2023 social_security_partial_taxability 57.4
E           ! YR,KIND,EST= 2023 niit -43.9
E           ! YR,KIND,EST= 2023 cgqd_tax_preference 176.0
E tests/test_tax_expenditures.py:53: ValueError

martinholmer and others added 2 commits February 19, 2026 13:22
E03400 (penalty on early withdrawal of savings) and E09900 (penalty tax
on qualified retirement plans) are distinct variables but were both mapped
to "early_withdrawal_penalty", causing E03400 to be silently overwritten.
Rename the E09900 mapping to "retirement_plan_penalty_tax" throughout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@martinholmer martinholmer merged commit dd0fd45 into master Feb 19, 2026
1 check passed
@martinholmer martinholmer deleted the fix-bug branch February 19, 2026 20:22
martinholmer added a commit that referenced this pull request Feb 19, 2026
Update expected test results for bug fix in PR #408
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.

Duplicate keys in newvars dictionary in the preprocess_puf function in puf.py

1 participant