Skip to content

Include traditional IRA and 401(k)/403(b) distributions in state retirement exclusions across 20 states - #9423

Open
jindal-git wants to merge 2 commits into
PolicyEngine:mainfrom
jindal-git:state-retirement-distributions
Open

Include traditional IRA and 401(k)/403(b) distributions in state retirement exclusions across 20 states#9423
jindal-git wants to merge 2 commits into
PolicyEngine:mainfrom
jindal-git:state-retirement-distributions

Conversation

@jindal-git

Copy link
Copy Markdown
Contributor

Fixes #9005

Summary

At the federal level, retirement account distributions (traditional IRAs, 401(k)s, 403(b)s, SEPs, and Keoghs) were split from taxable_pension_income into taxable_retirement_distributions (and individual component variables). State retirement and pension exclusions in PolicyEngine previously only referenced taxable_pension_income in most states, omitting traditional IRA, 401(k), and 403(b) distributions where state statutes allow them.

A comprehensive audit of state retirement tax provisions across all 50 states was conducted. This PR updates all 20 affected states in accordance with statutory rules:

  1. New York (ny): Created sources.yaml parameter containing pensions, traditional IRAs, 401(k), 403(b), SEP, and Keoghs; updated ny_pension_exclusion formula.
  2. Delaware (de): Updated income_sources.yaml to include traditional IRAs, 401(k), 403(b), SEP, and Keoghs for the age 60+ pension exclusion.
  3. Missouri (mo): Created mo_private_pension_sources.yaml parameter; updated mo_pension_and_ss_or_ssd_deduction_section_b.
  4. Michigan (mi): Created sources.yaml and private_retirement_sources.yaml; updated retirement benefit tier deduction formulas.
  5. Connecticut (ct): Created sources.yaml including 401(k)/403(b) for all years and traditional IRAs for 2023+; updated ct_pension_annuity_subtraction.
  6. Illinois (il): Added taxable_retirement_distributions to parameters/.../base/subtractions.yaml.
  7. Mississippi (ms): Created retirement_exemption_sources.yaml and updated ms_retirement_income_exemption.
  8. South Carolina (sc): Created sources.yaml and updated sc_retirement_deduction_indv.
  9. Iowa (ia): Created sources.yaml and updated ia_pension_exclusion.
  10. New Jersey (nj): Created sources.yaml for pension/retirement exclusion; updated gross income non_negative_sources.yaml to include 401(k), 403(b), SEP, Keogh distributions.
  11. Wisconsin (wi): Created sources.yaml; updated wi_retirement_income_subtraction and wi_retirement_income_exclusion_amount.
  12. Maine (me): Created sources.yaml; updated me_pension_income_deduction.
  13. Colorado (co): Added 401(k), 403(b), SEP, Keogh distributions to parameters/.../pension/income_sources.yaml.
  14. Georgia (ga): Added 401(k), 403(b), SEP, Keogh distributions to parameters/.../exclusions/retirement/sources.yaml.
  15. Oklahoma (ok): Created pension_sources.yaml and updated ok_pension_subtraction.
  16. Ohio (oh): Created sources.yaml and updated oh_pension_based_retirement_income_credit.
  17. North Dakota (nd): Created qualified_income_sources.yaml and updated nd_mpc.
  18. Maryland (md): Created sources.yaml including employer retirement plans (401k, 403b) while preserving the statutory exclusion of IRAs (Md. Code Ann., Tax-Gen. § 10-209).
  19. Rhode Island (ri): Created sources.yaml including 401(k) and 403(b) distributions from 2023+ while preserving the statutory exclusion of IRAs (R.I. Gen. Laws § 44-30-12(c)(9)).
  20. Arkansas (ar): Created employment_sources.yaml for employment-related retirement plans (401k, 403b, SEP, Keogh) while preserving the statutory age-59½ condition for IRA distributions (Ark. Code Ann. § 26-51-307).

Testing & Quality Checks

  • Added unit tests for each of the 20 states verifying IRA and/or 401(k)/403(b) inclusion.
  • All state test suites passed.
  • All 630 partner contract tests under tests/policy/baseline/partners/ passed without breaking changes.
  • Formatted with make format (ruff format and ruff check passed cleanly).
  • Added changelog fragment changelog.d/state-retirement-distributions.fixed.md.

…rement exclusions across 20 states

Fixes PolicyEngine#9005 by ensuring traditional IRA, 401(k), 403(b), SEP, and Keogh distributions
are included in state retirement and pension income exclusions according to each
state's statutory rules across 20 affected states:
NY, DE, MO, MI, CT, IL, MS, SC, IA, NJ, WI, ME, CO, GA, OK, OH, ND, MD, RI, AR.
@anth-volk

Copy link
Copy Markdown
Contributor

Program review

Base repository: PolicyEngine/policyengine-us
PR number: 9423
Reviewed head SHA: fa67fad
Merge base SHA: 8e212c1
Mode: full
Scope: all changed behavior and affected dependencies across the 20 state retirement-income calculations
Source manifest: /private/tmp/policyengine-command-runs/75c2761f5079/pr-9423-review-sources.json
Review status: PARTIAL

Source Documents

Critical

C1 — Connecticut applies the pension percentage to IRA distributions instead of the statutory IRA phase-in (OPEN)

  • Location: policyengine_us/parameters/gov/states/ct/tax/income/subtractions/pensions_or_annuity/sources.yaml:7-11, policyengine_us/variables/gov/states/ct/tax/income/subtractions/pension_annuity/ct_pension_annuity_subtraction.py:30-37, and policyengine_us/tests/policy/baseline/gov/states/ct/tax/income/subtractions/ct_pension_annuity_subtraction.yaml:144-154.
  • Trigger: A Connecticut single filer in 2024 has federal AGI of $60,000, $8,000 of otherwise qualifying 401(k) distributions, and $4,000 of taxable non-Roth IRA distributions—the exact new test case. The same defect affects taxable non-Roth IRA distributions in 2023 and 2025.
  • Observed: The new source list adds taxable_ira_distributions to the same base as pensions. The formula applies p.non_joint.calc(60_000) = 1 to the entire $12,000, and the new test requires a $12,000 subtraction.
  • Expected: Conn. Gen. Stat. §12-701(a)(20)(B)(xxviii) allows only 50% of a non-Roth IRA distribution for tax year 2024 before the applicable AGI schedule. On the modeled inputs, even assuming the $8,000 401(k) amount qualifies as pension/annuity income, the subtraction is $8,000 + 50% × $4,000 = $10,000, not $12,000. Clause (xxvii) sets 25% for 2023; clauses (xxviii) and (xxix) set 75% for 2025 and 100% from 2026.
  • Impact: Connecticut adjusted gross income is understated by 75% of affected non-Roth IRA distributions in 2023, 50% in 2024, and 25% in 2025, before AGI-schedule interactions. This can understate Connecticut income tax and alter downstream net-income and eligibility results.
  • Why introduced by this diff: Before this PR, ct_pension_annuity_subtraction read only taxable_pension_income. The new list adds IRA distributions beginning in 2023, but the formula continues to use only the pension/annuity rate tables. The test added by this PR fixes the incorrect full 2024 IRA subtraction as its expected output.
  • Required correction: Calculate pension/annuity income and non-Roth IRA distributions separately. Apply the IRA statutory phase-in and its applicable filing-status/AGI schedule, then combine the resulting subtractions. Correct the 2024 test expectation and add 2023 and 2025 cases.

Should Address

A1 — [MAJOR — test coverage] The two 2023 source-list transitions are not tested on both sides of the effective date (OPEN)

  • Locations: policyengine_us/parameters/gov/states/ct/tax/income/subtractions/pensions_or_annuity/sources.yaml:3, policyengine_us/tests/policy/baseline/gov/states/ct/tax/income/subtractions/ct_pension_annuity_subtraction.yaml:143, policyengine_us/parameters/gov/states/ri/tax/income/agi/subtractions/taxable_retirement_income/sources.yaml:3, policyengine_us/tests/policy/baseline/gov/states/ri/tax/income/agi/subtractions/taxable_retirement_income/ri_retirement_income_subtraction.yaml:108.
  • Trigger: Connecticut IRA distributions and Rhode Island 401(k)/403(b) distributions in 2022 versus 2023.
  • Expected coverage: cases immediately before and after 2023-01-01, proving the new sources are excluded in 2022 and included in 2023.
  • Observed coverage: each PR-added case uses only 2024. The changed YAML suite can pass if the 2023 boundary is moved backward or forward while 2024 remains correct.
  • Impact: historical calculations around the enacted effective date can regress without detection.
  • Causal chain: this PR introduces date-varying source lists, but its added tests exercise only the post-change value.

A2 — [MAJOR — test coverage] Three changed Michigan calculation paths have no PR-added retirement-distribution regression case (OPEN)

  • Locations: policyengine_us/variables/gov/states/mi/tax/income/deductions/retirement/expanded/mi_expanded_retirement_benefits_deduction.py:23, policyengine_us/variables/gov/states/mi/tax/income/deductions/retirement/tier_three/ss_exempt/not_retired/mi_retirement_benefits_deduction_tier_three_ss_exempt_not_retired.py:29, policyengine_us/variables/gov/states/mi/tax/income/deductions/retirement/tier_three/ss_exempt/retired/mi_retirement_benefits_deduction_tier_three_ss_exempt_retired.py:32, and policyengine_us/tests/policy/baseline/gov/states/mi/tax/income/deductions/retirement/tier_one/mi_retirement_benefits_deduction_tier_one_amount.yaml:395.
  • Trigger: a filer routed to the expanded or either tier-three Social-Security-exempt branch with IRA, 401(k), 403(b), SEP, or Keogh distributions.
  • Expected coverage: at least one new distribution case through each changed branch, with branch eligibility derived by the model.
  • Observed coverage: the only Michigan test added by this PR exercises the tier-one amount. The other three formulas now consume p.sources but receive no matching changed test.
  • Impact: an incorrect parameter path, aggregation, or cap interaction in any untested Michigan branch could pass the PR's changed test set.
  • Causal chain: this PR changes four Michigan formulas but adds coverage for only one of them.

A3 — [MAJOR — test coverage] The New Jersey case does not exercise the new gross-income inclusion or the resulting tax calculation (OPEN)

  • Locations: policyengine_us/parameters/gov/states/nj/tax/income/gross_income/non_negative_sources.yaml:9, policyengine_us/parameters/gov/states/nj/tax/income/exclusions/retirement/sources.yaml:3, and policyengine_us/tests/policy/baseline/gov/states/nj/tax/income/exclusions/nj_pension_retirement_exclusion.yaml:443.
  • Trigger: a 2022 New Jersey filer with 401(k) and IRA distributions, especially a filer who is ineligible for the retirement exclusion or whose distributions exceed the exclusion.
  • Expected coverage: the new case should assert nj_gross_income and a downstream New Jersey taxable-income or tax result in addition to the exclusion; an ineligible or above-cap case should prove the income remains taxable.
  • Observed coverage: the PR-added case supplies federal adjusted gross income directly and asserts only nj_pension_retirement_exclusion. It does not exercise the source-list change to New Jersey gross income or the combined inclusion-then-exclusion path.
  • Impact: one side of the paired change could be omitted or miswired, producing understated or overstated New Jersey tax while this test still passes.
  • Causal chain: this PR adds the same distribution types to both gross-income and exclusion source lists, but tests only the exclusion intermediate.

Suggestions

None.

Evidence Gaps

  • Primary authority was not independently verified within the source budget for New York, Delaware, Missouri, Michigan, Illinois, Mississippi, South Carolina, Iowa, New Jersey, Wisconsin, Maine, Colorado, Georgia, Oklahoma, Ohio, North Dakota, Maryland, Rhode Island, or Arkansas.
  • Connecticut's premature-distribution restriction and the classification of 401(k) and 403(b) amounts as pension or annuity income remain unverified because the cited form instructions were unavailable.
  • Arkansas SEP age treatment and Mississippi's after-retirement condition remain specific unresolved legal risks; the cited Arkansas document returned HTTP 404.
  • The focused microsimulation result, Ruff result, and final bounded-runner status were not recovered before the outer review deadline.
  • Role checks incomplete: pr-9423-review-code.md; see recovered report.
  • Role checks incomplete: pr-9423-review-policy.md; see recovered report.

Notes

  • No new source list combines taxable_retirement_distributions with one of its five constituent variables, so no component double counting was identified.
  • No partner contract test file is changed. The partner contract suite was not run during this review.
  • The PR currently has no reported GitHub checks for the reviewed head.
  • Git diff validation found trailing blank lines newly added at the ends of five changed YAML test files; this is formatting-only.

Validation Summary

Exact detached head imported successfully. All 21 changed YAML files ran together: 175 passed with 1 warning in 12.64 seconds. The full 1,320-line diff was inspected; no partner contract test is changed. Focused microsimulation, Ruff, and the final bounded-runner status are unrecovered; see raw recovered test log. Source integrity: 1 official Connecticut statute HTML accepted, 0 rejected, 0 discarded derivatives.

Timing

setup seconds: 335.00s; scope seconds: 95.00s; parallel review seconds: 1450.00s; policy role seconds: 1330.00s; code role seconds: 1476.00s; adjudication seconds: 66.00s; consolidation cleanup seconds: 26.00s; elapsed seconds: 1972.00s

Review Severity

REQUEST_CHANGES. Open findings: 1 critical, 3 should address, 0 suggestions.

…test coverage

- Separate CT pension/annuity sources from IRA sources and apply statutory
  IRA phase-in percentage (C.G.S. § 12-701(a)(20)(B)(xxvii)-(xxx))
- Add 2022 vs 2023 transition boundary test cases for both CT and RI
- Add regression tests exercising 401(k) and IRA distributions in MI expanded
  and tier-three retirement deduction branches
- Add NJ gross income inclusion test and under-62 exclusion ineligible test
@jindal-git

Copy link
Copy Markdown
Contributor Author

Thank you for the thorough and constructive review! All four findings have been addressed in commit fc60b36:

  1. C1 (Connecticut IRA Phase-in Rate):

    • Separated pension/annuity sources (sources.yaml) from IRA sources (ira_sources.yaml).
    • Added parameter ira_rate.yaml modeling the statutory IRA phase-in under C.G.S. § 12-701(a)(20)(B)(xxvii)–(xxx) (0% prior to 2023, 25% in 2023, 50% in 2024, 75% in 2025, 100% in 2026+).
    • Updated ct_pension_annuity_subtraction.py to apply the IRA phase-in rate to IRA distributions prior to applying the filing-status/AGI schedule rate.
    • Updated the 2024 test case expectation to $10,000 ($8,000 + 50% × $4,000) and added test cases for 2022, 2023, and 2025.
  2. A1 (Effective Date Boundary Tests):

    • Connecticut: Added 2022 (pre-effective date, 0% IRA subtraction) and 2023 (post-effective date, 25% IRA subtraction) test cases to ct_pension_annuity_subtraction.yaml.
    • Rhode Island: Added 2022 (pre-effective date, $0 subtraction for 401(k)/403(b)) and 2023 (post-effective date, $15,000 subtraction for 401(k)/403(b)) test cases to ri_retirement_income_subtraction.yaml.
  3. A2 (Michigan Multi-Path Regression Tests):

    • Added test cases exercising 401(k) and IRA distributions across the other three modified Michigan formulas:
      • mi_expanded_retirement_benefits_deduction.yaml
      • mi_retirement_benefits_deduction_tier_three_ss_exempt_not_retired.yaml
      • mi_retirement_benefits_deduction_tier_three_ss_exempt_retired.yaml
  4. A3 (New Jersey Gross Income & Exclusion Interplay):

    • Added a test in nj_gross_income.yaml confirming 401(k) and IRA distributions are included in nj_gross_income under Category j.
    • Added a test in nj_pension_retirement_exclusion.yaml for an under-62 filer confirming nj_pension_retirement_exclusion = 0, demonstrating that the distributions remain in taxable gross income when unexcluded.

All 64 tests across the updated suites and all 630 partner contract tests pass cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

State retirement/pension exclusions omit traditional IRA, 401(k), and 403(b) distributions

2 participants