Skip to content

Correct Pension Credit and pension-age Housing Benefit projections - #2092

Draft
anth-volk wants to merge 16 commits into
mainfrom
feature/pension-credit-2025-rates
Draft

anth-volk wants to merge 16 commits into
mainfrom
feature/pension-credit-2025-rates

Conversation

@anth-volk

@anth-volk anth-volk commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2083
Fixes #2072
Fixes #2154
Fixes #2155
Fixes #2195

Changes

Merge main eb0b8087d821 (including #2576 and #2207) into Anthony Volk’s 52c96b111efe (merge head 9b0d406723d1), preserving his commits without rebasing or force-pushing.

  • Keep Fix Pension Credit and pension-age Housing Benefit earnings uprating #2576’s dedicated earnings series, published Savings Credit maximum and forecast algebra: higher pension-age HB = guarantee + maximum Savings Credit.
  • Retain this PR’s common projection base derived from the seven enacted guarantee/threshold/protected-allowance paths. An incomplete rates update raises with every path and year; reform dates do not move the enacted base.
  • Generate independent threshold and single/lone-parent/couple allowance indices through standard uprating, retaining explicit reform anchors. Guarantee and phase-in reforms do not re-derive separately set thresholds or HB allowances. Below-guarantee and zero allowance/threshold reforms build; threshold residuals are non-negative.
  • Keep main’s existing non-negative earnings/CPI floors and post-2021 cohort link to earnings; remove the duplicate builders and overlapping changelog fragments.
  • Keep Correct historical Housing Benefit pensioner allowances #2207’s sourced 2015–19 history and all subsequent published rates, including 2025 HB £244.40/£366. The old PR’s 2015 placeholders were 2019 rates: those amounts remain at their correct 2019 dates. Add this PR’s dated GB/NI citations and regression cases.
  • Add the Pension Credit page’s missing uprating link and retain Guarantee Credit boundary regressions.

The two existing builder modules retain main’s formulas and now generate the independent indices before general uprating. tax_benefit_system.py changes only their registration/order and unreformed context, including prior-law projections (archived W1 ownership).

Invariants and evidence

  • Unreformed, each projected higher HB allowance equals the projected guarantee plus the projected Savings Credit maximum in every forecast year: existing Fix Pension Credit and pension-age Housing Benefit earnings uprating #2576 properties plus test_unreformed_higher_allowances_equal_guarantee_plus_maximum_every_year.
  • No projected allowance or threshold is negative under valid finite non-negative monetary/rate reforms; any combination of guarantee, threshold, phase-in and allowance reforms builds: test_combined_reforms_build_and_never_project_negative_amounts (Hypothesis, zero/subnormal/large amounts and future anchors).
  • Enacted amounts reproduce exactly in their years: test_forecasts_reproduce_each_enacted_value_exactly and existing published-rate properties. Independently rounded enacted HB amounts are preserved; the exact forecast identity applies after them.
  • The reconciled and frozen main builders agree wherever main’s behavior is retained: test_reconciled_builders_agree_with_main_where_its_behavior_is_retained (Hypothesis, positive and negative macro paths).
  • Lone-parent independence, below-guarantee/zero reforms, base-year updates and 2035 Guarantee Credit boundary continuity retain focused regressions.

Validation

Locked Python 3.13 environment, policyengine-core 3.33.2 (uv sync --frozen --extra dev). Ruff format/check and static YAML/AST/notebook checks pass; 156 explicit values audited against both sides, with only the three documented #2207 date corrections.

Runtime tests: 0 executed locally. Reservation allows uk-hub, but the host gate closed before tests: load1 123.56 and free disk 33.89 GB; last retry load1 73.14 and free disk 33.81 GB (required <=110 and >=55 GB). The Python projection/CPI/triple-lock tests, prior six failing properties, #2576 tests and Pension Credit/HB/integration YAML suites remain for CI. No mutation run, microsimulation or full docs build.

Impact and runtime validation are pending CI at this head. Prior aggregate reports predate this merge and are not evidence for this head. Keep this PR draft for the hub to undraft and dispatch independent review; do not merge.

Reproducer: policyengine_uk/tests/test_pension_age_projection_invariants.py::test_combined_reforms_build_and_never_project_negative_amounts

axiom: needed

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Anthony. Reviewed at 54e19d2: the fix looks right to me, with a few small points.

All four corrected 2025-26 values match SI 2025/295 art. 29 (£227.10 / £346.60; £198.27 / £314.34; NI SR 2025/64 gives the same), and the explicit 2026 entries match SI 2026/148. Tests pass locally (PC directory 106/106; PC + integration 207/207 when merged into current main), and six of the new tests fail on the old values.

  1. Overlap with #1925. Max's #1925 sets the same four values and makes the same entitledto_scenarios.yaml edit (4,023.20 / 18,048.66), so whichever merges second will conflict. #1925 currently has conflicts with main and this PR is green, so I'd suggest merging this one first and rebasing #1925 on it. That also keeps the tests here and closes #2083, which #1925 doesn't link.
  2. The savings credit tests don't catch the fix. savings_credit.yaml Case 3 passes on the old values too (MG − threshold is 28.83 under both sets), and Case 4 only moves by 1p. A case that separates them: a single person with £11,000 income gets 413.98 on the new values vs 577.78 on the old. A positive eligibility case just above the new threshold would help too; the current eligibility cases are all negative.
  3. Nit: the other 2025 amounts in art. 29 are still off on main (carer £46.40 vs 46.37, severe disability £82.90 vs 83.25, child £67.42 vs 67.60, child disability £36.54 vs 36.68, child severe disability £114.12 vs 114.54). #1925 covers these, so fine to leave them there.
  4. Nit, follow-up rather than this PR: from 2027 the minimum guarantee is uprated by gov.benefit_uprating_cpi (minimum_guarantee.yaml), but SSAA 1992 s.150A(2) requires an increase not less than earnings growth, so projected Pension Credit is understated in later years.
  5. Nit: the docs edit and its revert (b270272 / 54e19d2) could be squashed.

@anth-volk
anth-volk marked this pull request as ready for review October 5, 2026 14:36
@anth-volk
anth-volk requested a review from vahid-ahmadi October 5, 2026 14:36
@anth-volk anth-volk changed the title Correct 2025 Pension Credit rates Correct Pension Credit rates and Savings Credit projection Oct 5, 2026
@anth-volk
anth-volk marked this pull request as draft October 6, 2026 15:55
@anth-volk
anth-volk force-pushed the feature/pension-credit-2025-rates branch from b1097c2 to ddfd3f0 Compare October 6, 2026 16:47
@anth-volk anth-volk changed the title Correct Pension Credit rates and Savings Credit projection Correct Pension Credit and pension-age Housing Benefit projections Oct 6, 2026
@anth-volk

Copy link
Copy Markdown
Collaborator Author

Critical fixed

  • Consolidated Project Pension Credit guarantee with earnings #2146 and Project protected pension-age Housing Benefit by component #2156 into this PR so that the Pension Credit guarantee, Savings Credit threshold, and protected Housing Benefit allowances use compatible projections.
  • Replaced the provisional post-2026 Savings Credit threshold freeze with a threshold derived from the earnings-projected guarantee and CPI-projected maximum Savings Credit.
  • Added protected single, lone-parent, and couple Housing Benefit projections, removing the discontinuous downstream loss at the modeled Guarantee Credit boundary.

Should-address fixed

  • Reused the State Pension review's May-July earnings input through a separate non-negative earnings series; Pension Credit does not inherit the CPI or 2.5% parts of the triple lock.
  • Derived component bases from enacted parameters instead of hard-coding monetary values in Python.
  • Added direct official-source references, documentation, and Towncrier fragments.
  • Added focused tests for both relationship types, every forecast year, negative-growth floors, and deterministic 2035 boundary calculations.

Skipped by design

Verification

  • make format: passed.
  • Focused Python tests: 34 passed before and after rebasing on current main.
  • Altered and directly affected YAML tests: 22 passed before and after rebasing.
  • Towncrier draft build and staged diff checks: passed.
  • Independent plan verification: 5/5 items complete; no new issues found.

@anth-volk

Copy link
Copy Markdown
Collaborator Author

Addressed all three findings from the latest review:

  • The Savings Credit projection now creates separate SINGLE and COUPLE
    forecast indices. Standard parameter uprating consumes those indices; the
    builder no longer writes future values into either threshold parameter.
  • Regression tests confirm that pre-processing scenario changes, direct
    reforms, and future explicit source values remain exact. A future explicit
    value becomes the anchor for subsequent forecast years.
  • Savings Credit metadata now cites the GB and Northern Ireland prices-review
    provisions as well as the earnings-review provisions.
  • The protected pension-age Housing Benefit allowances now cite SI 2006/214,
    schedule 3 paragraph 1, and the enacted 2026 amounts in SI 2026/148,
    article 24(6) and schedule 6.

Validation: make format passed; 41 changed/directly affected Python tests
passed; 51 focused Pension Credit and Housing Benefit policy YAML cases passed;
the Towncrier draft and diff checks passed. The full package suite was not run,
following the requested focused-test scope.

@anth-volk
anth-volk force-pushed the feature/pension-credit-2025-rates branch from 0d45a0d to 8bc60ad Compare October 7, 2026 13:09
@anth-volk
anth-volk requested review from vahid-ahmadi and removed request for vahid-ahmadi October 7, 2026 13:09
@anth-volk

anth-volk commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

@vahid-ahmadi I rebased this PR cleanly onto current main (base revision c85ffef; new PR revision 8bc60ad) and renewed your review request. Focused local validation passed: formatting/lint, 40 Python tests, and 51 YAML policy tests. I did not run the full test suite locally; GitHub checks are running against the rebased revision. Could you please re-review the latest revision?

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Anthony. I re-reviewed at 8bc60ad. The earnings uprating of the guarantee, the derived Savings Credit threshold and the protected HB allowances all look right to me. The 2025-26 and 2026-27 enacted values are unchanged from the SIs, and the projected maximum Savings Credit follows September CPI exactly: £17.96 → £18.34 → £18.72 → £19.10 → £19.49 for a single person, 2026 to 2030.

Locally, the 40 changed Python tests pass, and so do 448 YAML cases (the Pension Credit, Housing Benefit and integration directories). From my last round:

  • the £11,000 savings credit case (413.98);
  • the positive eligibility case;
  • the s.150A earnings point.

Those are all in now, and the docs edit and its revert go away in the squash.

Should

  1. 2025-26 pension-age HB allowances are still on the old guarantee. housing_benefit/allowances/{single,lone_parent}/aged.yaml:11-12 hold 239.20 and couple/aged.yaml:11 holds 357.98, which is the old £221.85 / £338.61 guarantee plus maximum Savings Credit. DWP's 2025-26 rates are 244.40 / 366.00: £227.10 + £17.30, and £346.60 + £19.35 rounded up.

    • With the corrected guarantee, the protected allowance in 2025-26 sits only £12.10 (single) and £11.38 (couple) above it, instead of the maximum Savings Credit, so HB is understated by up to £5.20 a week for pension-age claimants just above Guarantee Credit.
    • Since this PR now owns the PC/HB relationship and edits these files, I'd fix the three 2025 values here and add one 2025 case. #1925 makes the same change, so it can drop those hunks when it rebases. It conflicts with this PR on minimum_guarantee.yaml, threshold.yaml, the three aged.yaml files and entitledto_scenarios.yaml either way.
  2. BASE_YEAR = 2026 is hard-coded in create_savings_credit_threshold_projection.py:22 and create_protected_pension_age_uprating.py:18.

    • When the 2027-28 rates go in, the 2027 values become the uprating anchor but the indices are still built from projected 2027 amounts. The maximum Savings Credit then no longer follows CPI from the enacted 2027 maximum, and the HB uplift drifts the same way.
    • Fix: take the base year as the latest year with an explicit value. Raise an error if the guarantee, threshold and aged allowances disagree on that year, so the next uprating update can't miss it.

Nits

  1. A guarantee reform doesn't move the derived threshold. With minimum_guarantee.SINGLE set to 260 in 2027, the threshold stays at 216.71, so the maximum Savings Credit jumps from £18.34 to £25.97, and the protected HB allowance doesn't move either. That's what main does too, and arguably right, since the threshold is set separately by SI. A sentence in the threshold description saying reforms to the guarantee don't re-derive the threshold or the HB allowance would save someone a surprise.
  2. Docs placement: the paragraph about Pension Credit and HB sits in docs/book/programs/gov/dwp/state-pension.md:213-220. A line or link from the Pension Credit page would make it easier to find.

Happy to approve once 1 is in. 2 could be a follow-up issue if you'd rather keep this PR tight.

@anth-volk

Copy link
Copy Markdown
Collaborator Author

@vahid-ahmadi The local parameter audit selected the protected pension-age Housing Benefit couple allowance and confirmed your item 1. Commit 9442ffb corrects all three 2025 rates: £244.40 for single/lone-parent claimants and £366.00 for couples. Each dated value now cites SI 2025/295 Schedule 6 and NI SR 2025/64 Schedule 6, plus DWP's published rates. The enacted 2026 amounts and projection builders are unchanged.

The three new parameter regressions fail on the old values. After the correction, the entire altered protected-allowance Python test file passes (10 cases), and the new YAML file passes both tapered-award cases. Formatting/lint, Towncrier preview and diff checks pass. No full suite or population simulation was run.

The cited audit is #2195. #1925 still owns the remaining historical rate corrections and can drop the overlapping three 2025 hunks when rebasing; #1913 still owns the cohort split. Your separate item 2 about the hard-coded projection base year remains unaddressed in this small rate correction, as do the two documentation nits. Could you re-review the rate correction?

@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

Thanks Anthony, the rate correction is right. £244.40 and £366.00 match SI 2025/295 Schedule 6 and DWP's 2025-26 rates page, and at 9442ffb the protected-allowance and savings-credit tests pass (20), as do the Pension Credit and Housing Benefit YAML cases (437).

It needs a rebase before it can go in, though. #1925 merged on 11 October, and the branch now conflicts with main in seven files: the three aged.yaml files, minimum_guarantee.yaml, threshold.yaml, tax_benefit_system.py and entitledto_scenarios.yaml. Main already has 244.4 and 366 from #1925, but as bare values, so keep your cited versions when resolving.

The hard-coded BASE_YEAR is fine as a follow-up issue, as are the two docs nits. Happy to approve once it's rebased and CI is green.

🤖 Generated with Claude Code

@anth-volk
anth-volk force-pushed the feature/pension-credit-2025-rates branch from 9442ffb to 3c8b9bf Compare October 12, 2026 13:27
@anth-volk

Copy link
Copy Markdown
Collaborator Author

Rebased onto main e01f2f5ec after #1925 merged. I retained main's historical/current rates and the specific GB/NI citations, and integrated the projection builders into main's current date-aware parameter-processing code.

The 2035 boundary tests initially failed because their old fixed income values no longer crossed the updated forecast cutoff. They now locate the actual £1 step across that cutoff, including income-tax deductions; the assertions against discontinuous benefit losses are unchanged.

Validation: 43 Python tests and 24 YAML cases passed, sequentially. Formatting, lint, Towncrier draft, fix-evidence validation and whitespace checks passed. No full suite or CI polling. The 2026 projection-anchor follow-up remains unchanged.

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Anthony. The conflict resolution itself looks right at 3c8b9bf: the cited 2025 values are kept on top of #1925's, the builders sit in main's process_parameter_tree, and the new bisection in the 2035 boundary test leaves the assertions unchanged. The 43 Python tests and 475 Pension Credit, Housing Benefit and integration YAML cases pass locally.

CI is red, though, and I can reproduce it: six tests fail in run 38255826272, all with ValueError: The protected Housing Benefit allowance cannot be lower than the corresponding Pension Credit guarantee. from create_protected_pension_age_uprating.py:37.

  • test_council_tax_reduction_pension_credit_properties.py: five tests (test_freeze_keeps_savings_credit_only_receipt_when_the_reform_adds_guarantee_credit, test_guarantee_credit_recipients_ctr_is_invariant_to_state_pension, test_guarantee_credit_recipients_ctr_is_invariant_to_savings, test_awards_follow_the_pension_credit_routes, test_not_claiming_pension_credit_never_raises_a_recipients_ctr)
  • test_savings_credit_only_receipt_properties.py::test_pension_credit_freeze_keeps_the_baseline_receipt

Both files landed on main on 11 October (6731dd7), so the focused run wouldn't have picked them up. Their CREDIT_REFORMS raise the 2026 minimum guarantee to £300 / £459. Now that the builders run inside the parameter processing, they see the reformed guarantee, which is above the enacted £256 / £383.35 protected allowance, so retained_uplift goes negative and the guard raises. A one-line check: minimum_guarantee.SINGLE at 300 from 2026 raises on this branch and gives £15,600 of Pension Credit on main. A reform from 2027 onwards doesn't raise, so it's only the base-year guard.

The guard makes sense for the enacted base, but under a reform it should fall back rather than stop the simulation, for example by flooring the uplift at zero or building the index from the baseline values. Either is fine by me, and it stays consistent with the earlier point that a guarantee reform doesn't re-derive the HB allowance. A test with a 2026 guarantee reform would cover it. Happy to approve once that's in and CI is green.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Aggregate impact on certified data: FAIL

The report did not run, so this change has no report. See the workflow run.

MaxGhenis and others added 3 commits October 23, 2026 03:05
Resolves the conflicts with #2557 (September CPI uprating), which moved the
standard minimum guarantee, Savings Credit threshold and pension-age HB
allowances onto lagged CPI "until its own basis is modelled". This branch is
that basis, so its projection indices replace the lagged-CPI placeholder, with
a comment on each allowance and the guarantee saying why. Keeps main's NI scale
validation ahead of the generation steps in process_parameter_tree, and both
sides' Savings Credit YAML cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the guards

Review items on #2092 (vahid-ahmadi, 8 and 13 October):

- BASE_YEAR = 2026 is gone from both builders. The base year is the last
  year with an explicit value for the standard minimum guarantee, the Savings
  Credit threshold and the three protected HB allowances, read from the
  enacted tree; they must all reach the same year, or processing raises, so a
  rates update that misses one fails instead of indexing from a projection.
- The protected-allowance guard was reachable: any reform that set a
  base-year allowance below its guarantee (or to zero) raised ValueError while
  the tree was built. Such an allowance keeps no retained Savings Credit, so
  it is now projected whole with the guarantee's earnings path, continuously
  with an allowance equal to its guarantee. Only an enacted allowance below its
  guarantee still raises. intermediate_projection is no longer needed and is
  removed from tax_benefit_system.py, which shrinks this PR's footprint there.
- The same class of failure in the threshold builder: a zero phase-in rate
  raised, and a zero threshold divided by zero. The threshold now uses the
  enacted phase-in rate, as it already used the unreformed guarantee, and a
  zero base stays zero.
- Lone parents get their own index, so a reform to the single allowance no
  longer moves the lone-parent projection.

Tests: boundary cases at, 1p below and 1p above the guarantee; zero-base and
phase-in reforms; base-year derivation and an incomplete rates update. Pins
for 2027 move with main's published September 2026 CPI (3.5%, replacing the
2.116% forecast).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1913's aged_from_cutoff allowances equal the Pension Credit standard minimum
guarantee in every enacted year (SI 2006/214 Sch 3 para 1(1)(c) and (2)(c)).
On main both were on lagged CPI, so they stayed equal; once this branch moves
the guarantee to the statutory earnings floor, the allowances would have
drifted below it from 2027. They now use the same index, and a test checks
they are equal in every year to 2040. #2557's lagged-CPI test now checks
that these amounts have left lagged CPI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Collaborator

Hand-off: review items addressed and main merged (backlog job B, 23 Oct 2026)

Head: 52c96b111, three commits on top of edef32cfa: a merge of origin/main at c65bced64 (after #2557), then two fixes. No rebase or force-push.

What I changed

  • Merge: seven conflicts resolved. Uprate benefits by the previous September's CPI #2557 had moved the guarantee, threshold and pension-age HB allowances to lagged CPI "until its own basis is modelled"; this PR's indices replace that placeholder. Main's NI scale validation stays ahead of the generation steps. Both sides' Savings Credit YAML cases are kept.
  • BASE_YEAR = 2026 → derived (pension_age_projection_base.py): the base is the last year with an explicit value for the guarantee (2), threshold (2) and protected allowances (3), read from the enacted tree. If they disagree, processing raises with the list of years.
  • Guard: reachable, now fixed. Any reform that set a base-year allowance below its guarantee, or to 0, raised ValueError while the tree was built (I checked single.aged at 200, 237.99 and 0). Now only an inconsistent enacted pair raises. A reformed allowance below its guarantee is projected by the guarantee's earnings path, which is continuous with allowance = guarantee. The intermediate_projection plumbing is no longer needed and is gone, which shrinks this PR's footprint in tax_benefit_system.py. That file's W1 owner is archived; the remaining change only registers the builders and passes unreformed.
  • Same failure in the threshold builder: a phase-in rate of 0 raised, and a threshold of 0 divided by zero. The threshold now uses the enacted phase-in rate, and a zero base stays zero.
  • Lone parents have their own index, so a single-allowance reform no longer moves the lone-parent projection.
  • Post-2021 cohort: Split pension-age Housing Benefit allowances by when State Pension age was attained #1913's aged_from_cutoff allowances equal the guarantee in every enacted year. They now project by the guarantee's earnings index; otherwise this merge would have made them diverge from 2027.
  • Boundary and base-year tests: reformed allowance 1p below, at and 1p above £238, and £100 below; zero-base reforms; phase-in 0 pays no Savings Credit and leaves projections unchanged; base year 2026; a full 2027-28 rates entry moves the base and the 2028 maximum then follows CPI from the 2027 maximum; a partial entry raises.
  • 2027 pins moved only because main now has the published September 2026 CPI (3.5%).

Tests (locked env, core 3.33.2)

  • 108 passed: the projection files, September CPI, triple lock, inventory and cycle tests.
  • 48 passed: HB cohort properties and the applicable-amount cover property.
  • 11 passed: the six tests that failed CI on 13 Oct, plus inventory and cycle tests.
  • Published rates and parameter descriptions: 1,360 passed, 0 failed.
  • YAML: 83 files, 950 passed.
  • uvx ruff format --check . passes, and the fix-evidence checker passes locally.

Open items

  1. CI on 52c96b111 is pending.
  2. @vahid-ahmadi, could you re-review? Your 8 Oct item 2 and the 13 Oct guard point are addressed as above (your CHANGES_REQUESTED still stands). One behaviour change needs your eye: a phase-in reform no longer re-derives the threshold. Previously, a phase-in change from 2027 moved the threshold to keep the CPI-projected maximum; now the maximum moves with the rate, consistent with your nit 3 for guarantee reforms.
  3. The aggregate impact will differ from the 20 Oct run (Pension Credit +£257m to +£486m, 2027-28 to 2031-32): main's CPI input and the post-2021-cohort projection are new. The hub's aggregate-impact run at this head will show the change. I ran no microsimulation.
  4. Overlap with Correct historical Housing Benefit pensioner allowances #2207: both edit the three aged.yaml files (Correct historical Housing Benefit pensioner allowances #2207 adds 2015-19 history; this PR adds 2025 citations and the uprating line). Whichever lands second needs a small merge that keeps both.
  5. Docs nit 4 (a link from the Pension Credit page, pension-credit.ipynb) is not done; it's a small follow-up.
  6. Independent review: the hub's to dispatch at this head.

@MaxGhenis

Copy link
Copy Markdown
Collaborator

UK hub (Claude session, for Max): overlap with #2576. The hub should have spotted this before building #2576, and didn't.

#2576 ("Fix Pension Credit and pension-age Housing Benefit earnings uprating") follows from #2557's review. It is independently approved and in the merge queue. It implements much of this PR's projection design:

  • the standard minimum guarantee projected by earnings (s.150A);
  • the Savings Credit threshold derived from it;
  • the higher pension-age HB allowances composed as the guarantee plus the Savings Credit maximum (A3/2021);
  • a guard for a zero phase-in.

The two PRs share 12 files, including minimum_guarantee.yaml, threshold.yaml, all six aged*.yaml and tax_benefit_system.py.

Plan: let #2576 land, because it's Budget-critical and already green and approved. Then the hub reconciles this PR onto main, keeping what #2576 doesn't have and dropping what duplicates it:

Where the two implementations differ, the hub will list each difference here before choosing. @anth-volk, @vahid-ahmadi: say if you'd rather this PR's version win on a particular point. The backlog build's 52c96b111 is kept as the starting point.

@MaxGhenis

Copy link
Copy Markdown
Collaborator

Hand-off: #2092 reconciled onto main

Head: 9b0d406723d172e8a07c0ef42d57fd010251b977 on feature/pension-credit-2025-rates.
Merge parents: Anthony’s 52c96b111efe3205feae501aafce869977dba02c and main eb0b8087d821b92d4faa75cf51a92d15aa2a3c45. Anthony’s history is preserved; one merge commit added, no rebase or force-push.

Resolution

Kept #2576’s dedicated earnings series, published maximum Savings Credit and exact unreformed higher-HB forecast identity. Integrated this PR’s reform-safe independent indices into main’s existing builder modules; removed the duplicate builder files and 2072/2083/2154 changelog fragments. Retained derived enacted base validation, non-negative threshold residuals, zero/below-guarantee reform fallbacks, lone-parent independence, later-cohort equality and boundary regressions. W1’s tax_benefit_system.py changes are limited to builder registration/order and passing unreformed context.

All main published values stay exact. All PR published values stay at their original dates except three obsolete 2015 HB placeholders corrected by #2207; their amounts remain at the proper 2019 dates. 2025 HB values were already correct on main (£244.40/£366); retained PR’s dated GB/NI citations and test cases.

Checks and counts

  • uvx ruff format --check .: pass (1,999 files checked).
  • uvx ruff check .: pass.
  • Fix-evidence checker against the full committed SHA: pass, 11 changed executable test files.
  • Static parsing: 23 changed source/doc files including 9 YAML files, AST and notebook JSON; 156 explicit parameter value records checked against both sides, with the three documented Correct historical Housing Benefit pensioner allowances #2207 date corrections.
  • git diff --check, committed ancestry and Git bundle verification: pass. Worktree source changes are committed.
  • Runtime tests: 0 executed, 0 collected. Gate attempts at 04:56, 04:59 and 05:04 EDT had reservation exit 0 but free disk 33.89/33.83/33.81 GB, below 55 GB. First load1 was 123.56 (also above 110); last was 73.14. No test process started. Commands were prepared with -n 2, foreground and BLAS threads 1.

Not run: all projection Python files (including #2576’s test_pension_credit_uprating.py and the new Hypothesis/differential file); test_september_cpi_uprating.py; test_triple_lock_statutory_inputs.py; test_process_time_reforms.py including inventory/cycle coverage; test_council_tax_reduction_pension_credit_properties.py and test_savings_credit_only_receipt_properties.py (including all six 13 October failures); Pension Credit, Housing Benefit and integration YAML directories, including #2576’s pension_age_earnings_uprating.yaml and council_tax_reduction_pension_age_personal_allowance.yaml. Also not run: rendered docs build, full suite, mutation tests or microsimulation. Runtime validation and impact are pending CI at this head; old aggregate reports are not evidence for this merge.

Vahid’s points

Point Status after merge Regression evidence (not run locally; CI pending)
8 Oct item 1: 2025–26 HB rates Already fixed on main, retained exactly with PR citations; static rate audit passes test_protected_allowances_match_enacted_2025_amounts; protected_pension_age_rates.yaml
8 Oct item 2: derived base year Retained: seven enacted paths must agree; error lists paths and years; reforms do not reset the base test_projection_base_year_is_the_last_enacted_year; test_next_year_rates_move_the_projection_base; test_rates_update_that_misses_a_parameter_raises
13 Oct guard and six CI failures Addressed in code: guarantee-only reforms do not change HB; below-guarantee/zero allowance and threshold reforms build test_2026_guarantee_reform_pays_the_reformed_credit_without_rebuilding_hb; test_completed_joint_reform_below_the_guarantee_projects_with_the_guarantee; test_zero_base_reform_builds_and_keeps_the_zero; combined-reform Hypothesis test; the original two failing-property files
Nit 3: guarantee reforms leave threshold/HB separately set Explicit sentence retained in threshold.yaml and README; phase-in reforms are independent too test_phase_in_reform_changes_savings_credit_not_the_projections and guarantee reform properties
Nit 4: docs placement Completed: Pension Credit notebook has its own Uprating section and link; State Pension page links there Notebook JSON/markdown diff checked; no rendered docs build

The CHANGES_REQUESTED review remains open. Do not mark ready or merge. Hub to undraft for CI and dispatch the independent review. axiom: needed is retained; Axiom parity still needs maintainer follow-up.

Workspace/recovery

The assigned checkout contains only the build brief and its .git file is read-only, pointing outside the writable workspace. Original .git and prompt.md were preserved. All real repository operations use workspace-local .job/git (git --git-dir=.job/git --work-tree=.). .job/reconciled.bundle is verified and contains the reconciled branch; it requires ancestors available from the original PR branch. The remote branch is the canonical delivery. The hub must use this local Git directory or bundle if its generic salvage sees the original brief checkout instead.

#2092 reconciliation decisions (written before resolution)

Sides: main eb0b8087d821 (includes #2576 and #2207), PR 52c96b111efe.
Paths below are relative to policyengine_uk/ unless stated. Line numbers refer to those snapshots.

Main file:line PR file:line Main PR Keep / reason
parameters/gov/economic_assumptions/create_earnings_uprating.py:37 parameters/gov/dwp/state_pension/triple_lock/create_triple_lock.py:154 Dedicated non-negative earnings series, unrounded compounded index Duplicate statutory_earnings_floor in triple-lock builder Main series and precision (already floors earnings); SSAA 1992 s150A. Drop duplicate series.
parameters/gov/dwp/pension_credit/savings_credit/create_savings_credit_threshold.py:50 parameters/gov/dwp/pension_credit/create_savings_credit_threshold_projection.py:65 Derive after uprating from separately published maximum Generate threshold index from penny-rounded guarantee/threshold gap Main published maximum and algebra; retain PR reform independence and explicit anchors. Differential tests cover shared domain, including positive and negative macro inputs.
parameters/gov/dwp/pension_credit/savings_credit/create_savings_credit_threshold.py:61 parameters/gov/dwp/pension_credit/create_savings_credit_threshold_projection.py:56 Zero phase-in retains prior threshold Uses enacted phase-in, isolates all phase-in reforms Retain PR independence for separately enacted thresholds and HB; never divide by a reformed zero rate. Nit 3.
parameters/gov/dwp/housing_benefit/allowances/create_pension_age_allowances.py:29 parameters/gov/dwp/housing_benefit/allowances/create_protected_pension_age_uprating.py:39 Forecast guarantee + published CPI-projected Savings Credit maximum Forecast guarantee + enacted HB-minus-guarantee retained uplift Main exact forecast identity, DWP A3/2021 paras 3–5. Enacted amounts remain exact even when independently rounded.
parameters/gov/dwp/housing_benefit/allowances/create_pension_age_allowances.py:29 parameters/gov/dwp/housing_benefit/allowances/create_protected_pension_age_uprating.py:159 Reforms re-derive HB, no per-allowance index Independent indices, below-guarantee fallback, zero stays zero Keep PR extras: own lone-parent index, independent guarantee reforms, non-negative projections and below-guarantee reform buildability.
parameters/gov/dwp/pension_credit/savings_credit/create_savings_credit_threshold.py:23 parameters/gov/dwp/pension_credit/pension_age_projection_base.py:14 Each parameter extends from own last value Common latest enacted year, error enumerates seven years PR base validation on enacted tree; reform dates must not move enacted base.
parameters/gov/dwp/pension_credit/savings_credit/maximum.yaml:12 parameters/gov/dwp/pension_credit/create_savings_credit_threshold_projection.py:49 September CPI already has a non-negative floor Also floors CPI at zero Keep main's existing floor and published maximum; add a floor only to the derived threshold residual.
parameters/gov/dwp/housing_benefit/allowances/{single,lone_parent,couple}/aged.yaml:9 same paths:8 #2207 adds 2015–19 history; #1925 already has 244.40/366 in 2025 Dated GB/NI 2025 citations, forecast description Keep main’s cited 2015–19 history and all later rates, add PR citations; SI 2025/295 Sch 6 and DWP published rates. PR’s 2015 placeholders (181/270.60) are 2019 rates: retain those amounts at their correct 2019 dates, with 2015 166.05/248.30 from SI 2015/457 Sch 7. #2207 explicitly corrects these dates.
parameters/gov/dwp/housing_benefit/allowances/{single,lone_parent,couple}/aged_from_cutoff.yaml:13 same paths:13 Earnings uprating statutory_earnings_floor Main earnings series; same guarantee path. SI 2021/188 and DWP A3/2021 para 5.
parameters/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee.yaml:1 same path:1 earnings_uprating; published history statutory_earnings_floor; dated 2025 citations Main earnings route and all values plus PR citations/forecast description.
parameters/gov/dwp/pension_credit/savings_credit/threshold.yaml:1 same path:1 Post-uprating builder, published history Generated indices, explicit independence sentence/citations Keep main algebra with PR reform/anchor safety; retain independence sentence and citations.
tax_benefit_system.py:31,213 same path:33,215 Registers main builders after general uprating Registers PR builders in generation, passes unreformed into prior-law projections Integrate only required builder registration/context; retain W1 orchestration and other main changes.
tests/policy/baseline/gov/dwp/pension_credit/guarantee_credit/standard_minimum_guarantee.yaml:28 same path:28 Additional 2025 and projected earnings cases Additional 2025 cases Keep distinct cases and all main earnings cases, remove duplicate cases.
tests/test_september_cpi_uprating.py:240 same path:240 #2576 excludes pension-age paths PR excludes same paths, mentions later cohort Main checks plus explicit later-cohort exclusion.
tests/test_pension_credit_uprating.py:1 tests/test_housing_benefit_protected_allowance_uprating.py:1; tests/test_pension_credit_guarantee_reform_projections.py:1; tests/test_savings_credit_threshold_projection.py:1 Forecast algebra and published-rate regressions Forecast pins, reform/base/continuity regressions Main forecast expectations; retain distinct PR regressions, add Hypothesis invariants and differential comparison.
parameters/gov/dwp/pension_credit/README.md:1 docs/book/programs/gov/dwp/state-pension.md:260 Dedicated PC projection documentation Paragraph on State Pension page Keep main PC explanation, add reform/base rules and link from pension-credit.ipynb (nit 4).
changelog.d/pension-credit-earnings-uprating.fixed.md:1 changelog.d/{2072,2083,2092,2154}.fixed.md:1 Describes guarantee/threshold/HB forecast already merged Four overlapping fragments Drop 2072/2083/2154; rewrite 2092 for remaining floors, reform safety, base validation and continuity only.

Sources: SSAA s150A, SPCA s3, DWP A3/2021, 2025 rates.

The DWP published couple maximum in 2025 is £19.36 (formula £19.356), not £19.35. Published HB £366 is preserved without reconstructing its rounding.

Static preservation check

All main explicit parameter values are preserved exactly. All PR explicit values are preserved at the same dates except the three obsolete 2015-04-01 HB placeholders replaced by #2207. Their amounts (£181 single/lone parent, £270.60 couple) are retained at their correct 2019 dates. The 2015 values (£166.05/£248.30) and intervening years keep #2207’s statutory citations. A literal same-date union is impossible for those three conflicting placeholders; this follows the explicit instruction to keep #2207’s history.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment