Skip to content

Guard exported PUF top-tail capital gains#167

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/puf-top-tail-export-guard-20260602
Jun 2, 2026
Merged

Guard exported PUF top-tail capital gains#167
MaxGhenis merged 1 commit into
mainfrom
codex/puf-top-tail-export-guard-20260602

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • include long_term_capital_gains_before_response in the PUF support-clone top-tail rough-AGI guard
  • treat the exported pre-response LTCG column as an alias of the integrated PUF long_term_capital_gains variable for scaling eligibility
  • add a regression test matching the Guard PUF support clone top tail #166 rebuild failure: internal LTCG below the cap but exported LTCG-before-response still above the $79M open-ended AGI bin

Why

The post-#166 rebuild still failed the primary latest-local MP-vs-eCPS comparison: MP loss 1.2450774476685147 vs eCPS 0.7685371816961414. The same MD PUF support clone row remained in the top bin because the guard saw max rough AGI around $70M, while the exported H5 still had long_term_capital_gains_before_response around $95M for person 192879.

Validation

  • uv run ruff check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run ruff format --check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run --extra dev python -m pytest tests/pipelines/test_us.py -k 'puf_support_clone_top_tail_guard'
  • uv run --python 3.13 --extra dev --extra policyengine python -m pytest tests/pipelines/test_us.py (178 passed, 6 expected warnings)

Note: an earlier full-suite run without --extra policyengine failed only from missing optional microunit / policyengine_us dependencies; the corrected Python 3.13 + policyengine-extra run passed.

@MaxGhenis MaxGhenis merged commit efc1fd8 into main Jun 2, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/puf-top-tail-export-guard-20260602 branch June 2, 2026 05:33
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