Repository navigation
Conversation
…unts their laws allow Alabama (Code 40-18-15(a)(2)) and North Carolina (G.S. 105-153.5(a)(2)b) allow only the mortgage interest federal law allows, so they now read deductible_mortgage_interest, after the 26 U.S.C. 163(h)(3) acquisition-debt limits, instead of uncapped mortgage_interest. Hawaii makes IRC 163(h)(3)(F) inoperative (HRS 235-2.4(j)(3), (i)(3) from 2026 under Act 35), so it keeps the pre-TCJA limits for debt incurred at any time: $1,000,000 of acquisition debt plus up to $100,000 of home equity debt ($500,000 / $50,000 separate), per 2017 Publication 936 Table 1. The new hi_mortgage_interest_deduction applies them to gross interest, reusing the federal vintage split for grandfathered debt. With $40,000 of interest on $1.5M of 2020 debt, main allowed $40,000 in all three states; now AL and NC allow the federal $20,000 and HI $29,333.33. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…36 Table 1 requires The 2025 N-11 instructions (line 21c) send Hawaii filers to the 2017 Publication 936 worksheet, whose line 11 rounds the qualified-loan-limit ratio to three places. TheAxiomFoundation/rulespec-us#1556 encodes the same rounding, so PE and Axiom agree. Its three companion cases are added to the Hawaii YAML, and the property test now covers the rounded share. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 (GPT-6.1 Sol) findings: - Hawaii multiplied a directly supplied deductible_mortgage_interest by the worksheet share again ($20,000 supplied on $1.5M of debt gave $14,660). Hawaii now starts from interest paid as the federally deductible plus non-deductible parts, keeps the federal amount when federal law disallows nothing, and never goes below it (_hi_allowed_interest). - In single precision $1,100,000 / $1,128,784 = .97449999 became .9745 and rounded up; the ratio is now computed in double precision. - Alabama and North Carolina YAML headers say the expectations follow PE's exact federal ratio, not the worksheet's three-place rounding. - Alabama's spouse case now asserts al_itemized_deductions. - hi_interest_deduction cites the 2022 N-11 once, with both pages. The property test now covers single-precision inputs and line 12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
MaxGhenis
marked this pull request as ready for review
October 20, 2026 01:56
Contributor
Author
|
Hand-off to the US + core hub (session local_46e50d89-c1b5-4986-bd4e-7ada4b70bf0e)
🤖 Generated with Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alabama, North Carolina and Hawaii read uncapped
mortgage_interest, so they allowed interest on debt above the IRC 163(h)(3) acquisition-debt limits. With $40,000 of interest on $1.5M of 2020 debt, main allows $40,000 in all three states. Federal law allows $20,000.deductible_mortgage_interest, the amount after the federal limits.hi_mortgage_interest_deductionapplies them using the N-11 / 2017 Publication 936 worksheet calculation with a PE federal-floor safeguard.The US + core hub's round-2 review of #10003 found the defect; it is pre-existing on main. This PR supersedes the unopened branch
al-nc-mortgage-interest-federal-cap(2efb58d). That branch's review blockers (mixed-vintage and grandfathered debt) were fixed on main by #10025.Law
The limits are halved for married filing separately.
Allocation gap-fill. The checked law does not prescribe decimal rounding. Treas. Reg. 1.163-10T(c)–(g) provides alternative allocation methods without a rounding rule. CCA 201201017, PDF p. 5, a nonprecedential memorandum, discusses reasonable methods and approximations under the later debt limits. Hawaii's HRS 235-2.5(b) authorizes adoption of Treasury regulations by rule; HAR 18-235-2.3(a)(3) adopts federal regulations through January 1, 1979, before that 1987 temporary regulation. N-11's direction to the 2017 Publication 936 worksheet therefore supplies an administrative gap-fill, rather than a statutory rounding requirement. PE retains that three-place worksheet rounding and separately floors the result at its federal deduction. The floor is PE's chosen safeguard; worksheet line 12 only multiplies interest by the rounded fraction. This wording update leaves the arithmetic unchanged.
Before and after
$40,000 of interest. Before = main
f9b55fc4dd; after = this head.Hawaii's figures: $1,100,000 / $1,500,000 rounds to .733 (× $40,000 = $29,320). The $900k row is the control for Hawaii's own limit: it is above the federal $750,000 limit but below Hawaii's $1,000,000, so the full $36,000 stays deductible.
Rounding conventions. The federal, Alabama and North Carolina amounts follow PE's existing federal calculation, which uses the exact ratio. The 2025 Table 1 (line 14) rounds it to three places, which can move an amount by up to about 0.05% of the interest: $26,680 rather than $26,666.67 for the 2016 row. This PR doesn't change that convention. Hawaii uses the N-11 / 2017 worksheet as a gap-fill: line 11 rounds to three places, and PE uses half-up rounding at ties. The federal-floor safeguard is separate from worksheet line 12. The worksheet rounding matches rulespec-us#1556.
North Carolina's $20,000 cap hides line 1 in some cases, so the deduction tests use smaller amounts. Single, $15,000 interest on $1.5M from 2020, $5,000 property tax: line 5 goes from $20,000 to $12,500. Separate spouses, one with $30,000 on $1.2M from 2020 and the other with $10,000 and no balance: before, the $40,000 total was prorated to $15,000 and $5,000. After, it is $9,375 and $10,000, under the shared cap.
Changes
al_investment_interest.py(al_interest_deduction) addsdeductible_mortgage_interestinstead ofmortgage_interest. The label is now "Alabama interest deduction", and the references cite Form 40 (they said Form 1040) with PDF pages.nc_mortgage_and_property_tax_before_limitationreadsdeductible_mortgage_intereston line 1.New
hi_mortgage_interest_deductionand two parameters,gov.states.hi.tax.income.deductions.itemized.interest.home_acquisition_debt_limitand.home_equity_debt_limit. They take effect 2018-01-01, when Hawaii's itemized sources start. The formula has three helpers:_hi_qualified_loan_limitcomputes Table 1 lines 1–8. Grandfathered debt reuses main's_debt_by_vintage._hi_deductible_sharecomputes line 11, rounded half up to three places in double precision._hi_allowed_interestuses the worksheet calculation with a PE federal-floor safeguard: line 12 multiplies interest paid (the federally deductible and non-deductible parts together) by line 11, then PE floors the result at its federal deduction. When federal law disallows none of the interest, it keeps the federal amount, so a directly supplied deduction is not limited a second time. The floor is PE's chosen approximation and is not prescribed by line 12.hi_interest_deductionadds the new variable instead ofmortgage_interest, and cites its 2022 N-11 source once.Tests: nine existing NC cases that put the uncapped
mortgage_interestin as an input now use the canonicalhome_mortgage_interest. Their expected values are unchanged, and the renamed cases pass on main too.Invariants
deductible_mortgage_interest. The YAML covers the cases where they differ from main: above the limit, a pre-2018 vintage, mixed vintages, separate filers, 2026, and spouses filing separately under the shared cap. It also covers the controls where they don't: within the limit, no balance, grandfathered debt.test_hi_mortgage_debt_limit_invariants.pychecks all of this with Hypothesis (400 examples), plus half-up rounding at .3125.deductible_mortgage_interestwith $1.5M of debt stays $20,000 (it was $14,660 before review r1).hi/tax/income/integration.yaml(supplied deduction, no balance) is unchanged.Mutation checks on the Hawaii helpers, all reverted:
Tests
Current verification at
e81b3eaec0, after merging upstream/main11951ba4d3with a merge commit:al/.../itemized/al_interest_deduction.yamlnc/.../nc_mortgage_and_property_tax_before_limitation.yamlnc/.../nc_mortgage_and_property_tax_deduction.yamlhi/.../itemized/hi_mortgage_interest_deduction.yamltests/core/test_hi_mortgage_debt_limit_invariants.pyEach file ran separately in the foreground, one process at a time, with all requested thread caps set to 4 and
OMP_WAIT_POLICY=PASSIVE: 51 passed.make format(Ruff 0.15.5 format and lint) passed. The PR diff against merged main passesgit diff --check.Historical verification below is from the original reviewed head
6dadd9973d; each file ran alone with thread caps of 4.f9b55fc4dd6dadd9973dal/.../itemized/al_interest_deduction.yaml(new)nc/.../nc_mortgage_and_property_tax_before_limitation.yamlnc/.../nc_mortgage_and_property_tax_deduction.yamlnc/.../nc_itemized_deductions.yaml(inputs renamed)nc/.../itemized/nc_claim_of_right_deduction.yaml(input renamed)hi/.../itemized/hi_mortgage_interest_deduction.yaml(new; on main the same cases asserthi_interest_deduction)tests/core/test_hi_mortgage_debt_limit_invariants.py(new)The cases that pass on main are the controls: within the limit, no balance, grandfathered debt, Hawaii's $900k and $1.05M rows, a supplied Hawaii deduction, and the renamed inputs. At the previous head
9fde8b6eae, review r1 reproduced Hawaii's supplied-deduction case at $14,660 and the $1,128,784 case at $39,000; both now pass.Folder runs, one subdirectory per process (
test_batched.py --mode per-subdir --workers 1):6dadd9973d: 74 files and 602 cases.9fde8b6eae. Neither state's code changed after that, and their changed YAML files were rerun at6dadd9973dabove.Other suites:
test_mortgage_debt_limit_invariants.pyandtest_nc_mortgage_and_property_tax_limitation_invariants.pypass.deductible_mortgage_interest.yaml(11) anddeductible_mortgage_interest_tax_unit.yaml(18) pass.coveragemodule in the local venv, and they fail the same way on main.uvx ruff@0.15.5 format --check,checkandgit diff --checkpass.The Python invariant test is pure NumPy over the helpers and builds no model. Measured at reviewed head
6dadd9973dlocally on macOS, not in CI: under 1 s for the three tests, about 3.5 s for pytest, and 17 s and 1.0 GB peak footprint for the whole process. Almost all of that isimport policyengine_us, which the core group's process already pays fortest_mortgage_debt_limit_invariants.py. The test lands in the existing Rest Pythoncoregroup by directory. No CI job, matrix entry or runner changes.Independent review
GPT-6.1 Sol (
subfleet run --task review --tier hard -s workspace-write), on the hub host under~/reviews/us-hub/reviews-gen/us-10274/:review-r1.md, head9fde8b6eae): REQUEST_CHANGES. A supplied Hawaii deduction was limited twice, line 11 was rounded in single precision, Axiom parity was incomplete, the exact-ratio convention was unlabelled, and an assertion was missing. Everything is fixed in6dadd9973d.review-r2.md, head6dadd9973d): APPROVE. It ran 94 single-file cases, all passing. Its two documentation nits are addressed in this description: the precision claim is narrowed, and the partly supplied components and the federal floor are now listed under known gaps. The subsequent statute-first update changes documentation and references, adds the floor-binding YAML witness, and merges upstream/main; it preserves the formula arithmetic.Merge order with open PRs
adds = ["deductible_mortgage_interest", "investment_interest_expense", "deductible_mortgage_insurance_premiums"], with both sets of references.adds = ["investment_interest_expense", "hi_mortgage_interest_deduction", "hi_deductible_mortgage_insurance_premiums"]. In the reference tuple, keep this PR's single 2022 N-11 entry plus Cap Kentucky qualified residence interest at principal-residence interest from 2026 #10003's Announcement 2021-01.deductible_mortgage_interest, then Cap Kentucky qualified residence interest at principal-residence interest from 2026 #10003's premium block. Keep one SL 2026-31 reference entry.al_interest_deduction.yamlandnc_mortgage_and_property_tax_before_limitation.yaml, keep both sides' cases.mortgage_interest: 19_000. Under this PR it must becomehome_mortgage_interest: 19_000, or it computes $2,000 instead of $21,000.deductible_mortgage_interestandnon_deductible_mortgage_interestinclude points. Hawaii's line 10 then includes points, which 2017 Pub. 936 (PDF p. 13) multiplies by the same line 11 ratio.Known gaps
home_mortgage_interest, so the sum is a reconstruction. Review r2's example: $40,000 paid on $940,000 of debt, with only the federal deduction ($31,920) supplied, gives $40,005.11 in Hawaii instead of $40,000. Supplying both, or neither, gives $40,000. This input precedence predates this PR.~/reviews/us-hub/al-vehicle-loan-interest, review requested changes, no PR yet).interest_deduction; review r1 computed $20,000 where New York allows $29,320 on the witness. Arkansas and others are unchecked. This PR doesn't change them; a follow-up audits every such state.Impact
Real microsimulations on the default dataset, main
f9b55fc4ddagainst9fde8b6eae(2025 and 2026), one at a time under the shared heavy lock. All four runs exited 0 with a 14.3 GB peak footprint. Sums are weighted; records are tax units. 2025 was rerun at6dadd9973d, the review-r1 fix. Every tax and net-income output is identical record by record;hi_interest_deductiondiffers by at most $0.004 per record, from the switch to double-precision arithmetic. 2026 was not rerun at6dadd9973dbecause of disk pause #9. The hub runs the final impact at landing.state_income_taxal_interest_deductionhousehold_net_incomenc_mortgage_and_property_tax_deductionnc_income_taxhi_interest_deduction(unweighted: 7 records, −$157,888 / −$178,194)hi_income_taxincome_tax,deductible_mortgage_interest_tax_unitgov.states.al.tax.income.rates).nc_mortgage_and_property_tax_before_limitationchanges for records in every state. It is computed everywhere so that a separately filing spouse in another state counts toward the shared cap, but it reaches tax only in North Carolina. No tax or deduction output changes for any record outside Alabama, North Carolina and Hawaii, and federal tax is unchanged.Comparison script and per-year JSON:
~/reviews/us-hub/state-mortgage-federal-cap/(compare.py,impact-2025.json,impact-2026.json) on the hub host.axiom: HRS 235-2.4(j)(3)/(i)(3) TheAxiomFoundation/rulespec-us#1556 queued (updated 2026-10-19 to point here and add grandfathered debt, the supplied-deduction pass-through and seven companion cases) | Ala. Code 40-18-15(a)(2), N.C. Gen. Stat. 105-153.5(a)(2)b TheAxiomFoundation/rulespec-us#1815 queued (filed under d1142; composes 26 U.S.C. 163(h)(3), #1413 and #1673)
🤖 Generated with Claude Code