Repository navigation
Conversation
Adds tax_exempt_disability_benefits (IRC 104(a)(3)) and taxable_disability_benefits (IRC 105(a)) and lists the taxable part in gov.irs.gross_income.sources. State subtractions that remove disability income from federal AGI (VA, MT, LA, AR, SC, OH, CO) now read the taxable part; PA's rebate income adds only the exempt part. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
total_disability_payments (IRC 22(c)(2)(B)(iii)) now defaults to taxable_disability_benefits for someone retired on permanent and total disability, with tests from the 2024 Schedule R instructions' examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nefits" This reverts commit 285babb.
Pennsylvania starts from federal gross income in the model, so the taxable disability benefits now in federal gross income need a PA subtraction: sick pay and disability benefits other than regular wages, including third-party insurer payments, and disability distributions are not taxable (61 Pa. Code 101.6(c)(1); 2024 PA-40 instructions pages 8 and 13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
…ate disability income exclusions - disability_benefits_before_minimum_retirement_age (input, default 0) and earned_disability_benefits feed EITC/ACTC earned income, a dependent's standard deduction and child and dependent care credit earnings (Pub. 596 p.8, Pub. 503 p.4). - permanent_disability_retirement_pay (retired on permanent and total disability) feeds new exclusions modelled on former IRC 105(d): Wisconsin Schedule 2440W, New York IT-221, Iowa IA 2440 (from 2023) and Indiana IT-2440 (code 602). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bility exclusions Cases from the 2024 dependent standard deduction worksheet, Pub. 596, Pub. 503, Schedule 2440W, IT-221 Example 5, IA 2440 and Indiana Bulletin 70. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
…Y limit, IRA and filing earned income - permanent_disability_retirement_pay reads the explicit total_disability_payments input (payments from a plan providing for disability retirement), limited to wages and taxable disability benefits in federal AGI. - WI and IA treat a separated spouse filing as head of household as married. - Restore New York's ,000 combined disability and pension limit, which binds when above-the-line deductions keep AGI low. - Disability pay treated as wages counts as IRA compensation and as earned income in the filing requirement's unearned-income test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…disability pay in Medicaid's filer test - total_disability_payments documents IRC 22(c)(2)(B)(iii): the taxable part of qualifying disability pay. permanent_disability_retirement_pay keeps the wages-plus-taxable-benefits limit only as a consistency check. - medicaid_person_is_required_to_file counts earned_disability_benefits as earned income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Feeds the kiddie-tax AMT exemption and the federal-style IN, OK and WA credits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 13, 2026 09:14
…fits-gross-income # Conflicts: # policyengine_us/tests/policy/baseline/gov/irs/credits/earned_income/eitc_earned_income.yaml
Contributor
Author
|
Hand-off to the US + core hub (session local_baf7c8a1-e7e2-41ac-9fb9-718d62c46acf, 2026-10-13)
|
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.
disability_benefits("Disability benefits from employment (not Social Security), except for worker's compensation") was in no federal gross income list, so the model never taxed employer-paid disability benefits or disability pensions. Several state provisions also subtracted it from a federal AGI that never contained it.Law
Change
tax_exempt_disability_benefits(IRC 104(a)(3)), default 0, uprated likedisability_benefits.taxable_disability_benefits = max(0, disability_benefits - tax_exempt_disability_benefits)(IRC 105(a)), listed ingov.irs.gross_income.sources. It therefore reachesirs_gross_income, AGI, provisional income for Social Security anddependent_gross_income(the qualifying-relative test).va_disability_income_subtraction_personmt_disability_income_exclusion_personla_disability_income_exemption_personnontaxable_income_sourcesBenefit programs (SNAP, SSI, TANF, LIHEAP, CCAP and the rest), Michigan household resources and Denver property tax relief still count total
disability_benefits, as their income definitions require.Earned income. Taxable disability pensions received before the plan's minimum retirement age are earned income and go on Form 1040 line 1h (Pub. 596 (2024), file page 8; railroad benefits excluded). New input
disability_benefits_before_minimum_retirement_age(default 0; the model has no plan retirement age) givesearned_disability_benefits = min(input, taxable_disability_benefits). It counts in:eitc_earned_income(EITC, and the ACTC throughctc_phase_in_relevant_earnings);basic_standard_deduction(worksheet line 1z);adjusted_earnings(child and dependent care credit; Pub. 503 (2024), file page 4).It also counts in:
filer_adjusted_earnings(kiddie-tax AMT exemption; IN, OK and WA federal-style credits);ira_compensation; Pub. 4491 (Rev. 10-2025), file page 144);tax_unit_is_required_to_file) and Medicaid's filer test (medicaid_person_is_required_to_file).earned_incomeandtax_unit_earned_incomethemselves are unchanged, because benefit programs and state rules read them.State disability income exclusions modelled on former IRC 105(d). These apply to people who retired on permanent and total disability. Each excludes disability pay up to $100 a week ($5,200 a year), reduced dollar for dollar by federal AGI over $15,000. They read the new
permanent_disability_retirement_pay:retired_on_total_disability×total_disability_payments.total_disability_paymentsis the explicit input the Schedule R credit and DC already read. Its documentation now states the IRC 22(c)(2)(B)(iii) definition: the taxable part of wage-replacement pay from a plan that provides for disability retirement.taxable_disability_benefitsalone doesn't show the plan qualifies. A limit to the wages and taxable disability benefits in federal AGI catches entries with nothing in AGI.wi_disability_income_exclusionny_disability_income_exclusionia_disability_income_exclusionin_disability_retirement_deductionThe employer's mandatory retirement age is not modelled.
Tests
Evidence is in
~/reviews/disability-benefits-gross-income-2026-10/:evidence/fails-on-main.md, research reports and the 51-state differential.Invariants
irs_gross_incomeequals the positive-source gross-income reference.basic_standard_deductionandstandard_deductionmatch the Form 1040 dependent worksheet, including earned disability, the deductible self-employment tax, and age/blindness additions.tax_unit_is_required_to_filematches an independent IRC 6012/Publication 501 Table 2 reference, including claimability and the 2026 age-only threshold and equality rule for filers nobody can claim.medicaid_person_is_required_to_filematches its separate Table 2 reference.Review (merge): responses. P3-1: a person marked both a tax-unit dependent and a head has inconsistent inputs; main already drops their taxable pension through the same paths, so this tests-only follow-up leaves it unchanged. P3-2: H1/H1b pin the per-person earned-disability subtraction; H2 and H3a/H3b pin the worksheet and Medicaid merge interactions. P3-3: added the Hypothesis worksheet/filing references, taxable and mixed Montana fixtures, and these invariants. P3-4: the pre-existing wage-deferral treatment in the dependent worksheet and Medicaid earned-income threshold is reserved for a separate PR; elective deferrals are zero in the randomized worksheet reference, while H3a/H3b exercise netting of deferred wages in the Medicaid unearned-income test. No formula or methodology default changes; the d1466 merge hold remains.
Validation of merge-review test additions
All six files passed, one file per foreground process with
OMP_NUM_THREADS,OPENBLAS_NUM_THREADS,MKL_NUM_THREADS,VECLIB_MAXIMUM_THREADSandNUMEXPR_NUM_THREADSset to 4 andOMP_WAIT_POLICY=PASSIVE: general filing 39; dependent filing 55; basic standard deduction 20; Medicaid filing 13; disability properties 1 (8 passing Hypothesis batches,max_examples=8, seed 20261007); Montana invariants 17. Total: 145 pytest items.make formatandgit diff --checkpass. Main was already contained atf9b55fc4dd05f1bed921a4dd06cb8c81f6ceb2c7; no new merge resolutions were needed.Mutation checks each produced the expected single assertion failure, then the original formula was restored: M4 (subtract tax-unit earned disability instead of the person's) makes H1 incorrectly return false; replacing Medicaid's positive gross earned-source netting with raw earned income makes H3a incorrectly return false; M5 (omit earned disability from the positive gross earned amount removed) makes H3b incorrectly return true. H3b also fails when both PR earned-disability additions are removed from the Medicaid formula. No production formula or parameter changes are included.
Python coverage adds generated cross-variable references and taxability-split invariance that individual YAML examples cannot express. The property test uses 18 fixed anchors plus 24-32 generated single-person filers per batch in one shared-system simulation for all three years. Montana preserves its 216-household original grid and adds only 18 taxable/mixed households in the same simulation. Local macOS measurements including process setup: new property file 40.98 s, peak RSS 1.03 GiB; Montana before 54.77 s (13 tests), after 29.91 s (17 tests), peak RSS after 1.90 GiB. Baseline peak memory was unavailable because the sandbox denied
/usr/bin/time -l's sysctl access; its pytest run passed. These are individual local samples, not Linux CI aggregate measurements.Routing is unchanged: the new file joins Rest Python
core(shard 2), and Montana stays inremaining(shard 1). Existing artifacts from run 39206204721 at the reviewed head showcore39:48 / 9.97 GiB peak RSS andremaining19:52 / 7.67 GiB. Those aggregate groups were not rerun locally; no CI jobs, concurrency or full-model copies were added.Methodology choice: Max's decision d1466
The law is settled, but the CPS-based input records the payer type (DIS_SC), not who paid the premiums.
This PR's default treats all of the input as employer-paid, matching the variable's definition. The recommended follow-up is a Microcosm change that supplies
tax_exempt_disability_benefits(codes 7 and 8) and tags the government, military and railroad parts. d1466 also lays out the alternatives: hold the PR for that split, use a share parameter, or keep the status quo. Hold the merge for the ruling.Known limitations and follow-ups
These are separate tasks; none is introduced by this PR except as noted:
disability_benefits_before_minimum_retirement_agedefaults to 0. Whether the microdata should assume a part of the benefits is earned (an age proxy) is the earned-income sub-question in d1466. State rules that readtax_unit_earned_income(e.g. CO's refundable CTC, DC's EITC, HI and OR deductions) don't include it yet.total_disability_paymentsand have the consumer bugs found in review. NJ-2440 (NJ builds income from components) and KY are in the state follow-ups. Government, military and railroad disability pensions that some states exempt need the Microcosm split.disability_benefitsis missing from household net income.total_disability_paymentshave bugs found in review. Wiringtotal_disability_paymentsto this PR's variable was tried, then reverted, for that reason.tax_exempt_disability_benefits, because the taxable part reaches the credit through AGI. The original disability fixtures explicitly supply the exempt amount and keep their expected values. This fulfills the agreement with Count disability benefits and 2020 excluded unemployment compensation in Montana's elderly homeowner/renter credit income #10163's session.Merge with main
Merged main at
f9b55fc4dd05f1bed921a4dd06cb8c81f6ceb2c7into this branch without rebasing. The resolutions retain main's filing, claimable-filer and Medicaid MAGI rules alongside this PR's taxable disability income treatment.tax_unit_is_required_to_file.pytax_unit_is_required_to_file.yamlbasic_standard_deduction.pybasic_standard_deduction.yamlmedicaid_person_is_required_to_file.pymedicaid_person_is_required_to_file.yamlpa_property_tax_or_rent_rebate_income.yamlpa_ssp: 0in the isolated disability example, as main does in its other examples.All existing YAML cases from both parents are retained. An inherited extra blank line at the end of
charitable_deduction.yamlwas removed sogit diff --checkis clean. The eight additional merge cases cover two joint worksheet label swaps ($10,000 earned disability plus $3,000 self-employment income, net of deductible self-employment tax), four filing interactions (2024 earned/unearned disability and 2026 blind claimable/nondependent filers), and two Medicaid loss/401(k) interactions.Revalidation of the two commits: 825 pytest items pass across 76 files (652 in 62 merge files at
629cf47b38, then 173 in 14 Montana files at8225a56ffd), one file at a time in the foreground with every requested thread cap set to 4. This includes all conflicted YAML, the PR's 25 YAML/Python test files, the complete standard-deduction/EITC/child-care folders, all 13 Montana credit YAML files, andtest_mt_elderly_credit_nontaxable_income.py(13 passed). The new Pennsylvania disability fixture also setspa_ssp: 0to isolate disability income from the supplementation now counted on main.Against main
f9b55fc4dd05f1bed921a4dd06cb8c81f6ceb2c7, all 59 original new YAML cases fail: six reach numerical assertions and 53 fail because main lacks variables introduced here. Five additional main-compatible probes all fail numerically (qualifying-relative status; federal gross income $40,000 vs $60,000; employer-paid benefits $0 vs $24,000; disability pension AGI $0 vs $30,000; taxable Social Security $0 vs $2,500). Four probes retain the complete original case; one retains all inputs and drops only the unavailabletaxable_disability_benefitsoutput while preserving its gross-income and AGI assertions.Taxable employer-funded disability benefits enter gross income under IRC 61 and 105(a). Taxable disability pensions before minimum retirement age count as earned income (IRS Publication 596); the dependent worksheet includes their Form 1040 line 1h amounts through line 1z (Form 1040 instructions). Thus the explicit earned subset increases 63(c)(5) worksheet earnings and is excluded from the 6012(a)(1)(C)(i) unearned test; the taxable remainder remains in that test for claimable filers. Gross income includes both taxable portions.
The owed Montana switch replaces
disability_benefitswithtax_exempt_disability_benefitsin all three elderly-credit source periods (2009, 2017 and 2023), and marks #10163's disability fixtures as exempt so their expected values remain valid. Three additional worked cases cover fully taxable and mixed benefits across the three source periods. Taxable disability already reaches this credit through federal AGI. Montana's 2023 Form 2 instructions, printed page 45, elderly-credit line 8 list disability benefits among income not included on earlier lines; line 1 includes federal AGI.axiom: TheAxiomFoundation/rulespec-us#1512 queued (Montana elderly-credit income; existing #10163 parity item)
The d1466 merge hold and this PR's defaults remain unchanged. The hub reran the impact at this merged head; the table below is current.
Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
f9b55fc4ddagainst this PR's merged head8225a56ffd, for 2025 and 2026 (rerun 2026-10-19; the earlier run,2f3053c845againste9efd0f877, differs only by small merge effects, e.g. 2025 taxable income +$3.3M and Ohio deductions -$0.9M). The runs went one at a time under the shared heavy-job lock. Sums are weighted.disability_benefitsirs_gross_incomeadjusted_gross_incometaxable_incomeincome_tax_before_creditstaxable_social_securityeitcrefundable_ctcis_qualifying_relative_dependentva_disability_income_subtractionoh_deductionssc_subtractionsco_pension_subtractionla_disability_income_exemption_personmt_disability_income_exclusionar_retirement_or_disability_benefits_exemptionpa_property_tax_or_rent_rebatetotal_disability_paymentssection_22_incomeelderly_disabled_credittax_unit_is_required_to_filebasic_standard_deductionstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsThe microdata supplies only disability_benefits: tax_exempt_disability_benefits, disability_benefits_before_minimum_retirement_age, total_disability_payments and retired_on_total_disability are unset, so the whole input is treated as taxable (the d1466 default) and the earned-income and WI/NY/IA/IN exclusion changes don't move these aggregates. The state subtraction switches show no change for the same reason: taxable equals total. OH, CO and the section 22 base move only through AGI and taxable Social Security.
One surviving spouse becomes single. One 2025 record (weight 12,659) changes
filing_statusfrom surviving spouse to single, so its basic standard deduction falls from $31,500 to $15,750 (the -$199Mbasic_standard_deductionrow). Its 29-year-old dependent has $6,238 of disability benefits, which now count independent_gross_income, so the dependent fails the qualifying-relative gross income test inis_qualifying_relative_dependent. Main'ssurviving_spouse_eligibleneeds a child dependent throughis_child_dependent, which includes that test. IRC 2(a)(1)(B) instead tests the child "without regard to" section 152(d)(1)(B), the gross income test, so this record should stay a surviving spouse. The gap is on main and predates this PR; the hub has proposed it as a separate fix. Traced at~/reviews/us-hub/fixes/10185-impact/trace/.Comparison files are in
fixes/10185-impact/on the hub host.axiom: us/statute/26/104/a/3 TheAxiomFoundation/rulespec-us#1724 queued; earned income us/statute/26/32/c/2 TheAxiomFoundation/rulespec-us#1748 queued; states TheAxiomFoundation/rulespec-us#1740 (VA), #1741 (MT), #1742 (AR), #1743 (SC), #1744 (OH), #1745 (CO), #1746 (PA-1000), #1747 (PA § 301(d)), #1749 (WI 2440W), #1750 (NY IT-221), #1751 (IA 2440), #1752 (IN 6-3-2-9) queued, LA extends #1493 (comment)
🤖 Generated with Claude Code