Repository navigation
Use the State Pension Credit qualifying age, and start-of-year status for Class 4 NI - #1907
Conversation
… for Class 4 State Pension Credit Act 2002 s.1(6) sets the qualifying age as a woman's pensionable age, and for a man that of a woman born on the same day. Pension Credit, Universal Credit (WRA 2012 s.4(1)(b), (4)), Housing Benefit (reg 5 of SI 2006/213 and 2006/214; SI 2014/1230 reg 6A(4)), Council Tax Reduction pension-age schemes, Income Support (SSCBA 1992 s.124(1)(aa)), the benefit cap's pensioner exception and Winter Fuel Payment (SI 2000/729 reg 2(1)(b)) now use it instead of the person's own pensionable age. They differ only for men born before 6 December 1953, so only in 2018-19 and earlier. Class 4 NI (SI 2001/1004 reg 91(a)) now excepts only people over State Pension age at the beginning of the tax year (6 April), not on 6 October. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…more tests - is_benefit_cap_exempt_other: say the cap has no age exception and that exempting any unit with a member over the qualifying age misses Universal Credit mixed-age couples (UC Regs 2013 reg 3(2)(a)); behaviour unchanged. - council_tax_reduction_household_has_pensioner: note the unmodelled "not on UC, IS, JSA(IB) or ESA(IR)" limb of SI 2012/2885 reg 3(1)(a)(ii). - is_pension_credit_eligible and YAML case 13: s.4(1A) is in force from 15 May 2019 (SI 2019/37 art. 3); the model applies it in every year. - ni_class_4_liable: label the 6 April reading as an interpretation; name the six-month offset MONTHS_FROM_TAX_YEAR_START_TO_MID_YEAR (also used by the Savings Credit age test). - Changelog and docs: describe the benefit cap as reaching only working-age HB and UC, and point the qualifying-age entry to the Class 4 entry. - Tests: YAML cases 14-20 pin the HB and CTR applicable amounts, HB tariff income and capital, the guarantee credit route and Pension Credit capital (4 of the 7 fail on the parent commit; 3 are controls). A property test now samples only the cohort where the two ages differ (men born 6 April 1950 to 6 December 1953, 2015-16 to 2018-19) and also checks the pension-age CTR allowance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Class 4 "stops from the first tax year that begins on or after the day State Pension age is reached", matching the 6 April reading. The cohort property test samples births up to 5 December 1953, the last day rule (1) covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Overlap with #1940 (mixed-age couples, SI 2019/37). #1940 routes |
|
Coordination with #1944 (mixed-age couples on UC: benefit cap and CTR pensioner status). #1944 rewrites the two
Whichever lands second should:
A review agent merged the two branches in a scratch clone and took #1944's side of the two conflicting files. #1907's consumer assertion then failed for men born 1951-53 in 2017, because the new variables still read 🤖 Generated with Claude Code |
#1895 described ni_liable as covering primary Class 1, Class 2 and Class 4. Class 4 now uses ni_class_4_liable (status at 6 April, SI 2001/1004 reg 91(a)), so ni_liable covers primary Class 1 and Class 2 only. The National Insurance docs page states the Class 4 age rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed: not ready. The law is right. SPCA 2002 s.1(6) gives men born before 6 December 1953 a qualifying age earlier than their own pensionable age. Reg 91(a) makes Class 4 depend on status at 6 April, and
Verified: I read SPCA s.1(6), SI 2001/1004 reg 91, SSCBA s.17(2)(b) and NIM24510. SSCBA Sch 2 para 6 is about interest; the age exception is reg 91(a). I checked Class 4 case 1 by hand: (30,000 − 12,570) × 6% = £1,045.80. The new and #1899 YAML tests passed (69/69). The new Python tests and |
|
Composition note: #2015 (stacked on #2009 → #2006) deletes |
|
Coordination with #2076, stacked on #2027. #2076 removes the unused benefit sums from Whichever lands second: keep this PR's age or earnings test, and drop the |
Preserve claimant and partner routing, mixed-age couple savings, and shared Housing Benefit and Council Tax Reduction switches while using the State Pension Credit qualifying age. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retain the shared timetable refactor with upstream month arithmetic, fractional age precedence, birthday defaults, and unchanged dependency tests. Dependency changelog fragments remain identical to the dependency head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Make Winter Fuel Payment follow qualifying age before September 2024 and pensionable age afterwards, including reforms that separate those ages. Assert the historical couple is not mixed-age and reuse the loaded country model in qualifying-age properties without changing expectations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve all assertions, strategies and example counts while suppressing the slow-generation health check already handled by the State Pension age dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the shared Housing Benefit regime for applicable allowances, tariff, guarantee-credit passports and capital-limit selection, and the per-family CTR pensioner predicate for applicable allowances. Preserve rates and claimant/partner structure, add focused historical and component regressions, and clarify public metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep legacy income and capital passports from main alongside the pension-regime guarantee-credit condition, and correct the independent carer overlap reference at the strict 6 April 2016 State Pension cutoff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retain main earnings disregards and module-release follow-up alongside the qualifying-age changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Incorporate the dependency clean merge of main without rewriting the existing qualifying-age commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Welsh regulation 3 excludes UC recipients from pensioner status. Assert the corrected shared-model allowance explicitly and retain the documented, separate UC-specific calculation gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One textual conflict, in the National Insurance notebook: main's Class 4 profits and losses text (#1919) is kept, followed by this branch's sentence on Class 4 liability ending at State Pension age. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's #1938 picked the pension-age premium schedule for HB, CTR and Income Support when any member was over State Pension age, while this branch moves the HB and CTR allowances to their own statutory tests (HB(SPC) Regs reg 5; the CTR pensioner tests). A mixed-age couple on Universal Credit then got the working-age allowance with pension-age premiums. Each programme now chooses the schedule with the test that chooses its allowance; Income Support, whose Schedule 2 is a working-age schedule, uses the working-age premiums; and the pension-age severe disability premium follows the qualifying age of a claimant or partner. Also folds the build's changelog fragments into this PR's own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@vahid-ahmadi, thanks. All four items are addressed at
Merging current main also exposed one interaction with #1938. Its premium switch (any member over State Pension age) disagreed with the HB and CTR allowance switches, so a mixed-age couple on Universal Credit got working-age CTR allowances with pension-age premiums. Each programme now picks its premium schedule with its own regulations' test ( 🤖 Generated with Claude Code |
SSCBA 1992 s.124(1)(aa) requires that the claimant has not attained the qualifying age for State Pension Credit, and either member of a couple can claim, so a mixed-age couple can claim through the younger partner. The test barred the family if any member had attained the qualifying age. s.124(1)(g) separately bars Income Support where the other member is entitled to State Pension Credit; reading the Pension Credit amount would be circular, so the couple is taken to be on it where it meets the Pension Credit age conditions and would claim it. Adds three YAML cases: the 2017 cohort couple with and without a Pension Credit claim, and a mixed-age couple in 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests The age test and the carer test could be met by different members of a couple: the younger partner under the qualifying age and the older one a carer. SSCBA 1992 s.124(1)(aa) and (e) and IS Regs 1987 Sch 1B require the same claimant to meet both, so the formula now finds a claimant or partner who is under the qualifying age and a carer (or the lone parent of a young child). Carers who are neither claimant nor partner no longer count. Adds Case 24 (only the older partner is a carer: ineligible) and Cases 25-26, which show the Pension Credit proxy barring Income Support for a couple whose income is too high for Pension Credit, and that Income Support is nil for that couple anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's #1945 adds HB(SPC) Regs reg 27 (savings-credit-only awards) next to the Guarantee Credit passport in housing_benefit_applicable_income and housing_benefit_assessable_capital. Both files keep #1945's reg 27 branch and this branch's routing of the passport through the HB regulations switch; reg 27 also applies only where the pension-age regulations do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-age regulations HB(SPC) Regs 2006 reg 27(5) lifts the tariff income rule for a savings-credit-only award, within the pension-age regulations. The main merge gated #1945's income and capital branches on housing_benefit_pension_age_regulations_apply, but the tariff branch merged automatically without it. Adds a component routing case that fails without the gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged under decision d751 (merge after #1899 once CI is green on the head, an independent review approves it and the impact is stated) and Max's PE-UK merge-on-gates rule.
|
One conflict, in income_support_eligible.py. Main's #1907 rewrote the Income Support conditions: the carer limb now needs a claimant or partner who is under the qualifying age for State Pension Credit and a carer (SSCBA 1992 s.124(1)(aa) and (e), IS Regs 1987 Sch 1B para 4). That already contains this branch's rule (a claimant or partner carer, not any member), so the formula and its comments are main's. The reference tuple is the union of both sides: Sch 1B, reg 4ZA, s.124 and Claims and Payments Regs 1987 reg 4. Main also brought in a fix for the read-only cache test fixture with policyengine-core 3.32.16 (#2125), which failed this branch's last CI run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After merging main, income_support_eligible's formula is main's (#1907), which already opens the carer route only through a claimant or partner, who must also be under the qualifying age for State Pension Credit. Main's changelog records that, so this branch no longer claims it. The branch keeps its Income Support route tests and two extra references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main (#1907) split Class 4 out of ni_liable into ni_class_4_liable: Class 4 is due for the whole tax year from anyone not over State Pension age on 6 April (SI 2001/1004 reg. 91(a)). The floor's notional NI still multiplied Class 4 by ni_liable, so a claimant who reaches State Pension age between 7 April and 6 October paid Class 4 on their actual profits but had none deducted from the threshold. In 2026 that is everyone aged 66 with the default birthday: notional NI 0 against 633.73, a floor 633.73 too high. Class 1 and Class 2 keep ni_liable; Class 4 uses ni_class_4_liable, matching the model's actual contributions. An exhaustive check over ages 16-80, birthday months 0-11, 2020, 2026 and 2027 and both NI bases finds no difference from ni_class_2 + ni_class_4 or ni_class_1_employee on the threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
is_uc_eligible tests has_attained_state_pension_credit_qualifying_age since #1907, not State Pension age. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main (255 commits) moved State Pension age into utils/state_pension_age and added the State Pension Credit qualifying age (#1907), each deriving the birth from age and months_since_last_birthday. Resolved so every date-of-birth rule shares utils.dates.birth_instant (date_of_birth where given, 0 = not given, invalid input rejected): - state_pension_age and state_pension_credit_qualifying_age take the instant from birth_instant; - months_since_attaining now takes the birth instant and year, and months_since_state_pension_age and has_attained_state_pension_credit_qualifying_age pass it; - meets_savings_credit_age_requirement's "attained 65" uses it too; - utils.state_pension_age.date_of_birth reuses birth_instant_from_age; - the mixed-age saving keeps main's SPC qualifying age condition with this branch's 5 February 1954 date cutoff. Without a date_of_birth input every result is main's. Also narrows the UC born_before reference title (Sol review nit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #1896, #2001 and #1907 among others. Two conflicts: - income_support_eligible.py: keeps this branch's rule (the award holder is the claimant or partner who reports Income Support, and must be in a covered prescribed category, under the qualifying age and without contributory ESA; income-related ESA read for the claimant and partner only; capital test unchanged). Takes main's age test (has_attained_state_pension_credit_qualifying_age instead of is_SP_age) and main's s.124(1)(g) bar (meets_pension_credit_age_conditions and would_claim_pc), with its comment, and says so in the documentation. - income_support_carer_route.yaml: keeps main's para 4(a)/(b) header and its new para 4(a) case, and this branch's award-holder wording and the partner case with the award on the caring partner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #2009, #2006, #1944, #1907, #2033 and the rest of main since 4b84ea0. Each claim's scheme and non-dependant exemption still follow its own family's council_tax_reduction_pensioner and council_tax_reduction_applicant_has_non_dep_exemption, read on is_council_tax_reduction_applicant_or_partner, for every claim. - council_tax_reduction_pensioner: keeps #1944's reg 3 test (#1907's qualifying age, the IS/JSA/ESA and Universal Credit conditions) on this PR's applicant-and-partner members. - #2006's joint-claims-only machinery is replaced by the per-family rule it anticipated: council_tax_reduction_claim_pensioner, council_tax_reduction_claim_scheme_supported and _legacy.single_claim_is_pensioner are removed, and nothing reads council_tax_reduction_claims_are_joint for a scheme or an exemption. council_tax_benefit keeps this PR's reconciliation. - council_tax_reduction_household_has_pensioner is deleted again. - simulated_council_tax_reduction_benunit keeps main's council_tax_reduction_assessable_capital. - Tests on main that read the deleted flags now read the per-family ones: council_tax_reduction_pensioner.yaml, joint_liability.yaml, state_pension_credit_qualifying_age.yaml and four property tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #1906
#1899 (State Pension age by date of birth), which this PR builds on, has merged. This branch merges main
2105816c(after #1945 and #2079), so its diff against main is its own change.Summary
Two statutory age tests read the wrong State Pension age status. The statutes below were all read on legislation.gov.uk for this PR.
1. The qualifying age for State Pension Credit
State Pension Credit Act 2002 s.1(6): "the qualifying age" means "(a) in the case of a woman, pensionable age; or (b) in the case of a man, the age which is pensionable age in the case of a woman born on the same day as the man." A man born before 6 December 1953 has a pensionable age of 65 (Pensions Act 1995 Sch 4 para 1 rule (1)). His qualifying age is earlier: the day table 1 gives a woman with his date of birth. The model used his own pensionable age (
is_SP_age) wherever the law uses the qualifying age.state_pension_credit_qualifying_age: Set State Pension age from date of birth, including the rise to 67 #1899's timetable without the male rule.has_attained_state_pension_credit_qualifying_age: whether that age is reached by 6 October, likeis_SP_age.state_pension_ageintopolicyengine_uk/utils/state_pension_age.py, so both ages share one implementation, including Set State Pension age from date of birth, including the rise to 67 #1899's month arithmetic, fractional-age precedence and six-month birthday default. Set State Pension age from date of birth, including the rise to 67 #1899's tests are unchanged.meets_pension_credit_age_conditions(Pension Credit, new-claim Housing Benefit and Universal Credit read it),pension_credit_assessable_capital,is_mixed_age_couple, both age checks inhas_mixed_age_couple_pension_credit_savingis_uc_eligiblehousing_benefit_pension_age_regulations_apply(which HB regulations apply)housing_benefit_applicable_amount,_tariff_income,_assessable_capital,_applicable_income), and the HB premium schedule (benefits_premiums)council_tax_reduction_pensioner, and through it the CTR allowance and premium schedule (council_tax_reduction_applicable_amount)income_support_eligible, and the Income Support premiumspension_age_severe_disability_premiumis_benefit_cap_exempt_otherwinter_fuel_allowanceni_liable(Class 1 employee, Class 2),state_pension_type,additional_state_pension,meets_savings_credit_age_requirement(SPCA s.3(1)(a): "has attained pensionable age before 6 April 2016"), Scottishpawhp(SSI 2024/351 reg 6: "has reached pensionable age"), HBAI pensioner statusThe unused
has_pensionerreads ofis_SP_ageinis_benefit_cap_exempt_earningsandis_benefit_cap_exempt_health_disabilityare removed.Premium schedules. Main's #1938 chose the pension-age premium schedule for HB, CTR and Income Support whenever any member of the family was over State Pension age, while the allowances above follow each programme's own regulations switch. Combined, a mixed-age couple on Universal Credit got the working-age CTR allowance with the pension-age premiums. Each programme now chooses its premium schedule with the test that chooses its allowance (
490614677), and a new YAML case pins that couple.2. Class 4 National Insurance at the start of the tax year
SI 2001/1004 reg 91 excepts "any earner who (a) at the beginning of a year of assessment is over pensionable age".
ni_class_4andni_class_4_mainuseddefined_for = "ni_liable", which is status on 6 October, so they excepted anyone who reached State Pension age between 6 April and 6 October. HMRC NIM24510: "A person who attains State pension age during the course of the year of assessment remains liable for Class 4 NICs for the whole of that year."ni_class_4_liable=over_16and not (months_since_state_pension_age≥ 6), since 6 April is six months before 6 October (MONTHS_FROM_TAX_YEAR_START_TO_MID_YEAR). Class 4 now uses it in place ofni_liable.ni_class_4_liable's documentation and the State Pension docs say so; explicit birthday-month inputs and fractional ages place the birthday elsewhere.ni_liablenow covers primary Class 1 and Class 2 only; its label and documentation say so, and the National Insurance docs page states the Class 4 age rule. Employee Class 1 stays onni_liable: SSCBA 1992 s.6(3) stops primary Class 1 on earnings paid "after he attains pensionable age".over_16condition is kept. Reg 93's under-16 exception applies only on application for a certificate.Invariants (stated and tested)
test_state_pension_credit_qualifying_age.pyreuses Set State Pension age from date of birth, including the rise to 67 #1899's differential population: births every third day from 1945 to 1984 plus both sides of every statutory boundary, both sexes, 13 fiscal years. Set State Pension age from date of birth, including the rise to 67 #1899's statute-text reference (reference_attainment_day) shares no code with the model. For every person, the model's qualifying day equals that reference's day for a woman born the same day, and status on 6 October follows it.ni_class_4_liableequals "attains pensionable age after 6 April" (reference day vs 6 April), for every person and year.has_attained_state_pension_credit_qualifying_age⊇is_SP_age, with equality in every year from 2019-20. A companion test checks that 2015-16 to 2018-19 do contain people where the two differ, all of them men born before 6 December 1953, so the checks are not vacuous.severe_disability_premium; below it, nil. The HB premiums follow the pension-age schedule exactly when the pension-age HB regulations apply, which needs the qualifying age.months_since_state_pension_age< 6; anyone under State Pension age on 6 October is liable; Class 4 is positive exactly when liable (profits of £60,000).YAML tests:
state_pension_credit_qualifying_age.yaml(26 cases, including men born 1950-1953 in 2015-16 to 2018-19, the 6 December 1953 boundary, a woman born the same day, and a couple both born 6 June 1953 who are not a mixed-age couple; every expected day comes from Sch 4 para 1 table 1);ni_class_4_liable.yaml(9 cases, including the issue's example: born 6 June 1960, State Pension age 6 September 2026, pays (30,000 − 12,570) × 6% = £1,045.80 for 2026-27 and nothing for 2027-28, and exactly on 6 April 2025); new cases for the HB regime routing (housing_benefit_pension_age_means_test.yaml), the CTR pensioner test including the Welsh mixed-age couple on Universal Credit, Winter Fuel Payment's two dated tests, the mixed-age couple on Universal Credit inpension_age_premiums.yaml, and six mixed-age Income Support cases (Cases 21-26 instate_pension_credit_qualifying_age.yaml: the 2017 cohort couple with and without a Pension Credit claim, a couple in 2026, a couple where only the older partner is a carer, and a pair showing that the Pension Credit bar applies to a couple whose income is too high for Pension Credit, where Income Support is nil anyway).Tests run locally: on
43a52e25, all 2,245 YAML cases underpolicyengine_uk/tests/policy; on94dad0c1, the same YAML (2,244) underpolicyengine_uk/tests/policy, and 1,984 pytest (one existing xfail) across the qualifying-age, State Pension age, severe disability premium and addition, pension-age HB, HB savings-credit-only, benefit cap and CTR, mixed-age couple, UC State Pension, means-test income and HB passport property files and the code-health tests. CI runs the full suite.Microsimulation impact
Real
Microsimulationruns on the Enhanced FRS 2024-25 (policyengine-uk-data 1.57.4, SHA-25603fe15e4…68d4): main2105816cagainst this branch at43a52e25.94dad0c1, and earlier heads against main6ae9c5ee, gave identical totals. Changes, this branch minus main:Review
vahid-ahmadi's review of 1 October:
state-pension-age-67-phase-in*changelog fragments are no longer in this PR's diff.meets_pension_credit_age_conditions,is_mixed_age_couple,housing_benefit_pension_age_regulations_applyandcouncil_tax_reduction_pensioner, and both age checks in the SI 2019/37 saving inference. Main's claimant and partner roles, the saving, and Apply the benefit cap to mixed-age couples on Universal Credit, and keep them off pensioner Council Tax Reduction #1944's Universal Credit and legacy-benefit exclusions are kept. The HB and CTR means tests now read those switches too (table above), and the consumer property tests pass.ni_class_4_liableand the State Pension docs (see Class 4 above).An independent review of
490614677(Subfleet, GPT-6.1 Sol) found the law-to-code mapping, the semantic merges and every impact figure correct, and asked for three changes: Income Support's age test applied to the whole family rather than the claimant (fixed ina4b9f73a, with the s.124(1)(g) Pension Credit bar and three YAML cases); the description's claim about the earliest dataset (narrowed above); and two wordings (the change in who has attained the qualifying age, and what the cohort property samples), both fixed. Its review ofa4b9f73afound that the age and carer conditions could be met by different members of a couple;32a6c175requires the same claimant to meet both (Cases 24-26).94dad0c1merges main after #1945 (HB(SPC) reg 27, savings credit only): its rule is kept next to this branch's Guarantee Credit passport routing and applies only where the pension-age regulations do. The review of94dad0c1found the tariff income part of that rule (reg 27(5)) still ungated after the automatic merge;43a52e25gates it, with a routing case that fails without the gate.Earlier rounds: three independent Opus 5.5 reviews (Subfleet) approved
aa45dd76,b9d8573dandcae31319/09ec4bf0; their findings were addressed in those commits.Caveats and follow-ups
agedrate (£181 a week for 2015-16 to 2020-21). Not changed here.Axiom parity
axiom: uk/statute/ukpga/2002/16/1 encoded-correct (
uk/statutes/ukpga/2002/16/1.test.yamlcaseman_uses_woman_same_birthday_age: a man's qualifying age is a woman's pensionable age for the same birthday)axiom: uk/statute/ukpga/2012/5/4 encoded-correct (
uk/statutes/ukpga/2012/5/4.test.yamlcaseperson_does_not_meet_basic_conditions_after_reaching_state_pension_credit_qualifying_age_without_exception; the qualifying age is a leaf input)axiom: uk/statute/ukpga/1995/26/schedule/4/paragraph/1 TheAxiomFoundation/rulespec-uk#369 queued (computing pensionable age, and so the qualifying age, from date of birth)
axiom: uk/regulation/uksi/2006/213/5 TheAxiomFoundation/rulespec-uk#370 queued (which Housing Benefit regulations apply, and new claims)
axiom: uk/regulation/uksi/2001/1004/91 TheAxiomFoundation/rulespec-uk#373 queued
🤖 Generated with Claude Code