Skip to content

Name each benefit's LHA category and determination; drop dead UC LHA test inputs - #2134

Merged
MaxGhenis merged 2 commits into
mainfrom
lha-hb-category-followups
Oct 4, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
lha-hb-category-followups

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #2022 (published LHA rates): the three nonblocking findings from its round-4 review. No model output changes.

What and why

  • The HB notebook named the wrong category. It cited LHA_category, which since Give sharers, boarders and lodgers their own rent, tenure and LHA category #2006 is Universal Credit's category, for the Housing Benefit cap. It now names housing_benefit_LHA_category (HB Regulations 2006 reg 13D) and housing_benefit_LHA_rate.
  • Which determination each benefit reads.
    • benunit_lha's docstring said both benefits read one table. Housing Benefit reads the weekly determination (Rent Officers (Housing Benefit Functions) Order 1997) through its own category. Universal Credit reads the monthly one (Rent Officers (Universal Credit Functions) Order 2013) through LHA_category (uc_LHA_cap).
    • BRMA_LHA_rate's label and documentation now say it is the weekly determination read for the UC category. No formula reads it.
  • Dead test inputs. Four uncapped_BRMA_LHA_rate inputs in Give sharers, boarders and lodgers their own rent, tenure and LHA category #2006's UC tests (rent_of_sharers_boarders_and_lodgers.yaml and housing_benefit_meals_deduction.yaml) stopped affecting anything once uc_LHA_cap read the published monthly rates in Use published LHA determinations and apply Sch 3B paras 3 and 3A #2022. Each case now sets brma: MAIDSTONE explicitly, and the comments cite the published Maidstone UC rates: £750 a month (one bedroom) and £905 (two bedrooms) for 2025-26 and 2026-27. A stale comment's £11,892.40 two-bedroom rate becomes £10,860. Rent binds in every case, so no expected value changes.
  • From this PR's review.
    • test_mixed_age_couple_properties.py drew a BRMA_LHA_rate input that no formula reads, so Hypothesis varied nothing. It now draws the household's BRMA from four North West areas, whose published rates span a similar range (one bedroom, 2026: £88.60 to £178.36 a week).
    • lha_published_rates.yaml now pins the £750 one-bedroom UC rate those comments cite: Maidstone one-bedroom, 2025-26 (VOA £172.60 a week; DWP £750 a month).
    • A long docstring line in housing_benefit_LHA_rate is rewrapped.

Test plan

  • Not applicable for external-source YAML values: no expected value changes. The cited rates are the published DWP Maidstone UC rates, which the model reproduces (checked with lha_rates for 2025 and 2026).
  • policyengine-core test policyengine_uk/tests/policy -c policyengine_uk: 2,220 passed at 1200939
  • pytest policyengine_uk/tests/test_mixed_age_couple_properties.py
  • ruff format --check and ruff check on the changed Python files
  • Changelog fragment in changelog.d/

axiom: n/a: documentation and test fixtures only; no change to policy logic

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits October 4, 2026 09:15
…inputs

Follow-ups from the round-4 review of #2022:

- The HB notebook named the Universal Credit category (LHA_category)
  for the Housing Benefit cap. It now names housing_benefit_LHA_category
  (HB Regs 2006 reg 13D) and housing_benefit_LHA_rate.
- benunit_lha's docstring said the two benefits read one table. Housing
  Benefit reads the weekly determination through its own category,
  Universal Credit the monthly one through LHA_category. BRMA_LHA_rate's
  label and documentation now say it is the weekly determination read
  for the UC category, which no formula reads.
- Four uncapped_BRMA_LHA_rate inputs in #2006's UC tests stopped
  mattering once uc_LHA_cap read the published monthly rates. They are
  replaced by an explicit brma: MAIDSTONE, and the comments cite the
  published rates (750 and 905 a month). Rent binds in every case, so no
  expected value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the review of this PR:

- test_mixed_age_couple_properties drew a BRMA_LHA_rate input that no
  formula reads, so Hypothesis varied nothing. It now draws the
  household's BRMA from four North West areas, whose published rates
  span a similar range (one bedroom, 2026: GBP 88.60 to 178.36 a week).
- lha_published_rates.yaml pins Maidstone one-bedroom for 2025-26: VOA
  GBP 172.60 a week (8,975.20 a year) and DWP GBP 750 a month (9,000),
  the UC rate the updated fixtures cite.
- Rewrap a long docstring line in housing_benefit_LHA_rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Handed to the UK hub (only CI remains).

  • Head: 1200939.
  • Independent review (Subfleet, Opus, standard tier):
    • APPROVE at e3f06f3: ~/reviews/lha-published-rates-2026-10-01/review/REVIEW_2134.md.
    • Delta APPROVE at 1200939, after its nits N1–N3 were fixed: review/REVIEW_2134_r2.md.
    • Both reviewers could only read the code. I ran the commands they asked for, and both pass.
  • Passed:
    • CI: Lint, the four install/smoke-import jobs and the docs build.
    • Local at 1200939: policyengine-core test policyengine_uk/tests/policy (2,220 passed), test_mixed_age_couple_properties.py, and ruff.
  • Pending: CI Test (run 37205456584, started 13:23Z).
  • Depends on: nothing. It follows Use published LHA determinations and apply Sch 3B paras 3 and 3A #2022, which is merged (c004e53).
  • Decision: none needed. Documentation and test fixtures only; no model output changes.
  • Merge: a merge commit with --match-head-commit 12009399e17ff045624bf9300022ff56068b82d3 once Test passes.
  • Follow-ups owed: none.

@MaxGhenis
MaxGhenis merged commit f2758ce into main Oct 4, 2026
7 checks passed
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Merged by the UK hub, which took this PR on handoff from local_fa32d389, under the PE-UK merge-on-gates rule.

  • CI: every check passed at 12009399e, and gh pr checks exits 0.
  • Review: Opus 5.5 APPROVE at e3f06f333, then delta APPROVE at 12009399e after nits N1–N3 were fixed (~/reviews/lha-published-rates-2026-10-01/review/REVIEW_2134_r2.md).
  • Impact: documentation and test fixtures only, with no model output change. It follows Use published LHA determinations and apply Sch 3B paras 3 and 3A #2022 (merged c004e53).

@MaxGhenis
MaxGhenis deleted the lha-hb-category-followups branch October 4, 2026 14:01
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.

1 participant