Skip to content

Keep UC advance repayments fixed under allowance reforms - #2574

Merged
vahid-ahmadi merged 3 commits into
mainfrom
fix-uc-advance-cash-2410
Oct 26, 2026
Merged

vahid-ahmadi merged 3 commits into
mainfrom
fix-uc-advance-cash-2410

Conversation

@juaristi22

@juaristi22 juaristi22 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #2410

Advance repayment demand currently rises with the Universal Credit standard allowance. For a single claimant aged 30 in 2025, a legacy 10% advance represents £40.014/month at the unreformed £400.14 allowance. Raising the allowance to £440 makes the old demand £44. This change keeps demand at £40.014, subject to the existing cap and available award.

uc_advance_repayment_amount accepts known annual cash repayments, including explicit zero. This PR adopts the per-benefit-unit missingness repair from #2581 at 52201202239dfb73ddb5224ceff0753cdc2e4787: each omitted unit retains its fallback when another unit supplies cash or zero. The fallback retains the existing type-share estimate and uses the same year's unreformed allowance. The existing deduction-rate input, abolition switches, cap, penny floor and protected-floor allocation retain their behavior. SI 2013/383 reg. 10 provides for cash advance recovery. Recovery can still rise when a higher allowance releases a binding cap.

This fixes allowance reform responses within an annual cross-section. Cohort repayments across years, family-status changes, maintenance priority and coarse non-advance estimates remain unresolved under #2410; no maintenance or last-resort interface is added.

Validation:

  • 99 focused tests/cases passed on 22 October at exact head 52201202239dfb73ddb5224ceff0753cdc2e4787 (81 Python items and 18 YAML cases), with 0 failures and 0 skips. These execution results were reused; no model tests were rerun for this adoption.
  • Independent incremental policy and code review completed on 26 October at that head with COMPLETE/APPROVE, 0 open findings and 0 confirmed criticals. The review independently checked cached sources and retained execution evidence; it acquired 0 new sources.
  • At recorded main fba0c0a5, all 19 applicable head-52201202 CI contexts succeeded. Aggregate run 40317148188 (attempt 1) compared FBA with synthetic merge 362d4571 (fba0c0a5, 52201202) on pinned FRS 1.58.1: PASS, with 384 check classifications (360 pass, 22 warnings, one pre-existing VAT issue and one skipped check). Relative to FBA’s reform response, the 10% UC standard-allowance reform increased the UC spending response by £30.7m–£37.6m/year over 2025–2031; the government-balance response fell by the same rounded range. The direction is consistent with fixed advance cash demand; exact weighted attribution was not established. The VAT issue remains; DSA suppression and 18 withheld comparisons do not establish equality or zero national impact. Separately, one local compatibility batch passed three deterministic items on prospective main 944238d2 + head 52201202, public-source tree de968ba38bd7748171d6c707e1ba05050d0de052, using actual CPython 3.13.15 and Core 3.33.2. This targeted constructor/reform check is separate from the 99 historical passes and establishes no new population result or main-944 CI run. The documentation build was not run locally.
  • The separately requested external Preserve missing UC advance repayments in mixed populations #2581 review packet remains unavailable. The review above is this PR's new independent review.

Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/universal_credit/uc_fixed_deductions.yaml::A legacy advance rate uses the same year's unreformed allowance

axiom: TheAxiomFoundation/rulespec-uk#486 queued (cash advance recovery; signed encoder blocked pending separate per-run approval)

@juaristi22 juaristi22 self-assigned this Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Aggregate impact on certified data: pass

Base fba0c0a53e against head 362d457196, both on enhanced_frs_2024_25.h5 (policyengine-uk-data 1.58.1, sha256 056e80fd8e91), fiscal years 2025-26 to 2031-32. Each year is a full microsimulation run on each side.

Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in report_spec.yaml; a flag does not fail the job).

Workflow run and full report

Notes

  • In the years a figure from fewer than 10 records is suppressed (spending.disabled_students_allowance), every total containing it, and the decile incomes, are rebuilt from their other components, so no published total includes it. Those totals are marked †. A change is withheld where the two sides leave out different figures and can't be lined up.

Moves flagged for review

None.

Spending by benefit and service

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Universal Credit +£2 -£11 +£15 +£14 +£18 -£0 +£8
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed

Caseloads

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed

Government balance, each component counted once

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Government spending +£2 † -£11 † +£15 † +£14 † +£18 † -£0 † +£8 †
Government balance, each receipt once -£2 † +£11 † -£15 † -£14 † -£18 † +£0 † -£8 †

Model totals

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
gov_spending +£2 † -£11 † +£15 † +£14 † +£18 † -£0 † +£8 †
household_benefits +£2 † -£11 † +£15 † +£14 † +£18 † -£0 † +£8 †
gov_balance -£2 † +£11 † -£15 † -£14 † -£18 † +£0 † -£8 †

Household income totals

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Household net income +£2 † -£11 † +£15 † +£14 † +£18 † -£0 † +£8 †
Household net income (HBAI definition) 0 0 +£23 +£9 +£37 -£0 +£3

Inequality

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Gini coefficient, equivalised HBAI income before housing costs 0 0 -0.0000 -0.0000 -0.0000 +0.0000 -0.0000

Mean household net income in each side's own deciles

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Decile 1: mean household_net_income per household 0 † +£0.00 † +£0.00 † +£0.00 † +£0.00 † 0 † -£0.00 †
Decile 2: mean household_net_income per household +£0.00 † +£0.00 † +£0.00 † +£0.00 † +£0.00 † -£0.00 † +£0.00 †
Decile 3: mean household_net_income per household +£0.00 † 0 † +£0.00 † +£0.00 † +£0.00 † 0 † +£0.00 †
Decile 4: mean household_net_income per household +£0.00 † 0 † +£0.00 † +£0.00 † +£0.00 † -£0.00 † +£0.00 †
Decile 5: mean household_net_income per household 0 † -£0.00 † +£0.00 † +£0.00 † +£0.00 † 0 † 0 †
Decile 6: mean household_net_income per household 0 † 0 † 0 † +£0.00 † +£0.00 † 0 † -£0.00 †
Decile 7: mean household_net_income per household 0 † 0 † 0 † 0 † +£0.00 † +£0.00 † 0 †
Decile 8: mean household_net_income per household 0 † 0 † +£0.00 † +£0.00 † 0 † 0 † 0 †
Decile 9: mean household_net_income per household 0 † 0 † 0 † +£0.00 † 0 † 0 † 0 †
Decile 10: mean household_net_income per household 0 † 0 † 0 † 0 † -£0.00 † 0 † -£0.00 †

Standard reform costings (change in gov_balance)

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp 0 0 +£0 +£4 -£2 0 -£0
Raise higher rate by 1pp +£0 0 0 -£0 -£0 0 0
Raise personal allowance by ~800GBP/year +£0 0 +£0 +£1 -£2 +£0 +£3
Raise child benefit by 25GBP/week per additional child -£0 0 0 +£5 0 0 -£30
Reduce Universal Credit taper rate to 20% +£2 +£21 -£11 +£12 -£4 -£0 -£10
Raise Class 1 main employee NICs rate to 10% +£0 0 +£0 +£3 -£2 -£0 -£1
Raise VAT standard rate by 2pp 0 0 +£3 +£1 0 0 -£16
Raise additional rate by 3pp +£0 0 0 0 -£0 suppressed suppressed
Raise the Universal Credit standard allowance by 10% -£30.7m -£32.7m -£34.1m -£35.2m -£36.1m -£36.9m -£37.6m
Raise the State Pension by 10% 0 0 +£0 0 -£0 0 -£0

Standard reforms: change in each reform's target

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Reduce Universal Credit taper rate to 20%: change in universal_credit -£2 -£10 +£4 -£8 -£4 +£0 +£7
Raise additional rate by 3pp: change in income_tax 0 0 0 0 0 suppressed suppressed
Raise the Universal Credit standard allowance by 10%: change in universal_credit +£30.7m +£32.7m +£34.1m +£35.2m +£36.1m +£36.9m +£37.6m

Household net income by decile

No household's net income changes in any year.

No change in any year: receipts by tax head; population; poverty rates; people in poverty.

Checks failing on both base and head (1)
  • VAT excluding private school fees is never negative (sign:vat): 2025-26: 76 units below zero, a weighted £-53,889,156 in total; 2026-27: 76 units below zero, a weighted £-55,420,387 in total; 2027-28: 76 units below zero, a weighted £-56,618,038 in total
Counted-once check

Each of 91 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.

  • widowed_parents_allowance: pension_credit responds only through other heads in fewer than 10 households (other heads that moved there: carers_allowance; gov_spending; not a failure)
  • widowed_parents_allowance: pension_credit responds only through other heads in fewer than 10 households (other heads that moved there: carers_allowance; household_benefits; not a failure)
Provenance
Side Commit Runtime Environment hash Partition hash Time
base main fba0c0a53e uk 2.162.3 (files 094c8502b994), core 3.33.2, py 3.13.17 aarch64 6e6b7066671c 4f86ac4248d9 1883.87s
head #2574 merged into main 362d457196 uk 2.162.3 (files 236032ee1edd), core 3.33.2, py 3.13.17 aarch64 6e6b7066671c 4f86ac4248d9 1895.36s

Dataset: hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@2526edbbb687a3b54dbb11272e5389e4b62d2ac2, sha256 056e80fd8e9151d78f432a25cde863340baee81304c6216a37fb575ce8563784 (verified on both sides), policyengine-uk-data 1.58.1.

Receipts by tax head: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Final charge on cash interest in non-cash ISAs £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Lifetime ISA withdrawal charge £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Income tax £298.70bn £318.31bn £335.60bn £350.52bn £365.79bn £383.53bn £401.03bn
National Insurance (employee and self-employed) £52.37bn £54.71bn £56.48bn £58.15bn £60.22bn £62.11bn £64.44bn
National Insurance (employer) £150.59bn £156.99bn £161.74bn £166.13bn £173.24bn £178.59bn £185.29bn
Employer NI change borne by capital £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Employer NI change borne by consumers £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Capital gains tax £12.61bn £13.05bn £13.53bn £14.02bn £14.52bn £15.05bn £15.58bn
Student loan repayments £7.91bn £8.21bn £8.43bn £8.63bn £8.85bn £9.10bn £9.42bn
VAT excluding private school fees £249.37bn £255.28bn £261.81bn £267.87bn £274.12bn £280.56bn £286.81bn
Change in VAT from its baseline £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
VAT on private school fees £1.95bn £2.00bn £2.05bn £2.10bn £2.21bn £2.21bn £2.31bn
Change in private school VAT from its baseline £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Fuel duties £24.53bn £24.64bn £26.64bn £26.69bn £26.42bn £25.76bn £26.35bn
Alcohol duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Tobacco duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Vehicle excise duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Betting and gaming duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
TV licence fee £4.26bn £4.41bn £4.42bn £4.44bn £4.45bn £4.47bn £4.48bn
Council tax £49.21bn £51.88bn £54.97bn £58.29bn £61.55bn £64.92bn £68.49bn
High value council tax surcharge £0.00bn £0.00bn £0.00bn £0.48bn £0.49bn £0.50bn £0.51bn
Northern Ireland domestic rates £0.55bn £0.58bn £0.60bn £0.63bn £0.66bn £0.69bn £0.72bn
Business rates £34.68bn £38.04bn £38.88bn £39.76bn £43.07bn £43.13bn £44.57bn
Stamp duty land tax on the household's own purchases £6.90bn £7.39bn £7.81bn £8.21bn £8.62bn £9.02bn £9.42bn
Stamp duty land tax paid by companies £4.81bn £5.98bn £6.73bn £7.46bn £8.21bn £8.87bn £9.16bn
Land transaction tax (Wales) £0.07bn £0.08bn £0.09bn £0.09bn £0.10bn £0.10bn £0.11bn
Land and buildings transaction tax (Scotland) £0.31bn £0.32bn £0.34bn £0.35bn £0.37bn £0.38bn £0.40bn
Unspecified tax change borne by capital £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Unspecified tax change borne by consumers £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Wealth tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Wealth tax excluding the main residence £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Land value tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Carbon tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Spending by benefit and service: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Lifetime ISA bonus £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
State Pension £121.64bn £126.07bn £127.08bn £128.87bn £132.52bn £136.31bn £140.08bn
Pension Credit £6.66bn £7.04bn £7.32bn £7.46bn £7.60bn £7.77bn £7.94bn
Winter Fuel Payment £1.86bn £1.86bn £1.80bn £1.78bn £1.79bn £1.79bn £1.80bn
Pension Age Winter Heating Payment (Scotland) £0.19bn £0.20bn £0.20bn £0.21bn £0.21bn £0.22bn £0.22bn
Universal Credit £75.21bn £80.38bn £82.93bn £84.23bn £85.58bn £86.87bn £87.97bn
Housing Benefit £8.55bn £8.89bn £9.17bn £9.31bn £9.58bn £9.84bn £10.10bn
Council Tax Reduction £1.98bn £2.02bn £2.07bn £2.11bn £2.16bn £2.21bn £2.25bn
Employment and Support Allowance (income-related) £0.79bn £0.81bn £0.83bn £0.85bn £0.86bn £0.89bn £0.90bn
Employment and Support Allowance (contribution-based) £5.20bn £5.34bn £5.46bn £5.59bn £5.72bn £5.85bn £5.99bn
Jobseeker's Allowance (income-based) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Jobseeker's Allowance (contribution-based) £0.29bn £0.30bn £0.30bn £0.31bn £0.32bn £0.32bn £0.33bn
Income Support £0.12bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Working Tax Credit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Child Tax Credit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Incapacity Benefit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Personal Independence Payment £26.94bn £28.06bn £29.13bn £29.83bn £30.54bn £31.26bn £31.96bn
Disability Living Allowance £7.49bn £7.80bn £8.10bn £8.29bn £8.49bn £8.69bn £8.88bn
Attendance Allowance £8.68bn £9.04bn £9.38bn £9.61bn £9.83bn £10.07bn £10.29bn
Carer's Allowance £4.48bn £4.67bn £4.84bn £4.96bn £5.08bn £5.19bn £5.31bn
Carer Support Payment (Scotland) £0.31bn £0.32bn £0.33bn £0.34bn £0.35bn £0.36bn £0.37bn
Carer's Allowance Supplement (Scotland) £0.00bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn
Severe Disablement Allowance £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn
Industrial Injuries Disablement Benefit £0.50bn £0.52bn £0.53bn £0.54bn £0.55bn £0.57bn £0.58bn
Armed Forces Compensation Scheme £0.61bn £0.62bn £0.64bn £0.65bn £0.67bn £0.68bn £0.70bn
War Widow's or Widower's Pension £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Child Benefit £16.16bn £16.83bn £17.43bn £17.85bn £18.26bn £18.69bn £19.10bn
Scottish Child Payment £0.49bn £0.52bn £0.54bn £0.55bn £0.56bn £0.57bn £0.56bn
Two Child Limit Payment (Scotland, counterfactual) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Healthy Start vouchers £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn
Maternity Allowance £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Statutory Maternity Pay £3.30bn £3.39bn £3.47bn £3.55bn £3.63bn £3.72bn £3.80bn
Statutory Paternity Pay £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Statutory Sick Pay £1.12bn £1.15bn £1.18bn £1.21bn £1.24bn £1.27bn £1.29bn
Sure Start Maternity Grant £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn
Bereavement Support Payment £0.67bn £0.69bn £0.70bn £0.72bn £0.73bn £0.75bn £0.77bn
Widowed Parent's Allowance £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Tax-Free Childcare £0.55bn £0.56bn £0.57bn £0.58bn £0.59bn £0.61bn £0.59bn
Extended childcare entitlement £2.99bn £3.50bn £3.60bn £3.67bn £3.77bn £3.85bn £3.94bn
Universal childcare entitlement £2.05bn £2.23bn £2.28bn £2.34bn £2.40bn £2.47bn £2.52bn
Targeted childcare entitlement £0.50bn £0.51bn £0.52bn £0.53bn £0.54bn £0.56bn £0.52bn
Childcare Offer for Wales £0.26bn £0.28bn £0.28bn £0.29bn £0.30bn £0.30bn £0.31bn
Care to Learn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Childcare Grant £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Parents' Learning Allowance £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn
Adult Dependants' Grant £0.06bn £0.06bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn
Travel Grant £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed
16 to 19 Bursary Fund £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
NHS spending £203.83bn £204.54bn £205.13bn £205.79bn £206.49bn £207.23bn £207.73bn
State education spending £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn
Transport subsidy spending £25.05bn £25.13bn £25.21bn £25.29bn £25.37bn £25.46bn £25.53bn
Cost-of-living support payment £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Energy Bills Rebate £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Energy Price Guarantee subsidy £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Basic income £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Disability basic income £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Other public spending budget change £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Caseloads: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Lifetime ISA bonus 0k 0k 0k 0k 0k 0k 0k
State Pension 11,261k 11,158k 10,849k 10,746k 10,783k 10,822k 10,848k
Pension Credit 1,485k 1,483k 1,480k 1,461k 1,462k 1,464k 1,460k
Winter Fuel Payment 7,842k 7,793k 7,494k 7,407k 7,432k 7,459k 7,477k
Pension Age Winter Heating Payment (Scotland) 803k 803k 803k 800k 803k 806k 808k
Universal Credit 6,334k 6,341k 6,366k 6,347k 6,345k 6,333k 6,298k
Housing Benefit 1,249k 1,247k 1,250k 1,234k 1,238k 1,240k 1,239k
Council Tax Reduction 3,175k 3,198k 3,209k 3,229k 3,244k 3,257k 3,264k
Employment and Support Allowance (income-related) 71k 71k 71k 71k 71k 72k 72k
Employment and Support Allowance (contribution-based) 719k 721k 723k 726k 728k 731k 732k
Jobseeker's Allowance (income-based) 0k 0k 0k 0k 0k 0k 0k
Jobseeker's Allowance (contribution-based) 67k 67k 67k 68k 68k 68k 68k
Income Support 25k 0k 0k 0k 0k 0k 0k
Working Tax Credit 0k 0k 0k 0k 0k 0k 0k
Child Tax Credit 0k 0k 0k 0k 0k 0k 0k
Incapacity Benefit 0k 0k 0k 0k 0k 0k 0k
Personal Independence Payment 3,566k 3,579k 3,589k 3,601k 3,613k 3,626k 3,635k
Disability Living Allowance 1,291k 1,295k 1,299k 1,303k 1,308k 1,312k 1,316k
Attendance Allowance 1,694k 1,700k 1,705k 1,711k 1,716k 1,723k 1,727k
Carer's Allowance 1,034k 1,038k 1,041k 1,044k 1,048k 1,051k 1,053k
Carer Support Payment (Scotland) 71k 71k 72k 72k 72k 72k 73k
Carer's Allowance Supplement (Scotland) 0k 71k 72k 72k 72k 72k 73k
Severe Disablement Allowance 4k 4k 4k 4k 4k 4k 4k
Industrial Injuries Disablement Benefit 137k 137k 138k 138k 139k 139k 140k
Armed Forces Compensation Scheme 93k 93k 94k 94k 94k 95k 95k
War Widow's or Widower's Pension 0k 0k 0k 0k 0k 0k 0k
Child Benefit 8,102k 8,128k 8,142k 8,165k 8,191k 8,216k 8,232k
Scottish Child Payment 350k 352k 353k 357k 354k 355k 342k
Two Child Limit Payment (Scotland, counterfactual) 0k 0k 0k 0k 0k 0k 0k
Healthy Start vouchers 199k 200k 201k 201k 202k 203k 203k
Maternity Allowance 0k 0k 0k 0k 0k 0k 0k
Statutory Maternity Pay 332k 334k 335k 336k 337k 338k 339k
Statutory Paternity Pay 0k 0k 0k 0k 0k 0k 0k
Statutory Sick Pay 181k 182k 182k 183k 183k 184k 185k
Sure Start Maternity Grant 26k 26k 26k 26k 26k 27k 27k
Bereavement Support Payment 98k 98k 98k 99k 99k 99k 100k
Widowed Parent's Allowance 0k 0k 0k 0k 0k 0k 0k
Tax-Free Childcare 1,014k 1,024k 1,024k 1,027k 1,027k 1,031k 1,013k
Extended childcare entitlement 796k 801k 806k 809k 815k 819k 820k
Universal childcare entitlement 1,071k 1,074k 1,077k 1,080k 1,086k 1,096k 1,097k
Targeted childcare entitlement 165k 156k 154k 155k 155k 156k 144k
Childcare Offer for Wales 39k 39k 39k 39k 39k 39k 39k
Care to Learn 0k 0k 0k 0k 0k 0k 0k
Childcare Grant 0k 0k 0k 0k 0k 0k 0k
Parents' Learning Allowance 98k 98k 99k 99k 99k 100k 100k
Adult Dependants' Grant 18k 18k 12k 12k 12k 13k 13k
Travel Grant 0k 0k 0k 0k 0k 0k 0k
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed
16 to 19 Bursary Fund 0k 0k 0k 0k 0k 0k 0k
Cost-of-living support payment 0k 0k 0k 0k 0k 0k 0k
Energy Bills Rebate 0k 0k 0k 0k 0k 0k 0k
Energy Price Guarantee subsidy 0k 0k 0k 0k 0k 0k 0k
Basic income 0k 0k 0k 0k 0k 0k 0k
Disability basic income 0k 0k 0k 0k 0k 0k 0k
Government balance, each component counted once: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Government receipts, each component once £898.82bn £941.86bn £980.11bn £1,013.84bn £1,052.89bn £1,089.01bn £1,129.10bn
Government spending £528.87bn † £543.67bn † £551.43bn † £557.71bn † £566.13bn † £574.77bn † £582.74bn †
Government balance, each receipt once £369.95bn † £398.19bn † £428.68bn † £456.13bn † £486.76bn † £514.23bn † £546.36bn †
Benefits in household_benefits but not in gov_spending £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Model totals: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
gov_tax £898.82bn £941.86bn £980.11bn £1,013.84bn £1,052.89bn £1,089.01bn £1,129.10bn
household_tax £496.91bn £527.60bn £554.51bn £577.74bn £603.32bn £627.65bn £654.69bn
pre_budget_change_household_tax £489.00bn £519.39bn £546.08bn £568.63bn £593.98bn £618.05bn £644.75bn
gov_spending £528.87bn † £543.67bn † £551.43bn † £557.71bn † £566.13bn † £574.77bn † £582.74bn †
household_benefits £528.87bn † £543.67bn † £551.43bn † £557.71bn † £566.13bn † £574.77bn † £582.74bn †
gov_balance £369.95bn † £398.19bn † £428.68bn † £456.13bn † £486.76bn † £514.23bn † £546.36bn †
Household income totals: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Household market income £1,651.49bn £1,713.03bn £1,764.05bn £1,812.97bn £1,862.19bn £1,918.39bn £1,985.28bn
Household net income £1,644.34bn † £1,688.53bn † £1,719.29bn † £1,750.26bn † £1,781.23bn † £1,820.53bn † £1,866.75bn †
Household net income (HBAI definition) £1,457.21bn £1,504.32bn £1,537.33bn £1,569.01bn £1,602.22bn £1,639.95bn £1,686.40bn
Population: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
People 69,224k 69,466k 69,668k 69,891k 70,128k 70,381k 70,550k
Benefit units 35,100k 35,223k 35,325k 35,438k 35,558k 35,686k 35,772k
Households 31,037k 31,145k 31,236k 31,336k 31,442k 31,555k 31,631k
Poverty rates: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Absolute poverty, before housing costs: everyone 16.0% 15.1% 15.5% 15.6% 15.7% 15.8% 15.8%
Absolute poverty, before housing costs: children 24.0% 21.2% 21.5% 21.5% 21.7% 21.9% 21.8%
Absolute poverty, before housing costs: working-age adults 13.8% 13.5% 14.0% 14.1% 14.2% 14.2% 14.3%
Absolute poverty, before housing costs: pensioners 13.7% 13.2% 13.1% 13.4% 13.5% 13.5% 13.5%
Absolute poverty, after housing costs: everyone 21.5% 20.8% 21.3% 21.5% 21.8% 21.9% 22.2%
Absolute poverty, after housing costs: children 33.1% 30.7% 31.1% 31.1% 31.4% 31.7% 32.3%
Absolute poverty, after housing costs: working-age adults 19.8% 19.6% 20.3% 20.5% 20.7% 20.9% 21.1%
Absolute poverty, after housing costs: pensioners 12.7% 12.4% 12.3% 12.5% 12.9% 12.9% 13.0%
Relative poverty, before housing costs: everyone 17.2% 16.4% 16.5% 16.4% 16.3% 16.4% 16.6%
Relative poverty, before housing costs: children 26.2% 23.5% 23.4% 23.1% 22.8% 23.0% 23.3%
Relative poverty, before housing costs: working-age adults 14.6% 14.4% 14.7% 14.7% 14.6% 14.7% 14.9%
Relative poverty, before housing costs: pensioners 15.0% 14.8% 14.1% 14.1% 14.0% 14.0% 14.2%
Relative poverty, after housing costs: everyone 21.6% 21.0% 21.2% 21.2% 21.3% 21.4% 21.8%
Relative poverty, after housing costs: children 33.3% 31.2% 30.9% 30.7% 31.0% 31.0% 31.5%
Relative poverty, after housing costs: working-age adults 19.9% 19.8% 20.1% 20.3% 20.5% 20.5% 20.8%
Relative poverty, after housing costs: pensioners 12.9% 12.4% 12.1% 11.9% 11.8% 11.9% 12.8%
People in poverty: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Absolute poverty, before housing costs: everyone 11,051k 10,489k 10,774k 10,897k 11,005k 11,092k 11,140k
Absolute poverty, before housing costs: children 3,580k 3,185k 3,232k 3,242k 3,284k 3,321k 3,324k
Absolute poverty, before housing costs: working-age adults 5,846k 5,754k 6,039k 6,139k 6,191k 6,232k 6,270k
Absolute poverty, before housing costs: pensioners 1,625k 1,550k 1,504k 1,517k 1,530k 1,539k 1,545k
Absolute poverty, after housing costs: everyone 14,858k 14,424k 14,825k 15,016k 15,271k 15,438k 15,663k
Absolute poverty, after housing costs: children 4,944k 4,610k 4,671k 4,688k 4,757k 4,821k 4,919k
Absolute poverty, after housing costs: working-age adults 8,410k 8,361k 8,749k 8,916k 9,053k 9,141k 9,257k
Absolute poverty, after housing costs: pensioners 1,504k 1,454k 1,405k 1,412k 1,461k 1,475k 1,487k
Relative poverty, before housing costs: everyone 11,898k 11,405k 11,470k 11,490k 11,425k 11,528k 11,710k
Relative poverty, before housing costs: children 3,918k 3,524k 3,519k 3,491k 3,451k 3,492k 3,550k
Relative poverty, before housing costs: working-age adults 6,203k 6,137k 6,339k 6,402k 6,387k 6,441k 6,540k
Relative poverty, before housing costs: pensioners 1,776k 1,744k 1,611k 1,597k 1,587k 1,595k 1,621k
Relative poverty, after housing costs: everyone 14,969k 14,592k 14,740k 14,824k 14,961k 15,048k 15,363k
Relative poverty, after housing costs: children 4,977k 4,676k 4,652k 4,634k 4,691k 4,712k 4,794k
Relative poverty, after housing costs: working-age adults 8,455k 8,452k 8,697k 8,846k 8,924k 8,983k 9,107k
Relative poverty, after housing costs: pensioners 1,537k 1,464k 1,391k 1,344k 1,346k 1,354k 1,462k
Inequality: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Gini coefficient, equivalised HBAI income before housing costs 0.3086 0.3059 0.3066 0.3072 0.3077 0.3083 0.3096
Mean household net income in each side's own deciles: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Decile 1: mean household_net_income per household £17,773 † £17,876 † £17,831 † £17,889 † £18,127 † £18,315 † £18,445 †
Decile 2: mean household_net_income per household £27,956 † £28,855 † £28,514 † £28,878 † £29,157 † £29,624 † £30,132 †
Decile 3: mean household_net_income per household £34,379 † £35,481 † £36,103 † £36,490 † £36,752 † £37,303 † £38,128 †
Decile 4: mean household_net_income per household £38,782 † £40,746 † £41,895 † £42,415 † £43,112 † £43,928 † £44,188 †
Decile 5: mean household_net_income per household £43,785 † £44,532 † £45,603 † £46,280 † £47,374 † £48,286 † £49,557 †
Decile 6: mean household_net_income per household £48,210 † £49,520 † £50,751 † £51,516 † £52,206 † £53,079 † £54,258 †
Decile 7: mean household_net_income per household £56,210 † £57,193 † £57,748 † £58,266 † £58,991 † £60,089 † £61,812 †
Decile 8: mean household_net_income per household £69,153 † £70,584 † £71,803 † £73,070 † £74,090 † £75,614 † £77,419 †
Decile 9: mean household_net_income per household £79,488 † £81,416 † £82,836 † £84,144 † £85,527 † £87,051 † £89,927 †
Decile 10: mean household_net_income per household £117,580 † £120,294 † £121,931 † £124,160 † £126,041 † £128,335 † £131,104 †
Standard reform costings (change in gov_balance): head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp £6.47bn £6.76bn £6.67bn £6.86bn £7.06bn £7.35bn £7.55bn
Raise higher rate by 1pp £3.69bn £3.98bn £4.03bn £4.29bn £4.46bn £4.78bn £4.91bn
Raise personal allowance by ~800GBP/year £-3.82bn £-3.94bn £-4.01bn £-4.09bn £-4.18bn £-4.18bn £-2.00bn
Raise child benefit by 25GBP/week per additional child £-1.99bn £-1.75bn £-1.56bn £-1.46bn £-1.35bn £-1.24bn £-1.12bn
Reduce Universal Credit taper rate to 20% £-20.39bn £-20.96bn £-21.38bn £-21.57bn £-21.87bn £-22.17bn £-22.60bn
Raise Class 1 main employee NICs rate to 10% £11.02bn £11.42bn £11.77bn £12.07bn £12.37bn £12.75bn £13.07bn
Raise VAT standard rate by 2pp £24.89bn £25.55bn £26.14bn £26.75bn £27.39bn £28.03bn £28.66bn
Raise additional rate by 3pp £2.96bn £3.21bn £3.26bn £3.46bn £3.65bn suppressed suppressed
Raise the Universal Credit standard allowance by 10% £-3.05bn £-3.18bn £-3.30bn £-3.34bn £-3.38bn £-3.43bn £-3.48bn
Raise the State Pension by 10% £-7.79bn £-8.02bn £-8.01bn £-8.12bn £-8.43bn £-8.54bn £-8.87bn
Standard reforms: change in each reform's target: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp: change in income_tax £6.61bn £6.91bn £6.83bn £7.03bn £7.24bn £7.47bn £7.73bn
Raise higher rate by 1pp: change in income_tax £3.69bn £3.99bn £4.04bn £4.25bn £4.47bn £4.74bn £4.93bn
Raise personal allowance by ~800GBP/year: change in income_tax £-3.95bn £-4.08bn £-4.17bn £-4.24bn £-4.34bn £-4.41bn £-1.76bn
Raise child benefit by 25GBP/week per additional child: change in child_benefit £2.33bn £2.14bn £1.95bn £1.84bn £1.73bn £1.62bn £1.50bn
Reduce Universal Credit taper rate to 20%: change in universal_credit £20.39bn £20.95bn £21.37bn £21.62bn £21.87bn £22.22bn £22.61bn
Raise Class 1 main employee NICs rate to 10%: change in national_insurance £11.28bn £11.74bn £12.06bn £12.37bn £12.69bn £13.03bn £13.49bn
Raise VAT standard rate by 2pp: change in vat £24.69bn £25.35bn £25.94bn £26.54bn £27.17bn £27.81bn £28.43bn
Raise additional rate by 3pp: change in income_tax £2.96bn £3.21bn £3.26bn £3.46bn £3.66bn suppressed suppressed
Raise the Universal Credit standard allowance by 10%: change in universal_credit £3.05bn £3.18bn £3.29bn £3.36bn £3.43bn £3.48bn £3.52bn
Raise the State Pension by 10%: change in state_pension £10.68bn £11.18bn £11.31bn £11.55bn £12.00bn £12.44bn £12.94bn

@MaxGhenis

Copy link
Copy Markdown
Collaborator

UK hub independent review (GPT-6.1 Sol) at 41daefdd1: one P2 finding, so it requests changes. All 17 checks pass. The same-year baseline reference covers 2026–29 rebalancing; cap, abolition, penny floor and protected-floor allocation keep their structure; SI 2013/383 reg 10 prescribes no allowance indexation. National UC moves by under £12 a year in 2025–31 on the Aggregate impact report.

  • [P2] Missing cash becomes zero in partially supplied populations. uc_advance_repayment_amount.py:19 uses the float default of zero. When one benefit unit supplies cash, Core fills every omitted unit with zero and bypasses the fallback formula. So a 2025 single claimant aged 30 with ADVANCE_ONLY and latent rate 0.1 loses its £480.168 annual fallback whenever another unit supplies an explicit zero. Missingness needs keeping per unit, for example a sentinel default meaning "not supplied", or a separate supplied flag.

As with #2573, and at the coordinator's request so nobody waits, the hub is opening this fix as a separate PR stacked on your branch; it won't push to yours. @juaristi22, cherry-pick it if you'd rather fold it in. Both land together once you mark this ready or say the hub may.

@MaxGhenis

MaxGhenis commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

UC advance missingness fix is pushed as draft #2581, stacked on #2574's fix-uc-advance-cash-2410 branch. Head: 52201202239dfb73ddb5224ceff0753cdc2e4787; parent remains 41daefdd1671b029b8c2c650d30787f586cdd69f. No commits were pushed to the parent branch.

  • Change/impact: default -1 preserves omitted units in partially supplied cash arrays. The deduction formula resolves each missing amount through the shared legacy fallback; explicit zero remains zero. Includes fully supplied/unsupplied cases and the £480.168 mixed-zero regression. No aggregate run or data build was performed.
  • Tests: full repository uvx ruff format --check . (1937 files), ruff check . and whitespace checks pass. Seven population regressions, a Hypothesis peer-independence property and a mixed-zero YAML case were added. The prepared focused Python/YAML suite (including Keep UC advance repayments fixed under allowance reforms #2574's tests and allowance rebalancing) uses -n 2 in the foreground, frozen Python 3.13.15/Core 3.33.2 and BLAS/OpenMP limits of 2.
  • Open items: 0 local tests executed: after 30.9 minutes monitoring the resource gates, free disk remained below the required 55 GB decimal (50.749 GB at stop; load1 26.18, limit 110). The foreground runner was stopped before pytest launched. Retry once host disk space is available; workspace .job/HANDOFF.md contains the exact gated command. Local focused validation and the hub's independent final-head review are still pending. No CI checks were attached to the stacked draft when queried. Keep draft; do not merge or mark ready.

Workspace-local .job/PROGRESS.md, HANDOFF.md, handoffs.jsonl and recovery bundle are available for the hub. Track the narrow P2 in #2578; adopt this stack together with #2574 before the fallback build.

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Focused validation of the existing #2581 repair is complete at 52201202239dfb73ddb5224ceff0753cdc2e4787, directly on this PR's 41daefdd1671b029b8c2c650d30787f586cdd69f parent: 99 passed, 0 failed, 0 skipped (81 Python tests and 18 YAML cases). Native pytest and the bounded controller both exited 0; pytest took 226.52 seconds.

The single serial run covered all seven new population cases and the Hypothesis peer-independence property, both deduction YAML files, test_uc_deductions.py, test_uc_rebalancing.py and test_uc_standard_allowance_uplift.py. Both existing test_inactive_health_cash_reconciles_with_currentmain_deductions variants passed. This includes the mixed-zero regression for the £480.168 annual fallback.

Execution used an existing Python 3.13.14 / policyengine-core 3.33.2 / NumPy 2.5.4 environment, with imports verified against the exact detached checkout. Core's actual OpenFiscaPlugin(CountryTaxBenefitSystem(), {}) collected the YAML cases in the same pytest invocation. Source and test hashes were unchanged, and the process group was reaped. No environment installation, test rerun or full-population computation was needed.

This supplies the missing focused execution evidence for the parent repair. The hub's independent final-head review remains pending. #2574 remains draft; the repair still needs adoption and validation of the resulting upstream head before readiness and Vahid's review request.

@MaxGhenis

Copy link
Copy Markdown
Collaborator

UK hub: the stack is approved. The independent review (GPT-6.1 Sol) of this PR with the fix #2581 approves at 522012022. The full Code changes run on #2581's branch passed: 4,244 YAML and 8,164 Python tests, with the seven new population cases and the Hypothesis property. With no cash input, the fallback is unchanged.

@juaristi22: as with #2580, merge #2581 into this branch (it fast-forwards), and mark this ready. Or tell the hub it may, and it'll do both and land this through the merge queue.

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Can you link the full independent review report and result JSON for 522012022? I have verified CI and will reuse the existing test evidence.

@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

Round 1 at 41daefdd1.

Verdict: the approach is right and baseline is unchanged, but this head still has the hub's mixed-population bug; fold in #2581 before marking ready. Comment only, as it is a draft.

Findings

  1. must: an explicit cash value on one benefit unit zeroes the fallback for every other unit. uc_advance_repayment_amount.py:19 is a float with the default of 0, so once any unit supplies the variable, Core fills the rest with 0 and the formula at :23 never runs for them. I reproduced it at this head merged with main: two identical single 30-year-olds, latent rate 0.1, ADVANCE_ONLY. With no input both get £480.17 a year; when the second one supplies uc_advance_repayment_amount: 0, the first drops to £0 as well. This is the P2 from the hub review on 22 Oct, and Preserve missing UC advance repayments in mixed populations #2581 (522012022, stacked on this branch, -1 sentinel) fixes it. It is harmless for population runs today, because no dataset supplies the variable yet, but it breaks the documented "set the actual amount when known" route (docs/book/validation/uc-deductions.md, new section) for any mixed situation or future data build. Please fast-forward to Preserve missing UC advance repayments in mixed populations #2581 or cherry-pick it; it already carries the mixed-zero regression.
  2. should: the PR body predates the hub review. It says the independent review is "COMPLETE/APPROVE at 41daefdd1 ... with no open findings". The hub review at that sha requested changes (finding 1), and the approval was for 522012022 with Preserve missing UC advance repayments in mixed populations #2581. Please update the body when you adopt the fix, so the record matches.
  3. nit: the uplift YAML case (uc_fixed_deductions.yaml:151-190) copies the comment from the case above (:145 and :186, "£21,277.40 before £600"). Since the benefit cap absorbs the uplift and the cash is supplied explicitly, this case shows that the cap offsets the uplift rather than that the advance stays fixed; test_allowance_scenario_preserves_the_legacy_advance_cash_reference is the test that pins the actual fix. Maybe say so in the comment.
  4. nit: deduction_type_shares decodes uc_deduction_combination to strings three times (_deduction_amounts.py:12, :24, :36). The old code compared enum values. It is correct, just slower on a full population; decoding once or comparing enums would do.

Law

  • SI 2013/383 reg 10 only offsets or deducts payments on account against the award. It sets no instalment and indexes nothing to the allowance, so holding cash demand fixed under an allowance reform is right.
  • The deductions ceiling is a share of the standard allowance: SI 2013/380 Sch 6 para 4(1) sets 40%, and DWP runs the 15% Fair Repayment Rate within it (as deductions/cap.yaml records). So the cap should move with the allowance while the advance demand does not, which is what uc_deduction_rate.py now does. The "binding cap" and "penny" YAML cases match.

Current with main: yes. The branch is 765 commits behind 49a7590, but main has not touched any deduction file since the merge base 45c0431a2, and git merge-tree is clean. CI at this head is fully green (17/17), but it ran on 22 Oct, so the rerun after folding in #2581 will cover current main.

What I ran (fresh worktree, this head merged with main 49a7590, Python 3.13, core 3.33.12, serial)

  • test_uc_deductions.py, test_uc_rebalancing.py, test_uc_standard_allowance_uplift.py: 73 passed.
  • uc_deductions.yaml and uc_fixed_deductions.yaml: 17 passed. The other YAML files that mention UC deductions (HB passport, benefit cap by scheme, benefit cap pension age, CTR pensioner): 50 passed.
  • Baseline check against main: 7 combinations x 3 latent rates (0.05, 0.2, 0.4) x 4 claimant types x 2025 to 2030, 504 cells. uc_deductions matches main in every cell (max gap under £0.0001), including the rebalancing years. So the same-year baseline reference does what it says.
  • The finding 1 reproducer above.

Not run or read: no full microsimulation or aggregate run (I relied on the CI aggregate report); #2581's diff only as far as its description and the hub's notes; the documentation build; the full YAML and Python suites.

🤖 Generated with Claude Code

@juaristi22
juaristi22 marked this pull request as ready for review October 26, 2026 15:32
@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

Round 2 at 522012022.

Verdict: the must is fixed, the body is corrected, and the branch merges cleanly with main. Two nits remain, neither blocking, so I am approving.

Status of round 1 findings:

  1. must, fixed. The branch now carries Preserve missing UC advance repayments in mixed populations #2581 (merged into this branch, so the head is 522012022). uc_advance_repayment_amount defaults to -1 (uc_advance_repayment_amount.py:21) and uc_deduction_rate.py:37-43 uses the fallback for each unit whose value is negative, keeping an explicit zero. I re-ran the round 1 reproducer at this head merged with main 5b94537f6: two single 30-year-olds, latent rate 0.1, ADVANCE_ONLY, 2025.
    • No input: £480.17 and £480.17.
    • Second unit supplies 0: £480.17 and £0 (was £0 and £0 at 41daefdd1).
    • Second supplies £600: £480.17 and £600. First supplies 0: £0 and £480.17.
    • With the single allowance raised to £440: still £480.17 for the unit with no input, so the fix itself holds.
  2. should, fixed. The body no longer says the hub review approved 41daefdd1. It says this PR adopts Preserve missing UC advance repayments in mixed populations #2581 at 522012022 and describes the new review separately.
  3. nit, open. The uplift case still repeats "£21,277.40 before £600 fixed recovery" (uc_fixed_deductions.yaml:180 and :221). Fine to leave.
  4. nit, open. deduction_type_shares still decodes the enum three times (_deduction_amounts.py:12, :24, :36). Fine to leave.

New findings:

  1. nit: in a mixed run the variable itself reports -1 for omitted units. With the second unit supplying 0, uc_advance_repayment_amount returns [-1, 0], while the amount actually used for unit 1 is £480.17. Today the only reader is uc_deduction_rate.py:36, and the doc says what -1 means (docs/book/validation/uc-deductions.md:15-17), so nothing is wrong in the results. It would only matter if someone tabulates this variable straight from a partly supplied dataset.

Current with main: yes. git merge-tree against main 5b94537f6 is clean. Main has changed UC child-element and earned-income files since the merge base, but no deduction file. CI is 19/19 green at this head.

What I ran, at this head merged with main 5b94537f6 in a fresh worktree and venv (Python 3.13), one process at a time:

  • test_uc_advance_repayment_properties.py, test_uc_deductions.py, test_uc_rebalancing.py, test_uc_standard_allowance_uplift.py: 81 passed.
  • uc_fixed_deductions.yaml and uc_deductions.yaml: 18 passed. The HB passport, benefit cap by scheme, benefit cap pension age and CTR pensioner YAML files: 50 passed.
  • The reproducer above.

Not run: no microsimulation or aggregate run (I relied on the CI aggregate report, which ran against an older main), the docs build, or the full test suites. I did not repeat the round 1 baseline grid, but with no input the new code path gives the same value as before, since the fallback is never negative.

🤖 Generated with Claude Code

@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.

Approving at 5220120; see the comment above.

@vahid-ahmadi
vahid-ahmadi added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 3dcafee Oct 26, 2026
36 checks passed
@vahid-ahmadi
vahid-ahmadi deleted the fix-uc-advance-cash-2410 branch October 26, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants