Repository navigation
Model Hawaii's claim of right deduction and credit (section 1341 as operative in Hawaii from 2022) - #10200
Model Hawaii's claim of right deduction and credit (section 1341 as operative in Hawaii from 2022)#10200MaxGhenis wants to merge 29 commits into
Conversation
G.S. 105-153.5(a)(2)d, added by S.L. 2016-5 for 2014 and later, lets North Carolina itemizers deduct repayments of income included in AGI in an earlier year under a claim of right (Form D-400 Schedule A line 8). Repayments above $3,000 are deductible in full; smaller ones are reduced by 2% of federal AGI less other miscellaneous itemized deductions, which the 2016 and 2025 NCDOR worksheets both reproduce. PE had no input for these repayments, so it adds claim_of_right_repayment (person level; only the head's and spouse's count) and moves North Carolina's uncapped itemized items into a parameter list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…C taxed Review r1 (subfleet 20261009-090558-nc-itemized-review): - S.L. 2026-31 section 1.8 rewrites G.S. 105-153.5(a)(2)d for taxable years beginning on or after January 1, 2026: the repaid amount must have been included in AGI "as modified in G.S. 105-153.5 and G.S. 105-153.6" in the earlier year. New person input nc_claim_of_right_repayment_excluded_from_income (the part NC deducted when received, such as repaid Social Security) and a dated parameter apply it. - Count only the head's and spouse's other miscellaneous expenses against the pre-2018 floor; a dependent's are on the dependent's return. - The property grid now varies property taxes (so the $20,000 cap binds) and adds a 2026 grid for the excluded part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h Carolina's 1341(a)(5) bar and G.S. 105-266.2 payment (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es that exclude them (AZ, KS, WI, MO, OR, VA); property tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fragment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to keep it at two seconds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…urn-level prior-year inputs, California and Montana flows - The branches that fix the claim of right method start from inputs only, and the itemization branches settle the method in the parent first, so a tax liability calculated before the method is known cannot leak into them. - Ties are compared to the cent, so a one-cent difference picks the credit. - The prior-year federal decrease and NC increase are return-level inputs defined on chapter 1 and Article 4 tax. - California leaves out the federal deduction (Schedule CA Part II line 16); Montana deducts it through 2023 (Form 2 itemized line 18). - Section 67(g) is now 67(h); document the Arizona and NC coverage limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r2 found that with itemization branching off, tax_liability_if_not_itemizing used the parent's method when calculated first but chose its own after income_tax. The itemizing branches now take the method as an input. A branch keeps its parent's cache when an override equals the value the parent already holds, so ordinary simulations still share it. Adds the review's Texas household as an order test under both itemization settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… branches only when someone qualifies Review r3 showed that keeping a parent's cache when an override equals the parent's current value can reuse tax calculated before another input changed. Branches again drop inherited values whenever the parent knows an overridden variable. The itemizing branches add the claim of right method as an override only when some tax unit repays more than $3,000, so simulations without a qualifying repayment keep sharing the parent's cache. Adds the review's stale-parent sequence as a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th use tax Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ate property test Under the federal credit method, section 1341(b)(3) keeps the repayment out of every state that only follows the federal deduction, so their tax must not change. States with their own claim of right relief may lower tax under either method. The test now reads which states have their own rule from the model's variable names (<state>_claim_of_right_...), so a state PR adds its variables without editing this list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pending Max's ruling) Act 56 (SLH 2023) made section 1341 operative in Hawaii for taxable years beginning after December 31, 2021, and Act 35 (SLH 2026) keeps it. Hawaii tax is the lesser of the tax with a deduction for a repayment over $3,000 and the tax without it less the decrease in prior-year Hawaii tax (Form N-364), which is a refundable credit (Schedule CR line 9). Hawaii makes its own comparison with branches on hi_income_tax, independent of the federal method. Before 2022, and for repayments of $3,000 or less, a repayment is a miscellaneous itemized deduction above 2% of Hawaii AGI while Hawaii allows those (HRS 235-2.4(b); Act 35 ends that from 2026). For 2022-2025 this follows the statute: section 67(b)(9) keeps the section 1341 deduction outside the 2% floor. The 2022-2025 N-11 instructions list the items the other way round, and Form N-364 adds the repayment to Hawaii AGI when the federal deduction was taken; those readings go to Max. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Over a grid for 2021, 2025 and 2026, against simulations that fix Hawaii's method as an input: Hawaii tax is the lesser of the two methods (ties to the deduction) and the branches equal those simulations; the deduction and credit are all or nothing and never both, with no credit before 2022; Hawaii tax does not depend on the federal method, never rises with a repayment, and never rises as the repayment or the prior-year decrease grows. Four single-line mutants (ties to the credit, a floor on the section 1341 deduction, the credit left out of the refundable list, section 1341 operative from 2021) each fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eral credit Reviews of #10195, #10196 and #10198 found that reading own-rule states from variable names weakened the cross-state test: North Carolina and Montana lost their exact check, nothing asserted that a state's own relief actually lowered its tax, and any future <state>_claim_of_right_ input would exempt a state. Now an explicit, sourced map names each state whose relief applies under the federal credit method and the variable that carries it. Under that method each listed state whose variable is in the model must lower the household's tax by more than $1, and every other state's tax must not change. The same commit is on every state branch, so they still merge in any order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ouncement 2026-06 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves the add/add conflicts with #10028's squash (557b539) by keeping this branch's 26 U.S.C. 1341(a)(5) bar on the North Carolina deduction, its added NC cases and the method fixture in the NC property grid, and keeps both sides' Arizona itemized deduction cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom 2024 From 2024 Montana Form 2 line 2 takes the federal itemized deductions (2024 instructions, Worksheet A line 1: Form 1040 line 12), which include Schedule A line 16. The miscellaneous list was empty from 2024, so a Montana itemizer lost the federal claim of right deduction. Review r5b (P3-1) found it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…anch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off to the US + core hub (Hawaii; state claim of right lane, session local_d0c92ac9).
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off update (2026-10-14): new head |
From 2026 tax_unit_itemizes opens the itemizing branch for the section 68 limitation (#10136) with only tax_unit_itemizes overridden. From policyengine-core 3.33 (#560), set_input on a branch drops the values stored after the overridden variable was first stored anywhere in the simulation, so that branch lost the inherited section 1341 method and chose its own as a filer forced to itemize. Its itemized deductions then decided itemization on a liability tie, or always with itemization branching off: CI failed two 2026 grid points, and a 2026 household with branching off came out at $4,988 instead of $4,100. get_itemization_branch builds the itemizing and non-itemizing branches for all three callers, adding the method as an input whenever someone qualifies, so they share one branch and none chooses a method. A 2026 test covers that household in every calculation order under both itemization settings; it fails before this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ut note main compiled the North Carolina claim of right fragment into CHANGELOG.md when #10028 merged, so the copy left on this branch would print it again. The period_branch module docstring said set_input on a branch clears nothing, which policyengine-core 3.33 changed (review r8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off update (2026-10-14, supersedes the earlier one today): head |
PR Review: Model Hawaii's claim of right deduction and credit (section 1341 as operative in Hawaii from 2022)PR #10200 (author: MaxGhenis, head SummaryAct 56 of 2023 makes section 1341 operative in Hawaii for taxable years beginning after December 31, 2021. When a filer repays more than $3,000 of income Hawaii taxed in an earlier year, Hawaii tax is the lesser of two amounts, figured at Hawaii rates (Form N-364):
Before 2022, and for repayments of $3,000 or less, a repayment is a miscellaneous itemized deduction above 2% of Hawaii AGI, while Hawaii allows those (through 2025). The PR adds:
The Hawaii work is right:
One should-fix comes from main's #10202.
A second should-fix: the axiom line isn't valid, as on #10203. Five suggestions follow. This branch also inherits #10038's unresolved Should 1, so it can be approved only after #10038 is fixed and this branch merges #10038's new head. Critical (must fix)None. Should address1. The combined result with main's #10202 isn't stated or tested, and the body describes the old credit order.
2. The axiom line isn't valid, and no rulespec-us issue covers Hawaii's section 1341.
Suggestions1. For the d1461 ruling: the sources favor the implemented readings 1 and 2.
2. Put the cases in variable-named files and pin the final tax.
3. Drop the page from a single-page reference title.
4. Update the body's cost line.
5. (Optional) Pool the repayment with the model's other miscellaneous expenses.
Verified correct
Cross-cutting checks
Inherited from #10038#10038's posted findings are in this branch unchanged: Should 1 (California leaves the federal deduction out of CA itemized deductions) and Suggestions 1–5 (gate NC on eligibility; tighten the input docs and add "Federal" to a label; drop the 67(b)(9) reference; add NY IT-196 line 34 to the follow-up; fix the WI comment and stale status). Fix them in #10038, then merge its new head here. Axiom line assessmentInvalid (Should 2).
CI statusAll 27 checks pass (
Branch status
Own findings: 0 critical, 2 should, 5 suggestions. Changes are requested for this PR's Should 1 (the combined result with #10202) and Should 2 (the axiom line), and for the inherited #10038 Should 1. Approve once those are fixed, #10038 is fixed, and this branch merges #10038's new head. Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes; details in the full report above. This PR's own findings are 0 critical and 2 should. (1) The combined result with main's #10202 is neither stated nor tested. The merge is clean, and on the merged tree the credit is used before nonrefundable credits, as HRS 235-91.5 requires. That only matters for 2022 (the nonrefundable Hawaii EITC): a head of household with $22,500 of wages, a $10,000 repayment and a $600 decrease gets $0 relief merged versus $600 at this head. No test reads hi_income_tax, so neither the ordering nor the (b)(1) refund is pinned. Please state the combined result and add tests. (2) The axiom line "not yet queued" is not an allowed form, and no rulespec-us issue covers HRS 235-2.3(b)(40). Please file a dispatch-ready pe-parity issue; only the floor addendum needs to wait on d1461. This branch also carries #10038's unresolved Should 1 (California), so approve once both items are fixed, #10038 is fixed, and this branch picks up #10038's new head. The Hawaii law checks out (Acts 56 and 35, HRS 235-2.4(b), N-364, Schedule CR), and all 10 YAML cases and 5 households were hand-checked.
Held for Max's ruling on the Hawaii reading (decision d1461). Do not merge before it.
Summary
From 2022 Hawaii applies 26 U.S.C. 1341 on its own: Hawaii tax is the lesser of the tax with a deduction for a repayment over $3,000 and the tax without it less the decrease in prior-year Hawaii tax, a refundable credit. Before 2022, and for repayments of $3,000 or less, a repayment is a miscellaneous itemized deduction above 2% of Hawaii AGI while Hawaii allows those (through 2025). PolicyEngine had none of this, so a repayment changed nothing in Hawaii. This PR adds it.
Stacked on #10038 (branch
federal-claim-of-right-1341). Review the commits afterdc10cc58ceexcept the merges of #10038's heads2d36a76bca(its merge of main),32b0c13a6a(Montana's miscellaneous itemized list takes the claim of right deduction from 2024, so Montana's tax now changes under the federal deduction method; under the credit method that deduction is zero)6f34ccde23(its second merge of main),d1c695b2f7(itemizing branches inherit the claim of right method under core 3.33) and17cad4b53b(changelog and docstring), which bring in no change of this PR's. Heada046804c7a.hi_claim_of_right_prior_year_tax_decrease(tax unit; Form N-364 lines 4-6) andhi_claim_of_right_repayment_excluded_from_income(person; income Hawaii did not tax when received).hi_claim_of_right_repayment,hi_claim_of_right_section_1341_eligible, andhi_claim_of_right_credit_applies, which compares Hawaii income tax in two override branches (hi_income_tax_if_claiming_claim_of_right_credit,..._deduction), as Model the claim of right repayment deduction and credit (26 U.S.C. 1341) and North Carolina's rules that depend on it #10038 does federally and as the model already does for Virginia's and Delaware's EITC.hi_claim_of_right_deductionjoins Hawaii's itemized sources;hi_claim_of_right_creditjoins Hawaii's refundable credits from 2022.gov.states.hi.tax.income.claim_of_right.section_1341_operative(from 2022) andgov.states.hi.tax.income.deductions.itemized.miscellaneous_deductions_allowed(through 2025).The law
The reading for Max (d1461)
For 2022-2025 this PR follows the statute: section 67(b)(9), operative through HRS 235-2.4(b), keeps the section 1341 deduction (over $3,000) outside the 2% floor, so a repayment of $3,000 or less is the floored one. The 2022-2025 N-11 instructions (2025 PDF p. 19) list "Deduction for repayment of amounts under a claim of right over $3,000" among expenses subject to the 2% limit and "of $3,000 or less" among those not subject to it: the reverse. Form N-364 line 2 also tells a filer who "took a deduction on your federal return instead of claiming a credit" to add the repayment to Hawaii AGI (N-11 line 10); under the statute the deduction simply is not taken under (a)(5), and PolicyEngine's Hawaii itemized deductions never include the federal one. A third point: N-11 applies refundable credits, this one included (Schedule CR line 9), before nonrefundable credits, which it caps at tax less refundable credits (2022 instructions, PDF p. 21). The model applies every Hawaii refundable credit after nonrefundable credits capped at gross tax, and this PR follows that order, which matches section 1341(a)(5) (tax without the deduction, then less the decrease). The order differs from N-11 only when nonrefundable credits exceed tax less refundable credits. Fixing it for all Hawaii credits is #10202 (draft, another session), which would give this credit N-11's order too; whichever of the two lands second states the combined result. Max's ruling decides all three before this leaves draft. From 2026 the floor question disappears on the statute reading (Act 35 disallows miscellaneous deductions), but would disallow the over-$3,000 deduction entirely if DOTAX kept treating it as miscellaneous.
Design notes
hi_reduced_itemized_deductions) treats the deduction like other deductions it reduces.Not modeled:
claim_of_right_repaymentexcludes them, so Hawaii's section 1341 relief for them is not modeled.Household on
main, #10038 and this branch (2025, single, age 40)Script:
~/reviews/us-hub/claim-of-right-states/scripts/households.py; outputsevidence/households_*.json.main95eefa51e5; #10038dc10cc58ce; this branch612ea5e94e(later commits change only parameter references).mainTests
gov/states/hi/tax/income/claim_of_right/hi_claim_of_right.yaml, 10 cases: each fixed Hawaii method; a $3,000 repayment floored at 2% of $50,000 ($2,000); 2021, where a $10,000 repayment is floored ($9,000) and there is no credit; 2026, where a $2,000 repayment is not deductible; income Hawaii never taxed; a joint return counting both spouses toward $3,000; the credit chosen when the Hawaii decrease ($1,500) exceeds what the deduction can save (at most 11% of $10,000); the deduction chosen when it saves more than a $100 decrease (at least 1.4% of $10,000); another state.tests/unit/test_hi_claim_of_right_properties.py(the Rest job'sremaininggroup). Why Python: Hawaii's method comes from two branch computations, which only separate simulations can check.Invariants (stated and executed over a 108-return grid for each of 2021, 2025 and 2026: repayment × Hawaii decrease × wages × charity)
Mutation check: four single-line mutants (ties to the credit, a 2% floor on the section 1341 deduction, the credit left out of the refundable list, section 1341 operative from 2021) each fail the suite.
The cross-state test from #10038 has the identical explicit-map commit carried by #10195, #10196 and #10198; Hawaii is listed, and its tax falls under the federal credit method.
Local runs (macOS, one file at a time): the YAML file passes 10 cases; the property file passes 11 tests in 6.1 s at 1.88 GB peak (23.5 s wall with import); the cross-state per-state test passes in 10.6 s. Details:
evidence/tests.md.Cost
About 6 s in the
remaininggroup, measured locally (not CI); its process peaks at 1.88 GB including the model import, which the group's process already holds. 15 simulations of 108 returns, freed at teardown. For scale, theremaininggroup onmainhad 2,151 tests, 24:05 wall clock and 12.8 GB peak (run 37926760594, as reported in #10028); this PR's CI run will give the Linux figures.Review
Review r1 (
~/reviews/us-hub/claim-of-right-states/reviews/out-10200.md, REQUEST CHANGES) and the response (reviews/response-10200.md): the credit-ordering question is added to d1461 and the model-wide fix proposed separately; the scope of repayments deducted in arriving at AGI, the branch invariant and the CI cost are stated. Changing an input after calculating leaves stale results in PolicyEngine generally (core does not invalidate computed values; the federal tax shows the same with no state branches), so it is not specific to this PR.Review r2 (
reviews/out-10200-r2.md, APPROVE) found no new defect and confirmed the three readings left to Max (d1461): the 2022-2025 floor reversal, N-364 line 2's AGI add-back, and the credit ordering.Reviews r1 and r2 ran on GPT-6.1 Sol. A delta review of the later reference change (r4, Opus 5.5,
reviews/out-delta-r4.md) approves this head.Microsimulation
2025, default dataset (
populace_us_2024atpopulace-us-2024-spm-20260909), run 2026-10-13 under the shared heavy-run lock: #10038's headdc10cc58ceagainst this branch atd1b8b2b124(later commits only merge #10038's later heads and change tests or documentation). Driver and outputs:~/reviews/us-hub/claim-of-right-states/impact/(multi.sh;compare.hi.2025.json).claim_of_right_repaymentis $0 on every record (weighted sum $0), sohi_claim_of_right_deductionandhi_claim_of_right_creditare $0 everywhere.income_tax,state_income_tax,household_net_income,claim_of_right_credit_appliesorhi_income_tax.The change takes effect only for households that enter a repayment; the dataset has none.
Axiom
axiom: Act 56 (SLH 2023) / HRS 235-2.3(b)(40) and 235-2.4(b) — not yet queued. A rulespec-us
pe-paritydraft is held with the others (decision d1459) and waits on d1461 for the 2022-2025 reading. rulespec-us pins Hawaii's conformity at December 31, 2024 and defers itemized deductions (us-hi/policies/income_tax/resident_core_liability_pipeline.yaml).🤖 Generated with Claude Code