Repository navigation
Count disability benefits and 2020 excluded unemployment compensation in Montana's elderly homeowner/renter credit income - #10163
Conversation
… income MCA 15-30-2337(9)(a) counts all nontaxable income, including (vi) cash public assistance and relief. Schedule 2EC line 16 (2024, 2025) names SSI and workers' compensation, and the 2014-2023 instructions list SSI payments and workers' compensation as disability benefits. Add ssi, tanf_person (the SPM unit's TANF per capita, so the household sum counts it once) and workers_compensation to every period of the gross income sources, with worked Schedule 2EC / Form 2EC cases for 2016-2025. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a claimant, another adult and a child in four arrangements (one return or two, one SPM unit or two, and more assistance), gross household income adds every member's SSI and workers' compensation and the TANF once; the credit matches an independent reading of Schedule 2EC lines 18 to 30, does not depend on the arrangement, stays within the cap and never rises with more assistance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gross household income now counts SSI, and the model computes SSI for a claimant aged 65 or older with little income (take-up defaults to true). Three gross household income cases and three property-test builders are about other items, so they now input no SSI; SSI has its own cases in the government assistance tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups: gi_cash_assistance is outside federal AGI and 15-30-2337(9)(a) counts all nontaxable income (a government-funded pilot is also "any other government assistance" on Schedule 2EC line 16), so it joins every period of the sources. The worked cases move into mt_elderly_homeowner_or_renter_credit.yaml (and the SNAP guard into the gross household income file), with a guaranteed income case, the 2016 worksheet total corrected to line 10 and the references consolidated to one per document, with the 2009 MCA text for the 2009 period. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al AGI in Montana's elderly credit income (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; add changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nsation count once in every arrangement and year Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…overnment-assistance
#9900's one-claimant property test (now on main) builds claimants aged 65 or older with little income, for whom the model computes SSI, which gross household income now counts; its reference leaves SSI out, so the builder inputs none. Reference titles follow the repo format: no page in a single-page title, and quoted titles ending in "#page N-M" for several. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up from #10175 (2020 unemployment compensation exclusion fix), which changes two pins in this PR's #10175 makes each person's exclusion their own (up to $10,200 per spouse) and keeps a dependent's compensation on the dependent's own return, where the dependent excludes up to $10,200 if their own §85(c)(2) AGI is under $150,000. For Case 7 (spouse $8,000, dependent $4,000):
Whichever PR lands second updates these pins after merging main. |
…e, and test each list period's wiring Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment_compensation_addback; supply Case 7's taxable allocation as an input Both review rounds noted that the helper adds more than nontaxable compensation for a person recorded as both a dependent and the head. Case 7 no longer pins the federal exclusion's allocation, which #10175 changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hand-off to the US + core hub.
|
…ity-unemployment # Conflicts: # policyengine_us/parameters/gov/states/mt/tax/income/credits/elderly_homeowner_or_renter/gross_income_sources.yaml
|
US + core hub merge audit, us#10163 at
|
Merged latest
mainatd965f222309f6da0a23c6879ff7404446c1d5ed4after #10144 squash-merged as7b7b418cbc, using merge commitb2259be4dd6a8e1331ac1a99d2faa13241c969dcand preserving the initial main merge102e522dab4bb7ed29f096d7d1a97a78aba41922. The finalgh/main..HEADdiff matches the approvedf9d8d64b53..32fc16d292delta byte-for-byte: 6 files, including this PR's changelog. #10144's resurrected changelog fragment was removed.Montana's elderly homeowner/renter credit missed two kinds of income in gross household income:
disability_benefits). The model leaves them out of federal AGI and out ofdependent_gross_income, and the credit's list didn't name them, so they never counted.What the law and forms count
Change
gross_income_sources.yamlgains two items in every period (2009, 2017, 2023):disability_benefits, counted once in full. The model has no taxable/nontaxable split for it, and every year's form counts both parts.mt_elderly_homeowner_or_renter_credit_unemployment_compensation_addback: the unemployment compensation a member received that neither federal AGI nor a dependent's own gross income counts. In 2020 it is a filer's §85(c) excluded share. Outside 2020 it is zero, except for a person recorded as both a dependent and the head or spouse, whom neither income path counts. That edge follows Count a filer's gains without netted losses and Social Security once in Montana's elderly credit income #10139's Social Security rule.The formula file is untouched, so #10139, which rewrites it, does not conflict with this PR.
Why not
tax_exempt_unemployment_compensationtax_exempt_unemployment_compensationwould double count dependents. The model applies the tax unit's exclusion to every member's compensation, dependents included, and allocates the taxable part by share.dependent_gross_incomealready counts a dependent's compensation in full, without the exclusion, so adding the dependent's excluded share again would count it twice. Each role, withUreceived andTthe model's taxable allocation:Tests
Two new YAML files, kept separate from
mt_elderly_homeowner_or_renter_credit.yamland the gross household income file because #10139 and #10144 append cases to those, and a scratch merge with #10139 conflicts on appended cases. They can fold into the variable-named files after both land.mt_elderly_homeowner_or_renter_credit_disability_and_unemployment.yaml, each case worked line by line from that year's form:mt_elderly_homeowner_or_renter_credit_unemployment_compensation_addback.yaml: 9 cases for the new variable (under and over the cap, over the $150,000 cutoff, 2021, 2024, a joint return, a dependent, and the dependent/head edge in 2024 and 2016, each also asserting gross household income).Fails on the base (
~/reviews/mt-ehrc-disability-uc/fails-on-base.log, revert confirmed withgit status): credit cases 1-7 fail on gross household income; cases 8-9 fail only because they also pin the new variable; case 10 passes. Mutation check: dropping the new variable from the 2023 list fails case 8, and from the 2009 list case 9.policyengine_us/tests/test_mt_elderly_credit_nontaxable_income.py: a grid invariant test in one vectorized Simulation. A claimant aged 66 lives with another adult, in three arrangements (a 20-year-old student dependent, a 45-year-old on their own return, a 60-year-old spouse on a joint return). It runs 2019, 2020, 2021 and 2024, with compensation under and over $10,200 and pensions under and over $150,000. 216 households in all.dependent_gross_incomeor the 2020 exclusion shows up wherever it occurs.gc.collect()when the fixture finishes. Locally (macOS, a loaded host) the test took about 8 s and peaked at 2.0 GB, against 1.28 GB for a bare model import and one-household calculation. These are local figures, not CI. It runs in the Rest job'sremaininggroup (239 s in the Makefile's timing). A recentremainingrun peaked at 13.96 GiB (run 38184073570's resource report: 14,638,840 KB), so whether the group keeps its headroom is checked on this PR's CI, not assumed.Invariants
Validation after merging latest main
Validated final merge head
b2259be4dd6a8e1331ac1a99d2faa13241c969dcon 2026-10-13 (local macOS; Python 3.13.9; Core 3.33.2; pandas 3.0.6; pytest 9.1.1). All required files passed at this head, each in a separate foreground process, sequentially.OMP_NUM_THREADS,OPENBLAS_NUM_THREADS,MKL_NUM_THREADS,VECLIB_MAXIMUM_THREADS, andNUMEXPR_NUM_THREADSwere each4;OMP_WAIT_POLICY=PASSIVE. Wall times below include process startup and shutdown on this local host; they are not Linux CI measurements.YAML files in
policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/elderly_homeowner_or_renter/:mt_elderly_homeowner_or_renter_credit.yamlmt_elderly_homeowner_or_renter_credit_dependent_deductions.yamlmt_elderly_homeowner_or_renter_credit_disability_and_unemployment.yamlmt_elderly_homeowner_or_renter_credit_eligible.yamlmt_elderly_homeowner_or_renter_credit_federal_refundable_credits.yamlmt_elderly_homeowner_or_renter_credit_gross_household_income.yamlmt_elderly_homeowner_or_renter_credit_net_household_income.yamlmt_elderly_homeowner_or_renter_credit_pre_one_claimant.yamlmt_elderly_homeowner_or_renter_credit_property_tax_rebate_received.yamlmt_elderly_homeowner_or_renter_credit_selected_claimant.yamlmt_elderly_homeowner_or_renter_credit_unemployment_compensation_addback.yamlPython files in
policyengine_us/tests/(including this PR's invariant test):test_mt_elderly_credit_dependent_deductions.pytest_mt_elderly_credit_government_assistance.pytest_mt_elderly_credit_household_members.pytest_mt_elderly_credit_nontaxable_income.pytest_mt_elderly_credit_one_claimant.pytest_mt_elderly_credit_rebate_receipts.pytest_mt_elderly_credit_refundable_credits.pyTotal: 102 YAML cases and 26 Python tests across 11 YAML and 7 Python files.
make formatpassed (7,208 files unchanged; Ruff lint passed), andgit diff --check gh/main HEADpassed. The final patch is byte-for-byte identical to the approved PR delta; no partner contract tests changed.The sole initial merge conflict was
gross_income_sources.yaml.git diff f9d8d64b53 95eefa51e577922d56fc6c1effce98a242fbd6f4 -- <file>was empty, so the PR side was retained per the owner's hand-off. The duplicatechangelog.d/mt-elderly-credit-government-assistance.fixed.mdwas removed. The second merge of latest main was conflict-free and preserves that first merge.Coordination: #10139 may land in either order and also edits
gross_income_sources.yaml. Whichever of this PR and #10185 lands second must switchdisability_benefitstotax_exempt_disability_benefitsin all three list periods and rerun the invariant test.Earlier local runs
~/reviews/mt-ehrc-disability-uc/sweep-*.log): the elderly credit YAML folder 101/101, all Montana YAML (110 files) passed. Two Limit the Montana elderly homeowner/renter credit to one claimant per household (MCA 15-30-2341(1)) #9900 one-claimant tests failed there because Count SSI, TANF and workers' compensation in Montana's elderly homeowner/renter credit income (MCA 15-30-2337(9)(a)(vi)) #10144 now counts computed SSI; Count SSI, TANF and workers' compensation in Montana's elderly homeowner/renter credit income (MCA 15-30-2337(9)(a)(vi)) #10144's headf9d8d64b53pins it and they pass.ca9c11bc41(combo-*.log): the elderly credit YAML folder 126/126 and everytest_mt_elderly_credit_*.py29/29.32fc16d292merged with Fix the 2020 unemployment compensation exclusion: cutoff test, per-spouse cap, dependents #10175eabaefd3e2(run by Fix the 2020 unemployment compensation exclusion: cutoff test, per-spouse cap, dependents #10175's session): the add-back YAML 9/9, the credit-level YAML 10/10 and the invariant test 13/13, so the two can land in either order.Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
d965f22230against this PR's headb2259be4dd, for 2024 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.mt_elderly_homeowner_or_renter_creditmt_elderly_homeowner_or_renter_credit_gross_household_incomemt_income_taxstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsMeasured against current main, which now includes #10144. Gross household income rises for 4 records in each year, but none of them changes the credit or Montana tax.
Comparison files are in
fixes/10163-impact/on the hub host.Hub microsimulation impact (historical, before these main merges)
Real microsimulations on the default dataset (populace_us_2024), #10144's head
f9d8d64b53against this PR's heade3c78ee4dd, so the figures cover only this PR's commits. The runs went one at a time under the shared heavy-job lock. Sums are weighted. The later head32fc16d292renames the add-back variable and changes tests only, with the formula and list unchanged.mt_elderly_homeowner_or_renter_creditmt_elderly_homeowner_or_renter_credit_gross_household_incomemt_income_taxdisability_benefitsunemployment_compensationstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsFour Montana person records gain gross household income (up to $13,200 in 2024). Each gain is either disability benefits or the unemployment compensation of a person recorded as both a dependent and the head, which is the only way the add-back is nonzero outside 2020. No record's credit, Montana income tax or net income changes in either year.
2020. A 2020 pair also ran, but in it
unemployment_compensationanddisability_benefitsboth sum to zero: the default dataset holds 2024 records, and the 2020 run has none of these inputs. Every output shows no change, so it cannot size the 2020 exclusion.2024 counterfactual: the 2020 exclusion applied to 2024. To size the unemployment add-back, both sides ran 2024 with the 2020 IRC 85(c) parameters (exclusion amount $10,200; $150,000 cutoff for every filing status), set through
IMPACT_REFORM_JSON. It uses the federal exclusion as currently modeled, before #10175 (one $10,200 cap per return, dependents' compensation pooled in, the compensation subtracted twice in the $150,000 test), so the add-back total will move when #10175 lands.mt_elderly_homeowner_or_renter_creditmt_elderly_homeowner_or_renter_credit_gross_household_incomemt_income_taxunemployment_compensationtax_exempt_unemployment_compensationstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsIn the counterfactual, one record's credit falls by $345; its weight is near zero (−$0.29 weighted).
Comparison files are in
fixes/10163-impact/andfixes/10163-impact-cf2020/on the hub host.Federal gaps found, filed separately
taxable_disability_benefitsto federal gross income and atax_exempt_disability_benefitsinput. Whichever of Count taxable employment disability benefits in federal gross income (IRC 105(a)) #10185 and this PR lands second switches this list'sdisability_benefitsitem totax_exempt_disability_benefits, so each dollar still counts once; the invariant test checks that.Review
Independent GPT-6.1 Sol reviews (Subfleet,
--task review --tier hard, workspace-write):02f4fabb25: lost in a host restart before its verdict. Its draft had four P3 findings and no blockers, all addressed (line 5 for disability pensions, the add-back's role edge in the documentation, wiring tests for each list period; the separate test file kept as explained above).e3c78ee4dd: APPROVE. It hand-checked every YAML case against the forms, verified every cited page, traced each role's income paths and ran the new tests (19 YAML, 13 invariant). Its optional P3s: rename the helper (done), supply Case 7's taxable allocation as an input (done), record the test's cost (above).e3c78ee4dd..32fc16d292: APPROVE, no findings; the rename is complete and Case 7's values check by hand (19/19 passed).Reports:
~/reviews/mt-ehrc-disability-uc/review/on the hub host.axiom: TheAxiomFoundation/rulespec-us#1512 queued (extension comment: TheAxiomFoundation/rulespec-us#1512 (comment))
🤖 Generated with Claude Code