Skip to content

Fix WI retirement income exclusion not reflected in state_income_tax#7823

Open
PavelMakarchuk wants to merge 4 commits intomainfrom
fix-wi-retirement-exclusion-state-income-tax
Open

Fix WI retirement income exclusion not reflected in state_income_tax#7823
PavelMakarchuk wants to merge 4 commits intomainfrom
fix-wi-retirement-exclusion-state-income-tax

Conversation

@PavelMakarchuk
Copy link
Collaborator

Summary

  • Fix state_income_tax overstating Wisconsin tax for retirees eligible for the retirement income exclusion (Schedule SB Line 16)
  • wi_income_tax correctly computes min(standard_tax, exclusion_tax) but state_income_tax bypassed this via the decomposed before_refundable - refundable aggregation

Closes #7805.

Change

Modified wi_income_tax_before_refundable_credits to account for the retirement exclusion: when the exclusion is in effect, returns min(standard, exclusion_tax + refundable) so that after state_income_tax subtracts refundable credits, the result equals min(standard - refundable, exclusion_tax) — matching wi_income_tax.

Test plan

🤖 Generated with Claude Code

Adjust wi_income_tax_before_refundable_credits to account for the
retirement income exclusion so the decomposed aggregation
(before_refundable - refundable) matches the min(standard, exclusion)
logic in wi_income_tax.

Closes #7805.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6e42726) to head (5e1547c).
⚠️ Report is 41 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #7823    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           64         2    -62     
  Lines          707        32   -675     
  Branches         1         1            
==========================================
- Hits           707        32   -675     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

PavelMakarchuk and others added 3 commits March 22, 2026 19:24
…tern

Move retirement exclusion min() logic entirely into
wi_income_tax_before_refundable_credits and remove it from wi_income_tax,
keeping the codebase consistent with the standard state tax pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adapt the three unit tests to stub inputs upstream of
wi_income_tax_before_refundable_credits so they exercise the exclusion
logic in its new location.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review March 22, 2026 23:31
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.

WI retirement income exclusion not reflected in state_income_tax

1 participant