Skip to content

Fix MT Elderly Homeowner/Renter Credit eligibility cap#8548

Open
PavelMakarchuk wants to merge 4 commits into
mainfrom
fix-mt-ehrc-household-income
Open

Fix MT Elderly Homeowner/Renter Credit eligibility cap#8548
PavelMakarchuk wants to merge 4 commits into
mainfrom
fix-mt-ehrc-household-income

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

Summary

Closes #8547.

Two bugs caused the Montana Elderly Homeowner/Renter Credit to be granted to filers above the $45,000 gross household income cap mandated by § 15-30-2338(1)(d):

  • Per-person multiplier: the multiplier phase-out was computed against the person-level gross_household_income, but § 15-30-2337(4) defines GHI at the household level. Now aggregated to the tax unit before the multiplier lookup.
  • Social Security undercounted: gross income sources used adjusted_gross_income_person, which only includes the taxable SS portion. § 15-30-2337(9)(a)(viii) requires all federal social security payments. The gross household income variable now adds the untaxed SS portion (social_security - taxable_social_security) on top of the parametric source list.

Test plan

  • Added the integration test from the issue: joint filer both age 75, wages $30K, interest $5,280, SS $51,792, rent $17,139 → credit = $0 (was $407).
  • Existing MT EHRC tests still pass (11 tests).
  • Full MT regression suite passes (399 tests).
  • CI green.

🤖 Generated with Claude Code

Closes #8547

- Apply the multiplier phase-out to the tax-unit-aggregated gross
  household income, not the per-person value, per § 15-30-2337(4).
- Add the untaxed portion of Social Security to the gross household
  income sources so all SS is counted per § 15-30-2337(9)(a)(viii).
- Add an integration test for a joint filer above the $45,000 cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (16a0dce) to head (2bc3687).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #8548      +/-   ##
===========================================
+ Coverage   94.69%   100.00%   +5.30%     
===========================================
  Files           7         2       -5     
  Lines         113        38      -75     
  Branches        2         0       -2     
===========================================
- Hits          107        38      -69     
+ Misses          6         0       -6     
Flag Coverage Δ
unittests 100.00% <100.00%> (+5.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

PavelMakarchuk and others added 3 commits June 1, 2026 00:29
- Multiplier uses household-aggregated GHI (per-person GHI under
  threshold; tax-unit sum lands in phase-out bracket).
- Credit = 0 at exactly $45,000 GHI boundary.
- Full untaxed Social Security counted in the gross household income
  variable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add veterans_benefits, child_support_received, strike_benefits, and
general_assistance to the statutory list of nontaxable income items
counted toward gross household income, covering items (i), (iv), (v),
and (vi). Add a test asserting they are all summed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Federal AGI already includes the taxable portion of pension and IRA
distributions (via taxable_pension_income and
taxable_retirement_distributions). The gross income sources list was
adding pension_income and taxable_ira_distributions on top of AGI,
causing the taxable portions to be counted twice. Replace pension_income
with tax_exempt_pension_income and drop taxable_ira_distributions; the
existing tax_exempt_ira_distributions still captures the Roth portion
not in AGI.

Verified: a single MT filer with \$10,000 taxable pension or taxable IRA
distribution now produces \$10,000 of gross household income (was
\$20,000).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review June 1, 2026 05:10
@PavelMakarchuk PavelMakarchuk requested a review from hua7450 June 1, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MT Elderly Homeowner/Renter Credit: per-person multiplier and missing SS in gross household income (§ 15-30-2337)

1 participant