Repository navigation
Conversation
…erson Give the three cost-of-living amounts a zero before 2022, so backdating no longer pays them in 2015 to 2021 (#2847). Pay the means-tested amount to each benefit unit with a benefit listed in section 1(3) of the Social Security (Additional Payments) Acts 2022 and 2023, which leave out Housing Benefit, or with Child Tax Credit or Working Tax Credit and none of those benefits (section 1(2)), at least £26 of a credit for the year in 2022-23 (2022 Act section 2(2)). Pay the £150 disability amount to each person with a listed disability benefit (section 5). The household total adds both to the pensioner payment (#2848). Claude-Session: https://claude.ai/code/session_01WR8LHckHwu75WHHEdzLyNc Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Check every unpaid year in each dates example, both paid years in each decomposition example, and the exact rise when a qualifying benefit unit or person joins a household, all within one simulation per example. Take the £300 pensioner amount from the sources its parameter cites, not from the parameter. Add a 2023 Housing Benefit case. Cite section 4 of the 2022 Act beside section 2(2) for the £26 minimum, make Parliament, the Secretary of State or HMRC the actor in descriptions, test names and docs, move the model-baseline links to the 2022 amounts, and note the leading zero in the future-dating guide. Claude-Session: https://claude.ai/code/session_01WR8LHckHwu75WHHEdzLyNc Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Generated by Claude Code |
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
Standard reform costings (change in gov_balance)
The report suppresses a reform's costing and target change in these years, for the reasons below (
Standard reforms: change in each reform's target
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; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles. Checks failing on both base and head (1)
Counted-once checkEach of 92 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
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
|
|
Ready for hub review
Findings and how I resolved themFrom a review of the first commit on four fronts (the law, code and tests, the writing rules, the brief). A second check confirmed or refuted 6 of the 25 findings; I stopped it there, once I had fixed every remaining finding in
Found while working:
Tests run
Revert and mutation checksRevert (a scratch copy with
Mutation (12 one-line mutants against the final tests): every mutant fails at least one YAML case and at least one property.
Skipped, and why
Judgment calls
Hub documents
Generated by Claude Code |
|
Ready for hub review Verdict: APPROVE WITH NITS at I reviewed FindingsP1None. P2None against this PR. See "Merges and neighbours" for #2302. P31. No YAML case covers a unit on Working Tax Credit alone, so dropping - name: 2022 a benefit unit on £26 of Working Tax Credit alone gets the means-tested payment
# A yearly award of £26 meets section 2(2)'s "at least £26" for 2022-23, and
# the unit has no listed benefit, so HMRC pays £326 + £324 = £650
# (section 1(2)).
period: 2022
input:
people:
worker:
age: 30
benunits:
worker_unit:
members: [worker]
universal_credit: 0
pension_credit: 0
jsa_income: 0
esa_income: 0
income_support: 0
child_tax_credit: 0
working_tax_credit: 26
households:
household:
members: [worker]
winter_fuel_allowance: 0
output:
cost_of_living_means_tested_payment: 650
cost_of_living_support_payment: 650I haven't run this case; it follows the £26 Child Tax Credit case at 2. "the war pension mobility supplement" narrows section 5(2)(i).
Command: 3. The pensioner amount's description names a test the formula doesn't apply.
4. The YAML header turns "not later than 31 October 2022" into a range of qualifying days.
Previous round: the hand-off's findings
The law
Dates
The leading zeros do what the body says: each amount reads zero in 2015 to 2021. A 70-year-old alone with nothing set gets Code
CasesI worked all 11 new cases by hand from the quoted law; each expected value matches:
They cover companion cases C3 to C7 and C9 to C12 of rulespec-uk#532, with the same expected values. C2 matches the existing £650 Universal Credit case. No case covers C8 (a couple on Pension Credit), and C13 and C14 name benefits the model has no variable for. Invariants and mutantsThe five properties match invariants 1 to 3: two for invariant 1 (household, then unit and person), two for invariant 2 (household total, then each unit and person) and one for invariant 3. Invariant 4 has no test, and the body doesn't claim one. Each property sets every input the formulas read, takes its amounts from constants ( I applied each mutant to the scratch worktree, ran
The YAML cases each mutant fails:
For M1, M3, M5 and M12, the failing YAML cases and properties match the hand-off's table. Text
Tests
CI
Merges and neighbours
The fourth expectation is in Python: Checked and sound
What I couldn't check
Generated by Claude Code |
Add a YAML case for a benefit unit on £26 of Working Tax Credit alone, which gets the £650 means-tested payment under sections 1(2) and 2(2) of the 2022 Act. Name the mobility supplement as section 5(2)(i) of each Act lists it, say that the formula pays the pensioner top-up once to each household with a Winter Fuel Payment, and give the 2022 Act's second qualifying day as section 1(4) sets it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22
left a comment
There was a problem hiding this comment.
Reviewed 461b933ca2eb24fa69b4888b4e091d9f24efa02c. COMPLETE — no critical findings or material evidence gaps; one nonblocking reference correction remains.
S1: the newly added pensioner guidance URL in policyengine_uk/variables/gov/treasury/cost_of_living_support/cost_of_living_support_payment.py:21 returns HTTP 404. Replace it with the live official pensioner guidance. The historical amount is corroborated; this is a reference issue, not a cash calculation defect.
The Acts support the per-benefit-unit means-tested and per-person disability payments, separate £26 test for each credit in 2022, couple counting and tax/benefit disregards. The actual filed #532 contract and companion cases were checked. The documented annual receipt proxy remains distinct from exact qualifying-day entitlement.
All 171 focused checks passed. Native annual-proxy cases produced £1,900 in 2022 and £2,400 in 2023 across two qualifying units/two disability recipients, zero in 2021/2024. All five final household/spending measures changed exactly once by those amounts; UC, PC, tax and WFP were unchanged against the labelled control. The initial collection-only external-script typo was corrected before any PR test executed; its log is retained separately. Current-head CI is green.
Approval is withheld while S1 remains open.
GOV.UK returns 404 for the guidance page cost-of-living-payment-pensioner. The variable's reference and the pensioner amount parameter's reference now open the pensioner section of DWP's cost-of-living payment guidance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22
left a comment
There was a problem hiding this comment.
Re-reviewed 90e8418cb883db9a90527dc8e5f76183d31478eb. COMPLETE — no open findings or material evidence gaps. S1 is resolved: both the variable and pensioner parameter now use the verified live official guidance URL and pensioner anchor.
The delta contains exactly those two reference replacements. Python behavior, parameter values and the remaining tracked tree are unchanged. Independent code/source retention checks verified the prior 171 passing checks and native final-income/spending results, current runtime/dependency pins and the actual filed Axiom #532 evidence. No tests or model calculations were rerun; the documented annual entitlement proxy and other scope limits remain.
Approval is deferred because checks at this new head are still running. I will check CI on a later monitor run without repeating the completed code review.
juaristi22
left a comment
There was a problem hiding this comment.
Rechecked 90e8418cb883db9a90527dc8e5f76183d31478eb after CI completed. COMPLETE — no open findings or material evidence gaps. S1 remains resolved.
The head, description, runtime/dependency pins and filed Axiom #532 evidence are unchanged from the completed review. The prior independent policy assessment, 171 passing checks and qualified final-accounting results remain valid; their stored evidence and source bindings were verified without rerunning tests or repeating the code/source investigation. The documented annual-entitlement and other model scope limits remain.
The PR is ready and applicable checks pass at this exact head. Approved.
Fixes #2847
Also fixes #2848.
Reproducer:
policyengine_uk/tests/policy/baseline/gov/treasury/cost_of_living_support/cost_of_living_support_payment.yaml::2021 a household qualifying for every strand gets no Cost of Living Payment,policyengine_uk/tests/policy/baseline/gov/treasury/cost_of_living_support/cost_of_living_support_payment.yaml::2022 a benefit unit on Housing Benefit alone gets no means-tested paymentaxiom: TheAxiomFoundation/rulespec-uk#532 queued
What the code does now
gov.treasury.cost_of_living_supportread zero from0001-01-01until 2022 (Backdating pays the 2022-23 cost-of-living payments in 2015-16 to 2021-22 #2847).backdate_parametersgives each parameter its earliest value from 2015-01-01 up to its first stated date, so the model now pays nothing from 2015-16 to 2021-22, wheremainpays £650, £300 and £150. The 2022, 2023 and 2024 values stay as they were.cost_of_living_means_tested_payment(benefit unit; Cost-of-living payments use the wrong qualifying benefits and pay per household #2848). It dropshousing_benefitfrom that list. A unit with none of those benefits qualifies through the newqualifying_tax_creditslist (Child Tax Credit, Working Tax Credit) when its yearly award of either credit exceeds zero and reaches the newminimum_tax_credit_award: £26 from 2022-01-01 and £0 from 2023-01-01. A unit with a benefit and a tax credit gets one payment.cost_of_living_disability_payment(person; Cost-of-living payments use the wrong qualifying benefits and pay per household #2848).cost_of_living_support_paymentkeeps its name and still gives the household total thathousehold_benefits,hbai_household_net_income,hbai_benefits,gov_spendingandpre_budget_change_household_benefitsread. It sums the two new variables over the household's benefit units and members, and adds the pensioner payment once per household with a Winter Fuel Payment, as before.programs.yaml, we namecost_of_living_support_paymentas the programme's variable and list what the model leaves out.fiscal_partition.yamlkeepscost_of_living_support_paymentas the spending head, with the two new variables inside it. The partition lists components only for tax heads, and its schema test rejects an exclusion that names a spending head, so it needs no new entry. The programme page now describes the new rules,model-baseline.mdlinks to the 2022 values on line 4, and the future-dating guide shows the leading zero.The law
Parliament set out the payments in the Social Security (Additional Payments) Act 2022 and the Social Security (Additional Payments) Act 2023.
The model holds yearly amounts, so it tests receipt over the year, not in the month ending with each qualifying day. Neither Act covers the pensioner payment, which the model still pays once per household.
Invariants
The model keeps these properties for any amounts of the benefits its formulas read.
Tests
cost_of_living_support_payment.yaml: 12 new cases, which we worked by hand from the Acts (each comment shows the sum), and the 4 existing cases, which still pass. Each case sets every listed benefit as an input, because when a case sets none, the model computes Universal Credit for a working-age adult with no income (£4,018.92 in 2022) and Pension Credit for a pensioner with no income.test_cost_of_living_payment_properties.py: 5 Hypothesis properties for invariants 1 to 3, 40 examples each, with up to eight households (sixteen for invariant 3) in one simulation per example, plus pinned households for each rule. The properties hard-code the Acts' lists and amounts and the £300 pensioner amount, and read no model parameter. The two properties for invariant 1 check all 24 unpaid years in each example.main's parameters and variable, without the Working Tax Credit case. All 11 other new YAML cases fail and the 4 existing cases pass. On the household total alone, 8 new cases fail on value: 2021 (£1,100, not £0), the all-strands household in 2022 (£1,100, not £1,750), Housing Benefit alone in 2022 (£650) and 2023 (£900), £26 of Child Tax Credit in 2022 (£0, not £650), a small award in 2023 (£0, not £900), two qualifying units (£1,200, not £2,100) and two people on PIP (£150, not £300). All 5 properties fail, with the pinned households or without them. Without them, Hypothesis shrinks the household property for invariant 1 to one household with a Winter Fuel Payment, whichmainpays £300 in 2015.>at £26, noaward > 0check (so every unit qualifies in 2023), Housing Benefit back on the list, the means-tested or the disability payment once per household, no 2022 minimum, the minimum kept in 2023, each of the three amounts without its leading zero, and the tax credit route paying beside a benefit. Each one fails at least one YAML case and at least one property.test_disable_simulated_benefits_winter_heating.py,test_pawhp_household_income_properties.pyandtest_trading_loss_properties.py(31 tests), and the 5 cases ofwinter_heating_payments_in_income.yaml. None of their properties broke when this branch added the tax credit test. Seven other modules that simulate household income in 2015 to 2023 pass too (105 tests), and so does the whole YAML policy suite (5,478 cases).code_healthpasses on this head (3,095 tests), and so dotest_program_registry.py,test_parameter_descriptions.pyand both fiscal partition modules.ruff format --check,ruff checkandgit diff --checkcome back clean.Impact
The Aggregate impact report covers 2025-26 onwards (
report_spec.yamlsets the horizon at 2025 to 2031), where all three amounts read zero, so it can't show this change. CI's report ate4d61659flags no move, and this change breaks none of its checks. We ran no survey-data simulation for 2022-23 or 2023-24.🤖 Generated with Claude Code