Skip to content

Route pension and Social Security to older spouse in mixed-age households#925

Merged
PavelMakarchuk merged 3 commits into
mainfrom
gssi-age-aware-split
May 25, 2026
Merged

Route pension and Social Security to older spouse in mixed-age households#925
PavelMakarchuk merged 3 commits into
mainfrom
gssi-age-aware-split

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

@PavelMakarchuk PavelMakarchuk commented May 25, 2026

Summary

Context

Issue #774 (closed April 2026) agreed pensions in mixed-age households should go to the older taxpayer. PR #842 implemented age-aware splitting for pensions but routed mixed-age cases to the primary filer (not necessarily the older one). For #774's own case (page=54, sage=55), the implementation still misrouted to the under-eligible 54-year-old primary.

Issue #924 (filed today) demonstrates the same problem for Social Security in CO: primary 75 / spouse 40 with $94K gssi, the 50/50 split sent $47K to the under-60 spouse and lost half the CO age-based subtraction ($40,110 gap in CO taxable income).

This PR:

  1. Generalizes the age-aware accessor to operate on a set of fields (_AGE_GATED_FIELDS = {taxable_private_pension_income, social_security_retirement}).
  2. In mixed-age cases (one ≥60, one <60), assigns the income to the older spouse — primary if page ≥ sage, secondary if sage > page.
  3. Both-60+ still splits 50/50; both-under-60 still defaults to primary (no qualifying state exclusion in play).

Verified end-to-end

Test plan

  • 17 spouse-income-splitting tests pass, including new cases for primary-older, spouse-older, and both-young for both pension and gssi
  • Existing both-60+ split cases unchanged
  • CI passes

Closes #924.

`gssi` is a household-aggregate TAXSIM input with no per-spouse pair
field. The previous unconditional 50/50 split pushed half the SS onto
the younger spouse in mixed-age households, eliminating per-person
state elderly exclusions (CO, MD) on that half. Apply the same
age-gated rule already used for pensions: split only when both spouses
are 60+, otherwise keep the full amount on the primary filer.

For taxsim #924 (CO, primary 75 / spouse 40, $94K gssi), this brings
CO subtractions to $80,220 — matching the TaxAct DR 0104AD.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-taxsim Ready Ready Preview, Comment May 25, 2026 9:04pm

Request Review

In mixed-age MFJ couples, route pension and Social Security to the
older spouse (matching the original intent in #774) rather than
unconditionally to the primary filer. The previous primary-filer
rule missed the #774 case (page=54, sage=55) where the qualifying
spouse is the secondary filer.

Both-60+ still splits 50/50; both-under-60 still defaults to primary.

Verified:
- #924 CO (primary 75, spouse 40, $94K gssi): SS on primary,
  co_subtractions = $80,221 vs TaxAct $80,220 ($1 rounding).
- #774 IA (primary 54, spouse 55, $262K pension): pension on spouse,
  ia_income_tax = $0 (full eligible exclusion applied).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk changed the title Use age-aware allocation for Social Security input (gssi) Route pension and Social Security to older spouse in mixed-age households May 25, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk merged commit 7544c4a into main May 25, 2026
12 checks passed
@PavelMakarchuk PavelMakarchuk deleted the gssi-age-aware-split branch May 25, 2026 21:20
PavelMakarchuk added a commit that referenced this pull request May 28, 2026
Closes #933.

Colorado allows a $20K pension subtraction per filer aged 55-64.
PR #925 split pension/SS only when both spouses were ≥60, leaving
55-59 mixed-age couples allocating the full pension to one spouse
and losing the per-person CO subtraction on the other.

Drop the threshold to 55 (the lowest practical state age gate).
Higher-threshold states (DE 60, GA 62, MD 65) are unaffected: a
55-59 split doesn't create a false exclusion because those filers
fail the higher state age gates anyway.

3K eCPS 2025 sample: identical aggregate match rates (no regression).
Per-record: #933 CO joint, page=58/sage=56, $65K pensions now matches
TaxAct exactly (siitax $1,224.24 vs prior $2,104.24; $40K subtraction
vs prior $20K).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

CO joint 2025 8Kpwages 10Kswages 75page 40sage 197Kintrec 10Kstcg 77Kltcg 10Kpensions 94Kgssi

1 participant