Repository navigation
Conversation
SI 2025/1148 art 7, inserted by SI 2026/409, brings WRA 2012 s.33(1)(d) into force on 1 July 2026 for every Housing Benefit award not already terminated. It saves claimants within SI 2014/1230 reg 6A(2)-(5) (specified or temporary accommodation, pension age, protected mixed-age couples), income-related ESA appointee cases and prisoners until release. Northern Ireland: SR 2025/176 art 7, inserted by SR 2026/115, from 1 October 2026. gov.dwp.housing_benefit.working_age_awards_payable holds 1/0 per jurisdiction (great_britain, northern_ireland). PE-UK samples gov.* parameters at 30 April of each fiscal year, which would have left all of 2026-27 unaffected, so the parameter is day-weighted with fiscal_year_blend: 2026 takes 86/365 in GB and 178/365 in NI, and 0 from 2027. housing_benefit_payable_share is 1 for any benefit unit with a member over State Pension age and the country share otherwise; the continuing-award route needs it above 0 and the pre-cap award is scaled by it. Also make housing_benefit_eligible.yaml's boolean checks non-vacuous (margin 0, would_claim_uc false), and update the docs, programs.yaml and the take-up description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction A mutation check showed the mixed-population differential missed two breakages (no proration; NI given the GB date), because random populations rarely hold a working-age continuing award in 2026. The new property test builds only those families, for 2025-2027 in GB and NI, and fails on both mutations. Also drop dataset-specific take-up shares from the docs page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up: specified and temporary accommodation HB is not modelled, so programs.yaml lists Housing Benefit as partial. Comment that Great Britain's date applies to an unknown country, and use Stat-Xplore's own "Employment and Support Allowance" label in the docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Overlap with #1940: it replaces the pension-age new-claim test in |
Para 17(1) and 9(1) add £17.10 where net earnings "equal or exceed" the other disregards, the childcare charges and £17.10. Net earnings are float32, so exactly £1,149.20 (£5 + £17.10 a week) was held as £1,149.19995 and failed the test. The comparison is now in pence, and new cases pin £1,149.20 (single, 30 hours) and £2,189.20 (lone parent, 16 hours) as granted and a penny below each as not. The end-to-end pension-age cases are aged 72 and set the applicable amount (£256 x 52) as an input. SI 2006/214 Sch 3 para 1(1) gives £256 only to a claimant who reached pensionable age before 1 April 2021, and £238 to one who reached it later; #1913 models that split. The working-age case asserts housing_benefit_entitlement, which #1910's 2026 abolition scaling does not change. The disabled-worker case is labelled as a model limitation: the disability premium also brings in Sch 4 para 3's £20 in place of £5, which is not modelled. A new case pins the is_adult proxy counting an 18-year-old young person's earnings and hours (the law excludes them) until #1896 replaces it. The net earnings documentation names the provisions that set the tax deducted (213 regs 36(3) and 39(1); 214 regs 36(2) and 40(1)), calls the proportional attribution a lower bound for employees, and says what the proxy counts. The changelog fragment is a bullet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed: request changes (sequencing only; the law is right). The dates and savings are correct. GB is 1 July 2026 under SI 2025/1148 art 7, inserted by SI 2026/409, and NI is 1 October 2026 under SR 2025/176 art 7, inserted by SR 2026/115. Specified or temporary accommodation, pension age, protected mixed-age couples, ESA(IR) appointees and prisoners are saved. The 86/365 and 178/365 day counts are right.
Verified: I read SI 2025/1148 art 7 (revised), SI 2026/409, SR 2026/115 (sealed 17 June 2026), TP Regs reg 6A and DWP circular A6/2026 (in force 1 July 2026). In a fresh environment the abolition and eligibility YAML passed 16/16 and the two property files passed 38/38. CI: all 7 checks pass, including the docs build. |
Codex review — changes requiredReviewed commit code-1 — [P1] Preserve working-age awards covered by the abolition exceptions
Executed2027 case: age40, reported HB £5,200, would_claim_uc false, council rent £5,200 and assessable HB income held at zero. The model calculates HB entitlement £5,200, payable share0, HB £0 and UC £0. Protection status cannot be supplied at this head, so an otherwise identical protected continuing award necessarily gets the same exclusion. This is a confirmed missing condition with an executed downstream path; it is not a claim that the diagnostic encoded a protection variable that does not exist. Add a supported protection input/path, or coordinate the data/migration work so protected cases are retained before applying the blanket ending rule. Cover protected working-age awards through final payment after2026. Confidence: high on the universal-zero code path and statutory omission; population incidence is unverified. The source review independently confirms the continuing-award protections in GB article 7, NI article 7 and transitional regulation 6A. The overlapping code and policy findings are counted once. Appointee/prisoner savings also need an explicit treatment. The GB/NI commencement dates and annual shares are corroborated. The migration concern is separate from the confirmed missing protection: an absent UC award alone does not establish UC entitlement or take-up. The PR's population cost/poverty estimates remain author-reported. Outstanding evidence/decision:
Validation: 54 focused tests passed. An additional executed diagnostic traced the new payment-share path from £5,200 HB entitlement to £0 paid HB in 2027. Four official source originals were inspected and their cached bytes verified. Protection itself cannot be supplied as an input at this head; the finding combines the universal code path with the statutory exception, rather than claiming a fully represented protected household was simulated. Focused tests used an existing cached Python 3.13 environment (Core 3.32.9, NumPy 2.1.3, pandas 2.3.1, microdf-python 1.2.1, Hypothesis 6.168.2, pytest 8.4.2) with this PR’s isolated source snapshot. No dependencies were installed; this was not a freshly synced lock environment or a full-suite/population run. This is a review comment, not a formal GitHub review vote. Live check before posting (2026-10-02T10:39:08.735058+00:00): same commit, CLEAN; all reported CI checks pass. |
|
Review pass (Claude Code, on Vahid's behalf) at Short version: no new commits since my round 1 (head still
Checked again at this head:
|
|
@vahid-ahmadi — response to your 1 October and 2 October reviews:
Follow-up validation: the full Housing Benefit YAML directory plus the affected UC housing-cost and HB/UC mutual-exclusion YAML files passed: 101 passed in 211.90s. Notebook JSON and Publication status: these fixes are prepared locally, but the live PR branch does not yet contain them. The filesystem sandbox rejects writes to the worktree's Git metadata outside the assigned writable directory, preventing fetch/merge, staging, commit and push. The existing checkpoint merge Final lint: |
|
@juaristi22 — response to the Codex review:
Follow-up validation: the full Housing Benefit YAML directory plus the affected UC housing-cost and HB/UC mutual-exclusion YAML files passed: 101 passed in 211.90s. Notebook JSON and Publication status: the changes remain local. Sandbox restrictions prevent writes to the external Git metadata needed by fetch/merge, staging, commit and push, so the live PR branch has not received this fix and code-1 cannot yet be closed there. The existing checkpoint merge is preserved; the PR has not been merged or marked ready. Final lint: |
…bolition Adds the benefit-unit input in_specified_or_temporary_accommodation (default False; SI 2025/1148 art 7 and TP Regs reg 6A(2), NI equivalents): such awards stay payable after 1 July 2026 (NI 1 October 2026), new claims remain open, and the UC housing costs element excludes that rent. Other saved classes (pension-age switchers, ESA(IR) appointees, restricted prisoners) are documented as not modelled. The parameter description now says how reforms dated inside a year are read. With the input absent every existing result is unchanged. Addresses Vahid's items 2-3 and the Codex P1 on bd9272a. Item 1 (data migration onto UC) is held for Max (d837). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pension-age route now reads the claimant and partner (is_claimant_or_partner, from #1896) in place of the age-18 approximation. A reform key dated inside a year leaves that model year's payable share unchanged (86/365 for Great Britain in 2026): the test, the parameter description and the notebook now say so; the earlier text claimed it added one day. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Cross-reference from #2123, the HB Sch 4 para 18 specified or temporary accommodation earnings disregard. It is in force on 5 October 2026 and reads the same status input as this PR.
|
|
Status 02:45Z: this PR now belongs to the uk-data#492 session. A local branch has main merged (housing_benefit_eligible and notebook conflicts resolved) and #2119 merged. On it, the abolition prompts the closure claim: a family that claims Universal Credit at the abolition moves for the whole year, and one that does not claim keeps its award until the abolition date. All 2,043 policy YAML and 53 property tests pass. It is not pushed yet, because it would carry #2119's diff. It will be pushed once #2119 merges, then reviewed. It merges only after PolicyEngine/policyengine-uk-data#534 is released (d837). |
|
Coordination: the universal credit limb of the HB passport (#2133, fixes #2132). That PR targets
"On universal credit" is entitlement, whether in payment or not (reg 2(3B)). The model reads it as What changes for this PR once both land:
Checked on a local merge of this head (06ef074),
Two things for this PR:
🤖 Generated with Claude Code |
Review follow-up pushed (head
06ef0744). The accommodation input described below is committed (0d7df47d) andmainis merged in (including #1896). This PR is on hold (Max, 2 October, d837) until the data change that moves legacy claimants onto Universal Credit (PolicyEngine/policyengine-uk-data#492) lands; see the sensitivity section.Summary
Working-age Housing Benefit awards were abolished from 1 July 2026 in Great Britain and 1 October 2026 in Northern Ireland, subject to statutory savings. PolicyEngine UK still paid unprotected awards in every year through the continuing-award route (reported HB and not claiming UC). This PR ends that route on the statutory dates and pays 2026-27 for the part of the year before abolition.
The prepared review follow-up adds
in_specified_or_temporary_accommodation: a boolean benunit input that preserves a payable share of 1 and permits new Housing Benefit claims, including alongside UC with no UC housing costs element. It defaults toFalse; no current dataset supplies it, so this follow-up leaves existing dataset outputs unchanged. Other historical savings and accommodation-specific eligible-rent and benefit-cap rules remain unmodelled or approximated, as detailed below.Law
The original statutory review was on 29–30 September 2026. The abolition provisions, amended articles and cross-referenced savings and accommodation definitions were read again on legislation.gov.uk on 2 October 2026 for this follow-up.
Change
gov.dwp.housing_benefit.working_age_awards_payable, with childrengreat_britainandnorthern_ireland: each is 1 while unprotected working-age awards are payable and 0 from its abolition date, blended over the fiscal year.in_specified_or_temporary_accommodation(BenUnit, YEAR, boolean, defaultFalse): a supplied statutory accommodation status, not inferred from tenure or a generic supported-housing label. It setshousing_benefit_payable_shareto 1 in every year and opens the new-claim route inhousing_benefit_eligiblewithout a reported previous award or awould_claim_ucrestriction. Existing rental, capital, entitlement and take-up checks still apply.housing_benefit_payable_share(BenUnit, YEAR): 1 for the accommodation input or any benefit unit with a member over State Pension age; otherwise the country's parameter value.housing_benefit_eligible: the continuing-award route needs the share above 0; the accommodation input provides the additional new-claim route. Its existing pension-age approximation retains the age-18 threshold using an explicit age expression, avoiding the genericis_adultread without changing that threshold.housing_benefit_pre_benefit_cap: entitlement is multiplied by the share; the benefit cap applies afterwards.uc_housing_costs_element: 0 when the accommodation input isTrue, allowing HB alongside non-housing UC without duplicate UC rent support.partial.How a mid-year date applies to a YEAR period
PE-UK period 2026 means FY 2026-27.
convert_to_fiscal_year_parameters(utils/parameters.py) normally samples each parameter on 30 April and writes that value for the model year. Parameters markedfiscal_year_blend: trueinstead use a day-weighted average over 6 April to 5 April, when their values are numeric; booleans fall back to the 30 April sample. Annual formulas read the converted value at the start of the model year, not successive monthly values during that YEAR calculation.The abolition parameters are numeric 1/0 with blending enabled. PE 2026 therefore reads:
From 2027 they read 0, and before 2026 they read 1. This is an annual-amount convention; HB part-week rules for the week containing abolition are not modelled.
Reforms. Tested on the merged head with a real
Simulation:{"...great_britain": {"2026": 1, "2027": 1}}keeps awards for those full fiscal years;{"...great_britain": {"2026": 178/365}}, sets that fiscal year's annual share directly;{"...great_britain": {"2026-07-01": 1}}, a key dated inside the year, leaves the 2026 share unchanged at 86/365. An earlier version of this description said it added one day; the test showed it does not.Use whole-year values or a date range for annual reform scenarios.
A date written directly into already-converted parameters after the model year's start is ignored by that year's annual formula. That is distinct from a
reform=dictionary; the old PR description incorrectly said all reform dictionaries were applied after conversion. The follow-up adds a realSimulationregression for the dated-key and bare-year behavior. The parameter description now states the annual sampling point and this distinction.Savings: modelled, approximated and unmodelled
Truepreserves share 1 in every year and allows a new HB claim, including alongside non-housing UC. Existing rent, capital and take-up gates apply. Accommodation-specific eligible-rent and benefit-cap treatment remain unmodelled; capped joint HB/UC awards also have the unresolved reduction-coordination issue below. No current dataset supplies the status.The accommodation definitions are those linked by TP reg. 2: GB UC Schedule 1 paras. 3A(2)–(5) and 3B Cases 1–2, and NI paras. 4(2)–(5) and 4A Cases 1–2. Specified accommodation includes exempt accommodation; the defined care/support/supervision accommodation; qualifying domestic-violence refuges; and the defined local-authority/Housing Executive hostels. Temporary accommodation concerns the defined statutory homelessness arrangements, not every short stay. These are supplied statuses rather than inferred model conditions.
No additional status inputs were invented for the historical savings. The full award/history conditions above are documented instead.
What happens to families that lose HB
would_claim_uc(a take-up input drawn in policyengine-uk-data) decides it. For unprotected families with the accommodation input absent/defaultFalse, families that claim UC already get UC instead of HB in every year and are unaffected. Families that do not claim it lose HB and get no UC. On the current Enhanced FRS that group is 28.0k working-age benefit units paid HB through the continuing-award route.In reality most of them moved to UC. DWP's Move to UC statistics (Stat-Xplore "Households invited to Move to Universal Credit", tables MtUC Households 3 and 6, to end of March 2026) give these claim rates after a migration notice:
Rows overlap: the second includes the first. "ESA" is Stat-Xplore's label (migration notices go only to claimants of an "existing benefit", which covers income-related ESA), and the first row includes families also on Child Tax Credit. DWP's own headline for the same period is 87% claimed, with 814,703 households given transitional protection (53% of those eligible). The protection column here is of all claimants.
In the dataset (2026 weights), 82% of working-age HB reporters who do not also report UC have
would_claim_ucTrue. The share is 79% for the largest cohort, HB plus income-related ESA (184k units, 633 records). The draw does not look at legacy receipt, so the weighted shares most likely come from calibration. Across all working-age HB reporters the share is 72%. It is pulled down by 35.5k units (SPI-synthetic records and their clones) that report both HB and UC but lost their UC anchor in stage-2 imputation (PolicyEngine/policyengine-uk-data#491).Decision: model-side, this PR only ends the award; it does not create UC claims. The reasons:
would_claim_ucas an input for every year. A PE-UK variable could route former HB claimants to UC, but only by making a take-up assumption the model deliberately leaves to the data.would_claim_ucFalse also report it. Moving more of them onto UC before that is fixed would widen the double payment.Two follow-ups are planned, in this order:
Transitional protection is not modelled for anyone (#1912). An art 7 termination carries none: protection needs a qualifying claim after a migration notice (TP Regs 44(6), 48, 50).
Sensitivity (real runs on this branch, 2027: the abolition reversed, current law, and current law with
would_claim_ucset True for the group). The 28.0k working-age units whose HB this PR ends lose £0.192bn. If they all claimed UC:mainwould be +£0.264bn.PE-UK would also keep paying them £0.249bn of income-related ESA. UC's means test does not count it, so the UC figure stands, but the net income effect would overstate reality, where ESA(IR) ends too.
Invariants (property-tested in
test_housing_benefit_working_age_abolition_properties.py)False, reversing abolition restores the previous continuing-award behavior.False.2026override of 1 covers the whole fiscal year.Tests
Prepared follow-up validation
Follow-up validation: the full Housing Benefit YAML directory plus the affected UC housing-cost and HB/UC mutual-exclusion YAML files passed: 101 passed in 211.90s. Notebook JSON and
git diff --checkpassed. The two property files andpolicyengine_uk/tests/code_healthwere attempted, but the cutoff lost their final pytest session; its log contains only startup output, so no completed Python-suite result is claimed. Process inspection is blocked (ps/pgrepcannot list processes), so another potentially concurrent test was not started. The checkpoint also lacks the post-#1896 generic-child/adult code-health check because the latest-main merge is blocked. No full-dataset or microsimulation suite was run.The follow-up extends
housing_benefit_working_age_abolition.yamlfrom 12 to 21 cases, including final 2027 awards in GB and NI for protected continuing awards (£5,200), their unprotected controls (£0), protected new claims, unprotected new-claim controls, the existing capital gate, and HB alongside non-housing UC. The property tests cover protection in every model year, default-Falseequivalence and corrected dictionary-reform semantics. No microsimulation or full-dataset suite was run for this follow-up, following the task's memory restriction.Historical validation before this review follow-up
The results below describe the original branch validation; the broad suites were not rerun for this follow-up.
New
housing_benefit_working_age_abolition.yamlhas 12 hand-checked cases (rent £5,200, applicable income 0):With the
housing_benefit_payable_shareassertions removed (that variable does not exist onmain), 7 of the 12 fail onmain. The 5 that pass are the cases whose outcome does not change.housing_benefit_eligible.yamlwas vacuous. It compared booleans withabsolute_error_margin: 5, so every expectation passed even when flipped. It now uses margin 0 andwould_claim_uc: falsefor its continuing-award cases.Mutation check. Each of these deliberate breakages fails at least one new test:
Suites. The full YAML suite passes (1,288 cases), as does the non-microsimulation pytest suite (346 passed, 15 skipped).
Dataset impact
Historical validation before this review follow-up: Enhanced FRS 2024-25 (uk-data 1.56.16), the weights then used. These were real runs of
main(1c5b4d0) and this branch in separate environments. No dataset rerun was performed for the follow-up; the new input is absent from existing datasets and itsFalsedefault leaves the previous formula branches unchanged. A third run of this branch with the abolition reversed reproducedmainexactly in every aggregate metric and year.Read these as the model's current take-up gap, not as the abolition's effect. The HB saving and the poverty rise come from 28k units that lose HB and, because their
would_claim_ucdraw is False, get no UC. In reality most of them moved to UC, which on the sensitivity above would more than replace the HB. Once PolicyEngine/policyengine-uk-data#492 lands, these families should mostly move to UC and the sign of the income effect may reverse.Follow-ups
would_claim_ucFalse).housing_benefit_eligiblefilter drops unprotected working-age continuing awards from 2027; supplied protected accommodation remains eligible subject to the other gates.Notes for the reviewer
programs.yamlcontinues to mark Housing Benefitpartial: the accommodation input and new-claim/UC route are prepared, but existing datasets lack the status, special eligible-rent/cap rules are incomplete, and historical savings remain unmodelled or approximated.fixedfragment; the prepared accommodation input and UC rent exclusion addchangelog.d/abolish-working-age-housing-benefit.added.md.benefit_cap_reductionincludes bothhousing_benefit_pre_benefit_capanduniversal_credit_pre_benefit_cap, while finalhousing_benefitanduniversal_crediteach subtract that same reduction. The new accommodation status permits joint awards, so a binding cap can subtract the reduction from both benefits. This follow-up does not choose a cap methodology or claim to fully support capped joint awards. The synthetic final-award HB/UC cases remain valid below the cap; defaultFalseleaves existing outputs unchanged.axiom: TheAxiomFoundation/rulespec-uk#376 queued (SI 2025/1148 arts 3A, 7; SR 2025/176 arts 3A, 7; SR 2016/226 reg 4A; depends on rulespec-uk#370)
🤖 Generated with Claude Code
Final lint:
uv run --frozen ruff format .left 1,098 files unchanged;uv run --frozen ruff check .passed.git diff --checkpassed.