Conversation
|
Pension-age CTR schemes: checked against the law text (legislation.gov.uk, fetched 2026-09-30). This matters once #1938 makes pension-age CTR read this variable.
All three follow HB(SPC) Sch 3 para 6, not SPC Sch I:
So the CTR premium agrees with this PR's Pension Credit addition wherever HB does. The HB-specific residence test proposed for #1938 would serve CTR too. The law texts are saved with the evidence for this PR. |
…ions SPC Regs 2002 Sch I para 1(1)(a)(ii), (b)(ii) and (c)(iii) with para 2: the addition needs no other resident aged 18 or over, ignoring qualifying-benefit recipients, blind people and qualifying young persons. Para 1(1)(a)(iii), (b)(ii) and (c)(iv) with reg 6(5): a carer benefit blocks or halves the addition only when it is paid for caring for a qualifying claimant or partner, so a claimant's own Carer's Allowance no longer blocks it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce and carer tests A carer benefit paid to a claimant, partner or dependant is for a qualifying claimant or partner of the same unit when there is one, so it no longer also counts against another benefit unit in the household. Update the Carer Support Payment test: SPC Sch I para 1(1)(a)(iii) bars only a carer benefit paid for caring for the claimant, so a claimant's own CSP does not block it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…log entry test_severe_disability_addition_properties.py compares the addition with a reference written from the law text alone (differential), checks the rate bounds and the qualifying-benefit list, and checks that the residence condition, carer benefits and swapping partners behave as the law requires (metamorphic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ergences SSCBA 1992 s.70(7) allows one carer's allowance per carer, so a carer outside a benefit unit no longer counts against every other unit in the household. The household's carers not caring within their own unit go to qualifying claimants or partners not yet cared for, one each, taking the units in order of their eldest member. The reference oracle and the metamorphic property follow; add YAML cases for the residence probes and the allocation. The documentation no longer says pension-age Housing Benefit applies the same test: HB counts an 18- or 19-year-old young person of another family as a non-dependant, and needs the claimant to qualify where the partner is blind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pendants, pool surplus carers - Never let the addition go negative when more than two members are supplied as claimant or partner. - A carer cares first for a qualifying claimant or partner in their own unit, then for another member who receives a qualifying benefit (such as a disabled child); only carers left over go to other benefit units. Each person has one carer (SSCBA 1992 s.70(7ZA)), so extra carers in a unit join the household pool. - Document the age-tie order. Test the age-18 boundary, the bound, the disabled-child and surplus-carer cases and the tie order. - The reference oracle now attributes carers by explicit person-to-person matching rather than the implementation's counting; the property generator draws couples and dependants in every benefit unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bde8f7d to
214a2fa
Compare
|
Independent review (at bde8f7d): REQUEST_CHANGES. Response, all addressed in 214a2fa. The branch is rebased onto #1896's 143cc3c. The review found no law-to-code error for any Enhanced FRS household. It found:
The findings and what changed:
Impact is unchanged to £0.1m on the final code. Against 143cc3c in 2026:
|
…der as person order Tests: a qualifying 17-year-old carer with no one else to care for in her own unit cares for the grandmother; two young carers in their own units cover both pensioners. Documentation: ties between units go by person order; the reference's within-unit helper returns two values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent re-review at 214a2fa: APPROVE. It was done by an Opus agent that did not write this code.
The remaining non-blocking items are fixed in 228de58:
Disclosed modelling choice: a carer with both a qualifying claimant or partner and a disabled child in their unit is attributed to the claimant or partner first. |
|
Reviewed: approve with nits. The residence and carer limbs now match SPC Regs Sch I para 1(1)(a)-(c) and para 2. The para 2(2)(a), (b) and (f) exceptions, the 18+ threshold and the reg 6(5) single and double rates are encoded correctly. Self-exclusion and the one-carer-per-award rule (s.70(7), (7ZA)) are also right.
Verified: I read SPC Regs 2002 reg 6(5), Sch I paras 1-2 and reg 4A on legislation.gov.uk. Locally, the whole |
Summary
The Pension Credit severe disability addition (
severe_disability_minimum_guarantee_addition) now applies the statutory residence and carer conditions:This builds on #1896, which added the couple rule (both partners qualify, or one qualifies and the other is blind). Stacked on #1896 (base
remove-is-child-flags, head143cc3c4); retarget tomainonce #1896 merges. CI runs on this branch byworkflow_dispatchuntil then, because PR CI only runs for basemain.Law encoded
Source: legislation.gov.uk current revised text (CLML, valid from 2026-07-16), fetched 2026-09-30.
State Pension Credit Regulations 2002 (SI 2002/1792):
severe_disability_minimum_guarantee_additionadditionparameter)receives_severe_disability_addition_qualifying_benefit(existingrelevant_benefitslist)meets_severe_disability_addition_residence_condition,is_counted_resident_for_severe_disability_addition, new parametersevere_disability.other_resident_age_limit(18)is_counted_resident_for_severe_disability_additionnum_severe_disability_addition_qualifiers_cared_forCarer attribution. The data do not say whom a carer cares for, so each award is attributed as follows:
Not modelled (documented on the variables):
universal_credithere would be circular, becauseuc_non_dep_deduction_exemptreadspension_credit. A UC carer living in the household already stops the addition through the residence condition, unless their presence is ignored.receives_carer_benefit, so it inheritscarers_allowance, which does not apply the overlapping-benefit rule. In the calculator, a pensioner carer whose State Pension exceeds CA is treated as in receipt; a chip covers the fix. In dataset mode, CA comes from reported receipt.is_blindis not a policyengine-uk-data input. In microsimulation the blind-partner route (para 1(1)(c)) never applies, and a blind resident is counted rather than ignored (para 2(2)(b)).Pension-age HB and CTR (with #1938)
#1938 makes
pension_age_severe_disability_premiumread this variable, so pension-age HB and CTR follow it. HB(SPC) Regs 2006 (SI 2006/214) Sch 3 paras 6 and 12(1) have the same qualifying benefits, the same amounts, and nearly the same conditions. An independent audit (executed cases, law read verbatim) found where they differ:pension_age_severe_disability_premium(Give pension-age HB and CTR the severe disability premium Pension Credit uses #1938) as an HB-specific residence test. Details are in the coordination comment on Give pension-age HB and CTR the severe disability premium Pension Credit uses #1938.The documentation here now lists these differences, rather than saying HB applies the same test.
Merge order. #1938 alone has no residence test, so on its own it pays the HB/CTR premium to a pensioner living with an adult non-dependant; the law gives 0. It also conflicts with this PR (and #1896) in
severe_disability_minimum_guarantee_addition.pyandtest_carer_support_payment.py. Resolved to this PR's formula and #1896's test file, every #1938 test passes on the merge: 3 Hypothesis properties, including its invariant that the pension-age HB/CTR applicable amount is at least the Pension Credit minimum guarantee, and 122 YAML cases. Suggested order: #1896, then this PR, then #1938 rebased onto it. #1896 now passes on its own: its 143cc3c corrected the CSP test that this PR had previously rewritten, and this PR no longer touches that file.#1946 applies the same kind of conditions to the working-age legacy premium (HB Regs 2006 Sch 3 para 14), with its own qualifying-benefit list and non-dependant helper. It touches none of this PR's files. Its
has_non_dependant_for_severe_disability_premiumis one way to give #1938 the HB-specific residence test.Invariants and tests
Properties (
test_severe_disability_addition_properties.py, Hypothesis, derandomised). Households are generated with a pension-age benefit unit and up to two other benefit units, each single or a couple and possibly with dependants, each person drawn with a disability benefit, blindness, a carer benefit and education.severe_disability_addition_reference.py. A separate agent wrote that reference from the law text without seeing this implementation. Its carer rule was later rewritten as explicit person-to-person matching: brute force within a unit, bipartite feasibility across units. So the reference does not share the implementation's counting formula.Mutation check. Deliberately broken versions of the code were run against the tests, and each was caught:
>instead of>=and reversed tie order, are now caught by new YAML cases.YAML.
severe_disability_residence_and_carers.yamlhas 32 cases, covering:Replace generic child and adult flags with each programme's legal definitions #1896's own SDA cases pass unchanged.
Multi-unit fuzzing. Households of 3-5 benefit units, with interleaved members, age ties, and claimant flags both supplied and derived: 0 mismatches against the reference over about 30,000 benefit units.
Suites on this branch:
Independent review. An Opus reviewer requested changes at bde8f7d (eight findings, all fixed; see the PR comments). It then approved at 214a2fa. Its approval covers:
Its last test gap and wording nits are fixed in 228de58.
Independent audits. Opus agents read the law verbatim and executed every claim; each material finding was re-verified by a second agent.
Impact (real microsimulation runs)
Enhanced FRS 2024-25 (policyengine-uk-data 1.57.4, file sha256
03fe15e4...), policyengine-uk 2.102.6. Each figure compares two fullMicrosimulationruns of the named commits; nothing is scaled. The harness records the commit, dirty files, package versions and dataset hash.This PR against #1896 (
143cc3c4→214a2fad; 228de58 changes only tests and documentation), £m:In 2026:
impact/counterfactual_carers_only.py). All of those units also fail the residence test, so with both rules applied, carer attribution changes the addition for only 1.4k further benefit units, none of them on Pension Credit.Everything together (#1896 + this PR + #1938) against main, £m:
The Pension Credit total in 2026 splits as #1896 −£109.4m and this PR −£63.2m. #1938 against main adds +£1.5m, from its own change to this variable. This PR's formula replaces that change, so #1938 adds nothing further to Pension Credit once this PR is in (pair C equals pair B). #1938's HB and CTR effects are in its own PR. The UC line comes from #1896.
Reconciling the 2026-09-30 prototype (R2), which estimated Pension Credit −£182.75m in 2026.
e433e532...), a real run of Replace generic child and adult flags with each programme's legal definitions #1896 + this PR + Give pension-age HB and CTR the severe disability premium Pension Credit uses #1938 gives −£175.8m. On the canonical 1.57.4 file it gives −£172.6m.is_adultin place of claimant/partner;Follow-ups (not in this PR)
axiom: uk/regulation/uksi/2002/1792/schedule/I TheAxiomFoundation/rulespec-uk#360 queued; uk/regulation/uksi/2006/214/schedule/3 TheAxiomFoundation/rulespec-uk#383 queued
🤖 Generated with Claude Code