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 87 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
|
SR 2017/242 reg 7(7) omits the under-65 rows of the Schedule 4 para 1 personal allowance table from 6 December 2018 (reg 1(2)(b)), as SI 2017/1187 does in Great Britain. The NI age limits used 1 April 2019, from the 2019 up-rating table. Correct the three NI dates, citations and descriptions and the formula comment, and pin both jurisdictions' end date in a parameter test. Annual parameters are sampled at 30 April, so no annual result changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both sets of cases appended at the same place in housing_benefit_applicable_amount.yaml: this PR's 2015-2019 pensioner allowance cases and main's Schedule 3 paragraph 1 age-band cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge queue marked #2207 unmergeable after main took the Housing Benefit main-phase ESA allowance exception (f044be2). The only conflict is the reference tuple of housing_benefit_applicable_amount, where both sides added citations; the resolution keeps all five. The formula merges cleanly: main adds the ESA adjustment to the return value, and this branch changes the pension-age allowance selection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged main again (UK hub, 24 Oct)The merge queue marked this PR unmergeable at position 3. Main took the Housing Benefit main-phase ESA exception (
It goes back into the queue, pinned to |
main's 3a37c76 added test_omitted_age_component_keeps_existing_higher_allowance, which expects the higher pension-age rate in 2015 and 2020 and notes that the historical rate repair is #2207. This branch is that repair: until 6 December 2018 Housing Benefit paid pension-age claimants under 65 the former under-65 rate (SI 2006/214 Sch 3 para 1(1)(a); ended by SI 2017/1187). With no age input the claimant is 40, so in 2015 the pre-cutoff route now gives that rate. England's pensioner Council Tax Reduction has no such category in the model and keeps the higher rate. The test now derives the Housing Benefit rate from the parameters and asserts that the 2015 case uses the lower under-65 amount. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 removes it on the same day, under SR 2017/242 regulations 1(2)(b) and 7(7); NI's 2019 replacement table no longer has it. 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
14 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 until 6 December 2018 (GB and 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.The pre-2021 cutoff branch
Parameter processing backdates the April 2021 pension-age cutoff to 2015, so the "no cutoff yet" branches in the HB and CTR cohort variables couldn't run in any supported year (#2610). Main fixed that in #2628 (closed #2610 on 24 Oct), and this branch now contains it (below): before 2021 both cohort flags are true. The historical cases above still state the cohort explicitly.
Hub fix (23 October)
The independent review found NI's end date wrong: SR 2017/242 reg 7(7) removes the under-65 rows from 6 December 2018 (reg 1(2)(b)), not 1 April 2019. The hub corrected the three NI age limits, their citations and descriptions, the three
aged.yamldescriptions and the formula comment (23182a190). It pinned both jurisdictions' end date intests/test_hb_under_65_category_dates.py, and merged main (8d85577de), keeping both case blocks inhousing_benefit_applicable_amount.yaml. Annual parameters are sampled at 30 April, so no annual result changes.Merge with main and test update (24 Oct 2026)
037f66919merges main atadbaa87d7. It is clean: the two sides changed different files, and the recorded tree is git's automatic merge. The allowance parameters andhousing_benefit_applicable_amountare byte-identical to the previously reviewed head.3dc9fa220updates main's newtest_omitted_age_component_keeps_existing_higher_allowance(from Restore neutral pre-2021 pension-age cohort flags #2628), whose comment named this PR as the historical repair. With no age input the claimant is 40, so in 2015 the pre-cutoff route now gives Housing Benefit's under-65 rate (SI 2006/214 Sch 3 para 1(1)(a), £151.20 a week, ended by SI 2017/1187 from 6 December 2018). The test now takes the HB rate from the parameters and asserts the lower amount for 2015. England's pensioner CTR still has no under-65 category in the model, so it keeps the higher rate.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).After the 24 Oct merge: an independent delta review (Opus 5.5) approved
3dc9fa220. It rantest_housing_benefit_pension_age_cohorts.pyandtest_hb_under_65_category_dates.py(86 passed), and three mutations of the test and the model, each of which fails. All 18 CI checks pass at this head.Follow-up (separate model gap): England's prescribed pensioner CTR scheme had the same under-65 rows from 2015-16 to 2018-19 (SI 2012/2885 Sch 2 para 1), removed for 2019-20 by SI 2018/1346. PolicyEngine's CTR gives those units the higher rate.
Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_pensioner_history.yaml::Higher pension-age single allowance in 2015
axiom: TheAxiomFoundation/rulespec-uk#383 queued
The historical GB and NI tables, the 6 December 2018 removal and these companion cases are queued as an extension of #383's personal-allowance output: TheAxiomFoundation/rulespec-uk#383 (comment)