Repository navigation
Apply the New York itemized deduction adjustment to IT-196 line 45 - #10658
PavelMakarchuk wants to merge 6 commits into
Conversation
The line 46 worksheets take a share of line 45, which is after the line 40 limitation and before the college tuition deduction (line 48). Both incremental reductions took the share of the total before the limitation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review: Apply the New York itemized deduction adjustment to IT-196 line 45SummaryThe PR changes the base of the Tax Law 615(f) itemized deduction adjustment (IT-196 line 46, Worksheets 3 and 4) in two ways:
The rest of the change is sound:
Open items:
Critical (must fix)1. Taking the college tuition deduction out of the 615(f) base contradicts the statute in every claimed year. Files: The statute (N.Y. Tax Law 615) reads:
So the statutory base is the federal pre-TCJA deduction after section 68, with every 615(c)-(e) modification. That includes (d)(4) tuition and excludes only (f) and (g). The form's IT-201 layout is the only source for leaving tuition out:
So for nonresident and part-year filers the agency itself puts tuition inside line 45, which matches the statute. The line 48 placement is a layout choice for IT-201 filers, not a reading of 615(f). It also matches no consistent reading of the statute:
Project rules settle this. CONTRIBUTING.md#source-conflicts says to follow the statute over a form, and lists the canon "the operative words govern over form shortcuts". The model already takes the statute's side at the over-$1,000,000 tier. Impact, using the PR's integration household plus a $10,000 tuition deduction (2021, joint, NYAGI $360,200). Line 40 stays at 49,359.50 because tuition is not on the line 40 worksheet.
Fix:
Should address1. The PR body has no axiom line. This is a staff policy fix, so CLAUDE.md "Axiom Parity" requires one line in the PR body. There are no PR comments, and rulespec-us has no 615(f) issue: the NY items open there are #2041 (615(a) mortgage limits, for #10596), #2028 (613/615/606(t), for #10100), #1668 and #1525. Fix: either encode the provision, or file a dispatch-ready
The issue should state the base the PR ends up with: after line 40, with or without tuition per Critical 1. 2. No test pins the change to Reverting that formula to
Fix: add a case to
Suggestions
Verified correctLine numbering by year.
Order of the line 40 limitation. Placing the base after line 40 is correct under both the form (line 45 builds on line 42 = line 40 − line 41) and the statute. Subsection (a) counts deductions "allowed" under pre-TCJA law, which means after the IRC 68 limitation. Hand checks. At least 8 expectations:
Other checks.
Axiom line assessmentThe PR body has no axiom line and the PR has no comments, so this is missing. It is a staff policy change, so a valid line is required (Should 1). No 615(f) issue exists in rulespec-us. CI status
Branch status
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes per the review above: 1 critical (the 615(f) base leaves out the college tuition deduction, which Tax Law 615(a) includes; the IT-201 line 48 placement is a form layout, and IT-203 puts tuition inside line 45), 2 should (no axiom line; the higher-tier formula change is unpinned), 4 suggestions.
Tax Law 615(f) takes its percentage of the deduction allowable under 615(a), which includes the 615(d)(4) college tuition deduction. IT-196 line 45 holds it (line 43) for Form IT-203 filers; the IT-201 line 48 placement is a form layout. Both incremental reductions now use ny_itemized_deductions_max minus the line 40 limitation. Add tests with tuition for both tiers, a higher-tier case after the line 40 limitation, and an integration case with tuition expenses. Record the statute and form readings as a source-conflict candidate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450
left a comment
There was a problem hiding this comment.
Requesting changes at 2afa11600c for one blocking item. The formula change itself is now right.
Blocking
source_conflicts/candidates.yamldoesn't parse. The new entry'snote:is a plain multi-line scalar that containschecked: forms 2018-2021 …(line 6787, column 29). YAML reads the:as a mapping and stops with "mapping values are not allowed here". That fails all four candidate tests inpolicyengine_us/tests/code_health/test_source_conflicts.py, which is why Rest (Python shard 5) and Check Rest Python shards are red. Quoting the note, or rewording it to drop the:, fixes it.
Fixed
- David's critical. Both incremental reductions now use
ny_itemized_deductions_max - ny_itemized_deductions_phase_out. That is after the line 40 limitation, with the 615(d)(4) tuition deduction kept in the base, as Tax Law 615(a) and (f) require. - New cases checked by hand:
- Lower tier: 0.25 × 49,359.50 = 12,339.875; 0.25 × 60,000 = 15,000; 0.25 × 59,359.50 = 14,839.875.
- Higher tier: 0.5 × 0.25 × 49,359.50 = 6,169.9375 and 0.5 × 0.25 × 59,359.50 = 7,419.9375.
- Integration with tuition: NY itemized 44,519.625, taxable income 315,680.375, tax 0.0633 × 315,680.375 = 19,982.57.
- The higher-tier change (David's should 2) is now tested.
- The
max_(…, 0)floor (David's suggestion 1) is removed. - The conflict is recorded as a candidate with
follows: statute.
Nits (optional)
- The 0.5
absolute_error_marginon the two integration cases applies to every output in the case, not justny_income_tax_before_credits. Moving the tax assertion into its own case would keep the itemized amounts at 0.01. - The PR body has no
axiom:line (David's should 1), and its Summary still says the base excludes college tuition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the tax-before-credits assertions into their own cases, so that only they use the 0.5 margin for the supplemental tax rounding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review (round 2): Apply the New York itemized deduction adjustment to IT-196 line 45SummaryThe fix commits address every round-1 finding and every point in hua7450's review:
One item is still open, and it is about the branch, not the code. Main's #10300 (merged 2026-11-08) changed the same What we know about the head without CI:
Merge main and get a green run, and this is ready to approve. Prior findings
New findingsCriticalNone. Should1. The PR conflicts with main in
Fix:
The ids stay unique, and none of them is in main's pinned register, so the candidate checks should pass. Risk is low:
Suggestions1. Correct one sentence in rulespec-us#2143. Under "PolicyEngine implementation", the issue says: "with the $50,000 denominator, the fraction is exact to four places for whole-dollar New York AGI." That holds only when the excess is a multiple of $5:
So the claim is small, but it is wrong, and an encoder could rely on it in a parity comparison. Fix:
VerifiedHand checks of every new or changed expectation. All of these pass locally at the head:
Other checks.
Axiom
It is dispatch-ready:
It mirrors d470591. The only later commit splits test cases and changes no code, interpretation or expected value, so the issue matches the head. Suggestion 1 covers its one inaccurate sentence and the SHA refresh after the merge. CI
Branch
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Round 2: every round-1 item and hua7450's review are fixed. One should remains: the PR conflicts with main in source_conflicts/candidates.yaml (#10300), so no CI has run on this head. Merge main (keep main's block, add this PR's entry) and get a green run; 2 optional suggestions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review (round 3): Apply the New York itemized deduction adjustment to IT-196 line 45SummarySince round 2 (head d7103c5) there is one new commit: 410ea26, a merge of main with one hand-resolved block in
The branch is now 6 ahead and 0 behind main, and it merges cleanly. CI ran on the head, and all 33 recorded jobs passed, including the PR's three NY test files and the source-conflict guard. The workflow run itself is marked "failure" because two Contrib matrix jobs never started (see CI). That is an infrastructure problem, not a finding. Static checks show those two groups cannot be affected by this change. The PR's own code and tests are byte-for-byte what we reviewed in round 2. The round-2 Should is fixed. The two optional suggestions are still open. Prior findings
New findingsCriticalNone. ShouldNone. SuggestionsNone new. The two open ones are in the table above. VerifiedThe hand-resolved
Source-conflict guard at the head.
No other changes from the merge. Expectations. No expected value is new or changed since round 2. The round-2 hand checks still hold, and CI passed each of them at the head:
Main-side guards.
Axiom
It mirrors d470591. Since then the branch has only split test cases (d7103c5) and merged main (410ea26). No code, interpretation or expected value has changed, so the issue is not stale in substance. Suggestion 2 still applies:
CIHead 410ea26, run 42665231927 (re-checked at the end of the review):
The workflow run's own conclusion is "failure", with every recorded job a success. Compared with the 36-job run at d470591, three jobs are absent:
We classify these two as infrastructure, not a finding:
"Re-run failed jobs" on run 42665231927 would let the workflow run read green before merge. Branch
Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Round 3: the merge of main resolves the candidates.yaml conflict correctly (main's entries intact, this PR's entry once), and CI ran on this head with all completed jobs passing; please re-run the two Contrib jobs that never started before merging. Two optional suggestions remain.
Summary
New York's itemized deduction adjustment (Tax Law § 615(f), IT-196 line 46) takes a percentage of "the New York itemized deduction otherwise allowable under subsection (a)". That is the deduction after the line 40 limitation (the pre-TCJA overall limitation), with the § 615(c)–(e) modifications, including the § 615(d)(4) college tuition deduction.
ny_itemized_deductions_lower_incremental_reduction(§ 615(f)(1)) andny_itemized_deductions_higher_incremental_reduction(§ 615(f)(2)) took the percentage ofny_itemized_deductions_max, which is before the line 40 limitation. Both now useny_itemized_deductions_max - ny_itemized_deductions_phase_out.Found from PolicyEngine/policyengine-taxsim#1512, where TAXSIM matches the worksheet and PolicyEngine did not.
Evidence
N.Y. Tax Law § 615(f)(1): "An amount equal to the New York itemized deduction otherwise allowable under subsection (a) of this section, multiplied by a percentage, ..."
2021 IT-196 instructions, PDF p. 20, line 46, Worksheet 3, line 6 and Worksheet 4, line 3: "Enter 25% (.25) of line 45". Line 45 follows line 40.
Source conflict: college tuition
The 2021 IT-196 puts the tuition deduction inside line 45 for Form IT-203 filers (line 43), but after line 46 for Form IT-201 filers (line 48). § 615(a) includes "the modifications specified in this section", among them § 615(d)(4), so the PR follows the statute and keeps tuition in the base for all filers.
source_conflicts/candidates.yamlrecords this withfollows: statute, for this tier and for the § 615(g) tier, which already follows the statute inny_itemized_deductions.Example (taxsim #1512)
2021, joint, interest 360,200, mortgage interest 50,000:
With a $10,000 tuition deduction, the base is 59,359.50, line 46 is 14,839.875 and the deduction is 44,519.625.
Tests
Note: #10596 (open) changes
ny_itemized_deductions_maxandny_itemized_deductions_phase_out, but not these two formulas.axiom: TheAxiomFoundation/rulespec-us#2143 queued
🤖 Generated with Claude Code