Skip to content

[codex] Add policyengine-uk validation and fix SCP parameters#2

Draft
MaxGhenis wants to merge 4 commits intomainfrom
codex/add-policyengine-uk-validation
Draft

[codex] Add policyengine-uk validation and fix SCP parameters#2
MaxGhenis wants to merge 4 commits intomainfrom
codex/add-policyengine-uk-validation

Conversation

@MaxGhenis
Copy link
Copy Markdown

Summary

Adds an actual validation path against policyengine-uk and fixes the Scottish Child Payment parameter drift that the legislative reference called out.

What changed

  • added a real CI workflow that runs on pushes and PRs
  • added a parity validator script that compares selected exact-overlap household scenarios against policyengine-uk
  • added a small --scenario-json CLI path so the Rust engine can run deterministic single-household cases for validation
  • corrected Scottish Child Payment weekly amounts for 2025/26 through 2029/30 to match the reference Python model path
  • added a Rust regression test to lock those SCP year values in place
  • updated the legislative reference appendix so it no longer lists the fixed SCP issues as outstanding

Why

The repo previously had internal tests and a broad OBR aggregate sanity check, but it did not have any automated validation against policyengine-uk, and GitHub Actions did not run validation on PRs at all. That left parameter drift undetected, including the incorrect Scottish Child Payment values already noted in the reference document.

Validation

  • cargo test
  • cargo build
  • POLICYENGINE_UK_PATH=/Users/maxghenis/policyengine-uk python3 scripts/validate_against_policyengine_uk.py --rust-binary target/debug/policyengine-uk-rust

Notes

The parity suite intentionally covers exact-overlap scenarios only. It avoids known broader model-scope differences where the Rust implementation is still simplified relative to policyengine-uk (for example richer legacy-benefit and some historical-year behavior), so failures should be high-signal.

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