Repository navigation
Let Utah military retirees claim the military retirement credit when no retirement credit applies - #10702
Let Utah military retirees claim the military retirement credit when no retirement credit applies#10702MaxGhenis wants to merge 6 commits into
Conversation
…no retirement credit applies ut_claims_retirement_credit returned True whenever the retirement credit (59-10-1019) was at least the Social Security benefits credit (59-10-1042), including when both were zero. Because ut_military_retirement_credit_eligible requires ~ut_claims_retirement_credit, every military retiree born after 1952 without a Social Security credit lost the military retirement credit (59-10-1043): a 45-year-old with $30,000 of military retired pay paid $1,350 too much Utah tax in 2025. 59-10-1019(3)(b) bars the retirement credit when a 1042 or 1043 credit is claimed, and 1042(3)(b) and 1043(3)(b) bar those credits only alongside 1019, so a filer chooses between the retirement credit alone and the other two together. The choice now compares the retirement credit with the sum of the Social Security and military retirement credits, and a retirement credit worth nothing is never claimed. A new ut_military_retirement_credit_max holds the unconditional amount so the comparison has no cycle. The credit rate is zero before 2021, when 59-10-1043 took effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59-10-1043(2)(a) sets the credit at the percentage listed in 59-10-104(2). The separate military_retirement/rate parameter copied that rate through 2025 but not the 4.45% rate for 2026, so the 2026 credit used 4.5%. The credit now reads gov.states.ut.tax.income.rate, as the Social Security benefits credit already does, gated by a new in_effect parameter that starts in 2021. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry retirement credit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ice-date inputs, and run on 2.105.1 plus the Utah and Montana fixes The 45-year-old served 2001 to 2020 and the 67-year-old 1977 to 1996. In the military scenario the script sets retired_from_federal_government and Kentucky's months of service before 1998, and Oregon's subtraction for the share of service before October 1, 1991. The outputs come from a local PolicyEngine-US checkout (bfeef52eb9): 2.105.1 plus PolicyEngine/policyengine-us#10702 and #10713. The README documents the households, data coverage and limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
David, can you check how the PR picks between Utah's retirement credits? Utah lets a filer claim either the retirement credit or the Social Security and military retirement credits together (59-10-1019(3)(b)). The PR picks the retirement credit when it's positive and at least the other two combined. It also reads the military credit's rate off the income tax rate, 4.45% in 2026 under SB 60, so I'd like your eye on that too. If you can look by Tuesday afternoon, we can merge it before the Veterans Day post (PolicyEngine/policyengine-app-v2#1523). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10702 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 3 +2
Lines 37 38 +1
=========================================
+ Hits 37 38 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Review: Let Utah military retirees claim the military retirement credit when no retirement credit appliesSummaryThe PR fixes three real problems with Utah's military retirement credit (Utah Code 59-10-1043):
The new election claims the retirement credit only when it is positive and at least the Social Security and military credits combined. That matches 59-10-1019(3)(b), 59-10-1042(3)(b) and 59-10-1043(3)(b), and the TC-40 instructions for 2021 through 2025. Every TY2024–2026 household I traced comes out right. One critical problem remains in TY2021–2023, years the PR claims ( Critical1. TY2021–2023: the election picks the military credit, which is never applied, so the PR raises tax for older military retirees. File:
Should address1. Reference rule: one source is cited twice.
Suggestions
Verified correct
Hand checks
Axiom line assessment
CI status
Branch status
Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes per the review above: 1 critical (for 2021-2023 the new election drops the retirement credit, but the military retirement credit isn't in the non-refundable list until 2024, so those filers pay more than on main and than the law requires), 1 should (duplicate same-document reference), 4 suggestions. 2024-2026 results are correct.
…irement-credit-choice
…erans with TRICARE - The post leads with how many states exempt military retired pay, adds a table of the 13 states' rules, and lists the credits the retired couple loses. - The runs set is_veteran for the retiree (PolicyEngine-US infers it from VA payments, which these couples lack) and TRICARE coverage for both spouses, so no household claims the premium tax credit. - Results come from PolicyEngine-US main (3386304d28) plus the open Utah and Montana fixes (PolicyEngine/policyengine-us#10702, #10713); they stay preliminary until those merge. - render_post.py fails when a run moves a state into or out of the sets the prose names. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2021 S.B. 11, Section 4, gives the credit retrospective operation for taxable years beginning on or after January 1, 2021, and the 2021-2023 TC-40 instructions list it among the line 24 nonrefundable credits. The 2021 and 2022 nonrefundable lists omitted it, so the election that now weighs the military credit dropped the retirement credit without applying the military one. Add it to both lists, with TC-40-line household cases for 2021, 2022 and 2023. Also cite S.B. 11 for the 2021 start, cite the 2025 instructions once in ut_claims_retirement_credit, add a removed fragment for the deleted rate parameter, and document the active-duty survivor limitation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Critical 1: I added Should 1: Suggestions: |
What was wrong
ut_claims_retirement_creditweighed the retirement credit (Utah Code 59-10-1019) against the Social Security benefits credit (59-10-1042) alone, and returnedTruewhenever the retirement credit was at least that amount.ut_military_retirement_credit_eligiblerequires~ut_claims_retirement_credit, so main blocked the military retirement credit (59-10-1043) in two cases:Existing military-credit tests passed because they set
ut_claims_retirement_creditas an input.The nonrefundable credit list carried
ut_military_retirement_creditonly from 2024. The credit applies from TY2021, so for 2021 through 2023 it never reduced Utah tax.The credit had its own rate parameter,
military_retirement/rate.yaml, which copied the income tax rate through 2025 and stopped there, so PolicyEngine-US applied 2025's 4.5% in 2026. 59-10-1043(2)(a) uses "the percentage listed in Subsection 59-10-104(2)", which SB 60 (2026) sets at 4.45%.That parameter's first value (2021) also extended backward, so PolicyEngine-US computed the credit for 2020 and earlier. The 2020 TC-40 instructions have no military retirement credit; the 2021 instructions introduce it (code AJ, at 4.95%).
The law
Change
ut_military_retirement_credit_max: the 59-10-1043(2) amount,gov.states.ut.tax.income.ratetimes the filer's and spouse's military retirement income. Only the newin_effectparameter gates it, so the election can read it without a cycle.ut_military_retirement_credit_potentialnow adds it under the existing eligibility gate.ut_claims_retirement_credit=retirement_credit_max > 0andretirement_credit_max >= ss_benefits_credit_max + military_retirement_credit_max. A positive retirement credit still wins ties.non_refundable.yamladdsut_military_retirement_creditto the 2021 and 2022 lists (the 2022 list covers 2023). Its position changes only how the model attributes credits, because the liability cap applies to the total.military_retirement/rate.yaml; the newmilitary_retirement/in_effect.yamlreads false before 2021 and true from 2021, and cites S.B. 11 Section 4. Aremovedchangelog fragment names the deleted path and its replacement,gov.states.ut.tax.income.rate; the two held the same values for 2021 through 2025.ut_claims_retirement_creditcites the 2025 instructions once, with a# PDF pages 21, 23comment.Readings taken
ut_military_retirement_credit_max: the instructions (2021 page 22, 2025 page 23) send a survivor of a member who died on active duty or in training to the military survivor benefits credit (59-10-1036, code AA) instead of code AJ. No input separates those survivors, so their benefits count toward this credit. Both credits apply the 59-10-104(2) percentage, but 59-10-1036 carries no bar against the retirement credit.These are model choices, not conflicts between sources, so the source-conflict register needs no entry.
Invariants (for every input)
The YAML tests cover each boundary. I added no Hypothesis test, following this repo's YAML-first test policy.
Tests
ut_claims_retirement_credit.yaml: test 4 (0 vs 0) now expectsfalse; three new cases weigh the military credit (alone, combined with the Social Security credit, and outweighed by the retirement credit).ut_military_retirement_credit_max.yaml: the TY2025 amount (1,350), survivor benefits (450), no credit in 2020, and the TY2026 amount at 4.45% (1,335).ut_military_retirement_credit.yaml: two integration cases with nout_claims_retirement_creditinput (a 45-year-old gets the credit; a 76-year-old with $4,000 of military pay takes the $450 retirement credit instead).ut_non_refundable_credits.yaml: three cases worked from the TC-40 lines for their year. A single 75-year-old with $30,000 of military pay owes $0 in 2021 and 2023, because the military credit (1,485 and 1,395) exceeds the tax (823.77 and 625.35). A 2022 working couple takes the full 1,455 against 3,576.75 of tax.tests/core/test_dependent_retirement_income_state_invariants.py: its Utah comment now describes the new election; its 4 cases pass unchanged.tests/policy/baseline/gov/states/utpass, andtests/code_health/test_military_retirement_readers.py,tests/code_health/test_source_conflicts.pyand the invariants file pass (111 tests).Before and after
Utah income tax from real runs of
ut_income_tax, main at 3386304 against this branch:On this branch the single filer's military credit (1,485 in 2021, falling to 1,335 in 2026) exceeds the tax every year, so tax is 0, as the law gives. The couple's credit comes off in full: 1,485, 1,455, 1,395, 1,365, 1,350 and, in 2026, 1,335 (4.45% of $30,000). Two 2026 households owe the same on both versions. With a $30,000 private pension in place of the military pay, the working couple owes 2,758.73. A retired couple, ages 67 and 65, with $45,000 of military retired pay and $30,000 of Social Security owes 0: its $872.20 Social Security credit already beat its $0 retirement credit on main, so it claimed the military credit there too, and the two credits absorb its $1,100.23 liability.
axiom: us-ut/statute/59-10-1043 queued (TheAxiomFoundation/rulespec-us#2074)
🤖 Generated with Claude Code