Skip to content

Preserve IRA support in CPS retirement split#217

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/fix-retirement-ira-caps-20260604
Jun 4, 2026
Merged

Preserve IRA support in CPS retirement split#217
MaxGhenis merged 1 commit into
mainfrom
codex/fix-retirement-ira-caps-20260604

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Jun 4, 2026

Summary

  • compute final capped retirement account leaves from the existing desired account pools during CPS processing
  • recompute final retirement inputs from desired leaves during PE export when checkpointed desired leaves are present
  • preserve traditional/Roth IRA support when CPS RETCB is below the 401(k) limit
  • add regressions for both the source split and checkpoint/export recovery path

Root cause

The #214 source-population patch added desired IRA and 401(k) leaves, but the final capped exports still consumed the bundled CPS RETCB total in greedy account order. For typical RETCB values below the 401(k) limit, traditional 401(k) absorbed the whole amount and left both IRA exports at zero, causing export support parity to fail against eCPS.

The landed a1f19e0 checkpoints already contain nonzero desired IRA leaves, so the export normalizer also needs to rebuild final retirement inputs from desired leaves when exporting from those checkpoints; otherwise a checkpoint resume would keep the stale zero final columns.

Validation

  • UV_PROJECT_ENVIRONMENT=.venv313 uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/data_sources/test_cps_retirement_contributions.py -q
  • UV_PROJECT_ENVIRONMENT=.venv313 uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/policyengine/test_us.py -q -k 'retirement or persisted_computed_inputs'
  • UV_PROJECT_ENVIRONMENT=.venv313 uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/targets/test_arch.py::test_arch_target_gap_queue_points_retirement_contributions_to_soi -q
  • UV_PROJECT_ENVIRONMENT=.venv313 uv run --python 3.13 --extra dev --extra policyengine python -m ruff check src/microplex_us/data_sources/cps.py src/microplex_us/pipelines/us.py tests/data_sources/test_cps_retirement_contributions.py tests/policyengine/test_us.py

@MaxGhenis MaxGhenis force-pushed the codex/fix-retirement-ira-caps-20260604 branch from d7b856c to 08a9fc1 Compare June 4, 2026 15:33
@MaxGhenis MaxGhenis force-pushed the codex/fix-retirement-ira-caps-20260604 branch from 08a9fc1 to fdc79fe Compare June 4, 2026 15:33
@MaxGhenis MaxGhenis merged commit 8709d27 into main Jun 4, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/fix-retirement-ira-caps-20260604 branch June 4, 2026 15:39
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.

1 participant