Conversation
Codex review — changes requiredReviewed commit code-1 — [P1] Cap the disregard against earnings after statutory deductionsThe new cap at Cap using the nonnegative net earnings available at this stage and add a low-earnings/pension-contribution regression that asserts the final award. The property tests currently construct gross-only earnings and so do not challenge this deduction ordering. Confidence: high; current-head code, source rule and final award reproduction agree. Policy/source review independently confirms the ordering in regulation 17A(4A), regulation 17(9) and Schedule VI. The code and policy reports describe the same defect, counted once. The standard/higher disregard amounts and category conditions were corroborated. The required correction is the cap's placement after statutory deductions. Validation: 43 focused tests passed. A separate executed household diagnostic reproduced the £60 final Pension Credit overpayment described above. Three official source originals were inspected and their cached bytes verified. Existing passing tests do not cover the failing net-earnings ordering. No material review gaps remain within this scope. Focused tests used an existing cached Python 3.13 environment (Core 3.32.9, NumPy 2.1.3, pandas 2.3.1, microdf-python 1.2.1, Hypothesis 6.168.2, pytest 8.4.2) with this PR’s isolated source snapshot. No dependencies were installed; this was not a freshly synced lock environment or a full-suite/population run. This is a review comment, not a formal GitHub review vote. Live check before posting (2026-10-02T10:35:18.903311+00:00): same commit, CLEAN; all reported CI checks pass. |
|
Review pass (Claude Code, on Vahid's behalf) at Short version: the Schedule VI amounts, categories and dating are right, but the cap needs to move. I agree with the Codex review's blocking finding and reproduced it independently. Everything else is small. 1. Blocking: cap the disregard at net earnings, not gross.
2. Nit: Sch VI para 6 isn't mentioned. Earnings from an employment that ended before the claimant first became entitled to Pension Credit are disregarded in full (other than reg 17(9)(b) amounts). The model can't see when an employment ended, so listing para 6 under "Not modelled" next to paras 2-2B would be enough. 3. Nit: coordination with #1896. The claimant-or-partner test reads Checked and correct:
|
20 pounds a week for a lone parent (para 1), a carer satisfying Sch I para 4 (para 3), or a claimant or partner on a listed disability benefit or certified blind (para 4(1)); otherwise 5 pounds single and 10 pounds couple (para 5); at most 20 pounds (para 4A), never more than the earnings. Refs #1954. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2019) Reg 17(9) disregards the Sch VI sums in calculating the claimant's earnings, which are net of income tax and NI (reg 17(10)) and of half of pension contributions (reg 17A(4A)). Capping at gross earnings let a taxpayer's first pounds of earnings raise Pension Credit. Income tax on earnings is the lesser of the person's income tax and the basic rate on their earnings. Also: the carer condition reads the claimant's or partner's is_carer_for_benefits (Sch I para 4), not the carer addition, which counts dependants; is_claimant_or_partner after #1896; property tests compute net earnings independently, include dependants' DLA and caring, and add that earning more never raises Pension Credit; parameter description and test comment fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2c87cee to
3d4f12b
Compare
Part of #1954 (its bullet "
pension_credit_incomeapplies no Sch VI earnings disregards").The law
SPC Regs 2002 reg 17(9) disregards the sums in Schedule VI from the claimant's earnings (legislation.gov.uk, current and as-made texts, read 2026-10-01):
The amounts have not changed since 6 October 2003. ESA was added to para 4(1)(a) on 27 October 2008 (SI 2008/1554), and PIP and AFIP on 8 April 2013 (SI 2013/388, SI 2013/591).
What changes
gov.dwp.pension_credit.earnings_disregard:standard(SINGLE £5, COUPLE £10);higher.amount(£20);higher.disability_benefits, a dated person-level list: IB, SDA, AA, DLA; contributory ESA from 2008-10-27; PIP and AFIP from 2013-04-08;higher.disability_benefit_unit_benefits: income-related ESA, held on the benefit unit, from 2008-10-27.pension_credit_earnings_disregard: min(net earnings, 52 × weekly amount).is_claimant_or_partner) is a carer (is_carer_for_benefits, i.e. Sch I para 4), is on a listed benefit, oris_blind. Otherwise it is £5 or £10 byrelation_type.pension_credit_incomesubtracts it, after tax, NI and half of pension contributions, floored at 0.Tests
pension_credit_earnings_disregard.yaml: 17 hand-computed cases (2024-25). They include a taxpayer whose disregard is capped at net earnings (Pension Credit income £14,514 with £1,040 of earnings and without), and a dependant's caring that doesn't qualify a couple. They cover single £5, couple £10, attendance allowance, partner's PIP, carer, lone parent, blind, both partners qualifying (para 4A cap), the earnings cap, self-employment, no earnings, a dependent child's DLA not qualifying, income-related ESA, and the effect on the guarantee credit.tests/test_pension_credit_earnings_disregard_properties.py(Hypothesis) checks six properties:The lists are tested as parameters because the model cannot compute severe disablement allowance before April 2015.
Updated expectations, with the arithmetic in comments:
pension_credit_income.yaml"All income sources are included" (343 → 214): the contributory-ESA £20 amount, capped at the £129 of net earnings.claimant_partner_income_and_carers.yaml(from Replace generic child and adult flags with each programme's legal definitions #1896): a couple who are both carers get £1,040 disregarded. PC income goes 8,579 → 7,539 and savings credit income 8,279 → 7,239.The Pension Credit and local authority YAML suites (178 cases) and the property tests pass locally. CI runs the full suite.
Measured impact (real runs)
The PolicyEngine/policyengine-uk-data#510 build D Enhanced FRS (2024-25), calibrated weights, GB. main 3c48247 (after #1896) against this branch:
It does not change which FRS Pension Credit reporters are entitled. The reporter gap comes from imputed capital; see #2018 (merged) and PolicyEngine/policyengine-uk-data#513.
Review
An independent Opus 5.5 review (Subfleet) of the first head asked for changes:
pension_credit_earnings.A delta review of the new head is pending.
axiom: TheAxiomFoundation/rulespec-uk#414 queued (SPC Regs 2002 Sch VI; the corpus cannot yet ingest a Roman-numeral schedule)
🤖 Generated with Claude Code