Repository navigation
Give Michigan's qualified disabled veteran exemption to every veteran with a service-connected disability - #10714
Conversation
… with a service-connected disability MCL 206.30(3)(b) allows the exemption for each qualified disabled veteran, defined as a veteran with a service-connected disability (38 U.S.C. 101(16)), with no rating threshold. PolicyEngine-US read is_fully_disabled_service_connected_veteran, so veterans with partial ratings got nothing. Add a has_service_connected_disability input that defaults to the fully disabled flag, and read it in mi_exemptions and mi_exemptions_count (the home heating credit's count). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
David, can you check the Michigan exemption here? MCL 206.30(3)(b) and the 2025 MI-1040 instructions give a $500 exemption for each veteran on the return with a service-connected disability, at any rating. So the PR adds a person input, |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10714 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 3 +2
Lines 37 48 +11
=========================================
+ Hits 37 48 +11
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: Give Michigan's qualified disabled veteran exemption to every veteran with a service-connected disabilitySummaryThe law supports the fix. MCL 206.30(3)(b) gives an additional exemption "for each taxpayer and every dependent of the taxpayer who is a qualified disabled veteran". It defines that as "a veteran with a service-connected disability": a disability "incurred or aggravated in the line of duty ... as described in 38 USC 101(16)", held by a veteran with an honorable or general discharge. Neither the statute nor the 2023-2025 MI-1040 or MI-1040CR-7 instructions set a VA rating threshold. Before this PR, the model gave the exemption only to The model now counts the exemption per person, across the head, the spouse and each dependent. It uses the right amounts ($400 for 2023, $500 for 2024-2026) and feeds both readers: One issue remains. The new variable has a default formula, so PolicyEngine treats it as computed, not as an input, and the web calculator's household builder won't offer it. That leaves the fix out of reach for calculator users, including readers of the Veterans Day post that cites this PR. Making it a plain input fixes this. Critical (must fix)None. Should address
Suggestions
Verified correct
Axiom line assessment
rulespec-us#2076 is OPEN and labelled
It matches the head's behavior. The line's legal id says If the "Should address" item changes the variable to a plain input, the issue body's description of CI statusAt the current head 4a67d2b, most checks pass, including:
Pending at the last check: Microsimulation and Baseline states-shard-1. No failures so far. Locally on the head tree, the three changed YAML files pass 33/33. On the tree merged with main:
Branch statusThe branch is 1 commit ahead and 46 behind main. Main has changed none of this PR's files since the merge base. #10398 (Michigan military survivor exemptions and The PR shares no files with the sibling military retirement PRs (#10702 UT, #10713 MT, #10715 ID, #10716 DE, #10717 ID). #10330 (open, not in this batch) adds Washington-scoped VA rating inputs: a design overlap with no file conflict (Suggestion 3). Verdict: REQUEST_CHANGES |
DTrim99
left a comment
There was a problem hiding this comment.
Requesting changes per the review above: 0 critical, 1 should (has_service_connected_disability has a default formula, so it isn't an input variable and the web calculator can't set a partial rating; make it a plain bool input and OR it with is_fully_disabled_service_connected_veteran in Michigan), 5 suggestions. The law supports the fix and the amounts check out.
… Michigan helper
has_service_connected_disability had a default formula, so policyengine-core
did not treat it as an input and the web app's household builder could not
offer it. Rename it is_service_connected_disabled_veteran, drop the formula
(default false), and add mi_qualified_disabled_veteran, which ORs it with
is_fully_disabled_service_connected_veteran; mi_exemptions and
mi_exemptions_count read the helper, so a person counts once.
Record the discharge assumption in the helper, mi_exemptions and the input's
documentation, note that the input does not set is_veteran, reword the
parameter description ("on the return"), drop the Form 446 reference and the
page text in two reference titles, and add tests: the helper's truth table,
both inputs on one person, a veteran dependent, and an is_input_variable check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
David, thanks for the review. 8976ec0 takes your should item and suggestions 1, 2, 4 and 5:
#10330 has merged with its Washington rating inputs. I kept Michigan on a bool, since a 0%-rated condition still qualifies, as you noted, and a rating test would miss it. A shared federal rating input could feed both states later. A Sol review approved this head, with 41 YAML cases, 13 Python checks and 60 edge-case and year probes passing. Could you take another look? |
PR Review (round 2): Give Michigan's qualified disabled veteran exemption to every veteran with a service-connected disabilitySummary8976ec0 fixes the round-1 should item. The any-rating flag is now The commit also takes suggestions 1, 2, 4 and 5. Max declined suggestion 3 (a rating input shared with Washington) for a reason that holds: Michigan's definition names no rating, and a 0% rating still counts. I re-read MCL 206.30(3)(b) and the 2023-2025 MI-1040 instructions, and they support the head:
Every new or changed expectation matches my hand trace. All 38 CI checks pass at the head, and the branch merges cleanly with current main. #10768 and #10811 changed only the VA flags' labels and documentation, so main creates no conflict and no double count. Two optional suggestions remain. Align the new input's label and documentation with the VA flag conventions #10811 set (Suggestion 1), and pin the edition-specific Taxpayer's Guide reference (Suggestion 2). No Python ran locally for this round. Each claim below rests on reading the head and main, hand traces, or the CI logs at the head, and says which. Prior findings
New findingsCriticalNone. Should addressNone. Suggestions
Verified
AxiomThe line rulespec-us#2076 is OPEN and labelled It stays dispatch-ready:
The cosmetic CI
The Quick Feedback log shows the three changed YAML files passing:
That is 41 cases, within 736 passing under BranchThe branch is 3 commits ahead (the original fix, a merge of main and 8976ec0) and 52 behind main (47c4e87).
Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Approving. The round-1 should is fixed: is_service_connected_disabled_veteran is now a plain input, mi_qualified_disabled_veteran ORs it with the 100% flag so a person counts once, and a Python test pins that it is an input. Four of the five suggestions are taken, and the decline on a shared rating input holds, since MCL 206.30(3)(b) names no rating and a 0% rating qualifies. All 17 new or changed expectations hand-check, including the dependent case (3 × 5,900 + 2 × 500 = 18,700). Two optional suggestions are in the report above. CI is green at 8976ec04f1, and the branch merges cleanly with main with no double count against #10768 or #10811.
|
Merged at reviewed head 8976ec0 (squash f2b6108).
|
What was wrong
PolicyEngine-US gave Michigan's qualified disabled veteran exemption only to veterans marked
is_fully_disabled_service_connected_veteran, a 100% VA rating. Michigan law gives it to every veteran with a service-connected disability, at any rating, so a veteran rated 30% or 70% got no exemption, and the home heating credit's exemption count left them out too.The law
Change
is_service_connected_disabled_veteran(variables/household/demographic/person/): a veteran with a disability incurred or aggravated in the line of duty (38 U.S.C. 101(16)), at any VA rating, 0% included. It has no formula, so it defaults to false and the web app's household builder, which lists only input variables, offers it. Its documentation says that it does not setis_veteran(which followsveterans_benefits), that the 100% input does not set it, and that the model has no discharge input.mi_qualified_disabled_veteran(Person, defined for Michigan): true whenis_service_connected_disabled_veteranoris_fully_disabled_service_connected_veteranis. A veteran marked only with the 100% input keeps the exemption, and a person marked with both counts once.mi_exemptionsandmi_exemptions_count(the home heating credit's count) addmi_qualified_disabled_veteranacross the head, the spouse and every dependent, in place ofis_fully_disabled_service_connected_veteran. The comment inmi_exemptionsand the helper's comment record the discharge assumption below.disabled/amount/veteran.yaml:#page=. The Taxpayer's Guide title names the edition its live link serves, the 2025 tax year, which shows $500 on file page 12.test_state_tax_head_spouse_swap_invariance.pydraws the new input, andtest_input_variable_definitions.pyasserts that it is an input variable with a false default.This PR leaves the other readers of
is_fully_disabled_service_connected_veteranas they are: Missouri's property tax credit, Illinois's CTA military service pass, Virginia's energy assistance,military_disabled_headandmilitary_disabled_spouse. Washington's property tax exemption reads its own inputs,wa_pte_va_service_connected_ratingandwa_pte_receives_va_disability_compensation. A rating doesn't fit Michigan's test, which names none, so this PR doesn't read them.Readings
Invariants
For every input:
mi_qualified_disabled_veteranequalsis_service_connected_disabled_veteran or is_fully_disabled_service_connected_veteranfor a Michigan resident and is false elsewhere. The tests cover the whole truth table.mi_exemptionsexceeds its value without veterans by at most $500 (2024 on) times the unit's size, andmi_exemptions_countby at most the unit's size.mi_exemptionsormi_exemptions_count.is_service_connected_disabled_veterangets the samemi_exemptionsandmi_exemptions_countas main.test_state_tax_head_spouse_swap_invariance.py, now drawing the new input).Tests
mi_qualified_disabled_veteran.yaml, 7 cases: a partial rating, the 100% input alone, the 100% input with the any-rating input set false, neither input, a VA beneficiary without a service-connected disability, an Ohio resident, and four Michigan residents covering every combination of the two inputs.mi_exemptions.yaml, 6 new 2026 cases: a partial rating ($5,900 + $500 = $6,400), the 100% input alone ($6,400), both inputs on one person (counted once, $6,400), a joint return with two veterans ($11,800 + $1,000 = $12,800), a head and an adult dependent who are both veterans (3 x $5,900 + 2 x $500 = $18,700), and a VA beneficiary without a service-connected disability ($5,900).mi_exemptions_count.yaml, 3 new cases: two people, one with a partial rating (3); one person with both inputs (2); and four single filers covering every combination of the inputs (1, 2, 2, 2).test_input_variable_definitions.py: the new input is an input variable with a false default. YAML can't check this, and a formula would hide the input from the web app.or, reading either input alone (or both added) inmi_exemptionsormi_exemptions_count, dropping the veteran term, dropping the helper'sdefined_for, and giving the input back a default formula each fail.Locally, all 736 cases under
tests/policy/baseline/gov/states/mipass, as dotests/core/test_input_variable_definitions.py,tests/core/test_state_tax_head_spouse_swap_invariance.pyandtests/code_health/test_military_retirement_readers.py.Before and after
A single Michigan filer in 2026, aged 40, with $40,000 of wages, computed on main (3386304) and on this branch:
mi_exemptionsbeforemi_income_taxbeforeis_service_connected_disabled_veteran)is_fully_disabled_service_connected_veteran)The new input defaults to false, so microsimulation results don't change until a dataset sets it.
axiom: us-mi/statute/206.30/3 queued (TheAxiomFoundation/rulespec-us#2076)
🤖 Generated with Claude Code