Repository navigation
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>
MCA 15-30-2337(4) defines gross household income as "all income received by all individuals of a household while they are members of the household". The 2023 Elderly Homeowner/Renter Credit Schedule combines the returns of "ALL members of the household" (lines 1-7 and 9) and has non-filing members report their wages on line 8; the 2024 and 2025 Schedule 2EC put "Income received by other members of your household" on line 17. The model summed each person's federal AGI over the tax unit. A tax unit dependent's federal AGI is zero (their income is on their own return), so a dependent's wages and other income were left out, and household members who file their own returns were never counted. - Add dependent_gross_income to the gross income sources. It counts a dependent's gross income items, gains but not losses, and the taxable part of their Social Security; the formula now subtracts that part before adding the untaxed remainder, so the benefits count once. - Sum gross household income over the household instead of the tax unit in the net household income and the credit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests dependent_gross_income counts anyone who is not the head or spouse, while irs_gross_income counts anyone who is not a dependent. A person with neither role (a minor alone in a tax unit whose dependent flag is input as false) was counted by both. Count dependent_gross_income in the formula for tax unit dependents only, so the two paths split people exactly. The property tests check, for random claimants and household members, that gross household income is the Schedule 2EC total whether the other member is a dependent or files their own return, that the credit is the same either way, stays within its bounds, and never rises with income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… household MCA 15-30-2341(1): "Only one claimant per household in a claim period ... is entitled to relief." Since gross household income now counts every household member, two eligible tax units in one household (for example two elderly siblings filing separately) each computed a credit on the same household income and both were paid. - mt_elderly_homeowner_or_renter_credit_pre_one_claimant holds the existing computation (Schedule 2EC lines 18-30) for every eligible tax unit. - mt_elderly_homeowner_or_renter_credit_selected_claimant (TaxUnit) ranks the eligible tax unit heads within each household by that credit with get_rank and selects the largest; ties keep member order, so exactly one tax unit per household with an eligible one is selected. - mt_elderly_homeowner_or_renter_credit pays only the selected tax unit. Six legacy credit cases that never set a state now place their households in Montana. Adds YAML cases (two eligible tax units, one eligible, a joint couple, a tie, separate households) and property tests against a Schedule 2EC reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cite ARM 42.4.302, the rule implementing 15-30-2341, in the selected claimant's references; note that neither it nor the statute says which member claims. - Restore the living-apart note in the net household income comment with its source (ARM 42.4.302(3)(a)), and say in the selection comment that a separated spouse in another tax unit is not linked, so that limit is not modeled. - Selected-claimant Case 8 now fails if non-heads are ranked: a dependent's input amount larger than the other tax unit's no longer decides the selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Independent review (Opus) asked for text fixes only: - The selection ranks by Schedule 2EC line 26 (property tax billed plus 15% of rent, before the cap), not by total housing cost; say so. - Counting each tax unit's own property tax and rent follows the form's wording; the statute defines both for the homestead (MCA 15-30-2337(5), (10)). Name that reading as not modeled (queued for a ruling as decision d1035). - Uniqueness of the selection comes from get_rank's ranks; its stable sort only breaks ties. - Cite ARM 42.4.302 at Cornell, which shows the rule text. The Hypothesis test is now derandomized and pins a tie at the cap and an owner against a renter who pays more but has the smaller line 26. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ructions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retain refundable-credit and actual-receipt income rules, dependent-owned non-loss deductions, and federal-AGI tax allocation alongside maximum-credit claimant selection and the negative-income multiplier fix. Preserve both test sets and add a worked combined-credit regression.
…derly credit ARM 42.4.302(2)(b) lets an eligible claimant use property taxes billed "as rent if the property occupied by the claimant is in a name other than the claimant"; the Form 2 instructions (line 23, since tax year 2011) say such taxes "can qualify as rent only". The model counted only each tax unit's own property tax and rent, so an elderly person living in a home billed to another household member got $0. - New mt_elderly_homeowner_or_renter_credit_property_tax_billed (Schedule 2EC line 23): the property tax billed to the tax unit's head and spouse. A dependent's bill is in a name other than the claimant's. - New mt_elderly_homeowner_or_renter_credit_gross_rent (line 24): rent paid, or, for a tax unit billed no property tax, the larger of that and the household's property tax. Line 25 then takes 15% of it. - New parameter property_tax_in_another_name_as_rent: false for 2009-2010, whose instructions applied "rent only" just to trusts; true from 2011. - The pre-limit credit reads both; the one-claimant selection is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
fix-mt-ehrc-property-in-others-name
branch
from
October 11, 2026 16:03
d6a512b to
b209688
Compare
…line 23 Review fixes for the property-tax-as-rent change: - The rule predates 2011. ARM 42.4.302(5), in force from 8/20/2004 (Wayback captures of mtrules.org, 2008 and 2010), read "Property taxes billed are allowable as rent if the property occupied by an eligible claimant is in a name other than the claimant"; the 2017 restructuring made it (2)(b). The property_tax_in_another_name_as_rent parameter, false for 2009-2010, is removed, and the 2010/2011 cases become one 2009 case. - A home co-owned by the claimant and a dependent stays on line 23 with both bills, as before; only a home wholly in others' names, a dependent's included, moves to line 24 as rent. - State the actual basis for max(rent paid, bill): the rule's "may use" is a choice between two measures of one home's cost, and ARM 42.4.302(3)(a) and (3)(c)(v) count one housing cost or another "but not both". - New cases: a joint couple billed nothing counts the other member's bill once (kills a head-or-spouse double count that only Hypothesis caught), and a home co-owned with a dependent. - Cite the line 23 instructions from PDF p. 46; describe the bill-as-rent path as the model's treatment in comments and the test docstring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 11, 2026
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.
Summary
An elderly Montanan who lives in a home billed to another household member, such as an adult child who files separately, got $0 from the elderly homeowner/renter credit. Montana lets that claimant count the property tax as rent:
The model counted only each tax unit's own
real_estate_taxesandrent, so that claimant's lines 23 and 24 were both 0.Stacked on #9900, which carries #9882 and #9877. #9900 is at
da7c17e844, withmainmerged in. This PR targetsmainbecause the PR workflow runs only for PRs intomain, so its diff includes #9900's commits until #9900 merges. This PR's own changes are the two commits afterda7c17e844(compare). Merge #9900 first, then mergemaininto this branch.The homestead reading (decision d1035) is not implemented
d1035 is still open. It asks whether the household's one claimant counts the homestead's whole property tax and rent (MCA 15-30-2337(5), (10)) or only their own (the form's "you"). This PR keeps the form reading, which is the decision's default.
The rule here is needed under either ruling. §2340(1) and (2) cover a claimant who owns or rents the homestead; a claimant who does neither needs ARM 42.4.302(2)(b) to count the bill at all.
d1035 would still change two things here:
How "as rent" enters Schedule 2EC
real_estate_taxesof everyone in the tax unitrentof the tax unitreal_estate_taxesChoices, with reasons:
The bill goes on line 24 and is multiplied by 15% on line 25. The instructions put the sentence under line 23 and say the bill "can qualify as rent only", so it may not go on line 23. The rule called it "allowable as rent". Line 24 is rent, line 25 is "Multiply line 24 by 15%", and the 15% is §2337(11)'s rent-equivalent tax.
Line 24 is the larger of the rent paid and the bill, not their sum. The claimant "may use" the bill: a choice between two measures of what it costs to occupy one home. Adding them would count that home twice. The rule's facility provisions take the same approach to two housing costs for one period, allowing "either ... or ..., but not both" ((3)(a), and again in (3)(c)(v)). Max asked me to decide how the bill enters lines 24 and 25.
One alternative is also defensible: use the bill only when the claimant pays no rent. §2337(5) defines gross rent as rent "actually paid ... pursuant to an arm's-length transaction". The two readings differ only for a claimant who pays a household member less rent than that member's bill. I recorded the alternative on d1035.
The claimant is the head and spouse. A joint return is one claim, and line 23 is "the property tax you were billed". If either is billed, the home is in the claimant's name and the rule does not apply: the tax unit's bills stay on line 23, a dependent co-owner's included, exactly as before. If neither is, the home is wholly in others' names, a dependent's included, and the bill moves to line 24.
The bill is the household's whole property tax. The instructions refer to "the property taxes billed for that property", so if two other members co-own the home, both bills count. PolicyEngine's household is one dwelling. Owners outside the household, such as a landlord, are not visible to the model.
Every modeled year. The rule has been in force since at least 8/20/2004, as (5) and then (2)(b), so it applies to every year the model covers, from 2009, and needs no parameter.
The instructions caught up later. The 2009 and 2010 booklets mention only trusts ("Property tax that is billed to an irrevocable or family trust qualifies as rent only"). The general sentence appears from 2011.
A tension the PR does not resolve. §2338(1)(c) makes eligible a person who occupied a dwelling "as an owner, renter, or lessee", and the 2025 Schedule 2EC has the same checkbox. A rent-free occupant fits that only through the rule's treatment of the bill as rent. Max's request named this case, the elderly parent in an adult child's home, as the gap to close, and the department's instructions apply the rule. So the PR models it.
Example: 2024, a parent living in an adult child's home
The parent is 80, has a $14,000 pension and pays no rent. The child is 45, has $6,000 of interest and is billed $4,000 of property tax. Each files their own return.
The child is under 62 and cannot claim.
Changes
mt_elderly_homeowner_or_renter_credit_property_tax_billed(TaxUnit, line 23).mt_elderly_homeowner_or_renter_credit_gross_rent(TaxUnit, line 24).tax_unit.sum(add(person.household, period, ["real_estate_taxes"]) * head).mt_elderly_homeowner_or_renter_credit_pre_one_claimantreads the two variables; the rest of its computation is Limit the Montana elderly homeowner/renter credit to one claimant per household (MCA 15-30-2341(1)) #9900's.mt_elderly_homeowner_or_renter_credit_selected_claimantis unchanged apart from its comment. One claim per household is still paid: a claimant whose bill counts as rent competes with the household's other eligible tax units by credit.Tests
New
mt_elderly_homeowner_or_renter_credit_gross_rent.yaml, 12 cases:New
mt_elderly_homeowner_or_renter_credit_property_tax_billed.yaml, 6 cases.mt_elderly_homeowner_or_renter_credit.yaml, 6 new end-to-end cases with Schedule 2EC line-by-line comments:[0, 1_150];mt_elderly_homeowner_or_renter_credit_pre_one_claimant.yaml, 2 new cases.test_mt_elderly_credit_one_claimant.py:These add about 4 s of test time to that file. Local run on macOS at load ~35: 38.9 s wall and 1.47 GB peak RSS for the whole file, including the model import. This is not a Linux CI measurement. No new test file was added.
Run locally against
3d487c5d4a, one file at a time:test_mt_elderly_credit_one_claimant.py(5 tests) andtest_mt_elderly_credit_household_members.py(3 tests) pass, with Hypothesis installed.test_reference_urls,test_known_dead_reference_urls,test_no_concatenated_reference_urls,test_no_builtin_sum_over_entity_callsandtest_no_in_place_writes_to_cached_arrays.Verification by separate agents, against the first version:
3d487c5d4a. It also flagged the tension and the alternative reading above, and the co-owner point under d1035.Invariants
These hold for every Montana household. The first five are #9900's and still hold; the Hypothesis test checks all seven.
Intended exception to 6. A tax unit billed nothing that becomes billed a small amount can lose credit. It stops counting the household's bill as rent and counts only its own bill on line 23. In the example, billing the parent $100 drops their credit from 341 to 0.
This follows from the form reading of line 23 for a co-owner in another tax unit. It is pinned by
test_newly_billed_tax_unit_can_lose_credit. Under d1035's homestead reading a co-owner would count the whole bill, and the drop would go away.Microsim impact
Pending: a 2024 base and branch pair, through the hub runner
lockrun.sh. The base is #9900's headda7c17e844; the branch is this PR's head.Not changed
real_estate_taxesis not limited to the residence and one acre. This was already true of line 23; the rule now passes it to line 24 as well.axiom: TheAxiomFoundation/rulespec-us#1512 queued (ARM 42.4.302(2)(b) evidence, review_finding addendum and companion cases in this comment; signed-encoder runs need approval and ARM 42.4.302 and the Montana forms are not in the pinned corpus)
🤖 Generated with Claude Code