Skip to content

Add CTC artifact comparison diagnostics to national validation#731

Merged
MaxGhenis merged 2 commits intomainfrom
codex/ctc-agi-filing-status-targets
Apr 12, 2026
Merged

Add CTC artifact comparison diagnostics to national validation#731
MaxGhenis merged 2 commits intomainfrom
codex/ctc-agi-filing-status-targets

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • add compare-mode support to validate_national_h5 for artifact-to-artifact CTC comparisons
  • report current-law CTC total drift plus AGI, filing-status, child-count, and child-age diagnostic deltas
  • report canonical CTC reform drift between two national artifacts
  • add focused unit coverage and a changelog fragment

Why

This implements the validation half of #725. We can already compare aggregate CTC totals, but recent adjacent artifacts showed that CTC reform sensitivity can move because the child composition moves even when top-line current-law totals stay close.

Using the new comparison output on adjacent staged national artifacts showed:

  • total ctc_qualifying_children moved only about -570k
  • but the mix shifted materially from 1- and 2-child units toward 3+ child units
  • the biggest shifts were compositional inside low/mid AGI and filing-status cells

That is exactly the failure mode we need the validator to surface.

Issue tracking

Testing

  • uv run pytest tests/unit/calibration/test_validate_national_h5.py -q
  • uv run pytest tests/unit/calibration/test_ctc_diagnostics.py -q
  • uv run ruff check policyengine_us_data/calibration/validate_national_h5.py tests/unit/calibration/test_validate_national_h5.py
  • uv run python -m policyengine_us_data.calibration.validate_national_h5 --help

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

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

Project Deployment Actions Updated (UTC)
pipeline-diagrams Error Error Apr 11, 2026 2:15pm

Request Review

@MaxGhenis MaxGhenis merged commit bd15588 into main Apr 12, 2026
10 of 11 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.

Add child-composition CTC targets or validation

1 participant