Repository navigation
Scope legacy-benefit closure to each award's owners - #2549
juaristi22 wants to merge 3 commits into
Conversation
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; components the model counts twice; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles; standard reform costings (change in gov_balance); standard reforms: change in each reform's target. Checks failing on both base and head (1)
Counted-once checkEach of 84 components was raised by £1 per unit in 2026-27, and every head of its totals was read household by household: its own head must rise by exactly £1, no other tax head may move, no other benefit may rise, and the model's own total must move by what its heads moved. A head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.
Provenance
Dataset: Receipts by tax head: head levels
Spending by benefit and service: head levels
Caseloads: head levels
Government balance, each component counted once: head levels
Model totals: head levels
Components the model counts twice: head levels
Household income totals: head levels
Population: head levels
Poverty rates: head levels
People in poverty: head levels
Inequality: head levels
Mean household net income in each side's own deciles: head levels
Standard reform costings (change in gov_balance): head levels
Standard reforms: change in each reform's target: head levels
|
|
Fixed the no-simulation reform’s integration with person-level legacy closure. The reform now keeps both closure controls false. The regression oracle distinguishes claimant/partner awards from separate owners’ awards and retains the positive ESA/status assertions. Before integration with current main, validation passed 93 Python cases and 798 YAML checks (891 unique checks). Fresh validation at Independent code and policy review completed with no findings or material gaps. Both CI fixes are verified, with no new issues. Static, lint, formatting, Towncrier and actual-main Fix/body gates pass. Axiom parity remains needed. The PR remains draft while hosted CI is evaluated for this head. |
Fixes #2395
The annual legacy-benefit closure flag currently reads reports from everyone in a benefit unit and applies the couple's closure to separate members' ESA/JSA claims. This lets an unrelated adult's report close or shield the couple's award, and lets the couple's report end that adult's separate claim.
Scope the couple's closure reports to the claimant and partner. Apply the existing closure predicate separately to other members' own reports and Pension Credit qualifying-age input. Exclude only closed reports before the existing ESA/JSA work, shared-capital and tariff calculations. Preserve direct-award, nil, neutralized and held-report value contracts.
SI 2014/1230 regulation 44 and regulation 46 tie migration notices and termination to the notified person's award, including their partner for that award. This fix retains the model's existing annual migration proxy and programme dates; it does not implement actual notices, deadlines, run-on periods, Housing Benefit exceptions or a full entitlement model. The existing shared-capital and aggregate-work-screen approximations remain. This uses existing role flags and reported amounts; it does not infer actual notices or legal award ownership, extend historical/NI/polygamous relationship inputs, or re-audit the Pension Credit exceptions.
Historical local validation at
ac43212a0c0e478e687777235640d1ea571a836cmake format(including ruff check), Towncrier draft and the captured-main Fix evidence validator pass. Formatting preserves all Python ASTs.Validation at
825a6fa9eccf659f953eadff0583ad11b6454b83Reproducer: policyengine_uk/tests/test_legacy_closure_scope.py::test_outside_closed_report_does_not_close_couple_award; policyengine_uk/tests/test_legacy_closure_scope.py::test_couple_closure_does_not_end_outside_own_award
axiom: needed
Axiom parity remains open; no encoding, billed run or parity claim is included.