Repository navigation
Check statutory resumption after a freeze: Budget reform contract 2.0.0 (cos d1344) - #627
Merged
Merged
Conversation
…s d1344 Fixes #626. The six pending d1344 rows (the 2034-35 personal allowance and basic rate limit after a freeze to 2033-34) become gating checks against ITA 2007 s57(3) and s21(3) applied to the frozen amounts, with the aligned NICs thresholds and the income tax change in 2034 and 2035. The sampled property's oracle indexes the allowance from the year before after a change (years to 2030-31 as Finance Act 2021 s5 states them). Uprated amounts keep returning to their uprated path (SI 2020/371 reg 3). The row fixture is recorded again; only the extended freeze's rows changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The independent review of policyengine-uk#2423 found that freezes of uprated amounts resumed from the frozen amount (WRWA 2016 s11), so the contract no longer presents its unchanged reading for them as decided. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The contract keeps 2.0.0's statutory prior law and gating extended-freeze checks, and takes main's default capital gains response, whose checks wait on policyengine-uk#2396. The evaluate_case fixture is recorded again from the merged runner: against main it differs only in the extended freeze's rows (132 gating rows for 18 pending ones), and against this branch only in main's capital gains and blended-rate rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ualification gate The gate tests read a real full run of the runner, and fail rather than skip when the contract version moves past it. This one ran contract 2.0.0 on policyengine-uk 2.135.0 (with the d1344 statutory resumption) and the certified enhanced_frs_2024_25: 881 pass, 19 pending policyengine-uk#2396, 119 unsupported, holds. It has no count from 1 to 9 and its population details agree across routes. Two gate tests that relied on 1.1.0's duplicated freeze check now swap the gating freeze check with a pending one; the gate still rejects every such swap and duplicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contract 1.1.0 read the 2034 allowance twice, so its full run drove the gate's resolution of same-label rows (by assertion id, else by oracle and order); 2.0.0 reads it once, and three mutants of that branch survived the fixture swap. The tests now declare a second, pending check on the 2034 allowance on top of the real runner and its 2.0.0 run, and pin a pending assertion reported pass and an id with another oracle. Tests written by the round-2 reviewer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 17, 2026 14:44
Contributor
Author
|
Merge audit (W1, session local_37646626): merged at d2af337, pinned with
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #626
Status: policyengine-uk#2423 is merged and released (2.134.9, now 2.135.0).
review-runner-d1344-out.md). It reproduced the 42 failures on 2.130.1 and zero assertion failures on #2423's source, and confirmed the row fixture changes onlyextended_freezerows.review-runner-r2-out.md) checked the merges, the re-recorded rows and the fixture: it re-ran the whole contract and got an identical result. It requested only the same-label gate tests, which are now in.Why this merges before certification, not after: under contract 1.1.0, main's contract today, the projected 2034 allowance check gates. It fails on every release with #2423 (2.134.9 and later), which resume from the frozen amount by statute. So those releases can only qualify under 2.0.0.
The gate tests need a real full run on the certified dataset (
CERTIFIED_SHA), not a ledger-certified model, so this PR carries one on released 2.135.0. Policyengine-uk 2.130.1, still pinned, returns to current law's path after a freeze, so it fails the new 2034-35 checks: 13,630 where 12,830 is expected. That's correct, and once 2.0.0 is in, the qualification pipeline qualifies the newest release against it.The call (cos d1344)
Max delegated the Budget CI plan's methodology calls to the workstream sessions on 2026-10-15 (d1344). Each needs an independent review to agree and its basis recorded. The call and its basis are in policyengine-uk#2423. In short:
What changes
CONTRACT_VERSIONis2.0.0andPRIOR_LAW_OPTIONisstatutory. The module docs record the call and its basis.extended_freeze: the projected 2034 check and the twopending d1344checks (six rows across the country routes) are replaced by gating checks for 2034 and 2035. They cover the personal allowance, basic rate limit, LPL, UPL, PT and UEL, each indexed or aligned from the frozen amounts with current law's September CPI rise. Each year also gets an income tax change check, which runs on the wrapper routes too.expected_annualgives the allowance the statutory oracle. Years a change covers take its value, years to 2030-31 take current law, and later years are s57 applied to the year before.DEFAULT_RESPONSE_DECISION, from CGT-602).tests/fixtures/uk_contract/evaluate_case_rows.jsonis recorded again from the merged runner. Against main's, onlyextended_freezerows differ: 22 removed (among them the six pending d1344 checks on each country route) and 132 added, 40 of them unsupported rows on routes that can't read parameters. Against this branch before the merge, only main's CGT and blended-rate rows differ.full_released_uk_2.135.0.jsonreplacesfull_released_uk_2.130.1.json, the 1.1.0 run.max_examples=20, with population checks on the certifiedenhanced_frs_2024_25(SHA-256056e80fd…).RELEASED_COUNTSand the full-run summary assertion use the new counts.Tests
Locally on the merged head: the contract, gate and qualification test files (
test_uk_budget_reform_contract.py,test_uk_candidate_gates.py,test_uk_qualification_pipeline.py,test_qualification_contracts.py,test_uk_qualification_workflow.py) pass, 924 passed.ruffis clean. New contract tests:Contract 2.0.0 against two models, run locally on this branch:
extended_freeze, sampled properties (10 examples)So the new checks catch the old reading and pass the new one.
🤖 Generated with Claude Code