Skip to content

Drop computed retirement helpers from CPS export#1102

Merged
MaxGhenis merged 2 commits into
mainfrom
codex/drop-computed-retirement-export
May 21, 2026
Merged

Drop computed retirement helpers from CPS export#1102
MaxGhenis merged 2 commits into
mainfrom
codex/drop-computed-retirement-export

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • drop pension_income and retirement_distributions after they are used as SSI asset-imputation predictors
  • explicitly delete stale persisted H5 keys so append-style CPS saves cannot leave computed variables behind
  • extend the add_tips regression to cover both in-memory save payloads and stale H5 key deletion

Why

Publication run usdata-gha26236821283-a1 failed in Modal stage 1_build_datasets because extended_cps_2024 exported policyengine-us computed variables: pension_income and retirement_distributions. These leaked in from PR #1097 after being added as construction-only predictors for SSI asset imputation.

Verification

  • uv run ruff format policyengine_us_data/datasets/cps/cps.py tests/integration/test_cps_generation.py
  • uv run ruff check policyengine_us_data/datasets/cps/cps.py tests/integration/test_cps_generation.py
  • uv run pytest tests/integration/test_cps_generation.py::test_add_tips_derives_tipped_status_from_raw_cps -q
  • uv run pytest tests/integration/test_cps_generation.py tests/unit/test_extended_cps.py -q
  • uv run --with pyyaml python scripts/run_quality_guards.py
  • /cycle read-only review: clean

@MaxGhenis MaxGhenis merged commit e89e365 into main May 21, 2026
13 checks passed
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