Repository navigation
Conversation
… benefits veterans_benefits and railroad_benefits reached neither household_benefits nor spm_unit_benefits, so neither net income nor SPM resources counted them. Census P60-200 Appendix A lists veterans' payments as a source of money income and counts railroad retirement among government transfers. Both now sit in household_benefits and spm_unit_benefits. Veterans' benefits stay out of federal gross income under 38 U.S.C. 5301(a)(1). Railroad benefits' federal tax treatment follows in a separate change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them from state income IRC 86(d)(1)(B) treats tier 1 railroad retirement benefits as social security benefits, and 72(r)(1) treats the rest of the annuity as a benefit from a section 401(a) plan. 45 U.S.C. 231m(a) bars states from taxing either, so every state that starts from federal AGI or taxable income subtracts the amount federal gross income includes. Section 22's reduction now counts the Railroad Retirement Act amounts the head and spouse exclude from gross income, as 22(c)(3)(A)(i)(II) says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e floors, and log the section 22 return-of-cost conflict Colorado and, before the SCIAD, South Carolina start from federal taxable income, which floors at zero. When the standard deduction absorbs some of a filer's railroad benefits, the full 231m subtraction exceeds what federal taxable income gained, so I4 lets those two bases fall there. I4 always runs the wage-free case that exposed it. Section 22(c)(3)(A)(i)(II) reduces the section 22 amount by railroad annuity amounts excluded from gross income, including the tax-free recovery of tier 2 contributions; Schedule R line 13b leaves returns of cost out. candidates.yaml records the conflict and the statute reading the model takes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 72(r)(1) treats Railroad Retirement Act benefits other than tier 1 as benefits from a qualified plan, and 72(d)(1)(A) turns off 72(b) for annuities under a qualified employer retirement plan. The Simplified Method in 72(d) therefore recovers tier 2 contributions for annuities that started after November 18, 1996, and 72(b) covers only some older ones (IRS Pub. 575 (2024), pages 7 and 8). The section 22 comment, the YAML test header and the conflict entry now cite both. 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>
… parity test #10663 made the parity test require every source in gov.irs.gross_income.sources to name the SPM resource that counts its cash. railroad_benefits, which #10693 adds to spm_unit_benefits, holds the whole annuity; taxable_railroad_pension_benefits and taxable_railroad_social_security_equivalent_benefits tax its parts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add veterans_benefits and railroad_benefits to the six reform copies of the benefit lists (BOOST, End Child Poverty Act, EDAA End Child Poverty Act, Texas rebate), which otherwise dropped both benefits and showed a false loss under each reform, and to SHARED_CASH_PROGRAMS so the guard catches a copy that drops them. - Narrow the veterans' benefits property test to gross income and AGI, checking income tax only when neither household itemizes: the IRS counts veterans' benefits as income for the optional sales tax tables. New state_sales_tax.yaml cases show the 2025 Texas row moving. - Keep Combat-Related Special Compensation in veterans_benefits, as military_retirement_pay directs, and point VA education benefits and dependency and indemnity compensation, and railroad survivor annuities, to their own variables. - Cite the Census appendix once, with its page range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2025 Instructions for Schedule A add the nontaxable part of social security and railroad retirement benefits, and of pension and annuity distributions, to Form 1040 line 11b to pick the sales tax table row. This PR adds the untaxed SSEB and the tax-free part of the annuity to that income list, and no test covered the change. Two Texas cases cross the $120,000 line on those amounts alone; both fail on the old list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At $131,072 of wages, float32 steps are $0.015625 wide. Hypothesis found a case there in which moving 1 percent of a $1 benefit from title II to the SSEB moved AGI by one step: the railroad household adds its title II and SSEB shares to AGI separately, and each sum rounds on its own. The tests' fixed one-cent tolerance fell below one step. The comparisons now allow eight float32 steps at the sum of the household's income inputs, and never less than a cent. I3's zero-tax check keeps the cent. test_i1 pins the failing case with @example; with a one-cent tolerance it fails on that example, with AGI of $131,072.84375 against $131,072.859375. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lief income 45 U.S.C. 231m(a) bars any state tax on Railroad Retirement Act annuities. - Minnesota's alternative minimum taxable income now subtracts taxable_railroad_benefits, since the 2024 Schedule M1MT instructions carry Schedule M1M line 17 into line 18. - Vermont's minimum tax under 32 V.S.A. 5822(a)(6) applies 3 percent to federal AGI less taxable_railroad_benefits; the $150,000 test still reads federal AGI. - The 42 state withholding estimates start from the new state_withholding_agi, each person's federal AGI less taxable_railroad_benefits, so neither the estimates nor the federal deduction for state and local taxes count the benefits. - Pennsylvania's property tax and rent rebate income replaces the taxable SSEB in federal AGI with half of the SSEB (PA-1000 line 5) and adds the tax-free recovery of the rest of the annuity (line 6, gross amount). - Utah's homeowner and renter relief adds only the railroad benefits that federal AGI leaves out. Tests: new YAML cases for each fix, zero withholding in the 42 railroad-only state cases, and two Hypothesis examples plus a withholding check in the state invariant. Each new case fails at 033d78e except North Dakota's, whose zero bracket already left withholding at zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- veterans_benefits: is_veteran reads this input, so a survivor or dependent whose VA payments go here should set is_veteran to false. - disability_benefits: VA disability compensation goes in veterans_benefits. - SSI unearned sources note: household net income now counts railroad benefits; SNAP, HUD and the other program lists still don't (#10551). - Parity test docstring: list the two new invariants, and say the veterans' income tax check covers filers under 65 without a disability, since the model doesn't yet reduce the section 22 credit by VA pensions (26 U.S.C. 22(c)(3)(A)(i)(III)). - Sales tax test comment: the table gives the amount a filer may deduct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Answers the federal, states and tests reviews of 033d78e. States: - West Virginia: box (c) of Schedule M line 47 leaves out income reported on lines 35 to 48, and filers subtract railroad benefits on line 40, so taxable_railroad_benefits joins the excluded sources. - Arizona: the 2025 Form 140PTC instructions (page 4) leave railroad retirement benefits out of the property tax credit's income. Subtract the head's and spouse's taxable_railroad_benefits from federal AGI and leave both railroad sources out of a dependent's income. - Oregon: ORS 316.157(2)(f) counts tier 1 benefits as Social Security benefits and (2)(b) leaves them out of household income. Subtract the taxable SSEB from household income and add the SSEB to line 5. - Minnesota: Minn. Stat. 290.0802 subd. 1(a) and (c). Subtract taxable_railroad_benefits from the elderly and disabled subtraction's AGI and reduce its base by the head's and spouse's railroad_benefits. Federal: - WATCA's alternative tax MAGI adds the nontaxable SSEB (S.4083 section 1A adds the section 86(d) benefits gross income leaves out). - taxsim_gssi counts the SSEB, so taxsim_v12 reruns section 86 on both. - Reject a negative or non-finite SSEB, as the model rejects negative title II benefits; the model doesn't net amounts as Publication 915 does. - The TOB variables document that they leave out HI's 1993-amendment share of the tax on the SSEB (section 121(e)(1)(B), (3)(C)). - Uprate the railroad pension inputs with SOI pension income. - Document that an entered railroad_benefits total replaces the parts, reaches no tax and applies only to its year. Tests: a YAML case for each fix and a WATCA and TAXSIM case; I1 checks the section 22 amount with an age-70 example; I3 draws 2025 and 2026; I5 checks each spouse's share of the taxable SSEB; a negative and NaN SSEB test; the sales tax test lists both untaxed railroad items. The added inputs move to an added changelog fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 9, 2026
This was referenced Nov 11, 2026
…enefits Section 1303, "Income" (2), counts 50% of railroad retirement benefits from 1999 and names no tier. Rebate income now takes the taxable railroad benefits out of federal AGI and adds half of all railroad benefits, in place of Form PA-1000's half of tier 1 and all of tier 2. Restore main's Case 3, add the same case entered as the tier 1 part, and move cases 3a and 3b to 11,000 and 25,000. Log the Pennsylvania and Oregon form conflicts in source_conflicts/candidates.yaml, and leave the Minnesota M1R conflict to the entry PR 10722 adds. Point the Utah reference at page 4. Tests: property examples draw deterministically; the SSEB check rejects an infinite amount as well as a negative one; I6 checks that each railroad dollar adds 50 cents to Pennsylvania rebate income, entered by part or as a total, with each entry in its own simulation; West Virginia's 2014 case enters taxable_railroad_benefits: 0, since it enters AGI directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's property tax credit invariant keeps number 7 in test_household_spm_resource_parity.py; this branch's two invariants become 8 and 9. test_aggregate_list_integrity.py lists the benefits beside main's state_property_tax_refunds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Montana's subtraction list keeps taxable_railroad_benefits in every block beside main's repeal of the disability income exclusion, and its references keep both the 231m(a) citation and main's repeal citations. Utah's existing case takes main's 51,087.05 expectation, and the railroad case follows it. 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.
This PR builds on #10693. Until #10693 merges, GitHub also shows #10693's nine files in this diff.
What changes
After #10693,
railroad_benefitscounts in household and SPM income but in no tax. This PR splits the benefits into parts with different tax rules and taxes each part. It adds three person inputs:railroad_social_security_equivalent_benefits: the social security equivalent benefit (SSEB) on Form RRB-1099, box 5.taxable_railroad_pension_benefits: the rest of the annuity on Form RRB-1099-R (the non-social security equivalent part of tier 1, tier 2, vested dual benefits and supplemental annuities), less the employee contributions the annuitant recovers tax free.tax_exempt_railroad_pension_benefits: that tax-free recovery.railroad_benefitsbecomes their sum. If a user enters only the total, it counts in income totals but in no tax.Federal
tax_unit_section_86_benefitsandtax_unit_taxable_section_86_benefitsrun section 86 once on title II benefits and the SSEB together.taxable_social_securitykeeps the title II share, so the programs and states that read it see no railroad benefits.taxable_railroad_social_security_equivalent_benefitstakes the SSEB's share, and a dependent's own return splits the same way.taxable_railroad_pension_benefitsjoinsgov.irs.gross_income.sources. Under section 72(r)(2), the tier 2 taxes employees paid count as employee contributions, which the annuitant recovers tax free.medicaid_magiandaca_magiadd back the nontaxable SSEB, as section 36B(d)(2)(B)(iii) requires for any benefit that counts as a social security benefit under section 86(d).ira_219g_magiandira_219g_taxable_social_securityfor the IRA deduction limit,taxable_ss_magi, the dependent IRA deduction and the tuition deduction cap.taxable_social_security_tier_1(section 86's 50 percent tier) andtax_unit_taxable_social_security_pre_1993run on both benefits and keep the title II share.source_conflicts/candidates.yamlasus:elderly-credit-railroad-tier-2-return-of-cost.States
Under 45 U.S.C. 231m(a), no state, territory or the District of Columbia may subject a Railroad Retirement Act annuity to "any tax".
taxable_railroad_benefitsholds the Railroad Retirement Act benefits in the head's and spouse's federal AGI. The model builds income for 38 jurisdictions from federal gross income, AGI or taxable income, and now subtractstaxable_railroad_benefitsin each: AZ, CA, CO, CT, DC, DE, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MT, NC, ND, NE, NM, NY, OH, OK, OR, PA, RI, SC, UT, VA, VT, WI and WV. For most of them, this PR addstaxable_railroad_benefitsto a parameter list of subtractions; the KS, MA, ME and UT formulas subtract it directly.The model builds income for Alabama, Arkansas, Mississippi and New Jersey from each state's own list of sources. None of those lists holds railroad benefits, so they need no change.
Virginia filers subtract the taxable SSEB on Form 760 line 5 and the taxable rest of the annuity on Schedule ADJ. Under Va. Code 58.1-322.03(5), Virginia's age deduction phases out with federal AGI less the benefits that enter federal AGI only under IRC 86, so the SSEB leaves that test and the rest of the annuity stays in it.
Where railroad benefits still move state tax
id_income_tax_liable), and federal gross income includes taxable railroad benefits.mn_social_security_subtraction, so for a filer with both kinds of benefits it counts the taxable SSEB and leaves the SSEB out of the benefits term. This PR leaves that worksheet, and the other state Social Security worksheets that read title II amounts, to a follow-up.Reforms
tax_unit_taxable_social_securityandtaxable_social_securitynow hold only the title II share of taxable benefits. Parameter reforms to section 86 reach both benefits throughtax_unit_taxable_section_86_benefits. A reform that replacestax_unit_taxable_social_securitychanges title II benefits only and leaves the SSEB on baseline section 86. These reforms and tools read the title II variables, so they leave the SSEB out:reforms/crfb/non_refundable_ss_credit.py);tax_unit_taxable_social_security.Invariants
These hold for every input, and
test_railroad_retirement_taxation.pychecks them with Hypothesis.railroad_benefitsequals the sum of its three parts, and the title II and SSEB shares sum to the taxable section 86 amount. For a head or spouse,taxable_railroad_benefitsequals their taxable SSEB plustaxable_railroad_pension_benefits; dependents get zero.Tests
irs_gross_income/social_security/railroad_social_security_equivalent_benefits.yaml(7 cases)irs_gross_income/taxable_railroad_benefits.yaml(4)elderly_and_disabled/section_22_railroad_retirement.yaml(3)medicaid/income/medicaid_magi_railroad_retirement.yaml(2)va/tax/income/subtractions/va_railroad_retirement.yaml(2)states/railroad_retirement_benefits.yaml(42), one filer with only railroad benefits in each income tax jurisdictionirs_gross_income,elderly_and_disabled,hhs/medicaid/income, the cross-state file, and the Colorado, Montana, North Carolina, Oregon and Virginiatax/incomefolders.test_railroad_retirement_taxation.pyquantifies over amounts, filing status and every state, which YAML cannot. Locally, its six tests take 148 s (184 s with imports) at 1.9 GB peak memory, and I4, which loops over 40 states, takes 85 s of that.test_household_spm_resource_parity.pyfails when a federal gross income source has neither an SPM resource that counts its cash nor a documented reason to leave it out. This PR maps both new sources,taxable_railroad_pension_benefitsandtaxable_railroad_social_security_equivalent_benefits, torailroad_benefits. That file andtest_railroad_retirement_taxation.pypass locally, 69 tests in all.Impact
I'll add the 2026 results on
hf://datasets/policyengine/populace-us/populace_us_2024.h5@populace-us-2024-spm-20260909when the run finishes.axiom:
us:statutes/26/86#tier_1_railroad_retirement_benefitencoded-correct (companion testmarried_separate_not_apart_with_repayments_substituted_benefits_and_lump_sum_electioninus/statutes/26/86.test.yaml); TheAxiomFoundation/rulespec-us#2071 queued (26 U.S.C. 72(r), 45 U.S.C. 231m(a), and companion tests for section 22's railroad reduction and section 86's tier 1 benefit).🤖 Generated with Claude Code