Repository navigation
Use the Housing Benefit pension deduction parameter consistently - #2497
Conversation
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Looks right, fine to approve.
@juaristi22, this replaces the hard-coded 0.5 in HB applicable income with the existing means_test.pension_contribution_deduction_rate that housing_benefit_net_earnings already uses. So both now follow HB Regs 2006 reg 36(3)(c) ("one-half"), and a reform moves both. The default result is unchanged. I hand-checked the default case. 12,000 − 0.5 × 2,000 − 260 = 10,740, and 10,000 − 0.65 × (10,740 − 4,786.60) = £6,130.29. The 25% case gives 11,240 and £5,805.29.
- nit: the same hard-coded half-pension deduction remains in
income_support_applicable_income.py:39,council_tax_reduction_applicable_income.py:116andcarers_allowance_earnings.py:106. Each comes from different regulations, so it is right to leave them out of this PR. They would fit as follow-ups under #140 alongside the JSA one. - nit:
housing_benefit_applicable_income.py:93-101still rebuilds a net-earnings-like figure itself instead of readinghousing_benefit_net_earnings. This PR makes the two consistent on the rate, but the duplication is where the inconsistency came from. Worth a follow-up issue.
What I checked
- Read the full diff and issue #140, and the parameter's references (SI 2006/213 reg 36 and 38, SI 2006/214 reg 36 and 39).
policyengine-core test housing_benefit_applicable_income.yaml: 9 passed. All oftests/policy/baseline/finance/benefit/family/housing_benefit: 259 passed.- Reverted the formula change. The new reform cases then fail 3 of 9, and the default case still passes, as expected.
ruff checkandruff format --checkon the changed file: clean.- Hosted CI on this head: all green.
🤖 Generated with Claude Code
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Approving, per my review above. The shoulds and nits can follow.
|
UK hub audit (session local_8e19f9d5, Opus 5.5), for Max's d1728 (2026-10-19), under which the hub merges #2458, #2497 and #2147 on its gates, after correcting each body's
🤖 Generated with Claude Code |
Changing the Housing Benefit pension-contribution deduction rate updates net earnings but leaves the applicable-income deduction at 50%. Use the existing parameter in applicable income so final awards respond consistently; the default 50% calculation stays unchanged.
The new 2025 council-tenant regression has £12,000 earnings, £2,000 pension contributions and £10,000 rent. Under a 25% deduction-rate reform, Housing Benefit should be £5,805.29 instead of the default £6,130.29. The original calculation kept the default payment.
Refs #140 (the Housing Benefit follow-up). The JSA work remains open. Contribution bases, claimant masks, floors and eligibility rules are preserved.
Reproducer:
policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/applicable_income/housing_benefit_applicable_income.yamlValidation:
policyengine-core test policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit -c policyengine_uk— 259 cases passed, including the four new rate/control cases.make formatand Ruff lint passed. Local runtime: Python 3.13.14 / PolicyEngine Core 3.32.27.Impact (UK hub, 2026-10-19): none.
e2ea32893with main merged with this head (5b063b5bb), on policyengine-uk-data 1.58.1, fiscal years 2025-26 to 2031-32.axiom: needed
Encoded parity for the changed pension-deduction parameter response remains unverified. No encoder was invoked.