Repository navigation
Conversation
- Compare taxable_uc_agi, which already leaves out unemployment compensation, with the $150,000 cutoff instead of subtracting the compensation from it a second time. - Exclude up to $10,200 of each person's own compensation, so each spouse on a joint return excludes up to $10,200 (worksheet lines 8 and 9). - Keep a dependent's compensation on the dependent's own return: the tax unit's taxable compensation sums only members who are not dependents, and a dependent's exclusion is tested on a new dependent_taxable_uc_agi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hypothesis batches of single, joint, joint-with-dependent and single-parent tax units near the $150,000 cutoff check: per-person bounds, the cutoff on the filers' and each dependent's own return, a differential between taxable_uc_agi and AGI less the taxable compensation, that dependents' compensation never moves the filers' return, and spouse symmetry; and that nothing is excluded in 2021. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
The tax unit's taxable unemployment compensation now sums only the head and spouse, in every year, so Indiana's deduction (IC 6-3-2-10) no longer deducts a dependent's compensation that is not in the filers' federal AGI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 12, 2026 21:03
MaxGhenis
added a commit
that referenced
this pull request
Oct 12, 2026
…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>
…ts' estate losses Address the independent review of #10175: - California's Schedule CA subtraction and Wisconsin's unemployment compensation subtraction now read tax_unit_taxable_unemployment_compensation, and Rhode Island adds back the new tax_unit_tax_exempt_unemployment_compensation, so a dependent's own-return amount no longer lands on the filers' return. - Add estate_income to the dependent helper's loss sources: limited_business_loss deducts estate and trust losses for filers, and the helper's own comment says it lists the sources loss_ald deducts. This reaches the dependent's IRC 86 and 85(c) modified AGIs and the dependent's IRA deduction. - Fix two form-line citations (Form 1040 line 5b, Schedule 1 line 17) and state that the differential invariant covers compensation that is not negative. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#10187 fixes the same three state lines (ca_agi_subtractions, ri_additions, wi_unemployment_compensation_subtraction) more broadly and has its own review, impact run and Axiom issues. Restore them to main here and drop tax_unit_tax_exempt_unemployment_compensation, which only Rhode Island used. #10175 should land after #10187, so the dependent routing never meets the old pooled state lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egative Address round 2 of the independent review of #10175: - dependent_income_and_deductions now limits a dependent's business losses (self-employment, farm, rental, partnership/S corporation and, since the last commit, estate and trust) to business income plus the IRC 461(l) threshold, as limited_business_loss does for the filers. The threshold is infinite while the limit is suspended (2018-2020), so the 2020 exclusion test keeps the whole loss. - taxable_unemployment_compensation is floored at zero. irs_gross_income counts positive amounts only, so a net repayment never reduced gross income; a negative taxable amount let CA, PA and MA subtract it anyway. The exempt part carries the repayment, as before this PR, which Wisconsin's homestead income reads. - The property test now draws net repayments, and the differential invariant holds for every input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Hand-off to the US + core hub. Session bebaaf35, head
|
MaxGhenis
added a commit
that referenced
this pull request
Oct 13, 2026
… in Montana's elderly homeowner/renter credit income (#10163) * Count SSI, TANF and workers' compensation in Montana's elderly credit 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> * Add property tests for government assistance in Montana's elderly credit 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> * Format the Montana government assistance property tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pin SSI to zero in Montana elderly credit cases that test other income 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> * Count guaranteed income payments; move the cases to variable-named files 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> * Count disability benefits and unemployment compensation outside federal AGI in Montana's elderly credit income (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test the 2020 cutoff above the band the federal test double subtracts; add changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add a grid invariant test: disability benefits and unemployment compensation count once in every arrangement and year Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pin SSI in the one-claimant property test; format reference titles #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> * Name line 5 for disability pensions, describe the add-back's role edge, and test each list period's wiring Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rename the add-back to mt_elderly_homeowner_or_renter_credit_unemployment_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> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes three gaps in the 2020 federal unemployment compensation exclusion (IRC 85(c), added by ARPA § 9042).
The law
26 U.S.C. 85(c) (checked 2026-10-12):
Section 85(a) is what puts unemployment compensation in gross income, so "without regard to this section" leaves all of it out. The IRS implements this in the Unemployment Compensation Exclusion Worksheet in the 2020 Instructions for Form 1040 (rev. 4-2021), file page 88:
Page 87 has the joint example: "$20,000 … and your spouse was paid $5,000 … report $15,200 on line 8 as a negative amount".
What was wrong
taxable_uc_agialready sums the gross income sources other thantaxable_unemployment_compensation, less above-the-line deductions, so it is AGI without the compensation (worksheet line 6).tax_unit_taxable_unemployment_compensationthen comparedtaxable_uc_agi - tax_unit_unemployment_compensationwith the cutoff. A single filer in Montana, age 66, with $150,000 of taxable pension income and $8,000 of compensation, gottaxable_unemployment_compensation0. The law gives 8,000, because line 6 is 150,000, which is not under $150,000. The two boundary tests added in Fix 2020 unemployment exclusion boundary at $150,000 AGI #8900 encoded the same misreading: their comments say "AGI over UC = 155,000 - 5,000 = 150,000".min(tax unit compensation, 10_200). In the IRS joint example it gave taxable[11_840, 2_960](14,800 in all); the law gives[9_800, 0].tax_unit_unemployment_compensationadds every member, dependents included. Take a 2020 joint couple whose spouse received $8,000 and whose 20-year-old student dependent received $4,000. The model gave taxable[0, 1_200, 600], andirs_gross_incomethen dropped the dependent's 600. The law gives the couple 0 taxable: the spouse's 8,000 is under 10,200, and the dependent's 4,000 is on the dependent's own return.Changes
taxable_unemployment_compensation(Person) is now each person's own compensation less their own exclusion. That exclusion ismin(max(0, compensation), 10_200)when the AGI of the return the compensation is on is under the cutoff, and nothing otherwise.taxable_uc_agiof the tax unit, compared directly with the cutoff, with no second subtraction.dependent_taxable_uc_agi, their own § 85(c)(2) AGI, against the single cutoff, or the separate one if they live with their spouse. It reusesdependent_income_and_deductionsfromdependent_taxable_ss_magi.py, less the compensation, plusdependent_taxable_social_security.irs_gross_incomecounts positive amounts only, so a net repayment never reduced gross income. Before this PR a person's share was 0 when the tax-unit total was not positive. A negative taxable amount would let California, Pennsylvania and Massachusetts subtract it.tax_exempt_unemployment_compensation(received less taxable) carries the repayment as a negative amount, as before this PR, which Wisconsin's homestead income reads.tax_unit_taxable_unemployment_compensationis the sum over members who are not dependents (sum_among_non_dependents), asirs_gross_incomecounts them.taxable_uc_agi: the label, documentation and references now say what it is (worksheet line 6). The formula is unchanged.amountandcutoffparameters get descriptions, labels and references (IRC 85(c), worksheet lines).tax_unit_unemployment_compensationis unchanged and no longer feeds the exclusion.dependent_taxable_ss_magi.py:estate_incomejoinsBUSINESS_LOSS_SOURCES, so a dependent's own estate or trust loss (Schedule E Part III, Schedule 1 line 5) reduces the modified AGI of the dependent's own return.limited_business_lossalready deducts these losses for the head and spouse, and the list's own comment says it holds the sourcesloss_alddeducts. The shared helper feedsdependent_taxable_uc_agi,dependent_taxable_ss_magi(and sodependent_taxable_social_security) anddependent_traditional_ira_deduction, so all three now net the loss. Tests:dependent_taxable_uc_agi.yamlCase 3 and a newdependent_taxable_ss_magi.yamlcase.limited_business_lossdoes for the filers. Business losses (self-employment, farm, rental, partnership/S corporation, estate) are allowed up to business income plusgov.irs.ald.loss.maxfor a single (or, living with a spouse, separate) filer. That threshold is infinite for 2018–2020 (CARES Act § 2304), so the 2020 test keeps the whole loss. Without the limit, a $700,000 estate business loss would have wiped out a 2025 dependent's taxable Social Security. Tests: the 2025 above-limit case independent_taxable_ss_magi.yaml(modified AGI 88,000, taxable benefits 17,000), anddependent_taxable_uc_agi.yamlCase 4 (2020, suspended).Direction of allocation. Before, the person-level amount was the tax-unit amount times the person's share of the unit's compensation. Now persons are primary and the tax unit sums them. No dataset input sets
tax_unit_taxable_unemployment_compensation: the hub's screen sample of the default dataset, which keeps its inputs, has 18 tax-unit columns and none is this one, and no reform overrides it. One test sets it as an input (in_unemployment_compensation_deduction.yamlCase 1), and only Indiana's deduction reads it there, which is unchanged. The only remaining readers of the tax-unit variable are Indiana's deduction andtaxsim_v11.Effect outside 2020
The exclusion amount is 0 outside 2020, so the person-level
taxable_unemployment_compensationis each person's own compensation in every other year, before and after this PR. The tax-unit total now leaves out dependents' compensation in every year, which moves its two readers:in_unemployment_compensation_deduction(IC 6-3-2-10, in effect from 2021). It deducted a dependent's compensation that is not in the filers' federal AGI, and now does not. Test:in_unemployment_compensation_deduction.yamlCase 3.taxsim_v11(contrib TAXSIM output), which reports the tax-unit total.Invariants
These hold for every input, net repayments included, and are tested on random households in
tests/core/test_unemployment_compensation_exclusion_invariants.py(Hypothesis):taxable_uc_agi< 150,000, and a dependent's only when their owndependent_taxable_uc_agiis. When it is, the exempt part is exactly min(max(0, compensation), 10,200).taxable_uc_agi= max(0,adjusted_gross_income−tax_unit_taxable_unemployment_compensation). These are two independent ways of figuring AGI without the compensation, and they agree only if the compensation is left out exactly once.taxable_uc_agi, AGI and the tax-unit total all stay the same.The property test fails on the old formulas. Hypothesis shrank to wages of 150,000 and compensation of 1, which the old code excluded.
Tests
YAML cases are worked line by line from the 2020 worksheet. On the old formulas, 11 of the 18 cases in the two unemployment test files failed and 7 passed. Two of the 11 also read
dependent_taxable_uc_agi, which did not exist yet, but their taxable amounts are wrong on the old code as well. All pass now.taxable_unemployment_compensation.yamlCases 4–14:tax_unit_taxable_unemployment_compensation.yaml: the boundary cases are rewritten on the correct reading, with AGI of exactly 150,000, 149,999, and 154,999 (the last was the old file's "full exclusion" case), plus a joint return with a dependent.dependent_taxable_uc_agi.yaml: the dependent's own adjustments, and Social Security taxable on the full compensation.in_unemployment_compensation_deduction.yamlCases 2–3. Case 3 fails on the old code.Local runs: all YAML files above, plus the 2020-affected consumer files (student loan MAGI, IRA phase-out, AR, DE, MA, MT, IN, WI, RI; 73 cases);
test_modified_agi_add_backs.py(13 passed);core/test_dependent_above_the_line_deductions_invariants.py(9 passed);code_health/test_rest_python_groups.py(12 passed).Cost of the new Python test. It runs in the Rest
coregroup. Locally on macOS: 2 tests in 7 s (28 s with the model import), 1.1 GB peak RSS. Each Hypothesis example builds one vectorized simulation, so nothing is retained between tests. These are local measurements, not Linux CI.Consumers checked
Federal.
irs_gross_income(filers only).taxable_ss_magi,ira_219g_magi,ira_219g_taxable_social_security,student_loan_interest_ald_magiandcapped_qualified_tuition_expenses_aldall use the full compensation, as §§ 86(b)(2)(A), 219(g)(3)(A)(ii), 221(b)(2)(C) and the 2020 instructions' line 7 caution require; unchanged.dependent_gross_incomeoverrides with the full compensation; unchanged.States, 2020. MA's qualified unemployment deduction (head and spouse, capped), MT's subtraction and UT's homeowner/renter relief now read each person's correct federal amount.
California, Rhode Island, Wisconsin: land Leave dependents' unemployment compensation off California, Rhode Island and Wisconsin filer returns #10187 (and Leave dependents' income out of Wisconsin homestead credit household income #10191) first.
ca_agi_subtractions,ri_additionsandwi_unemployment_compensation_subtractionsum every member onto the filers' state return. The independent review of this PR found that once a dependent's 2020 exclusion moves to the dependent's own return, some pooled cases that happened to be right turn wrong. Example: a filer at $160,000 with a dependent's $5,000 of compensation; Rhode Island would add the dependent's excluded $5,000 to the filer's return. Leave dependents' unemployment compensation off California, Rhode Island and Wisconsin filer returns #10187 fixes those three lines. I merged its head 042b072 onto this PR's head 1bf37f4: the merge is clean, its state tests pass, and so do the cases from the reviewer's findings. After Leave dependents' unemployment compensation off California, Rhode Island and Wisconsin filer returns #10187 merges I'll merge main here and add the two 2020 cases that need this PR's dependent exclusion (California: a dependent with $150,000 of dividends; Rhode Island: a filer over the cutoff).Other state lines that pool dependents (independent review, round 2). Delaware
de_agi_joint, Montanamt_agi_joint, DCdc_taxable_income_joint, Iowaia_net_income, Utah homeowner/renter and RI-1040H household income, Wisconsin homestead, and SC TANF each read a dependent's person-level compensation onto the filers' return or a household measure, or count taxable rather than received compensation. In 2020 the old pooled allocation made some of them right by accident, and this PR's per-person allocation makes a different set right by accident.A 2020 grid of 96 households per state checks each line against its own rule:
de_agi_jointmt_agi_jointdc_taxable_income_jointia_net_incomepr_gross_income_personri_property_tax_household_incomewi_homestead_incomesc_tanf_gross_unearned_incomeSplitting each cell's absolute error (rounds 3-4 of the independent review) shows where the movement comes from:
~/reviews/uc-exclusion-2020/consumer-grid/.2020 charitable deduction: the $300 deduction for non-itemizers (§ 62(a)(22), Form 1040 line 10b) was taken below the line, so worksheet line 5 was short by it; Take the 2020 charitable deduction for non-itemizers above the line #10186 fixes it.
Count disability benefits and 2020 excluded unemployment compensation in Montana's elderly homeowner/renter credit income #10163 (stacked, open). At its head 32fc16d it no longer pins the federal allocation: Case 7 supplies
taxable_unemployment_compensationas an input. I merged that head into this PR's head eabaefd and its unemployment tests pass: the add-back file (9), disability and unemployment (10), andtest_mt_elderly_credit_nontaxable_income.py(13). Merge order doesn't matter.Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
00ce2281d0against this PR's head9fde2d1ec4, for 2024. The runs went one at a time under the shared heavy-job lock. Sums are weighted.unemployment_compensationtaxable_unemployment_compensationtax_exempt_unemployment_compensationtax_unit_taxable_unemployment_compensationtaxable_uc_agiadjusted_gross_incomein_unemployment_compensation_deductionca_agi_subtractionsri_additionswi_unemployment_compensation_subtractiondependent_taxable_ss_magistate_income_taxincome_taxhousehold_net_incomehousehold_benefitsCurrent law, 2024. Only the tax-unit total moves:
tax_unit_taxable_unemployment_compensationnow leaves out dependents' compensation (27 records). Indiana's deduction moves by $78 on one record (its weight rounds to zero). Dependents' own Social Security modified AGI falls by $19 on 2 records, from netting estate losses. Person-level taxable compensation, AGI, income tax, state income tax and household net income are unchanged. The exclusion's own effect, which outside 2020 is zero, is sized in the counterfactual below.Comparison files are in
fixes/10175-impact/on the hub host.Counterfactual: 2020 exclusion rules on 2024 data
The default dataset holds 2024 records only, and core does not carry inputs back to earlier years. On the screen sample, 2020
unemployment_compensationandemployment_incomeboth sum to exactly 0. A 2020 pair would therefore show no change whatever the code does.To size the fix itself, this pair runs 2024 with the 2020 exclusion parameters on both sides:
gov.irs.unemployment_compensation.exemption.amount10,200 and everycutoff150,000, viaIMPACT_REFORM_JSON. It compares main at the merge base00ce2281d0with this PR's head9fde2d1ec4, on the full default dataset under the hub's heavy lock.These are 2024 incomes, 2024 federal law apart from the exclusion, and 2024 state law on main's state lines, before #10187. They are not an estimate of 2020 itself. Sums are weighted.
unemployment_compensationtaxable_unemployment_compensationtax_exempt_unemployment_compensationtax_unit_taxable_unemployment_compensationtaxable_uc_agiadjusted_gross_incomein_unemployment_compensation_deductionca_agi_subtractionsri_additionswi_unemployment_compensation_subtractiondependent_taxable_ss_magistate_income_taxincome_taxhousehold_net_incomehousehold_benefitsFiles:
~/reviews/uc-exclusion-2020/impact/rules2020-on-2024/on the hub host; reform JSON at~/reviews/uc-exclusion-2020/impact/reform_2020_rules_2024.json.axiom: TheAxiomFoundation/rulespec-us#1719 queued.
us:statutes/26/85already encodes § 85(c)(1) correctly: per-recipient $10,200 cap, joint return summed per spouse, strict<, with teststemporary_2020_exclusion_applies_per_spouse_on_joint_returnandtemporary_2020_exclusion_denied_at_threshold. But the § 85(c)(2) AGI and the recipient relation are free inputs. #1719 queues encoding both, with companion tests from the same worksheet cases.🤖 Generated with Claude Code