Repository navigation
Preserve recorded student loan plans during dataset projection - #2650
Conversation
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 11 (thresholds in Notes
Moves flagged for review
Receipts by tax head
Spending by benefit and service
Caseloads
Government balance, each component counted once
Model totals
Household income totals
Poverty rates
People in poverty
Inequality
Mean household net income in each side's own deciles
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileMean change in household net income per household, and as a share of the decile's base income; households stay in the base run's deciles.
No change in any year: population. Checks failing on both base and head (1)
Counted-once checkEach of 88 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
|
|
Review at This fixes the 2025 relabelling that #2636 reports. I checked the plan rules against GOV.UK (plans, write-off). SAAS borrowers are on Plan 4 and Student Finance NI borrowers on Plan 1, for both undergraduate and postgraduate courses. The Postgraduate Loan is a separate plan for England and Wales. Plan 1 loans first paid before 1 September 2006 are written off at 65. So the old Step 1 was wrong in each case the issue lists. Its
What I ran: both student loan test files at the head, 37 passed. At merge base Verdict: good fix, and the repayment change is right. Not approving yet because of finding 1. 🤖 Generated with Claude Code |
|
@juaristi22 on the plan-mix point above: option (b) is fine from our side. Keeping recorded plans fixes most of #2636 and revenue doesn't move, so please just note the size of the gap in the docs (about 3m of 7.1m Plan 2 holders who should move to Plan 5 by 2031, and the Plan 1 to Plan 2 shift) and open a follow-up issue for the boundary moves. I'll approve and queue at the new head once that's in. 🤖 Generated with Claude Code |
|
Round 2 at Status of round 1:
New, nit only:
What I checked: the only commit since Verdict: no must or should findings left. Approving at this head and adding it to the merge queue. 🤖 Generated with Claude Code |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Approving at 36380ef; see the comment above.
Brings in #2589 (ISA inputs), #2639 (rail per person) and #2650. uprating_indices.yaml keeps both per-person blocks (interest and rail journeys). non_cash_isa_cash_interest moves with savings_interest_income to the per-person interest index, so KNOWN_INDEX_OVERRIDES stays empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Addresses #2636.
axiom: needed
The first projected year can replace a recorded Plan 4, an NI-resident holder’s Plan 1 or a postgraduate loan with an English undergraduate plan. It can also clear a holder's repayments using an assumed course start at 18 and a universal cancellation term.
Preserve each existing holder's recorded plan and the repayment amount supplied to
uprate_student_loan_plans. Keep the new-holder age bands, funding-region proxy, deterministic draws and take-up assumptions unchanged. The separate average-earnings uprating of stored repayments still applies.The data do not provide the funding agency, course start, first loan payment or April first due to repay. This is a conservative missing-date fallback: retaining older plans can change the future cohort mix and retain loans too long. It does not implement exact cancellation dates or date-aware cohort shifts, and #2636 remains open for that work. Retention in the age-65 test is not a claim that a known pre-2006 loan remains legally outstanding.
The official plan rules and cancellation rules identify the missing facts. This change does not certify every observed plan as legally correct.
Reproducer: policyengine_uk/tests/test_student_loan_existing_holder_projection.py::test_existing_ni_plan_1_is_preserved_in_first_projection
Validation:
PLAN_2instead of the suppliedPLAN_1; the supplied £500 repayment was retained.--noconftest -p no:cacheprovider -o xfail_strict=true, using an offline, unchanged Python 3.13.14 environment (Core 3.33.2, NumPy 2.5.4, pytest 9.1.1). It used synthetic tables and no survey data.Reported-versus-modelled repayment precedence (#1764), simultaneous loans and upstream data work are outside this patch. Microcosm #1383 records the existing known-defect test and SLC remeasurement dependency; its owners retain that work.
Remaining cohort projection gap
This correction documents the retained-plan option accepted in Vahid Ahmadi’s 25 October 2026 follow-up. Existing holders still retain their recorded plan in every projected year. The England and Wales Plan 1 to Plan 2 transition at the 2012 intake and England Plan 2 to Plan 5 transition at the 2023 intake remain unimplemented.
In his audit of
enhanced_frs_2024_25at revision2526edbb, Vahid reported these approximate counts using the intake-at-18 and current-region proxies:Those are reviewer-reported dataset audit counts, retained with their original scope. No population run or revenue calculation was repeated for this documentation correction. The reviewer reports that current reported-repayment precedence (#1764) masks the revenue effect; this PR does not independently quantify that effect. Age and residence do not identify course dates, funding agency, first payment or first April due to repay, including mature starters and cross-border movers.
Follow-up issue tracks forward cohort boundaries and the date and funding facts needed to separate cohort projection from legal cancellation. #2636 remains open; this PR continues to use “Addresses”. The separate Microcosm work retains its existing owners.
Documentation correction validation: exact non-docstring source bytes and the docstring-stripped AST remain unchanged; all 845 tracked test files retain their bytes, modes and types. Exactly three tracked paths changed: the helper docstring, dataset guidance and existing Towncrier fragment. No model imports, test collection, model tests, documentation build or population comparison ran for this prose correction. The earlier 37-case synthetic execution remains evidence for the original
6ae9e46a0cfe3cb827569fc879e83a0830b6996eimplementation; it is not a new run at the documentation revision. Scoped Ruff format and check passed with the source file unchanged. Independent canonical policy/source and code/test review at36380ef9bb631401d0dca24f859379004e3b4a07completed with no findings or gaps.