Repository navigation
Conversation
…ption MCA 15-30-2120(3)(n) and (8), from tax year 2024: the lesser of half the return's military retirement pay or its Montana earned income (Form WMRE lines 2-5), plus half of military survivor benefits. An input records the section (9) residency and five-year conditions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… June 30, 2023) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's #10331 drops the disability income exclusion from Montana's subtractions for 2024 on, after SB 399 repealed it. This branch adds the working military retirement exemption to the same lists. The resolution keeps both: the exemption joins the 2024 and 2025 lists, the exclusion stays out, and the references keep both changes' sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
David, I'd like your read on two Montana choices here:
If you can look by Tuesday afternoon, we can merge it before the Veterans Day post (PolicyEngine/policyengine-app-v2#1523). |
PR Review: Model Montana's working military retirement and survivor benefit exemptionSummaryThe structure follows the law. MCA 15-30-2120(3)(n)(i) and (8)(a) give a retiree "the lesser of: (i) the amount of Montana source wage income on the return; or (ii) 50% of the taxpayer's military pension or military retirement income". (3)(n)(ii) gives "up to 50% of all income received as survivor benefits", with no earnings cap. (9) adds the residency and five-year conditions. The rates (0.5 and 0.5), the 2024 start, pooling the earnings cap over the return, carrying the return's amount on the head, keeping dependents out, the zero floor on each business source, and the per-person eligibility mask all match the statute, Form WMRE (2025) and its instructions. The exemption flows through the 2024+ federal-taxable-income path ( One critical problem remains. Two of the four earnings sources that set the cap are the wrong PolicyEngine variables:
Three should items remain: the PR's two statute-over-form readings have no source-conflict candidate entries; four new terms are unpinned by tests; and one reference title carries page text. On the two questions in the thread:
Critical (must fix)
Should address
Suggestions
Verified correct
Axiom line assessment
rulespec-us#2075 is OPEN and labelled
It records the encoding debt (the held It matches the head's behavior. Its output 4 is stated at the level of the law ("net income from a trade or business and net farm income"), so the Critical fix doesn't contradict it. When the fix lands, consider adding a farm companion test, such as "$30,000 of military retirement income and $40,000 of net farm income gives output 5 = 15,000". Also consider correcting "SB 124" (Suggestion 5). CI statusAt head 2eeb5d3, 36 checks pass and 7 are skipped, with none failing or pending. The passing checks include:
The head already includes main, so CI ran the merged tree. Locally on that tree:
Branch statusThe branch is 3 commits ahead and 0 behind main. #10331 (merged today) edited No file overlaps with the sibling military retirement PRs (#10702 UT, #10714 MI, #10715 ID, #10716 DE, #10717 ID). Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes per the review above: 1 critical (the earnings cap reads self_employment_income and farm_income, so it drops SSTB business income and Schedule F farm income that 15-30-2120(8)(b) counts, and counts a non-AGI input; use total_self_employment_income and farm_operations_income), 3 should (record two statute-over-form readings; four unpinned terms; a reference title), 5 suggestions.
What was missing
PolicyEngine-US did not model Montana's working military retirement and survivor benefit exemption.
military_retirement_pay.pylisted it as a limitation and the Montanasubtractions.yamlmarked it "not yet modeled", so PolicyEngine-US taxed all of a Montana military retiree's pay.The law
Change
gov.states.mt.tax.income.subtractions.military_retirement:rate(0.5),survivor_rate(0.5) andin_effect(false before 2024, true from 2024; parameters extend their first value backward, so the rates alone would have reached 2023).mt_military_retirement_exemption_eligible(Person, default true) for the (9) residency and five-year conditions, which PolicyEngine-US cannot derive.mt_military_retirement_exemption(Person). The head's record carries the return's amount:in_effect× [min(rate× the eligible head's and spouse'smilitary_retirement_pay, the return's earned income) +survivor_rate× their eligiblemilitary_retirement_pay_survivors]. Earned income addsirs_employment_income,self_employment_income,partnership_s_corp_incomeandfarm_incomeacross head and spouse, and floors each source at 0, as WMRE lines 3 to 5 do. Dependents' pay and income do not count.subtractions.yamladds the variable to its 2024 and 2025 lists (2026 carries 2025 forward), andmilitary_retirement_pay.pydrops the Montana limitation line.Assumptions
mt_military_retirement_exemption_eligibledefaults to true. The exemption began in 2024, so through 2027 no claimant can have used up five consecutive years; the default can only miss a filer who fails the residency test (someone who lived in Montana before July 2023 but began receiving the pay elsewhere, or who claimed it and moved away). From 2028, users should set it to false for claimants past their five years.partnership_s_corp_incomeand leaves rents out.Invariants
For every input:
A local randomized check (600 tax units, 60% married, random pay, survivor benefits, wages, business and farm income including losses, and eligibility; seed 20261108; not committed, following this repo's YAML-first test policy) found every invariant held, and the exemption equaled min(0.5 × pay, earned income) + 0.5 × survivor benefits on every unit.
Tests
New
mt_military_retirement_exemption.yaml, 10 cases:mt_subtractions15,000.mt_military_retirement_exemption_eligiblefalse: 0.mt_subtractions0.At 3b2bcd5, all 1,062 cases under
tests/policy/baseline/gov/states/mtpass, and so do the 98 tests intests/core/test_dependent_retirement_income_state_invariants.py,test_state_tax_head_spouse_swap_invariance.py,test_dependent_elsewhere_head_spouse_swap_invariance.py,test_mi_military_survivor_income_invariants.py,tests/code_health/test_military_retirement_readers.py,test_known_dead_reference_urls.pyandtests/test_aggregate_list_integrity.py. ruff format and check pass.Before and after
A married couple, one spouse age 45 with $30,000 of military retired pay and $60,000 of wages, TY2026 (
PolicyEngine/veterans-day-2026,scripts/trace_state.py MT working_45):mt_military_retirement_exemptionWith no pension the couple owes 1,307, so Montana's tax on the pay falls from 1,410 to 705. A retired couple, ages 67 and 65, with $45,000 of military retired pay, $30,000 of Social Security and no earnings (
retired_67) owes the same on both versions: without earned income it gets no exemption.axiom: us-mt/statute/15-30-2120 queued (TheAxiomFoundation/rulespec-us#2075)
🤖 Generated with Claude Code