Repository navigation
Conversation
435fc43 to
96ed76e
Compare
|
Consolidated the complete #2231 historical under-65 implementation into this PR and rebased on main. Corrected the three existing HB regression expectations; the same tests now document CTR's shared higher-rate parameter and unchanged historical category approximation. No new inputs or CTR formula changes. All four relevant YAML files passed sequentially: 5 + 26 + 12 + 13 = 56 tests. Formatting/lint and git diff --check passed. No full suite or CI polling. This PR now references both tracking issues #2206 and #2230; #2231 is superseded. |
Resolves the conflicts with #1913's pension-age cohort split. The three aged.yaml histories keep this branch's 2015-16 to 2019-20 values (now each cited, with SI 2019/480 Sch 4 and SR 2019/58 Sch 4 for 2019-20) and main's 2020-21 to 2026-27 values, uprating and references. The applicable-amount formula applies the historical under-65 selector to the higher allowance and then #1913's cutoff split. The historical HB tests state the claimant's pre-cutoff cohort, since parameter processing backdates the 2021 cutoff to 2015 and a unit given no person ages would otherwise read as the later cohort. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hand-off: merged main after #1913 (backlog job B, 23 Oct 2026)Head: What I changed
Tests (locked env, core 3.33.2)
Impact: only 2015-16 to 2018-19 HB (and CTR pensioner) allowances change. 2019-20 and later read unchanged values, so the aggregate-impact years see £0. Open items
|
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)
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 84 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
|
Fixes #2206
Fixes #2230
Combines the complete changes from #2207 and #2231 into this PR: approved plan A2's historical higher pensioner allowances and B1's former under-65 category. #2231 is superseded; both tracking issues remain open until this PR merges.
Changes
Correct the three existing higher-category allowance histories for 2015–18. Single/lone-parent weekly amounts are £166.05 / £168.70 / £172.55 / £176.40; couple amounts are £248.30 / £252.30 / £258.15 / £263.80. The 2019-20 entries (£181.00 single and lone parent, £270.60 couple) are unchanged and now cite SI 2019/480 Schedule 4 and SR 2019/58 Schedule 4; main's 2020-21 and later entries are untouched.
Add the three historical under-65 parameter documents and route qualifying pension-age-regulation families by eldest claimant/partner age. Lower single/lone-parent amounts are £151.20 / £155.60 / £159.35 / £163.00; couple amounts are £230.85 / £237.55 / £243.25 / £248.80. Each document contains the amount and independently sourced GB/NI category-ending dates. Explicit zero parameter reforms remain zero.
Government citations appear at each dated value: GB 2015, 2016, 2017, 2018, with matching NI 2015, 2016, 2017, 2018.
GB removes the lower category on 6 December 2018, under SI 2017/1187 regulations 1 and 7. NI's 2019 replacement table removes it from 1 April 2019. The annual calculation retains the established 30-April sampling: fiscal year 2018 retains the category, 2019 no longer does. This does not reconstruct within-year age or household histories.
Update existing qualifying-age and scheme-routing regression tests: the 64-year-old HB claimant receives £155.60 × 52 = £8,091.20 in 2016 and £159.35 × 52 = £8,286.20 in 2017, not the previously asserted later-year £9,412.
Scope and dependencies
13 changed files, no new inputs. Includes both original Towncrier fragments. No change to CTR formulas, datasets, deferred child allowances or future-cohort rules.
CTR's existing formula reads the same higher-category HB parameters. Consequently its historical outputs change with this rate correction, and the matching regression assertions now reflect £8,772.40 / £8,972.60. Its existing omission of the under-65 category is not fixed here; the test comments explicitly identify those CTR outputs as an unchanged approximation rather than the statutory lower-category amounts.
#1925 and #1913 have merged; this branch now merges main (below). #2092 still edits the same three
aged.yamlfiles (2025-26 citations and the protected-allowance uprating), so whichever of #2092 and this PR lands second needs a small merge; both keep each other's values. This consolidation eliminates the separate #2207 → #2231 merge dependency.Merge with main after #1913 (23 Oct 2026)
Merged
origin/mainata45baf5e4into this branch with a merge commit (no rebase or force-push).aged.yaml(single, couple, lone parent). Kept this PR's 2015-16 to 2018-19 values, cited the 2019-20 values as above, and kept main's 2020-21 to 2026-27 values, its lagged-CPI uprating and its references. The descriptions now say that before December 2018 (GB) and April 2019 (NI) the higher rate excluded units where the claimant and any partner were under 65.housing_benefit_applicable_amount. The under-65 selector now sets the higher (pre-cutoff) allowance, and Split pension-age Housing Benefit allowances by when State Pension age was attained #1913's split then gives units where neither member attained State Pension age before 1 April 2021 theaged_from_cutoffrate. Both age limits are 0 from 2019-20 at the 30-April reading, so the selector does nothing from then on and Split pension-age Housing Benefit allowances by when State Pension age was attained #1913's routing is unchanged.housing_benefit_pensioner_history.yamlandhousing_benefit_applicable_amount.yamlnow statehousing_benefit_attained_pension_age_before_cutoff: true. Parameter processing backdates every parameter's first value to 2015-01-01 (BACKDATED_FROMinutils/dated_reforms.py), the 2021 cutoff included. So a unit given onlyeldest_claimant_or_partner_age, with no person ages, read as the post-2021 cohort and got the backdated £177.10 lower rate. All 18 of these cases failed after the merge until the cohort was stated.Legal reading: the 2019 GB table
SI 2017/1187 reg 7(7) omits paragraph (a), the under-65 rows, of the Schedule 3 para 1 table, in force from 6 December 2018 (reg 1). The GB Up-rating Order 2019's replacement table (SI 2019/480 Sch 4) still prints the under-65 rows (£167.25 single or lone parent, £255.25 couple), while NI's (SR 2019/58 Sch 4) does not. This PR keeps the GB category ending on 6 December 2018: that date is the amendment's own, and from it everyone who had attained the qualifying age was 65 or over, so no pension-age claimant could fall in the rows the 2019 table reprints. The last cohort to attain it under 65 (women born 6 November to 5 December 1953) did so on 6 November 2018, and the next attains it on 6 March 2019 aged 65 and 3 months (Pensions Act 1995 Sch 4 para 1, as encoded in
state_pension/age/day_by_birth_date.yaml). The two readings agree for every unit whose ages are consistent.Impact
Only fiscal years 2015-16 to 2018-19 change: main read the 2019-20 rate (£181.00 / £270.60) back to 2015, and these years now get each year's own rate and, for units under 65, the lower rate. 2019-20 and later read unchanged values, so the aggregate-impact years (2025-26 on) are unaffected. CTR's pensioner allowances read the same
agedparameters and change for those historical years too.Validation
Original validation (Anthony, before the merge): 56 cases across the four YAML files, rebased on main
88ecf58b8.After the merge (23 Oct 2026, locked env from
uv sync --frozen --extra dev, policyengine-core 3.33.2, Python 3.13):test_housing_benefit_pension_age_cohorts.py47/47 andtest_consumers_use_the_qualifying_age(births 1945-65, years 2015-2030) pass. Five Hypothesis properties in the HB pension-age, benefit-cap/CTR and CTR young-person modules, which sample 2021 and later, were not run here; CI runs them.uvx ruff format --check .andgit diff --checkpass. No microsimulation run (no effect on the simulated years).Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_pensioner_history.yaml::Higher pension-age single allowance in 2015
axiom: needed