Repository navigation
Conversation
…e closes Tax credits closed on 6 April 2025 and Income Support and income-based JSA on 1 April 2026, but the model kept paying a family's other legacy awards and paid Universal Credit only through would_claim_uc, which datasets draw without regard to legacy receipt. A family that drew it false was left with nothing once its tax credits stopped. - would_claim_uc_at_legacy_closure: dataset input (default true) saying whether the family claims Universal Credit when its legacy benefits close. - legacy_benefits_closed: a working-age family reports a legacy benefit that has closed (tax credits from 2025, IS and income-based JSA from 2026). - claims_universal_credit: would_claim_uc, or the closure and the flag. It replaces would_claim_uc in universal_credit, universal_credit_pre_benefit_cap, uc_has_deduction, is_CTC_eligible and housing_benefit_eligible. - Once a family's legacy benefits have closed, its Housing Benefit continuing award, Income Support, income-related ESA and income-based JSA end, whether or not it claims (SI 2014/1230 regs 8 and 46). Years before any closure are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge WTC migrants Review r1 found that excluding every family on the Pension Credit route left out families DWP moved to Universal Credit: protected mixed-age couples and pension-age claimants on Working Tax Credit without Pension Credit (SI 2019/167 art. 3A; SI 2014/1230 reg 60A; DWP HB circular A9/2024). - legacy_benefits_closed now sends to Pension Credit only families on it, and families on Child Tax Credit but not Working Tax Credit that meet the Pension Credit age conditions (art. 3A(1)). IS and income-based JSA closures do not move wholly pension-age families (reg 8(2B)). - claims_uc_at_legacy_closure: the closure claim. - is_uc_eligible admits a closure claimant on the pension-age route: a protected mixed-age couple claims jointly, and a pension-age WTC recipient has the upper age condition waived (reg 60A). - left_pension_route_at_legacy_closure: such a family leaves the route if it claims, or as a protected mixed-age couple loses its Housing Benefit and saving at the deadline; Housing Benefit's pension-age route and Pension Credit eligibility honour it. - Tax credits (CTC and WTC) are masked for families moved off legacy benefits, so a reform keeping tax credits open does not pay them with UC. - Documentation: claims_universal_credit's scope, the UC notebook's two claim routes and how to decline both. - Tests: seven YAML cases for these routes and the reform; property tests now generate mixed-age couples, pension-age families and Pension Credit reporters, and check UC/PC and UC/HB exclusivity. The childcare grant overlap test pins legacy_benefits_closed false to keep testing the overlap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
Collaborator
Author
|
Status 02:45Z: head cf40b02 = 4313fbd (round-1 review fixes) + main merge, which brings main's read-only cache fixture fix for policyengine-core 3.32.16 (the earlier CI Test failure). The 2,109 policy YAML tests pass locally on core 3.32.16. Delta review r2 (Opus, |
21 of 52 tasks
This branch has not been deployed
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 #2118
Summary
Tax credits closed on 6 April 2025, and Income Support and income-based JSA on 1 April 2026. DWP moved each working-age family off its legacy benefits with one migration notice covering all of them. The awards ended when the family claimed Universal Credit, or at the notice's deadline if it did not claim. The model had no such step:
would_claim_uc, which datasets draw without regard to legacy receipt. A legacy family that drew it false lost its tax credits from 2025-26 and got nothing in their place.This PR adds the closure-time claim. It is the model half of PolicyEngine/policyengine-uk-data#492, which draws the new input at DWP's Move to Universal Credit claim rates.
Law
Read on legislation.gov.uk on 3 October 2026.
Change
would_claim_uc_at_legacy_closure(BenUnit, YEAR, bool input, defaultTruelikewould_claim_uc): whether the family claims Universal Credit once its legacy benefits close. uk-data#492 draws it by legacy benefit combination at the Stat-Xplore claim rates; datasets without it get the default.legacy_benefits_closed(BenUnit, YEAR, bool): DWP moved the family off its legacy benefits towards Universal Credit. It holds when:gov.dwp.tax_credits.activeis false (from 2025), unless DWP sent it to Pension Credit instead. Pension Credit took families on Pension Credit, and families on Child Tax Credit but not Working Tax Credit that meet the Pension Credit age conditions: single or both pension age, or a protected mixed-age couple (SI 2019/167 art 3A(1)). Every other tax credit family got a Universal Credit migration notice, including pension-age and protected mixed-age families on Working Tax Credit (reg 44, reg 60A, DWP HB circular A9/2024 paras 5–14);activeparameter is false (from 2026), unless it is on Pension Credit or wholly pension age (reg 8(2B)).claims_uc_at_legacy_closure=legacy_benefits_closed&would_claim_uc_at_legacy_closure.claims_universal_credit(BenUnit, YEAR, bool) =would_claim_uc|claims_uc_at_legacy_closure. It replaceswould_claim_ucin the five places that read it as "claims Universal Credit":universal_creditanduniversal_credit_pre_benefit_cap(defined_for);uc_has_deduction;is_CTC_eligible. The rewrite also drops the old~add(...) > 0precedence trick;addreturns a bool there, so the result is the same;housing_benefit_eligible's continuing-award route.is_uc_eligibleadmits a closure claimant on the Pension Credit route. A protected mixed-age couple claims jointly and gives up its saving (UC Regs reg 3(2)(a)). A pension-age Working Tax Credit recipient not on Pension Credit has the upper age condition waived (reg 60A).left_pension_route_at_legacy_closure(BenUnit, YEAR, bool): a family on the Pension Credit route that DWP moved off legacy benefits leaves that route if it claims Universal Credit. A protected mixed-age couple also leaves it if it does not claim, because its Housing Benefit ends at the deadline and the saving with it (A9/2024 para 11). Housing Benefit's pension-age route andis_pension_credit_eligiblehonour it. A wholly pension-age family that does not claim keeps the route and can claim Pension Credit and Housing Benefit afresh.legacy_benefits_closedholds; tax credits (CTC and WTC) are masked too, so a reform that keeps tax credits open does not pay them alongside Universal Credit. A family on Child Tax Credit and Income Support therefore loses its Income Support in 2025-26, not at the Income Support closure.Unchanged:
claims_universal_creditequalswould_claim_ucthen, and nothing else reads the new input.legacy_benefits_closedwhen it lands, so that those families move at the same rates.Not modelled:
main; Abolish working-age Housing Benefit from 1 July 2026 (NI 1 October 2026) #1910 adds one, on a separate new-claim route this change does not touch).Impact
These are real runs on the released Enhanced FRS 2024-25 (uk-data 1.57.4, sha256
03fe15e4…), comparing PE-UKmain325d585 (this branch's merge base) with this branch at 4313fbd. The dataset has nowould_claim_uc_at_legacy_closure, so it takes the default (true). The figures are therefore the effect of this PR alone, before uk-data#492 (PolicyEngine/policyengine-uk-data#534).maintoo)legacy_benefits_closedcovers 191k benefit units in 2025 and 246k from 2026.main6fa14dc), 63k of the 2025 units did not drawwould_claim_uc. 54k of those have Universal Credit capital above £16,000 (tax credits had no capital test), so only 4.3k gain Universal Credit; see the reg 51 limitation above. That split was not re-run on this head.Aggregates come from
aggregates.pyin the session's review folder, two full runs per head. The combined effect with uk-data#492's draw comes from seeded builds and is reported on PolicyEngine/policyengine-uk-data#534.Invariants
Property-tested in
policyengine_uk/tests/test_uc_legacy_closure_properties.py(Hypothesis, years 2024–2027). The generated families include working-age, pension-age and mixed-age families, with and without the SI 2019/37 saving, and every subset of reported legacy benefits and Pension Credit.legacy_benefits_closedholds exactly per the destination rule above.claims_universal_credit=would_claim_ucor (closure and flag), and no Universal Credit is paid without a claim.would_claim_uctrue.Also 20 hand-checked YAML cases (
tests/policy/baseline/finance/benefit/family/universal_credit/claims_universal_credit.yaml). They cover protected mixed-age couples on Working Tax Credit (claiming and not), a mixed-age couple on Child Tax Credit only, pension-age Working Tax Credit recipients (reg 60A, claiming and not), one on Pension Credit, and a reform that keeps tax credits open.Mutation checks on round 1's head: each of these mutants failed at least one test file:
claims_universal_credit;universal_credit'sdefined_for;The Income Support mutant was caught only by YAML at first; a targeted property test now covers it. On this head, removing the Working Tax Credit mask fails the reform YAML case.
All 2,020 policy YAML tests pass locally. One existing Childcare Grant case now pins
legacy_benefits_closed: false, because tax credits closed in its year (2025) and it tests the Working Tax Credit overlap.Review
claims_universal_credit's wording, the Universal Credit notebook, and the reg 51 disclosure. All are addressed in 4313fbd.Interactions
legacy_benefits_closedfrom its abolition year. Housing Benefit reporters then move at the Move to Universal Credit rates instead of being stranded. Itshousing_benefit_eligiblehunk overlaps this PR's.legacy_benefits_closed. This PR ends income-related ESA only for families whose legacy benefits closed. The overlap with Universal Credit for families already onwould_claim_ucis left to Abolish income-related ESA from 1 July 2026 (NI 1 October 2026) and stop paying it alongside UC #1914.axiom: SI 2014/1230 regs 8, 46 and 60A; SI 2019/167 art 3A: TheAxiomFoundation/rulespec-uk#433 queued
🤖 Generated with Claude Code