Repository navigation
Count only the claimant and spouse in Michigan household resources (MI-1040CR lines 14-27, 30 and 31) - #9796
Merged
Merged
Conversation
A filer with capital losses or other capital gains enters capital gain distributions on Schedule D line 13 (2025 Instructions for Schedule D), so they net against the losses before the 26 U.S.C. 1211(b) limit on line 21. The model added distributions (non_sch_d_capital_gains) to gross income and deducted min(3,000, losses) separately: a 5,000 long-term loss with 3,000 of distributions gave 0 in AGI instead of -2,000. - capital_losses_allowed_against_gains (new): losses allowed up to the gains in gross income, distributions included (1211(b), first part). - limited_capital_loss: the net loss up to the limit (1211(b)(1)-(2), Schedule D line 21). loss_ald deducts both. This also nets spouses' gains and losses on a joint return. - loss_limited_net_capital_gains (+ person version): Form 1040 line 7a, max(-limit, LT + ST + distributions). Net investment income no longer adds the distributions separately (Form 8960 line 5a). - has_qdiv_or_ltcg: qualified dividends, or Schedule D lines 15 and 16 both above zero (Form 1040 instructions, line 16). - dependent_taxable_ss_magi: the same netting on the dependent's return. - dc_self_employment_loss_addition: subtracts both capital parts of loss_ald. Tests: YAML cases with form line comments; grid, Hypothesis property and monotonicity tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons-agi # Conflicts: # policyengine_us/parameters/gov/irs/investment/income/sources.yaml
filer_loss_limited_net_capital_gains (from #9784) now nets the head and spouse's capital gain distributions with their Schedule D gains and losses before the 1211(b) limit, and net investment income no longer adds the distributions separately. The invariant test's reference computation follows: distributions move from the person-level Form 8960 amounts to the Schedule D inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
capital_losses_allowed_against_gains counts only the capital gains that gov.irs.gross_income.sources includes, and dependent_taxable_ss_magi nets distributions only when both sources are listed. Cover both branches with reforms that drop non_sch_d_capital_gains or capital_gains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the independent review of #9788: - mi_household_resources subtracted all above-the-line deductions, including the capital loss already netted in the capital gains line (MI-1040CR line 30 is U.S. Schedule 1 adjustments only). It now leaves out capital_losses_allowed_against_gains and limited_capital_loss. The two existing loss-limit cases double counted the loss: 44,000 -> 47,000 and 47,000 -> 48,500. - has_qdiv_or_ltcg figures Schedule D lines 15 and 16 over the head and spouse, so a dependent's loss cannot switch off the filer's worksheet. - Distributions are floored at zero per person in every line 7a variable (box 2a is not negative), as irs_gross_income does. - Capital losses are deductible only while capital_gains is a gross income source, matching dependent_taxable_ss_magi under such a reform. - Test that the two loss-limit parameters agree; rename the #9784 invariant test that no longer compares with the pre-change formula. - loss_ald label: "Business and capital loss ALD". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI caught two tests written against the old capital loss formula: - test_dependent_losses_agi_invariants (#9647) compared limited_capital_loss with min(cap, sum of losses), which does not net one spouse's gains against the other's losses. Its reference now splits 1211(b) the same way: losses allowed up to the gains, plus the excess up to the cap. Renamed ..._match_all_member_formula. - md_capital_gains_surtax "partial offset" set capital_losses (a formula variable, max(0, -capital_gains)) to 50,000 next to 150,000 of net gains, a state no inputs can produce, and its comment applied the $3,000 cap to losses within gains. It now inputs the short-term loss directly (30,000 gains less 50,000 losses = -20,000): Schedule D line 16 and Form 502CG line 1 are 100,000, surtax 2,000 (same on main). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MCL 206.508(4) adds back "any net business loss after netting all business income and loss" and "any net rental or royalty loss". The MI-1040CR nets line 16 (Schedule C, Form 4797 Part II, Schedule E Parts II and III, Schedule F) and line 17 (Schedule E Parts I and V) and floors each total at zero. Line 30 is the U.S. Schedule 1 adjustments, so loss_ald, which holds business, rental and capital losses, is no longer subtracted there. Estate and trust income and Form 4797 ordinary gains now count on line 16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MCL 206.508(3): "'Household' means a claimant and spouse." Netting every tax unit member's sources let a dependent's business or rental loss offset the claimant's income (a 15-year-old's Schedule C loss of 20,000 took the claimant's household resources from 70,000 to 50,000). Lines 16 and 17 now sum only non-dependents, as loss_ald and irs_gross_income do. Tests: three dependent YAML cases and a deterministic dependent property test. The loss_ald reform check now runs once, on the grid, instead of on every Hypothesis example; test_properties drops from 931 s in CI to about 8 s. The deterministic tests no longer need hypothesis. Small inputs are drawn at $100 or more, the tolerance docstring is corrected, and comments list Schedule E Part IV (REMIC) on line 17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MCL 206.508(3) defines the household as "a claimant and spouse", and the MI-1040CR asks for the income "you and your spouse received". Every household resources source except lines 16 and 17 was summed over all tax unit members, so a dependent's wages, interest, pensions and capital gains raised the claimant's household resources, and a dependent's Schedule 1 adjustments (such as the deduction for half of self-employment tax) lowered them. - Sources are summed over the head and spouse with tax_unit_non_dep_add. - Line 21 (Social Security, SSI and railroad retirement, including amounts received for minor children or dependent adults), line 22 (child support) and line 27 (public assistance paid to the household) still count for every member, as the form says. - Line 19 reads filer_loss_limited_net_capital_gains, the head and spouse's Schedule D. - Line 30 sums the head and spouse's Schedule 1 adjustments, with the self-employment adjustments read per person. - Line 31 premiums paid for the family are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no income, the model computes a Michigan FIP grant (tanf) for the test household, which counts on line 27 but was missing from the test's reference. Each SPM unit now gets a tanf input, drawn at random in the Hypothesis test and counted in full on line 27 of the reference. The Hypothesis tests also run more examples (50 and 30). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
irs_gross_income leaves tax unit dependents' income off the filer's return, but self_employment_tax_ald, self_employed_health_insurance_ald and self_employed_pension_contribution_ald summed every member's person-level amount, and above_the_line_deductions summed every member's IRA contributions, early withdrawal penalty, educator expenses, adoption assistance and education bond interest. A dependent's Schedule SE and Schedule 1 deductions belong on the dependent's own return. - The three self-employment aggregates sum their _person variables over non-dependents; alimony_expense_ald masks dependents. - above_the_line_deductions sums gov.irs.ald.deductions with tax_unit_non_dep_add. - Readers that sum the ALD list themselves do the same: taxable_ss_magi, taxable_uc_agi, student_loan_interest_ald_magi, adjusted_gross_income_person and ma_part_b_agi. - mo_adjusted_gross_income takes personal ALDs over non-dependents, so its remaining-ALD allocation never goes negative. - medicaid_adjusted_gross_income_person attributes a dependent's own person-level deductions to the dependent instead of the head. - ma_gross_income_loss_adjustment leaves out dependents' losses, as the federal gross income it adjusts does. The _person variables keep each person's own amount, which a dependent's own return (dependent_taxable_ss_magi) uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9796 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 4 11 +7
Lines 76 265 +189
Branches 2 14 +12
==========================================
+ Hits 76 265 +189
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:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-resources-claimant-spouse Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e member lists Review r1: - Line 30 reads the tax-unit adjustments as they are, so supplied inputs and reforms of self_employment_tax_ald and the other aggregates are respected. #9801 (merged in) makes those aggregates and alimony_expense_ald leave dependents out. - The every-member sources (lines 21, 22 and 27) move to a parameter, gov.states.mi.tax.income.household_resources_all_members, and a source defined for a group larger than the tax unit (an SPM unit amount) is aggregated as a household amount, so a reform cannot hit an entity error. - gi_cash_assistance counts only for the claimant and spouse: nothing shows a pilot payment is public assistance paid to the claimant's household. - Tests: dependent alimony and guaranteed income YAML cases; property tests always have a dependent and a positive-resources household; a reform test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons-agi # Conflicts: # policyengine_us/tests/core/test_dependent_losses_agi_invariants.py # policyengine_us/variables/gov/states/mi/tax/income/mi_household_resources.py
… and move the distributions comment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to mi-household-resources-business-losses # Conflicts: # policyengine_us/variables/gov/states/mi/tax/income/mi_household_resources.py
…change in the changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
…s-losses' into mi-household-resources-claimant-spouse # Conflicts: # policyengine_us/variables/gov/states/mi/tax/income/mi_household_resources.py
…aggregate-input cases Review r1 finding 1: filer_loss_limited_net_capital_gains summed the head's and spouse's components, so a tax unit net_capital_gains input was ignored (wages 10,000 plus a 5,000 aggregate gain gave 10,000, not 15,000). It now takes net_capital_gains less the dependents' own gains and losses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
…nd SE health insurance cases Review r2 follow-ups: a supplied net_capital_gains reaches net investment income (YAML case), a supplied self-employed health insurance deduction comes off Michigan line 30 (YAML case), and the variable documents how a supplied total combines with dependents' person-level gains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ces-claimant-spouse # Conflicts: # changelog.d/fix-dependent-ald-filer-agi.fixed.md # policyengine_us/tests/core/test_ald_determinism.py # policyengine_us/tests/core/test_dependent_above_the_line_deductions_invariants.py # policyengine_us/tests/policy/baseline/gov/hhs/medicaid/income/medicaid_adjusted_gross_income_person.yaml # policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/dependent_above_the_line_deductions.yaml # policyengine_us/tests/policy/baseline/gov/states/mi/tax/income/mi_household_resources.yaml # policyengine_us/variables/gov/hhs/medicaid/income/medicaid_adjusted_gross_income_person.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/above_the_line_deductions.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/alimony_expense_ald.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/above_the_line_deductions/student_loan_interest/student_loan_interest_ald_magi.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/adjusted_gross_income_person.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/filer_loss_limited_net_capital_gains.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/social_security/taxable_ss_magi.py # policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/unemployment_insurance/taxable_uc_agi.py # policyengine_us/variables/gov/states/ma/tax/income/adjusted_gross_income/ma_part_b_agi.py # policyengine_us/variables/gov/states/mi/tax/income/mi_household_resources.py
…ive Schedule C and F income With #9801 on main: line 30 sums gov.irs.ald.filer_amounts_recorded_on_dependents over every member, as above_the_line_deductions does, and the losses test now draws positive dependent Schedule C and F income, whose self-employment tax deduction is on the dependent's own return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
Line 16 of the filers' Schedule D now starts from the tax unit net_capital_gains and takes out dependents' person-level gains and losses, as #9796 does for Form 1040 line 7a. The Schedule D Tax Worksheet read net_capital_gains on main, so a tax unit amount supplied there keeps reaching worksheet line 7. filer_loss_limited_net_capital_gains goes back to main's formula, so this PR no longer edits the file #9796 and #9840 change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
MaxGhenis
added a commit
that referenced
this pull request
Oct 9, 2026
* Use the filers' Schedule D for the tax on net capital gain Net capital gain (26 U.S.C. 1222(11), 1(h)(11)), the Schedule D Tax Worksheet and the 28% rate gain summed long- and short-term gains, capital gain distributions, qualified dividends, collectibles gain and Form 4952 elections over every tax unit member. Adjusted gross income leaves out tax unit dependents, whose items are on their own returns (2025 Form 8814, line 4), so a dependent's gain or dividends let the filer's ordinary income be taxed at capital gain rates. The rate side also added a negative capital gain distributions input, which AGI floors at zero (Form 1099-DIV box 2a). A new helper, filer_schedule_d_lines, gives the head and spouse's Schedule D lines 7, 15 and 16 with distributions floored per person. It now feeds filer_loss_limited_net_capital_gains (Form 1040 line 7a), has_qdiv_or_ltcg, net_capital_gain and the worksheet's Form 4952 lines, so the AGI side and the rate side read the same lines. Qualified dividends, the Form 4952 election and the 28% rate gain inputs are summed over the head and spouse with tax_unit_non_dep_add. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Trim the Schedule D property tests' Hypothesis examples Keeps the remaining pytest group's added time small: the file now takes about 50 s of CPU locally (6 tests, 1.4 GB peak footprint). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep a supplied net_capital_gains in Schedule D line 16 Line 16 of the filers' Schedule D now starts from the tax unit net_capital_gains and takes out dependents' person-level gains and losses, as #9796 does for Form 1040 line 7a. The Schedule D Tax Worksheet read net_capital_gains on main, so a tax unit amount supplied there keeps reaching worksheet line 7. filer_loss_limited_net_capital_gains goes back to main's formula, so this PR no longer edits the file #9796 and #9840 change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use the filers' amounts in Vermont's and Hawaii's capital gain lines Review r1 found that Vermont's flat capital gains exclusion took every member's qualified dividends out of the now filer-only adjusted_net_capital_gain. A dependent's 3,000 of dividends cut a 4,000 exclusion to 1,000 (Vermont tax 936.33 to 1,036.82). The dividends are now the head and spouse's, as in the federal amount. Hawaii's Tax on Capital Gains Worksheet took the smaller of the filers' net capital gain (line 7) and every member's long-term gains (line 4), so a dependent's loss shrank the head's line 8. Line 4 is now the head and spouse's too. The property tests also give dependents section 1202 gain, a long-term loss carryover and Schedule D line 18 small business stock gain, and no longer claim the grid runs without Hypothesis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test that a supplied net_capital_gains reaches Schedule D line 16 Review r2 asked for a case covering 2b7bf4f: distributions of 1,000 and a tax unit net_capital_gains input of -5,000 make line 16 a loss of 4,000, so has_qdiv_or_ltcg is false and worksheet line 9 is 0. Main turned the flag on there. The helper's line 16 comment now says it is figured from net_capital_gains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Clarify Schedule D worksheet scope and aggregate input limitation * Match the changelog and helper docstring to the PR's scope The 28% Rate Gain Worksheet was already filer-only on main (#9988), so the fragment no longer claims this PR changes it, and it now names Vermont's dividend subtraction. The helper docstring sentence was missing an "and". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as draft
October 9, 2026 10:14
5 tasks
michigan.gov has removed the 2025 home heating credit book (TY2025/MI-1040CR-7-Book.pdf now returns 404), so cite the Wayback Machine capture of 2026-02-18. It is byte-identical to the NBER TAXSIM mirror (sha256 f540a3dd...). Its total household resources lines 17-33 say the same as MI-1040CR lines 14-31 about whose income counts: "you and your spouse", Social Security "for minor children or other dependent adults who live with you" (line 24), child support and foster care payments (line 25), MDHHS payments "made to your household" (line 30), and premiums "for yourself and your family" (line 33). References only; no formula or value changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Hand-off back to the US + core hub (from session
|
MaxGhenis
marked this pull request as ready for review
October 9, 2026 21:01
Contributor
Author
|
US + core hub merge audit, us#9796 at
|
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
Michigan total household resources (
mi_household_resources, used by the homestead property tax credit and the home heating credit) summed every source over all tax unit members. So a dependent's own wages, interest, pensions and capital gains raised the claimant's household resources, and a dependent's Schedule 1 adjustments, such as the deduction for half of self-employment tax, lowered them. MCL 206.508(3) says "'Household' means a claimant and spouse". #9790 fixed this for lines 16 and 17. This PR goes line by line through the rest of the MI-1040CR: lines 14-27, 30 and 31.Example (2025): a parent with wages of 40,000 and a 17-year-old dependent with 8,000 of wages, 200 of interest and 3,000 of Schedule C income. The model gave 47,988.06: 40,000 + 8,000 + 200, less the dependent's 211.94 self-employment tax deduction. The form gives 40,000.
Main merge and CI follow-up
Merged
mainat30192579689d02dde1d04dd305b47e3aee73fa5finto the approved headabff6ae89c7b76b39eb134de059b5c97d686db55with merge commitafaad539dd882fccae4ee5cf1ead3b53a945bc49. d1143 follow-up head:dd85603c7fc1d5d3e2d8ff431901e7d4e1167d5a. Current head:08f20a99e95726c9c558047859366f399c136543, a references-only commit on top of it that cites the 2025 MI-1040CR-7 book (see "The law and the forms"). Main includes #9790, #9801, #9795 and #9855. This PR is second in the Michigan chain: #9795 → #9796 → #9840.gov.states.mi.tax.income.household_resources_adjustments, filtered to deductions still present ingov.irs.ald.deductions, and Count only the claimant and spouse in Michigan household resources (MI-1040CR lines 14-27, 30 and 31) #9796'stax_unit_non_dep_addclaimant-and-spouse summation. The list includeseducator_expense_ald, capped per eligible educator. Federal income exclusions stay in Michigan resources.filer_loss_limited_net_capital_gainsnow reads the shared filer Schedule D line 16, which also feeds the Schedule D worksheet and routing. Michigan's line 19 and Form 1040 line 7a therefore apply their capital-loss limit to the same filer amount.net_capital_gainswith the ordinary computed all-member aggregate at the aggregate's storage precision. When they match, line 16 uses the filers' short- and long-term components directly. When they differ, line 16 starts from the supplied aggregate, subtracts the dependents' long- and short-term gains separately, and adds the filers' distributions. Each filer's distributions are floored separately.Michigan retirement invariant: intended exception (d1143)
Max ruled d1143 on 2026-10-09 to follow the form. MI-1040CR lines 18 and 21 (2025 booklet, PDF page 28 / printed page 32) count pensions only for the claimant and spouse, but include SSI received for dependent adults who live with them. A dependent adult's pension can therefore lower their SSI, reduce Michigan household resources, and increase the claimant's refundable heating credit. This is intended.
The retirement invariant now exempts Michigan only from the assertion that dependent retirement income never lowers net state income tax. Every other state's assertion remains strict. Michigan still must preserve claimant AGI, taxable income, pension benefits, subtractions and tax before refundable credits; units without dependent income must remain unchanged.
A paired 2025 YAML regression computes actual SSI for a dependent adult with zero or $2,400 of pension: SSI falls from $11,604 to $9,444 because $2,400 − 12 × $20 = $2,160 is countable unearned income. Household resources fall from $21,604 to $19,444. The standard heating allowance is $815 less 3.5% of household resources, producing $58.86 and $134.46. Applying the 2025 60% funding factor gives heating credits of $35.316 and $80.676, reducing net Michigan tax by $45.36 ($2,160 × 3.5% × 60%). Claimant AGI remains $10,000; pension benefit, subtractions, taxable income and tax before refundable credits remain zero.
The d1143 follow-up changes tests, not Michigan formulas. The PR remains draft.
Validation
Validation tree:
dd85603c7fc1d5d3e2d8ff431901e7d4e1167d5a, following27ffb3b8c2d20ccc9ab4889ba56598c34901fba1. The retirement and EITC invariants and the household-resources and homestead YAMLs passed onb09d151287e33eedf519305f811382c0aff25bd6. The subsequent correction changes only two inputs in the new home-heating fixture; those earlier test files and all model formulas are unchanged. The final home-heating and capital-gain results below refer todd85603c7fc1d5d3e2d8ff431901e7d4e1167d5a. The requested matrix runs as single files in the foreground, one process at a time. Local validation uses Python 3.13.9 and policyengine-core 3.32.15.Final matrix: 85 passed across six files.
retirement: 35.05 s reported by pytest (1612.47 s wall); eitc: 1158.61 s reported by pytest (1756.53 s wall); resources: 155.20 s reported by pytest (2002.94 s wall); homestead: 51.95 s reported by pytest (1870.58 s wall); heating: 85.40 s reported by pytest (1729.76 s wall); capital: 39.14 s reported by pytest (877.77 s wall). Startup was slow under host load. The retirement timing helper could not read a sandbox-restricted system metric after pytest passed; subsequent commands use portable elapsed timing. Peak RSS is unavailable.
make format, Ruff formatting and lint, andgit diff --cached --check: passed.The initial home-heating attempt had 11 passed and 1 failed: supplying zero SSI for the heads initialized the whole person input array to zero, bypassing the dependents' SSI formulas. The fixture now computes SSI with explicit take-up flags for all four people; its expected outputs are unchanged. The failed attempt is retained as diagnostic evidence.
08f20a99e9changes only thereferencetuple ofmi_household_resourcesand one reference inhousehold_resources_all_members.yaml.mi_household_resources.yamlpassed 48 of 48 on it (policyengine-core 3.32.15). No folder or full-suite runs were done for these follow-ups. The microsimulation impact at the current head is in "Hub microsimulation impact (current head)" below.The law and the forms
MCL 206.508 (https://www.legislature.mi.gov/Laws/MCL?objectName=mcl-206-508): "(3) 'Household' means a claimant and spouse. (4) 'Total household resources' means all income received by all persons of a household in a tax year while members of a household, ..."
MCL 206.510(1) (https://www.legislature.mi.gov/Laws/MCL?objectName=mcl-206-510): "'Income' means the sum of federal adjusted gross income ... plus all income specifically excluded or exempt ... Also, a person who is enrolled in an accident or health insurance plan may deduct from income the amount that person paid in premiums in the tax year for that insurance plan for the person's family."
2025 MI-1040 book (https://www.michigan.gov/taxes/-/media/Project/Websites/taxes/Forms/IIT/TY2025/MI-1040-Book.pdf):
The 2025 MI-1040CR-7 book (home heating credit) has the same text on whose income counts. michigan.gov has removed it (
TY2025/MI-1040CR-7-Book.pdfreturns 404), so the PR cites the Wayback Machine copy of 2026-02-18. It is byte-identical to the NBER TAXSIM mirror (sha256f540a3dd…). Page 4 has "the total income (taxable and nontaxable) of both spouses or of a single person maintaining a household", and page 8 has "Include all taxable and nontaxable income you and your spouse received in 2025." Its resources are on lines 17-35, so MI-1040CR lines 21, 22, 24, 27 and 30 are CR-7 lines 24, 25, 27, 30 and 32 (page 9), with the same wording. The 2024 CR-7 book has the same text on lines 26, 27, 29, 32 and 34.Line by line
irs_employment_income,strike_benefits,disability_benefitsinterest_income,dividend_incomepension_income,retirement_benefits_from_ss_exempt_employmentfiler_loss_limited_net_capital_gains(wasloss_limited_net_capital_gains)alimony_income,gambling_winningssocial_security,ssi,railroad_benefitschild_support_receivedunemployment_compensationmiscellaneous_incomegi_cash_assistance(guaranteed income pilot payments)veterans_benefits,workers_compensationtanf,general_assistancetanfis an SPM-unit amount that reaches the tax unit in per-person shares, so counting only the head's share would drop the children's part of the grantgov.states.mi.tax.income.household_resources_adjustments, filtered bygov.irs.ald.deductions; includes cappededucator_expense_aldhealth_insurance_premiumsChanges
mi_household_resources:tax_unit_non_dep_add(from Leave dependents' investment income out of the filer's NIIT base #9784). A tax-unit-level source is taken as it is. This replaces Net Michigan business and rental losses in household resources (MI-1040CR lines 16, 17 and 30) #9790's own mask for lines 16 and 17.gov.states.mi.tax.income.household_resources_all_membersover every member withadd. These are lines 21, 22 and 27: amounts the claimant receives for others in the household. So is a source defined for a group larger than the tax unit, such as an SPM unit amount, so a reform can't hit an entity error.tax_unit_non_dep_add. A supplied input or a reform ofself_employment_tax_aldor another aggregate is respected. Keep dependents' above-the-line deductions off the filer's AGI #9801 (now on main) makes those aggregates leave dependents out.gov.states.mi.tax.income.household_resources:filer_loss_limited_net_capital_gains(the head and spouse's Schedule D, with the same netting and loss limit).gi_cash_assistancecounts only for the claimant and spouse: nothing shows that a pilot payment is public assistance paid to the claimant's household.filer_loss_limited_net_capital_gains(read by Michigan and by net investment income) reads the filers' Schedule D line 16 from Use the filers' Schedule D for the tax on net capital gain #9855's sharedfiler_schedule_d_lines, then applies the capital-loss limit. Capital gain distributions are floored separately for each filer. Anet_capital_gainsamount matching the ordinary computed all-member aggregate at its storage precision uses the head and spouse's components directly, preventing a dependent's large gains from introducing rounding changes. For a differing supplied aggregate, the helper subtracts dependent long- and short-term gains separately from that supplied amount before adding the filers' distributions. It does not reconstruct the supplied amount through a residual against the rounded computed aggregate. Tax-unit inputs remain supported: wages 10,000 plus a supplied 5,000 give 15,000, and a supplied −5,000 is limited to −3,000.Tests
Six new deterministic cases in
net_capital_gain.yamlcover the shared Schedule D calculation:mi_household_resources.yaml: 15 claimant-and-spouse cases plus the 33 now on main (48 in all), with MI-1040CR line comments and expected values worked out from the form. The "was" values come from running the cases on #9790's headb6c5f613ce, where 6 fail. The 3 guards pass on both:net_capital_gainsinput of 5,000 counts on line 19 (15,000), and one of −5,000 is limited to −3,000 (7,000). Both fail on the r1 code. Suppliedself_employment_tax_aldandself_employed_pension_contribution_aldamounts come off line 30 (8,000), as does a suppliedself_employed_health_insurance_ald(9,000).dependent_net_investment_income.yamladds a case where a suppliednet_capital_gainsof 100,000 is net investment income.long_term_capital_gainsin place of the tax-unitnet_capital_gainsand keep their expected values. The new cases above cover the supplied amount.test_mi_household_resources_members.py: a deterministic test of every source on a child and on a dependent parent, a spouse test, and Hypothesis tests. Households have a head, an optional spouse, and 0-2 dependents aged 10, 16 or 75, with sparse random amounts of 26 inputs and a random FIP grant. Invariants, for every household:mi_household_resourcesequals a reference written from the form: max(0, the head and spouse's lines 14-20 and 23-26 + every member's lines 21, 22 and 27 − the head and spouse's line 30 − every member's premiums). Lines 16, 17 and 19 net and floor as the form does. This is a differential test against the form.The first Hypothesis counterexample was a test gap, not a model error. In a household with no income, the model computes a FIP grant, which counts on line 27, but the reference had left it out. The SPM unit's
tanfis now an input.Historical validation on head
b10ac14936(before #9795), one process at a time:test_capital_gain_distributions_loss_limit.py(43 passed); Keep dependents' above-the-line deductions off the filer's AGI #9801'stest_ald_determinism.pyand dependent ALD invariants (13 passed).Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
3019257968against this PR's head08f20a99e9, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.mi_household_resourcesmi_refundable_creditsmi_income_taxmi_homestead_property_tax_creditmi_home_heating_creditfiler_loss_limited_net_capital_gainsnet_investment_income_taxadjusted_gross_incomestate_income_taxincome_taxhousehold_net_incomehousehold_benefits08f20a99e9differs from the d1143 follow-up headdd85603c7fonly in references. The Michigan figures match the earlier approved-head estimate (abff6ae89c, below) at the precision shown. Household resources fall in all 126 changed units, and every changed credit rises. The refundable-credit change equals the homestead plus home heating changes up to float32 rounding: $4,414,000 + $8,336,907 = $12,750,907 against $12,750,904 in 2025, and $2,651,825 + $7,943,936 = $10,595,762 against $10,595,763 in 2026. The federal capital-gain follow-ups (78a463146,27ffb3b8c) change no record on the default dataset:filer_loss_limited_net_capital_gains,net_investment_income_tax,adjusted_gross_incomeandincome_taxare identical record by record in both years. Each side-year ran under the shared heavy-job lock with a 20 GB footprint cap; peak footprint was 14.3 GB.Comparison files are in
fixes/9796-impact/on the hub host.Historical hub microsimulation impact (approved head abff6ae, superseded)
Historical results on the default dataset, main at the earlier merge base
0a8c3c2c43against approved headabff6ae89c, for 2025 and 2026. These estimates predate the latest main merge and CI follow-ups. "Hub microsimulation impact (current head)" above supersedes them, with the same Michigan totals. The original runs went one at a time under the shared heavy-job lock. Sums are weighted.mi_household_resourcesmi_refundable_creditsmi_income_taxmi_homestead_property_tax_creditmi_home_heating_creditstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsExcluding dependents' income lowers household resources on all 126 changed units, and every changed credit record rises. The refundable-credit increase equals the homestead plus home heating increases in each year: $4.41M + $8.34M = $12.75M in 2025.
Earlier historical microsimulation (default dataset, 2026)
Historical impact, superseded: this section predates #9795 and the main merge above. The figures are kept as originally measured. The later approved-head estimate is "Historical hub microsimulation impact (approved head abff6ae, superseded)"; both are superseded by "Hub microsimulation impact (current head)" above.
Base: #9790's head
0a2ca21b4amerged with #9801 at1a97062090, which is everything here except this PR's own change. Branch:b10ac14936. The two ran one at a time under the shared heavy-job lock and a 24 GB watchdog (peak 15.4 GB) onpopulace_us_2024.h5@populace-us-2024-spm-20260909: 79,729 tax units, 1,974 in Michigan.mi_household_resources(weighted)mi_homestead_property_tax_creditmi_home_heating_creditmi_refundable_creditsmi_income_tax/state_income_taxmi_eitc,adjusted_gross_income,loss_limited_net_capital_gainsfiler_loss_limited_net_capital_gainsdiffered in 31 units by at most $0.03 (one float32 spacing; −$977 weighted on $1.63T), from its summation order.income_taxdiffered by less than a cent in one unit. The current precision fix removes the computed-gain dependence on the dependents' amounts; these historical measurements do not validate the follow-up head.Coordination
Not in this PR (follow-ups, sent to the US + core hub)
mi-household-resources-premiums-gambling, stacked on this one. It also mapsmiscellaneous_income(taxable other income) to line 20 and gifts (financial_assistance) to line 24.axiom: TheAxiomFoundation/rulespec-us#1491 queued (extended for MCL 206.508(3), household = claimant and spouse; the signed encoder run needs approval)
🤖 Generated with Claude Code