Model NY IT-214 2025+ flat credit-amount tables; fix elderly-dependent tier and gate rate - #9313
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9313 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 8 1 -7
Lines 147 37 -110
Branches 0 2 +2
==========================================
- Hits 147 37 -110
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:
|
…+ gate (ref PolicyEngine#9310) Follow-up to PolicyEngine#9301. Three corrections to ny_real_property_tax_credit: - 2025+ amount: Part RR of Ch. 59 of the Laws of 2025 replaced the 50%-of-excess formula (capped by the 18-row chart) with a flat lookup by federal-AGI bracket, gated by 'property tax > FAGI x rate'. Add Table A (65+) and Table B (<65) amount parameters + a uses_flat_amount_table flag (2025-01-01); the formula branches to the flat table for 2025+ and keeps the pre-2025 formula unchanged. - Elderly tier: drop the ~is_dependent term so a claimed dependent aged 65+ qualifies the unit for the elderly amount (2024 and 2025 IT-214 Line 7). - Gate rate: excess_real_property_tax was missing type: single_amount, so its .calc summed the bracket rates (0.12 at $6k) instead of the single Table-1 rate (0.045). Add type: single_amount so the income gate uses the correct rate (affects 2024 too). NY RPTC suite 19/19, incl. a regression case nonzero only under the single-rate gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
982ecc3 to
d8007aa
Compare
Income exactly at a band top (e.g. FAGI 3,000) was shifted into the next band by Table 1, Tables A/B, and the pre-2025 credit-limit chart, flipping the line 19 gate and mis-sizing the cap. Look up all five scales with right=True over band-top thresholds (first threshold -.inf so income 0 stays in the first band), round income to whole dollars half up per IT-214-I before the lookups and the 18,000 limit, and fix a 1_0000 typo threshold. Adds boundary and rounding regression tests; corrects the 2022 expectation at HGI 5,000 to the 4,001-5,000 chart row cap (67). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…into pr/DTrim99/9313
|
Reviewed against the primary sources and pushed a follow-up commit (24272a7, plus a merge of main). Verified as correct
Fixed in the follow-up commit Band-boundary off-by-one. Every IT-214 income table uses closed integer bands ($0 to 3,000, then 3,001 to 5,000 — Table 1, Tables A/B, and the pre-2025 credit-limit chart, see 2024 IT-214-I pages 2–3), but Whole-dollar rounding. IT-214-I page 1: "enter whole dollar amounts only… drop amounts below 50 cents and increase amounts from 50 to 99 cents to the next dollar." Income is now rounded half up ( Test corrections. Nine regression tests added (five boundary, four rounding). One pre-existing 2022 expectation encoded the boundary bug: at HGI exactly $5,000 the 2022 chart row "4,001 to 5,000" gives a non-elderly cap of 67, not 65; updated accordingly. Changelog. Rewritten to list the changes; the clause about applying the single Table-1 rate in the gate was removed since that fix already landed on main via 4d669d1 (#9301). All 29 tests in the credit's test file pass locally after merging main. |
hua7450
left a comment
There was a problem hiding this comment.
Verified against the 2025 IT-214 form and the 2022/2024 IT-214-I instructions; Table A/B values, the line 19 gate, and the elderly-household-member tier all match the sources. Band-boundary and whole-dollar-rounding corrections pushed directly to the branch with regression tests (see review comment above). All 33 checks green after merging main.
Summary
Models the New York IT-214 real property tax credit's 2025+ flat credit-amount tables and fixes two related defects. Closes #9310.
Changes
1. 2025+ flat amount tables (Part RR of Ch. 59 of the Laws of 2025)
For tax years beginning on/after 2025-01-01 the credit amount is a flat lookup by federal-AGI bracket, with "property tax > FAGI × rate" as a pure gate — replacing the pre-2025 "50% of excess, capped by the 18-row chart" formula. New parameters (dated 2025-01-01):
amount/elderly.yaml— Table A (65+): $375 / 330 / 300 / 260 / 230 / 200 / 150 by FAGI bracket.amount/non_elderly.yaml— Table B (<65): $75 / 70 / 60 / 50 (wider, distinct brackets).uses_flat_amount_table.yaml— bool flag flipping true at 2025-01-01 (mirrors Fix NY IT-214 real property tax credit eligibility #9301'suses_household_gross_income).The formula branches on the flag: 2025+ returns the gated flat amount; ≤2024 is unchanged. Source: 2025 IT-214 Tables A/B.
2. Elderly tier now includes a 65+ dependent
meets_age_conditiondropped the~is_dependentterm. Both the 2024 and 2025 forms grant the elderly amount if "you, your spouse, or a dependent you claimed" was 65+ (Line 7). Previously a unit whose only 65+ member was a claimed dependent wrongly got the non-elderly amount. Sources: 2024 IT-214-I, 2025 IT-214.3. Gate rate fix —
excess_real_property_taxsingle rate (pre-existing bug, folded in)While implementing the 2025 gate I found
excess_real_property_taxwas missingtype: single_amount, so its.calc()summed the bracket rates (0.12 at $6k, 0.35 at $16k) instead of returning the single Table-1 rate the form specifies (0.045, 0.065). This understated the credit via an inflated income threshold — and it affected 2024 as well as 2025. Addedtype: single_amountso the gate uses the correct rate. The existing 2024 cases were maximum-cap-bound so their outputs are unchanged, but this corrects the underlying gate for marginal cases in both years.Tests
NY RPTC suite 19/19 (
.venv-py312). Coverage added: Table A/B brackets across the ladder, the $X,001 boundary transitions, a gate-fails → $0 case, the dependent-65+ case for 2025 and 2024 (locks item 2), a FAGI-over-$18k → $0 case, and a single-rate-gate regression case (FAGI $16k, property tax $2k → $150 under the fix, $0 under the old summed gate).🤖 Generated with Claude Code