Skip to content

Correct Housing Benefit applicable amounts, disregards, capital and non-dependants - #2198

Closed
anth-volk wants to merge 3 commits into
mainfrom
fix/hb-capital-threshold-history
Closed

anth-volk wants to merge 3 commits into
mainfrom
fix/hb-capital-threshold-history

Conversation

@anth-volk

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

Copy link
Copy Markdown
Collaborator

Fixes #2196
Fixes #2197

Summary

Expand the original capital-threshold correction to implement the six additional Housing Benefit gaps identified by the whole-program audit of release 2.106.1. The changes correct older allowance and deduction histories, add missing child applicable amounts, apply statutory childcare and earnings-disregard conditions, exclude qualifying retained capital, and add non-dependant exceptions and pension-age postponement. Government citations are embedded in the relevant parameters and variables, not only this description. Existing corrections owned by other PRs are preserved rather than copied.

Changes and government evidence

  1. Historical allowances and deductions. Add verified 2015–18 pension-age allowances, the former under-65 category and its 6 December 2018 removal, and 2015–17 non-dependant scales. Retain the original correction from £6,000 to £10,000 on 2 November 2009 and the corrected allowance-age citations. Sources include 2015 GB uprating Schedule 7, 2015 NI Schedule 7, 2016 GB regulation 6, 2017 GB Schedule 7, 2018 GB Schedule 6, category removal and the 2009 capital amendment.
  2. Applicable amounts. Add child personal allowances, historical two-child restrictions and protection, family-premium abolition/protection, separate disabled/enhanced-child premiums, and the claimant-personal ESA main-phase age exception. GB/NI commencement dates are separate; disability additions are not limited to two children. Sources: GB working-age Schedule 3, GB pension-age Schedule 3, 2017 child-limit amendments, 2024 pension-age removal, 2026 working-age removal and family-premium abolition, with NI counterparts cited in code.
  3. Childcare. Test paid/expected work, permitted sickness and paid parental leave, partner incapacity/absence, the provider and individual child-age conditions. Add HB-specific £175/£300 weekly caps. Restrict the deduction to earnings after the ordinary disregard plus actual WTC/CTC; test the additional disregard against the correct earnings threshold without a calculation cycle. Sources: GB working-age regulation 28, pension-age regulation 31, NI regulation 25 and additional disregard paragraph 17.
  4. Earnings. Add the distinct working-age/pension-age £20 grounds, occupation/carer couple rules, protected awards and permitted-work limits. Savings-credit-only HB uses the actual/modelled PC income assessment and subtracts only the permitted HB modifications, avoiding double deduction of the PC disregard. Sources: GB working-age Schedule 4, pension-age Schedule 4, ESA regulation 45, 2017 duration amendment and PC Schedule VI.
  5. Capital and LISA. Add category-specific retained-stock exclusions with dates, provenance and jurisdiction/age rules: July 2026 carers' reassessment payments, injury payments/trusts, qualifying arrears/official errors, home/repair funds, business assets and specified premises. Exclude shared funds before allocation; known claimant/partner ownership, including zero, replaces the household proxy. Require qualifying written medical evidence received by the LISA manager. Sources: GB working-age Schedule 6, pension-age Schedule 6, 2026 GB carers' amendment, NI counterpart and LISA medical provision. Not treating prospective first-home eligibility as unrestricted surrender is an inference from the restricted conveyancer-withdrawal provisions and the HB capital-valuation rule, not an express HB first-home exemption.
  6. Non-dependants. Add normal-home-elsewhere, specified training, ESA assessment-phase, linked hospital-day, custody and military-operation exceptions. Distinguish study from working summer vacations and GB/NI pension-age student rules. Apply claimant-specific 26-week postponement from the first qualifying increase, not annual uprating or every subsequent event; reductions/exemptions apply immediately. Sources: GB working-age regulation 74, pension-age regulation 55, NI working-age regulation 72 and NI pension-age regulation 53, GB postponement regulation 59 and NI postponement regulation 57.

Connected Council Tax Reduction correction

The CI regressions exposed a missing historical personal-allowance category in the connected CTR calculation. Add separate under-65 rates and category dates for England, Scotland and Wales: England removed the category on 6 December 2018, Scotland on 1 February 2021, and Wales for annual schemes beginning 1 April 2022. England/Scotland mid-year changes use preserved Boolean schedules with fiscal_year_segments; the Welsh provision applies by scheme year, not to five days of the preceding model year. Existing higher-age rates remain shared with HB; this does not import HB child additions or HB eligibility into CTR, or duplicate the remaining rate corrections owned by #1925.

Sources: England historical table, Scotland commencement and category removal, Wales scheme-year application and replacement table. These references also appear in code and parameters.

Inputs, timing and coverage

See the assessment documentation for the input contract.

  • Weekly amounts use the model's 52-week annualisation. Ordinary rates retain 30 April fiscal-year sampling. Preserved Boolean schedules plus fiscal_year_segments handle the specified mid-year category/restriction changes.
  • Capital, childcare circumstances and pending deduction changes use an explicit assessment date, defaulting to 6 October to match annual age inputs. This annualises an assessment; it does not reconstruct all weekly awards.
  • Provider, disability-award, payment-provenance, ownership and award-history facts are explicit inputs. Unknown facts do not establish statutory qualification. Datasets are not automatically populated with invented history.
  • Childcare now requires per-child charges/provider facts; aggregate adult childcare_expenses alone is insufficient.
  • The core has no claimant/non-dependant relationship entity. The postponement calculation therefore accepts validated sparse JSON records per benefit unit, with person IDs, previous deduction and dated changes. This is a new data interface requiring review, not an established repository entity pattern. Policy calculations remain vectorised after parsing/validation.
  • PC earnings deductions remain owned by Apply the Pension Credit earnings disregards (SPC Regs 2002 Sch VI) #2019. HB accepts the actual PC assessment or uses the upstream model component when installed. Without Apply the Pension Credit earnings disregards (SPC Regs 2002 Sch VI) #2019 or supplied actual assessment inputs, the PC estimate retains that known upstream limitation.
  • This does not implement every historical compensation scheme, every ESA transitional/component amount, every pre-2015 award or dataset materialisation. Program metadata is marked partial.

Existing PRs and merge composition

This remains draft. The complete audit cannot be considered resolved until the existing corrections below are incorporated and their interactions reviewed. Issue #2196 stays open until that work and this PR are complete.

Existing work Required composition
#1925 rates, #1913 later pension-age cohorts, #2092 forecasts Merge #1925 before #1913; preserve #2092's protected projections and this PR's earlier history.
#2007 general non-dependant/CTR rules, #2017 within-unit deductions, #2035 shared non-dependants Preserve their income/couple/claimant exemptions and rent allocation. Replace #2007's blanket student exemption with this PR's claimant-specific study/summer rules and retain the first-event postponement.
#2019 PC earnings deductions, #1995 PC capital-derived income, #2066 PC income Keep upstream PC calculations there; no second PC earnings calculation is introduced here.
#1969 valuation, #1974/#2131 asset components and ownership Preserve valuation/itemisation; apply the category exclusions and actual-ownership replacement once, with no double-counted LISA.
#2027 award attribution and other existing eligibility work Preserve passporting, savings-credit-only assessment and claimant/partner award attribution.

All open-PR list pages and changed-file pages were inspected for overlapping work. Standalone tests do not establish that every combination of unmerged PRs passes.

Validation

Rebased onto actual main 9f92d53e714e7f0b0381c42d82df9e4ce9ea7195.

  • The first CI run failed 18 cases across eight existing YAML test files. The previously reported 194 focused passes did not include those files. All 18 failures were reproduced and corrected.
  • Final sequential local run: 199 YAML tests passed in 2.91s across all 11 new/altered YAML files.
  • Three new/altered Python files: test_housing_benefit_parameter_history.py, test_housing_benefit_additional_rules.py and test_housing_benefit_non_dep_additional_rules.py — 168 passed in 83.16s.
  • 367 focused tests passed. This includes 28 additional regressions for country-specific historical CTR routing, unpaid/expected-paid work and disability facts that do not establish the statutory condition. Childcare fixtures now report per-child qualifying charges/providers; allowance/disregard expectations follow cited law.
  • No local full suite, broad property-test sweep or external-dataset tests were run, as requested. GitHub CI for the correction commit is pending.
  • make format ran before committing; ruff check ., ruff format --check . and git diff --check pass.
  • Structured audit validates; the canonical issue text is verified against it. All 30 original parameter audit dates and the immutable release review are retained.
  • No local audit tooling, skill changes, research files or CI/deployment changes are included. Documentation build was not run locally; the new document is engineering guidance outside the book.

axiom: needed

@anth-volk
anth-volk force-pushed the fix/hb-capital-threshold-history branch from 5f7187f to 5f9c96b Compare October 8, 2026 20:20
@anth-volk anth-volk changed the title Correct Housing Benefit capital threshold history and age references Correct Housing Benefit applicable amounts, disregards, capital and non-dependants Oct 8, 2026
@anth-volk

Copy link
Copy Markdown
Collaborator Author

Critical fixed

Implemented all six approved additional Housing Benefit groups in this PR: historical allowance/deduction schedules; child/family/disability applicable amounts and the claimant's ESA age exception; childcare qualification and limits; special/permitted-work earnings disregards; capital exclusions/ownership and LISA medical evidence; additional non-dependant exceptions and claimant-specific postponement.

Government references are embedded in parameters and variables. The description now incorporates #2196, explains the new factual inputs and timing conventions, and identifies existing PR ownership. No duplicate Pension Credit earnings formula is added: #2019 retains that correction.

Verification

Rebased onto main 9f92d53e714e7f0b0381c42d82df9e4ce9ea7195. 194 focused cases pass (168 Python, 7 applicable-amount YAML, 19 childcare YAML), executed sequentially. Formatting, lint, whitespace and structured-audit validation pass. No full suite or external-dataset tests were run.

This remains draft for review and dependency composition, particularly the PC assessment, non-dependant and asset changes. Passing standalone tests does not verify every unmerged combination. New factual fields are not silently populated in datasets; coverage is documented as partial. Local audit/skill files are not included, and individual parameter audit dates are unchanged.

@anth-volk

Copy link
Copy Markdown
Collaborator Author

Critical fixed

Fixed all 18 CI failures across eight existing YAML test files. Childcare fixtures now provide per-child charges/provider facts, work tests establish paid or expected-paid work, and applicable-amount/disability-disregard expectations reflect the statutory additions. Government sources determine these changes; expectations were not changed merely to accept a failing calculation.

The failures also exposed a real CTR historical under-65 allowance omission. Added referenced national rates and removal dates, preserving the existing higher-age rates and keeping HB eligibility/child additions out of CTR. Added 28 regression cases, including national cutoff boundaries, unpaid work and insufficient disability facts.

Verification

Sequential local checks: 199 YAML + 168 Python = 367 passed. Lint, formatting and whitespace checks pass. No local full suite or broad property-test sweep was run. GitHub CI for this correction commit is pending; the PR remains draft.

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

Labels

None yet

Projects

None yet

1 participant