Skip to content

Apply each scheme's own non-dependant test to the LHA shared accommodation rate - #2030

Draft
MaxGhenis wants to merge 13 commits into
in-unit-non-dep-deductionsfrom
lha-sar-non-dep-per-scheme
Draft

MaxGhenis wants to merge 13 commits into
in-unit-non-dep-deductionsfrom
lha-sar-non-dep-per-scheme

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

One variable, lha_renter_has_non_dependant, decided the non-dependant condition of the LHA shared accommodation rate for both Universal Credit and Housing Benefit. It blended the two schemes' definitions, and it treated every 16-year-old as a dependant all year. This PR gives each scheme its own test and drops the 16-year-old rule.

Scheme Provision New variable Person-level definition (from #2017)
UC Sch 4 para 28(4) with para 9 universal_credit_renter_has_non_dependant is_benefit_unit_non_dependant_for_universal_credit (16+, not claimant/partner, not a UC qualifying young person)
HB reg 13D(2)(a)(i) with reg 3 housing_benefit_claimant_has_non_dependant is_benefit_unit_non_dependant_for_legacy_benefits (not claimant/partner, not a Child Benefit child or QYP)

Consumers:

Other families' non-dependants:

  • UC gives them to the household head's claim only (para 9(2)(f)), as uc_non_dep_deductions does.
  • HB gives another family's non-dependant to every joint occupier (reg 3(1), (4); reg 74(5)). A joint occupier's own in-unit non-dependant, such as a joint tenant's adult son, is that occupier's only (LHA Guidance Manual para 2.093, example 2; HBGM A5 para 5.622). Both match Charge non-dependant deductions for non-dependants within the claimant's benefit unit #2017's housing_benefit_non_dep_deductions as of 155766b. A boarder or lodger has only their own family's (reg 3(2)(e)).

lha_renter_has_non_dependant is deleted. It was introduced in #1896 and has never been on main.

The 16-year-old rule

The blend excluded (age >= 16) & (age < 17) from non-dependants. No provision makes every 16-year-old a dependant for the whole year:

  • UC reg 5(1)(a) makes a 16-year-old a qualifying young person "up to, but not including, the 1st September following their 16th birthday".
  • For HB, the young person is the Child Benefit one (reg 19). Child Benefit (General) Regs 2006 reg 7 Case 1 keeps a school leaver a qualifying young person only until the week including the next terminal date (the last day of February, May, August or November). Reg 5 adds a 20-week extension for a 16-17-year-old registered with a careers service.

The annual model cannot place these dates. It does not need to for the shared rate:

  • UC: a 16-year-old is either a qualifying young person the renter is responsible for, which fails para 28(3), or a non-dependant, which fails para 28(4).
  • HB: they are either a young person in the claimant's family, so the claimant is a lone parent and not a "single claimant" or young individual (reg 2(1)), or a non-dependant (reg 3).

Either way there is no shared rate. Each test now uses the model's own young person definition. The one case where the rule mattered was wrong:

  • HB's single-claimant test (is_single_person) uses the Child Benefit young person, which has no 16-year-old rule.
  • So a 16-year-old outside the Child Benefit test was not a dependant there, and the rule also stopped them being a non-dependant.
  • A young single claimant living with them therefore got the shared rate. Example: a parent aged 33 with a son of 16 who has left education got HB category A on the base and gets C here. UC gives C on both.

The same rule remains in is_responsible_for_child_or_young_person_for_uc_or_housing_benefit, now used only by the benefit cap. There the classification does change the rate, so it is left to a separate task.

Invariants

These hold for every input. All four are Hypothesis tests in test_lha_shared_rate_non_dependant_properties.py:

  1. UC: a benefit-unit member aged 16 or over, other than the claimant or partner and not looked after by a local authority, always stops the renter being a specified renter.
  2. HB: such a member who is not placed with the family (reg 21(3)) always stops the claimant being a young individual with no non-dependant.
  3. Deduction implies non-dependant: any family charged a UC or HB non-dependant deduction has a non-dependant under that scheme's test. This is a differential check against the deduction formulas.
  4. Agreement below 19: for a member under 19 who is not the claimant or partner, the UC and HB person-level definitions agree. They diverge from 19, when UC reg 5(1)(b) ends at the 1 September after the 19th birthday and Child Benefit reg 3(4) does not.

Mutation testing. Five mutants were tried:

  • M1: the 16-year-old rule put back into HB;
  • M2: UC drops in-unit non-dependants;
  • M3: HB drops other families' non-dependants;
  • M4: UC uses the legacy definition;
  • M5: the specified renter ignores the UC non-dependant.

In round 1, M1, M3 and M4 survived: the generator rarely produced the deciding cases, and HB deductions are £0 at nil income. The properties now concentrate ages around 16-20 and give members and other families earnings. Explicit examples pin a 16-year-old school leaver, a 19-year-old in education and a shared house with earning non-dependants. In round 2, all five mutants are killed and the unmutated code passes.

Impact

These are real Microsimulation runs on the released enhanced FRS 2024-25 (sha256 03fe15e40a4c). Base is 94380e076 (#2017 at 155766b plus #2016 at 9311e4e); branch is ef6c77fbe. Figures are aggregates only, and any cell with fewer than 10 survey households is suppressed.

2025 2026
Benefit units whose UC LHA category changes 0 0
Benefit units whose HB LHA category changes 0 0
UC specified renters switching on or off 0 0
UC, HB, household net income (BHC/AHC), poverty unchanged unchanged
Benefit units whose non-dependant flag changes (UC or HB) fewer than 10 survey households (suppressed) fewer than 10 survey households (suppressed)

The fix is a law cleanup with no measurable fiscal effect on the current data. The few 16-year-olds outside the young person test now count as non-dependants, and none was in a benefit unit where that moves a category.

Tests

Stack and coordination

Related: #2014.

axiom:

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits October 1, 2026 14:30
…bedrooms in the LHA size criteria

Universal Credit (UC Regs 2013 Sch 4 paras 9-12): the household head's
non-dependants' children are in the extended benefit unit and share rooms
with the renter's children; foster children are in no one's extended benefit
unit; foster parents and adopters with a child placed (para 12(4)-(5)) and
renters whose household includes someone with non-resident overnight care
(para 12(A1), (3)) get one additional bedroom for each condition (12(9)).
Foster parents are excepted from the shared accommodation rate (29(9A)), and
armed forces independence payment counts in the para 29(5) exception.

Housing Benefit (HB Regs 2006 and HB (SPC) Regs 2006 reg 13D): the children
of non-dependants, boarders and lodgers are occupiers (13D(12)); a child
placed with the claimant as a foster child or for adoption is not (reg
21(3)); a qualifying parent or carer and a person who requires overnight care
give one additional bedroom each (13D(3A)-(3B)) and are not young
individuals.

New inputs: is_placed_for_adoption, is_approved_foster_parent_without_placement,
has_non_resident_overnight_carer.

Fixes #2011

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HB reg 21(3) names only children placed with the claimant or partner, but
DWP treats foster children as not occupying the dwelling (LHA Guidance
Manual para 2.033; HB circular A21/2013 para 22), as Universal Credit does
(UC Sch 4 para 9(2)(g)). The household head's Housing Benefit size criteria
and overnight-care bedroom now leave out a child placed with a non-dependant,
boarder or lodger as a foster child or for adoption. Adds a YAML case and
tightens the foster-child Hypothesis property to an exact effect on every
family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HB Regs 2006 reg 13D(3)(a) puts any occupier couple in "a couple" (one
bedroom; LHA Guidance Manual para 2.012), so a non-dependant's, boarder's or
lodger's couple adds one bedroom to the household head's HB size criteria,
not two. Universal Credit is unchanged: each non-dependant who is not a
child has a bedroom (UC Sch 4 para 10(1)(c); ADM F3112 note 1). Reported by
the disabled-rooms session (chip task_cc724597).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Childcare Payments (Eligibility) Regs 2015 reg 4(2)(d): no one is
responsible for a child placed for adoption by an adoption agency in the
home of a person proposing to adopt them. The new is_placed_for_adoption
input is documented for each scheme it touches: Universal Credit and
Pension Credit treat the adopter as responsible (UC reg 4A(1)(c); SPC Sch
IIA para 4(3)(c)); HB, the legacy schemes and English pensioner CTR do not
count the child in the household; CTC's rule 4 case B depends on local
authority payments and is not modelled. Changelog covers the HB occupier
couple rule too. Found by the first review attempt's probes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt test predicates

- HB occupier couple: count the half rooms only when both members are
  counted, so a benefit unit flagged as a couple without two adults no
  longer produces a fractional bedroom (and an enum error downstream).
- UC: read "child" as under 18 for foster children throughout
  (is_lha_foster_child; parameter gov.dwp.LHA.foster_child_age_limit): a
  looked-after 16- or 17-year-old placed with the renter has no room of
  their own, and their overnight care counts under para 12(A1)(c).
- Overnight care beyond the renter or HB claimant and partner applies from
  1 April 2017 (SI 2017/213; parameter overnight_care_beyond_claimant).
- youngest_child_age_for_legacy_benefits leaves out a child placed with
  the family (IS reg 16(4)).
- Property tests derive the added person's status from the inputs (UC
  reg 5, Child Benefit QYP, looked after under 18) instead of the model,
  bias the generator towards looked-after young people, and give the added
  person overnight care in the reference property.
- YAML: 13 new cases pinning the reviewer's surviving mutants and probes,
  a case with an inconsistent couple flag, and a 2016 date-gate case; the
  fostering-couple case now uses ages that detect counting the foster
  child; corrected citations.
- Documentation: Scottish working-age CTR adoption gap, Scottish devolved
  disability benefits, HB 13D(3A)(a)(iii) reading, reg 21(3)(a) and
  s.22C, and the overnight-carer and adoption inputs.

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

- is_looked_after_child: the looked-after flag applies only under 18
  (Children Act 1989 ss.22(1), 105(1)). It replaces the raw flag in the UC,
  CTC and Pension Credit child tests and in the legacy placement test, so a
  flagged 18- or 19-year-old qualifying young person keeps their UC room
  and gives no HB carer room. The looked-after age limit moves to
  household.demographic.looked_after_child_age_limit.
- HB occupier couples need is_couple as well as two counted claimant or
  partner members, so relation_type SINGLE is respected again.
- Income Support Sch 1B para 2: a single claimant or lone parent with whom
  a child is placed by a local authority is a prescribed category.
- YAML: a looked-after 17-year-old claimant (pins the claimant-guard
  mutant), a looked-after 18-year-old with a single renter of 30, a
  non-dependant pair entered as single, two IS para 2 cases.
- Property predicates apply the under-18 limit and accept any non-tertiary
  education; P5 renamed to a reference count. The child-definition
  property reference applies the same under-18 limit.
- Documentation: HB reg 19(2)(c) eligible children; looked-after flag
  under 18 only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the lha-sar-non-dep-per-scheme branch from ef6c77f to 2389a88 Compare October 2, 2026 08:45
MaxGhenis and others added 7 commits October 2, 2026 04:45
UC Sch 4 para 28 now uses the UC para 9 non-dependant and UC responsibility
(regs 4-5); HB reg 13D(2)(a)(i) uses the HB reg 3 non-dependant with the
Child Benefit young person (reg 19), including non-dependants of joint
occupiers (reg 74(5)). The blanket rule treating every 16-year-old as a
dependant is removed: a 16-year-old outside each scheme's young person test
is a non-dependant, and one inside it is a dependant who also fails the
specified-renter / single-claimant test, so neither scheme's shared rate
depended on the rule, except that HB gave the shared rate to a young single
claimant living with a 16-year-old who was neither.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers a 16-year-old in and out of education, a 19-year-old past the UC
terminal date (a UC non-dependant, an HB young person), looked-after young
people in and out of education, a foster child, and a joint tenant's adult
son (HB counts him for both tenants, UC for the head only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Invariants: a 16+ member who is not looked after (UC) or placed (HB)
always defeats the shared rate, however classified; any UC or HB
non-dependant deduction implies a non-dependant under that scheme; and the
UC and HB person-level definitions agree below 19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mutation testing showed three surviving mutants (the 16-year-old rule back
in HB, HB's other-family term dropped, UC using the legacy definition): the
generator rarely produced the deciding cases and HB deductions were zero at
nil income. Ages now concentrate around 16-20, members and other families
have earnings, and explicit examples pin a 16-year-old school leaver, a
19-year-old in education and a shared house with earning non-dependants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follows #2016's reading of "foster child" (UC Sch 4 para 9(3), with the
reg 2 foster parent definition) as a looked-after person under 18 placed
with the renter (is_lha_foster_child), so a looked-after 16- or 17-year-old
who is not a qualifying young person is excluded by para 9(2)(c) rather
than counted as a non-dependant. The WRA 2012 s.40 reading (a child is
under 16) would count them; the code records both. HB is unchanged: such a
person is not a young person (reg 19), so reg 21(3) does not apply and they
are a non-dependant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… deduction code

Follows #2017 at 2d54628 (review r2 F3/F4): a non-dependant normally
resides with each joint occupier whichever family they belong to (HB reg
3(1), (4); reg 74(5)), including a joint tenant's own adult son and a
lodger's adult son (reg 3(2)(e)(i) excludes only the person liable to pay
the claimant). A boarder or lodger keeps only their own family's.

Both flags now count the same people the deduction formulas charge, so a
deduction always implies a non-dependant, including for a family with no
claimant or partner (review r1 finding 3). "Joint renter" in the UC
docstring becomes "sharer of the rent" (in UC Sch 4 it means a joint
claimant; review r1 finding 6).

New YAML cases: a lodger's adult son (HB non-dependant of the householder
and the lodger; UC counts him in the lodger's claim only, para 9(2)(f)),
and a looked-after 16-year-old school leaver with a young single HB
claimant (C, not A; #2016 review r2 N9).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the lha-sar-non-dep-per-scheme branch from 2389a88 to c98930c Compare October 2, 2026 08:51
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Coordination note from #2016: #2016's head is now e5c36dc. Since 9311e4e it adds is_looked_after_child (the looked-after flag counts only under 18), which the UC, CTC and Pension Credit child tests and the placement test now use. It also replaces gov.dwp.LHA.foster_child_age_limit with household.demographic.looked_after_child_age_limit, and adds IS Sch 1B paras 2 and 2A. Please merge origin/lha-nondep-children-foster-rooms into this branch before it lands.

@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Coordination note from #2062 (issue #2059), which makes every programme read one household head.

This PR's LHA_additional_bedrooms, LHA_allowed_bedrooms, housing_benefit_LHA_additional_bedrooms and universal_credit_renter_has_non_dependant read the raw is_household_head input. That input can flag several members of a household, or none, and programmes reading it directly then disagree about whose household it is. #2062 adds is_resolved_household_head (exactly one per household) and defines benunit_contains_household_head from it.

Whichever of the two PRs lands second needs these readers switched:

  • family level: benunit.any(person("is_household_head", period)) becomes benunit("benunit_contains_household_head", period), and person.benunit.any(person("is_household_head", period)) becomes person.benunit("benunit_contains_household_head", period);
  • person level: person("is_household_head", period) becomes person("is_resolved_household_head", period).

#2062 adds a test, test_only_the_resolved_head_reads_the_flag, that fails while any module other than is_resolved_household_head reads the raw flag. If this PR lands first, #2062 makes the switch when it merges main. If #2062 lands first, the switch belongs here. Survey results do not change either way: the Enhanced FRS has exactly one flagged head per household.

@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Coordination with #2089 (each scheme its own benefit cap and LHA shared-accommodation rules), stacked on #2084.

For the LHA, #2089 adopts #2006's names and helpers, so this stack and #2089 meet on the same files:

#2089 keeps lha_renter_has_non_dependant for both schemes. Both shared-rate tests also read is_responsible_for_child_or_young_person_for_uc_or_housing_benefit: a dependant under one scheme only is the other scheme's non-dependant, which the proxy misses.

When this stack and #2089 meet, take this stack's versions of the HB LHA files: the (a)(ii) route, the non-dependant tests and the overnight-care and foster exceptions. Then:

#2006's housing_benefit_LHA_category already has no single-claim path for a couple, which is right for HB.

This branch has not been deployed

No deployments
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