Skip to content

Guard PUF support clone top tail#166

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

Guard PUF support clone top tail#166
MaxGhenis merged 1 commit into
mainfrom
codex/puf-top-tail-guard-20260602

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Jun 2, 2026

Summary

  • add a PUF support-clone top-tail guard that caps unsupported clone rough AGI just below the open-ended $79M SOI bin
  • compute the cap trigger on a nonredundant rough-AGI basis, avoiding double-counting derived totals and their leaves
  • scale PUF-imputed investment/top-tail variables proportionally and record before/after diagnostics in the support-clone summary
  • cover enabled/disabled guard behavior and redundant total/leaf columns with focused tests

Why

The combined #163/#164 artifact regressed against latest-local eCPS because one arbitrary MD PUF-support clone row moved from about $37M rough income to about $109M. Since PUF has no state geography, that single state-inherited row dominated the Maryland AGI top-tail target after calibration. This is a temporary production guard until MP has state-aware top-tail support records.

Checks

  • uv run --python 3.13 --extra dev --extra policyengine ruff check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run --python 3.13 --extra dev --extra policyengine ruff format --check src/microplex_us/pipelines/us.py tests/pipelines/test_us.py
  • uv run --python 3.13 --extra dev --extra policyengine pytest tests/pipelines/test_us.py -k "puf_support_clone_top_tail_guard or puf_support_clone_refresh"
  • uv run --python 3.13 --extra dev --extra policyengine pytest tests/pipelines/test_us.py

Review Fix

An independent read-only review found the first version double-counted capital_gains with LTCG/STCG and dividend totals with dividend leaves. The branch now computes rough AGI on a canonical nonredundant basis and has a regression test proving below-cap rows with both totals and leaves are left unchanged.

Follow-up

If this merges, rebuild the CPS-spine Gate-1 artifact and rerun the primary latest-local eCPS sound comparison. The guard should remove the #163/#164 state AGI blow-up; SNAP remains the next separate loss lane.

@MaxGhenis MaxGhenis force-pushed the codex/puf-top-tail-guard-20260602 branch from 61df773 to f7104fd Compare June 2, 2026 03:43
@MaxGhenis MaxGhenis marked this pull request as ready for review June 2, 2026 03:49
@MaxGhenis MaxGhenis merged commit e0ea1b4 into main Jun 2, 2026
5 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