Repository navigation
Align Wisconsin itemized credit with Schedule 1 and 2020 charity rules - #10311
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10311 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 2 -2
Lines 76 33 -43
Branches 2 0 -2
=========================================
- Hits 76 33 -43
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Retain the explicit Wisconsin Schedule A components and main mortgage insurance premium exclusion, including both sets of regression tests.
Subtract the modeled federal non-itemizer allowance only when claimed in 2020. Preserve full charitable gifts for federal itemizers and from 2021, and cite the historical five-percent rate.
The base formula (before 2020) had no test, so codecov/patch reported one uncovered line. At $150,000 of wages the 2019 Wisconsin standard deduction is 0, so 5% of a $10,000 gift gives $500. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review: Fix Wisconsin itemized credit counting charitable gifts twice in 2021PR #10311 (author: MaxGhenis), head
SummaryThe PR rebuilds the Wisconsin Schedule 1 base from four explicit components (medical, interest, charity and casualty) instead of The problem is #10186, which merged on
Status:
Critical (must fix)None. Should addressS1 (merge blocker). The 2020 line 10b exclusion reads a variable that
|
DTrim99
left a comment
There was a problem hiding this comment.
The law checks out (Wis. Stat. 71.07(5)(a)2/7, the 2020-22 Schedule 1, the 2020 instructions), and all 12 cases hand-check at the PR's base. Three should-address items: (1) merge blocker: #10186 merged after this CI run and moved the 2020 deduction into charitable_contributions_ald, so formula_2020 subtracts nothing on the merged tree ($500 instead of $485 for a 2020 non-itemizer with $10k of gifts); subtract charitable_contributions_ald and add a 2020 case built from person inputs; (2) #10186 already removed the 2021 double count, so reword the title, changelog and body; (3) refresh the rulespec-us#1671 extension. Three suggestions. Full report in the comment above.
|
David, thanks. This answers your 10-22 review at
176 targeted tests pass. An independent delta review is queued. |
PR Review (round 2): Align Wisconsin itemized credit with Schedule 1 and 2020 charity rulesPR #10311 (author: MaxGhenis), head
Line numbers below refer to SummaryAll three should-address findings are fixed:
The author also took G2 and G3. G1 was declined with a reason, which is fine for a suggestion. CI is 29/29 green at the head, and the merge with current Prior findings
New findingsCritical: none. Should address: none. Suggestions: G4 (optional, out of scope). The model's 2020 Wisconsin standard deduction uses 2021 amounts.
VerifiedHand-checks of every new or changed expectation:
Law and code:
AxiomLine:
CI29 pass, 0 failed, 0 pending. I re-checked
Branch
0 critical, 0 should and 1 optional suggestion are open at this head. Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Round 2: all three should items are fixed. formula_2020 subtracts charitable_contributions_ald (both new 2020 cases trace to 485), the title, changelog and body describe the real change, and #1671 maps this head. One optional suggestion about 2020 WI standard deduction parameters. Full report in the comment above.
|
US + core hub merge audit, us#10311 at
|
Wisconsin's itemized deduction credit now builds its base from the four Schedule 1 components: medical, interest, charitable, and casualty deductions. This excludes miscellaneous deductions, keeps SALT outside the base, and preserves the existing mortgage-insurance adjustment, Wisconsin standard-deduction subtraction, 5% rate, and nonrefundability calculation.
For 2020, the charitable component subtracts
charitable_contributions_ald, the amount actually claimed on federal Form 1040 line 10b. Main's #10186 moved the 2020 deduction into that variable; its formula already returns zero for federal itemizers. A non-itemizer with $10,000 of gifts and $300 claimed above the line has a $9,700 Wisconsin charitable component and, with zero Wisconsin standard deduction, a $485 potential credit. Federal itemizers retain the full eligible gift amount.The branch merges main at
dc925ce7205e098cd59be3091ef22766f4b34b66. #10186 already corrected the 2021 double count on main. The 2021 $500 gift case is retained as a regression guard; $515 describes behavior before #10186. The remaining change relative to main is the explicit Schedule 1 base (including the miscellaneous exclusion) and the 2020 claimed-deduction subtraction. The 2019 case protects the unchanged federal charitable component and historical 5% rate. Federal non-itemizers remain eligible through hypothetical Schedule A deductions.Sources and hand calculations:
Validation at
d84a976854196715bd74533fc5950720c3d6654e: 176 passed across eight files, one foreground process per file, with all required thread caps set to 4.test_source_conflicts.pymake format(Ruff formatting and checks) andgit diff --checkpassed. An initial startup was interrupted under heavy host load, and a run with periodic stack diagnostics crashed during startup; both affected files passed on retry. No policy assertion failed in the completed runs.Impact: microsimulation remains with the hub.
axiom: TheAxiomFoundation/rulespec-us#1671 queued; historical corpus ingestion, signed-release re-pin, and separate encoder approval were recorded as blockers. The hub will refresh the existing extension with this head, the actual
charitable_contributions_aldmapping, the 2019 case, and all charitable-component tests.Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
dc925ce720against this PR's headd84a976854, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.wi_itemized_deduction_creditwi_income_taxstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsNo record changes in either year: the largest change for any record is $0.0005, which is float32 rounding, and the summed differences of a few dollars come from that rounding across about 11bn of Wisconsin tax. The default dataset has no 2020 data, so the 2020 charitable rule this PR adds is covered by the tests, not by this run.
Comparison files are in
fixes/10311-impact/on the hub host.