Repository navigation
Align Montana separate-filing deductions and the elderly credit's income with the forms - #9877
Conversation
… the forms - Federal income tax deduction (through 2023): attribute federal tax to the spouse who earned the income and cap each spouse at $5,000, instead of prorating the jointly capped amount by Montana AGI (2022 Form 2 instructions, Itemized Deductions Schedule, line 4). - Child and dependent care expense deduction (through 2023): phase out on the couple's combined Montana AGI and split the result equally only for spouses filing separately on the same form; a single filer and a joint return take the whole deduction (Form 2441-M lines 3-7). - Elderly homeowner/renter credit: count federal AGI without regard to losses (MCA 15-30-2337(9)(a); Form 2EC line 9). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions Each spouse filing separately on the same form deducts their own federal income tax up to $5,000, so both spouses itemize and Montana tax is 6,295.56. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chedule - A married person filing on a separate form (federal filing status SEPARATE) cannot take the child and dependent care expense deduction: "married couples shall file a joint return or file separately on the same form" (MCA 15-30-2131(1)(c)(vi)(A)); 2022 instructions, line 14. - The 2023 credit schedule was the Elderly Homeowner/Renter Credit Schedule; it became Schedule 2EC in 2024. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review: Align Montana separate-filing deductions and the elderly credit's income with the formsPR #9877 (author: MaxGhenis, head SummaryThe PR changes three Montana rules:
The law is applied correctly in all three areas, and I found no wrong result for a household in a year the PR claims.
Two items need attention, both small:
Critical (must fix)None. Should addressS1. The guard branches of the new share variable are untested, and the "dependent" case does not test the dependent filter.
S2. The care deduction hard-codes the spouse split as
Suggestions
Verified correct
Axiom line assessment
CI statusAll green: Branch status
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
The law and form alignment checks out (attribute-then-cap, the care deduction on combined AGI split only on a same-form return, the re-pinned 2021 case, the 2EC loss add-back), and rulespec-us#1512 is dispatch-ready. Two should items (see the comment above): S1, the new federal-tax-deduction share has three untested guards (the dependent filter, the max(AGI, 0) floor, the zero-income fallback), and S2, the care-deduction split hard-codes 0.5 where deductions.itemized.spouse_allocation_rate already exists. #9882 is stacked on this PR and is reviewed separately.
|
@DTrim99, both should-items from your 10/7 review are addressed at head
Measured impact is in the body. In 2025, |
PR Review (round 2): Align Montana separate-filing deductions and the elderly credit's income with the formsPR #9877 (author: MaxGhenis). Round 1 reviewed head
PR #9882 is still stacked on this branch. SummaryBoth should-address items from round 1 are fixed.
The charitable "fix" in
Tests and CI.
One action before merge. The branch now conflicts with I found no new critical or should-address problems. Two new suggestions follow. Round-1 items
Max's 2026-10-09 comment responds only to S1 and S2. The suggestions were optional and do not block. Critical (must fix)None. Should addressNone open. New suggestions
Charitable allocation fix: verification
CI status
Branch status
Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Round 2: both should items are addressed. The three share guards are now tested directly, and the care deduction uses deductions.itemized.spouse_allocation_rate. The charity-allocation change is baseline-neutral and consistent with ARM 42.15.524(3)(b). Two optional suggestions, notably trimming the five-rate grid to stay under the per-state override memory ceiling. Before merging: the branch now conflicts with main (#10004) in one test file, where both sides appended a case and you should keep both. Please merge main and re-run CI; #9882 is stacked on this.
Most of this branch landed on main through #9915. Main's versions win where the two overlap: - mt_federal_income_tax_deduction_share keeps main's zero allocation when neither filer has positive income; the branch's head-fallback test is dropped. - mt_elderly_homeowner_or_renter_credit_gross_household_income and both elderly credit test files are main's. What the branch still adds over main: - The care deduction and the federal-itemization charitable split use gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate in place of a hard-coded half. - Tests: care deduction case 29, the five-rate charitable grid, and the floor on a spouse's negative federal AGI in the tax share. The changelog fragment now describes only that remainder; the earlier text was released in 2.38.x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hand-off to the US + core hubHead: Scope now: most of this PR landed through #9915. The rest is 6 files, +284/−3:
No baseline output changes in any period, so there's no impact run. The body has the details. Review: an independent review at this head gave APPROVE.
Checks at this head: passed:
Still pending in run 38187744873: the Baseline, Contrib and Python suites, Household API Partners, and Quick Feedback. No partner test files changed. Mergeable: MERGEABLE. Dependencies:
Holds and decisions: none. Follow-ups:
Axiom: |
|
US + core hub merge audit, us#9877 at
|
Summary
Most of this PR is already on main. It landed through #9915 (squash
6c62c7f217, in release 2.38.17), which was stacked on this branch. After merging main (d8c12befc2), this PR adds two small code changes and their tests.Spouses who filed separately on the same Montana form (status 2a, through 2023) each take half of a couple's deduction. Two formulas hard-coded that half. They now read
gov.states.mt.tax.income.deductions.itemized.spouse_allocation_rate, the parameter thatmt_itemized_deductions_indivalready uses:mt_child_dependent_care_expense_deduction: each spouse's column of the Form 2441-M line 7 amount.mt_itemized_deductions_for_federal_itemization_indiv: each spouse's part of the couple's charitable deduction. This helper decides federal itemization; the actual deduction already used the parameter, so the two disagreed under a reform of the rate.The parameter is 0.5 from 2021, so no baseline output changes.
What landed through #9915
For the record, these parts of the original PR are on main and are no longer in this diff:
mt_federal_income_tax_deduction_share,mt_federal_income_tax_deduction_indiv, and the federal-itemization variant on each spouse's own withholding estimate).mt_child_dependent_care_expense_deduction_joint.Where main and this branch overlapped, the merge keeps main's version:
mt_federal_income_tax_deduction_sharegives a zero share when neither filer has positive federal AGI. This branch had given the whole amount to the head. That test is dropped.mt_elderly_homeowner_or_renter_credit_gross_household_incomeand both elderly credit test files are main's.Tests
Three test files differ from main:
mt_child_dependent_care_expense_deduction.yaml, case 29. At a reformed rate of 0.25 and a $2,400 line 7 amount, each column is $600 and the joint deduction stays $2,400. Main's formula multiplies by 0.5 whatever the parameter says (line 45 on main), which gives $1,200 per column.mt_itemized_deductions_for_federal_itemization_indiv.yaml, five charitable cases. Donations of $0, $400 and $800 at rates 0, 0.25, 0.5, 0.75 and 1. Both separate paths must give each spouserate × donation, and both joint paths must keep the full donation. Main's mortgage interest case (from Count only deductible mortgage interest in Montana, give Maryland spouses their own losses, report the whole Virginia EITC #10004) is kept above them.mt_federal_income_tax_deduction_indiv.yaml, one case. A spouse's negative federal AGI cannot produce a negative share: wages of $60,000 and a $20,000 business loss give shares[1, 0]and deductions[1_410, 0]. This passes on main too; it guards main's floor at zero.What has been run:
bfb8c55b5a) reported running the charitable file with and without the helper fix. Without it, the four reformed-rate cases failed in the helper (at rate 0.25 and $800 of donations it returned $400 per spouse, not $200); with it, all cases passed. Main's helper has the same hard-coded 0.5 (line 27 on main).ruff format --checkandruff checkpass on the Montana variables, and CI atd8c12befc2is the test run.ad02ee1b2f) comes from reading main's two lines above, not from a run on main.No partner contract test files are changed.
Impact
No baseline output changes in any period, so no microsimulation was run for this remainder. That follows from the diff, not from a measurement:
spouse_allocation_rateis 0.5 from 2021-01-01 with no later value.in_effect), before the formula reads the rate.defined_forgate,mt_married_filing_separately_on_same_return_eligible, readsmarried_filing_separately_on_same_return_allowed: true for 2021–2023 and false from 2024. Core skips a formula whose gate is false for every person, andmt_itemized_deductions_indivon main already reads the same rate behind the same gate.The hub's earlier microsimulation table for this PR (one record, +$537,083 of Montana income tax in 2025) measured the elderly credit change. That change is now on main through #9915 and is not part of this diff. The earlier body is kept at
~/reviews/us-hub/state-allocation-fixes/pr/mt-body-before-main-merge.mdon the hub host.Invariants
rate × line 7, so the columns sum to2 × rate × line 7: exactly line 7 at the default 0.5. The joint deduction uses its own line 7 onmt_agi_jointand does not depend on the rate. Case 29 checks this at 0.25.rate × donationand dependents zero, and both joint paths keep the donation. The five cases check this as a grid, including linearity in the donation and in the rate.mt_itemized_deductions_for_federal_itemization_indivandmt_itemized_deductions_indivallocate the charitable deduction identically at every rate. The grid asserts both in each case.The grid is example-based (15 points). A Hypothesis test was not added for a one-factor multiplication.
Methodology note
Dependencies
6eefe271dc, before Count refundable credits received in Montana's elderly homeowner/renter credit income #9915 merged, so each needs main merged in. Count a Montana casualty loss once per joint return and only for the spouse who had it #9888's author asked that it land after Align Montana separate-filing deductions and the elderly credit's income with the forms #9877.axiom: n/a: no rule changes at the enacted values (two hard-coded one-half factors now read an existing parameter whose value is 0.5). The provisions themselves stay queued in TheAxiomFoundation/rulespec-us#1512.
🤖 Generated with Claude Code