Repository navigation
Count railroad benefits in state tax worksheets, income tests and limits as each state's law does - #10722
Draft
MaxGhenis wants to merge 12 commits into
Draft
Count railroad benefits in state tax worksheets, income tests and limits as each state's law does#10722MaxGhenis wants to merge 12 commits into
MaxGhenis wants to merge 12 commits into
Conversation
Minn. Stat. 290.0132 subd. 26(i) gives "Social Security benefits" the IRC 86(d)(1) meaning, so the line 12 worksheet runs on title II and tier 1 benefits together. Provisional income now starts from gross income less all taxable benefits and adds half of the head's and spouse's section 86 benefits; the simplified method reduces all taxable benefits and then takes out the tier 1 benefits that the 231m subtraction removes (steps 26-29), and below the threshold line 12 is the title II share. The elderly and disabled subtraction applies 290.0802 subd. 1: the reduction counts all of the head's and spouse's railroad retirement benefits, and AGI leaves out the taxable ones. The homestead refund adds nontaxable tier 1 benefits to M1PR line 2, and the marriage credit gets tests for leaving out taxable tier 1 benefits, which Minnesota taxable income never includes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…urity worksheets Connecticut's Social Security benefit adjustment (12-701(a)(20)(B)(x)) reads the federal worksheet, which counts tier 1 railroad retirement benefits under IRC 86(d)(1). Line A now takes the section 86 benefits, and line D comes out of the taxable title II benefits first, since clause (iv) subtracts every taxable tier 1 benefit that clause (x) does not. Iowa's 2021-2022 reportable Social Security worksheet now follows the form: line 7 adds half of the head's and spouse's title II and tier 1 benefits, line 8 leaves out the student loan interest deduction, and line 1 leaves out dependents' benefits. The old formula left half of the benefits out of line 7. Missouri, Utah and Rhode Island already read title II amounts as their statutes direct; new tests pin those readings, and source-conflict entries record where their forms take Form 1040 line 6b instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e, Michigan and DC provisions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides changed Minnesota's elderly and disabled subtraction and Pennsylvania's property tax rebate income the same way. Keep this branch's wording and both sides' test cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a, Massachusetts, Idaho and North Dakota provisions Each change follows the state's statute or form: - DC disability exclusion, line 6: Form D-40 line 10 holds taxable title II and tier 1 benefits. - Maryland and Maine pension caps, and Idaho's retirement deduction cap: the statutes reduce each cap by Railroad Retirement Act benefits, taxable or not. - Wisconsin unemployment subtraction: worksheet line 4 takes Form 1040 line 6b. - New York IT-214 line 13, Oklahoma Forms 538-S and 538-H line 5, and Massachusetts c.62 s.6(k)(1) count railroad benefits by name or as retirement receipts. - North Dakota's renter's refund: N.D.C.C. 57-02-08.1(5)(c), logged as a source conflict. Maine, Maryland and New York read the railroad parts rather than railroad_benefits, so a total entered in that variable stays out of tax. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Missouri's property tax credit, Rhode Island's RI-1040H, Maine's fairness credits, Wisconsin's homestead credit, Washington's senior exemption and New Mexico's modified gross income name railroad retirement benefits. Vermont's renter credit, Colorado's sales tax refund and West Virginia's homestead excess credit count Social Security benefits with their federal meaning, so excluded tier 1 benefits count there too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Swapping title II benefits for tier 1 benefits now has to leave federal AGI alone, never raise state tax outside Michigan, and leave every state income test and pension cap unchanged. A step-by-step 2025 Schedule M1M line 12 worksheet checks Minnesota's formula. Also pin Montana's pre-2024 worksheet with tier 1 benefits, and log the open 45 U.S.C. 231m(a) question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minnesota's Social Security subtraction adds half of the taxable benefits to provisional income, as Minn. Stat. 290.0132 subd. 26(i) defines it since the 2019 amendment, in the baseline and in the HF1938 repeal reform. The M1M worksheets add half of all benefits; the register entry records the reading. Minnesota's homestead credit refund income counts the tax-free rest of a railroad annuity, which 290A.03 subd. 3(a)(2)(v) reaches because railroad employers fund tier 2 too (26 U.S.C. 3221(b)). The property tests now hold Minnesota's S1 increase to its top rate times the elderly or disabled subtraction lost, treat Idaho's SNAP-driven S2 change as a model gap tied to #10551, add the rest of the annuity to S3 and S4, and add S6: railroad benefits never lower a state base, and each Social Security subtraction stays within taxable title II benefits. D1 follows subd. 26(i). Rhode Island's worksheet leaves railroad benefits out, so its register entry goes; Utah's entry ends in 2024, when the worksheet starts taking those benefits back out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first property hunt found one counterexample in S3: Oklahoma's supplement rounds "the monthly amount of each income source" to the nearest dollar (OAC 317:35-5-42(i)), and the swap turns two payments into one, so ok_gross_income moved by $12. The swap households now take up no SSI, and S3 pins the case as an explicit example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck The changelog named Minnesota's marriage credit and Minn. Stat. 290.0675, but this branch changes no marriage credit code: Minnesota subtracts taxable tier 1 under 45 U.S.C. 231m(a), so the credit's earned income measure, which counts benefits "to the extent included in Minnesota taxable income", leaves them out. The Idaho skip in S2 now ends when the SNAP unearned income list counts all three railroad parts, not only when it counts the railroad_benefits total. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ncome MCA 15-30-2337(9)(b) reduces income "by the taxpayer's basis", and the 2025 Schedule 2EC line 5 tells filers to leave "your cost or net investment" out of pensions and annuities. The tax-free part of a railroad annuity recovers the employee's tier 2 taxes, which IRC 72(r)(2) treats as employee contributions, so it is basis. Montana still counts the untaxed tier 1 benefits in full under (9)(a)(i). The 2025 case falls from 27,000 to 26,000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename the Montana case to say the employee's basis stays out, and say in the code comment that the tax-free part returns the employee's own contributions, which under IRC 72(r)(2) include tier 2 taxes. The Idaho skip in S2 ends once the SNAP list counts tier 1 benefits, alone or in the railroad_benefits total: the swap gives both households the same rest of the annuity, so only tier 1 separates them. Co-Authored-By: Claude Fable 5.2 <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.
Stacks on #10696 (base branch
rrb-federal-tax). GitHub retargets this PR tomainwhen #10696 merges. GitHub runspr.yamlonly on PRs againstmain, and its jobs skip drafts, so CI first runs after the retarget, when the PR leaves draft or on the next push after that.After #10696,
taxable_social_securityandtax_unit_taxable_social_securityhold only the title II share of section 86's taxable amount, andtaxable_railroad_social_security_equivalent_benefitsholds the tier 1 share. A state variable that recomputes section 86, or builds an income measure from title II amounts, leaves out the social security equivalent benefit. This PR checks every state tax variable and parameter that readssocial_security,taxable_social_security,tax_unit_taxable_social_securityortax_unit_social_security_for_taxabilityagainst that state's statute and form, and counts railroad benefits as the state does under that law. The model subtracts the taxable railroad benefits once, through #10696's 45 U.S.C. 231m(a) subtraction (taxable_railroad_benefits), and no Social Security subtraction takes them again. #10764 covers state benefit programs.The limits and income tests this PR changes read the three railroad parts, or the two parts AGI leaves out, never the
railroad_benefitstotal. Four state provisions already read that total: Indiana's civil service annuity deduction, Kentucky's pension exclusion, Michigan's household resources and Utah's homeowner and renter relief. This PR changes the variable's docstring to say that a total entered there reaches those provisions, income totals and benefit programs, but no federal tax.Changes
Worksheets that recompute section 86 or take Form 1040 lines 6a and 6b
Deduction limits that shrink because of railroad benefits
Income tests that count railroad benefits
railroad_benefitstotal, and leaves dependents' Social Security out of the base cut, as section 22(c)(3) does.Audited, no code change
A YAML case covers each provision where a form and its statute differ or where we chose between readings.
taxable_railroad_benefits.Other effects
Readings recorded in
source_conflicts/candidates.yamlThirteen state entries:
us-ct:social-security-adjustment-railroad-tier-1,-order;us-mn:elderly-disabled-subtraction-railroad-benefits,homestead-credit-refund-railroad-annuity-tax-free-part,marriage-credit-railroad-tier-1,marriage-credit-subtracted-social-security,social-security-subtraction-provisional-income-benefits,social-security-subtraction-railroad-tier-1-order;us-mo:pension-income-test-railroad-tier-1,social-security-deduction-railroad-tier-1;us-nd:renters-refund-railroad-benefits;us-ut:social-security-credit-railroad-tier-1;us-vt:retirement-income-exemption-railroad-tier-1.Twelve carry a ruling under the statute-first rule: nine follow the statute, and three follow the form where the statute leaves the question open. The Minnesota provisional income entry follows the statute: in 2019 the Legislature inserted "taxable" into subd. 26's definition, effective for 2018, and the Department of Revenue kept half of all benefits in its worksheets for 2018 to 2025. We found
us-mn:marriage-credit-subtracted-social-securityduring the audit. It concerns a provision this PR leaves unchanged, so the entry stays unreviewed.The cross-state entry
us:railroad-benefits-in-state-income-testsstays open. It asks whether, under 45 U.S.C. 231m(a), a state may count the annuity in an income test, phase-out or deduction limit. This PR applies each state's provision as written and leaves that pattern for a ruling.Invariants
policyengine_us/tests/test_state_railroad_benefit_provisions.pyruns these with Hypothesis.0 <= mn_social_security_subtraction <=taxable title II, and the subtraction plus taxable tier 1 at least matches the subtraction of the same benefits as title II.mn_social_security_subtractionfor every filing status. At steps 12 and 13 the walk adds half of line 6b, as subd. 26(i) defines provisional income.The test file labels two exceptions and one model gap:
S6 gives its households no title II benefits and no Part B premium. The model splits section 86's taxable amount between title II and tier 1 in proportion, so more tier 1 moves part of that amount off title II, which some states tax. Higher benefits can also end a filer's Medicare Savings Program eligibility, so the state stops paying the premium that Idaho and Ohio let filers subtract. S6 skips Oregon, which subtracts federal income tax inside its AGI, and skips Colorado and South Carolina when part of the benefits falls within the standard deduction.
CI runs 8 examples each for S1 and S2 and the first S6 test, 15 each for S3 and S4, 25 each for S5 and the second S6 test, and 40 for D1. Locally the file ran in 4 to 11 minutes. In a longer hunt, at 40 to 200 examples a test, we found one counterexample, in S3. When it computes its SSI supplement, Oklahoma rounds "the monthly amount of each income source" to the nearest dollar (OAC 317:35-5-42(i)), so when the swap merged two monthly payments into one,
ok_gross_incomemoved by $12. To keep that rounding out of S1 to S3, the swap households take up no SSI, and S3 keeps the case as an explicit example. A second hunt over S1 to S3, at 40 and 80 examples, found no counterexample.The PR adds 58 YAML cases in 35 files, five of the files new. We derived each expected value from the statute or form, and most cases show the arithmetic line by line in comments.
Coordination with #10764
#10764's
test_state_benefit_railroad_income.pylists two files from Washington's senior and disabled exemption among those that read Social Security without railroad benefits. One entry names the exemption's income list, which onmainhas no tax-free railroad amount to add; this PR adds those amounts. When a merge ofmainbrings that test here, delete the income list's entry in the same merge, since the test fails on entries that no longer apply. The other entry, the disability retirement test, stays.Depends on #10696
#10696 has merge conflicts with
main, and its latest CI run failsstates-shard-4(the 2014 case inwv_senior_citizen_disability_deduction_person.yaml) and Python shard 5 (test_negative_or_missing_tier_1_benefits_raise[nan]). Both tests fail on this branch too; this PR changes neither.axiom: TheAxiomFoundation/rulespec-us#2141 queued
🤖 Generated with Claude Code