Repository navigation
Conversation
…eria Adds the non_dependant_normally_resides_with input (default: every joint occupier, LHA Guidance Manual 2.110; head-only or other joint occupiers for 2.093 example 2) and routes HB 13D(3) other occupiers through it. Still to do: 13D(2)(a)(i), 13D(3A), reg 74(5) and CTR para 8(5) apportionment, tests, impact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into hb-joint-tenant-shared-non-dependant # Conflicts: # policyengine_uk/variables/gov/dwp/housing_benefit_LHA_allowed_bedrooms.py
A non-dependant who normally resides with several joint occupiers is each one's non-dependant (HB Regs 2006 reg 3; LHA Guidance Manual 2.110): they count in each joint tenant's size criteria (reg 13D(3), (3A)) and keep each from the young individual's shared accommodation rate (13D(2)(a)(i)), and their deduction is apportioned (reg 74(5); CTR Sch 1 para 8(5)). One who lives with only one joint tenant counts for that tenant alone, who bears the whole deduction (2.093 example 2; HBGM A5 5.622). The new BenUnit input non_dependant_normally_resides_with records which, by default every joint occupier. Universal Credit is unchanged (Sch 4 para 9(2)(f)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without sharers the CTR claimant is the family of the household's oldest adult (council_tax_reduction_claimant_benunit), which need not be the is_household_head family that the joint-occupier split targets; the first real enhanced FRS run moved CTR in fewer than 10 survey households. The joint-occupier apportionment (SI 2012/2885 Sch 1 para 8(5)) now applies only where the rent is shared; otherwise the claimant keeps every other family's deductions as before. Adds a Hypothesis differential for the no-sharer case and tightens the CTR bounds to shared households. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model's amounts are float32, so household sums taken in different orders differ by up to about 1e-3; a 1e-6 bound failed on rounding alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1474c90 to
ef6c77f
Compare
Keeps #2016's paired couple weights and April 2017 overnight-care gate, routes the weights through housing_benefit_other_occupiers, and updates the #2016 independent reference so a non-dependant counts for every joint occupier by default (sharers included) and boarders and lodgers for the household head only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ef6c77f to
2389a88
Compare
…' into hb-joint-tenant-shared-non-dependant
2389a88 to
c98930c
Compare
…' into hb-joint-tenant-shared-non-dependant
|
Coordination note from #2016: #2016's head is now e5c36dc. Since 9311e4e it adds |
…pendants - A non-dependant of every joint occupier is split exactly as before by share_of_household_rent (HB) and council_tax_reduction_joint_liability_share (CTR), honouring supplied values; one of some joint occupiers is split by their supplied HB shares over the subset's total (reg 74(5)). - Members of the head's and sharers' families are never anyone's non-dependant through the other-family path, whatever their rent (HB reg 3(2)(a), (d); CTR reg 9(2)(a), (d)). - Documentation of the HB size criteria for sharers. - YAML regressions: supplied shares, subset shares, a zero-rent sharer, CTR without sharers (national and Merton), the CTR couple convention. - Properties cover zero rent and supplied shares; the generator supplies formula shares to every household when any household supplies them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' into hb-joint-tenant-shared-non-dependant
|
Coordination note from #2062 (issue #2059), which makes every programme read one household head. This PR's Whichever of the two PRs lands second needs these readers switched:
#2062 adds a test, |
|
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 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 |
…rers - rent_shared_with_another_family: a sharer flag on the household head's own family shares the rent with no one; the residence helper and the CTR wrapper both use it, so the no-sharer CTR formula holds there. - Without another family sharing the rent, every residence value takes the caller's part, so supplied rent shares give one result. - Document the CTR convention: several jointly liable families each bear one person's part; a non-dependant's only host family, a couple included, bears the whole deduction (s.6 vs s.9 liability not observed). - Properties: supplied zero shares; the old-formula differential compares households where every joint occupier has rent of its own. - YAML regressions for both fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
#2062 is now on This PR still adds formulas that read the raw flag:
Each needs to read the resolved head instead:
|
#2084 has merged, so this branch now targets main. Conflict resolutions: - LHA (#2006, #2134, #2022): main's housing_benefit_LHA_category, housing_benefit_LHA_rate, housing_benefit_severe_disability_premium_applies, LHA_cap, BRMA_LHA_rate, LHA_category and uncapped_BRMA_LHA_rate. This branch's reg 3(3) lines stay in is_lha_shared_accommodation_rate_specified_renter (#2030 is still open, so lha_renter_has_non_dependant and the union responsibility term stay). Its expectations in LHA_claimant_composition.yaml and housing_benefit_lha_order.yaml; the two HB categories this branch added there are now C under main's HB size criteria (reg 13D(3)(b)). - #1944: housing_benefit_pension_age_regulations_apply is main's. Its edit to the deleted is_benefit_cap_exempt_other is dropped. Its tests now read the per-scheme variables; the property file's "before" reform adds the age test to each scheme's exceptions. - #1978: the UC earnings exception and the capped total (benefit_cap_welfare_benefits) sum over is_uc_assessed_claimant. - Carer's Allowance overlap: both specified-benefit exceptions read is_entitled_to_carer_benefit (UC reg 83(1)(i)-(ia), HB reg 75F(1)(h)-(ha)). - #2084 (final head): the stays_on_legacy_benefits helpers stay deleted; its two routing cases are rewritten on the per-scheme variables. - SI 2014/1230 reg 60C: is_uc_benefit_cap_exempt_qualifying_age lifts the UC cap where every claimant has reached the qualifying age for State Pension Credit. That keeps the result #1944 pinned for such awards (inputs only; the model's UC eligibility needs a claimant under that age). - Tests main added that read the removed shared variables now read the per-scheme ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Parent update: What changed under you:
|
Finding C4. Under UC Regs 2013 Sch 4 para 28(4), a renter with a non-dependant is not a specified renter, so para 27's shared accommodation rate does not apply. LHA_allowed_bedrooms gives the claim that counts the household's non-dependants a bedroom for each person in other_family_non_dependants, but lha_renter_has_non_dependant read only is_uc_non_dependant_of_household_head. It missed two groups the bedroom count includes: main's in-unit non-dependants of a family that neither claims nor counts the household's non-dependants, and this PR's foster child aged 16 or 17 who is not a qualifying young person. So a single renter under 35 could get a non-dependant's bedroom, and on main bear their housing cost contribution, while keeping the shared rate. In the C4 case, a non-claiming sharer fosters a looked-after 17-year-old not in education, and the renter of 30 in Maidstone gets category A: a housing costs element of 5,337.96 and Universal Credit of 10,436.76 in 2026. Main gives the same category and amounts. The flag's other-family part now reads other_family_non_dependants, so the flag and the bedroom count name the same people. That case now gets category C: a housing costs element of 10,860 and Universal Credit of 14,753 after the benefit cap. A non-claiming sharer's son of 22 in the sharer's benefit unit moves the same way, from category A to C. The flag's in-family part keeps its rules (#2030 splits it by scheme). Tests: both cases through final Universal Credit, in LHA_other_families_children_and_additional_bedrooms.yaml and LHA_young_person_bedroom.yaml, and property 2 of test_lha_bedroom_young_people_properties.py now also checks that a counting claim that gains a bedroom from another family's person has a non-dependant on the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#2016 has merged. Since #2035's base (1f3ce21), main has also landed #2006 with its review commit (01d140e), #2062, #2015, #2010 and #2007; #2010 carries the in-unit non-dependant deductions (73abf3f) that the closed #2017 proposed. Main's formulas stay. #2035's input, non_dependant_normally_resides_with, is layered on them, so each result equals main's wherever the input keeps its default or no family shares the rent. Conflicts (10): - LHA_allowed_bedrooms.py keeps main's text. #2035 only added count_other= to bedrooms_for_children for the Housing Benefit formula, which on main uses child_bedrooms and no longer calls that function. - lha_renter_has_non_dependant.py keeps main's text. Main already made the variable Universal Credit only, and its Housing Benefit counterpart is main's housing_benefit_has_non_dependant, so #2035's factored within-unit function has no second caller. - housing_benefit_LHA_category.py keeps main's formula (the Housing Benefit severe disability premium test and housing_benefit_has_non_dependant) and #2035's pointer in the documentation. - is_non_dependant_of_household_head.py keeps main's formula and documentation, with #2035's sentence on the joint occupiers a non-dependant normally resides with. - housing_benefit_LHA_allowed_bedrooms.py and housing_benefit_LHA_additional_bedrooms.py keep main's size criteria over each liable claim's occupiers: child_bedrooms, a child placed with another family counts, and a boarder or lodger who pays the householder counts in every liable claim. #2035's housing_benefit_other_occupiers sends each non-dependant to the joint occupiers they normally reside with (LHA Guidance Manual paras 2.093 and 2.110). - housing_benefit_non_dep_deductions.py keeps main's deduction: one for each couple, the non-dependants within a benefit unit, the claimant's exemption. A non-dependant of every joint occupier keeps main's share of the rent times the household's deductions. #2035's split (reg 74(5); HBGM A5 para 5.622) applies to one who resides with only some joint occupiers, and no member of a joint occupier's family counts as another family's non-dependant, whatever its rent or share. - council_tax_reduction_non_dep_deductions.py and _legacy.py keep main's per-claim schemes, in-unit non-dependants, claiming-family rule and applicant's exemption. #2035's council_tax_reduction_joint_liability_non_dep_deductions keeps main's (household - own + own in-unit) x joint liability share for a non-dependant of every joint occupier, and adds #2035's equal split between the liable people of the joint occupiers a non-dependant resides with (Sch 1 para 8(5)), counting liable people as main's council_tax_reduction_joint_liability_share does. - test_lha_bedroom_young_people_properties.py keeps main's text. Its reference count already gives each family liable for the rent the other families' occupiers, which is what #2035's edit added for non-dependants. Outside the conflicts: - housing_benefit_has_non_dependant.py (main's Housing Benefit flag) takes #2035's routing and its rule that a joint occupier is never a non-dependant. #2035's duplicate, housing_benefit_claimant_has_non_dependant.py, goes, and #2035's tests read main's variable. - non_dependant_normally_resides_with.py reads benunit_contains_household_head, as main does everywhere, and its helpers split into resides_with_every_joint_occupier and the part for a non-dependant of only some joint occupiers. - LHA_joint_tenants_shared_non_dependant.yaml expects main's results where #2035 meant no change: a paying lodger counts in each joint tenant's size criteria, and only a family that claims bears national Council Tax Reduction deductions. Two new cases pin a sharer's own adult son beside the head's non-dependant, and a lodger's adult son who pays nothing. - test_joint_tenant_shared_non_dependant_properties.py restates the previous formulas as main has them: one deduction for each couple, the claiming family only, and applicants under the household head's scheme. - changelog.d/2029.fixed.md describes the change against main and drops the leading list marker, which main's fragment check warns about. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main added housing_benefit_severe_disability_premium_applies after #2035's base (01d140e, in #2006), and housing_benefit_LHA_category reads it beside housing_benefit_has_non_dependant. The merge (c7e610b) sent only the second through non_dependant_normally_resides_with, so the two tests could name different non-dependants. A disabled joint tenant lost the conditions, and took the shared accommodation rate, for a non-dependant who lives with the other tenant only, or for another joint tenant with no rent. The conditions' test for non-dependants outside the family now goes through non_dependants_residing_with, as housing_benefit_has_non_dependant does (HB Regs 2006 Sch 3 para 14(2)(a)(ii) with reg 3(1), (2)(d) and (4); LHA Guidance Manual paras 2.093 and 2.110). With the default input each liable family keeps main's result, except that a member of a joint occupier's family with no rent of its own no longer counts. That exception also qualifies the merge message, which says each result equals main's wherever the input keeps its default: a joint occupier with no rent is never a non-dependant in housing_benefit_has_non_dependant, the Housing Benefit deductions and, now, these conditions (68647f9). Main's other severe disability premium tests, has_non_dependant_for_severe_disability_premium and the Council Tax Reduction one, keep their explicit input (severe_disability_premium_joint_occupier_exclusion_applies) and do not read the residence input. Tests: - LHA_joint_tenants_shared_non_dependant.yaml gains four cases: a non-dependant of the other tenant only, of the household head only and of every tenant, and a sharer with a supplied zero share of the rent. - test_joint_tenant_shared_non_dependant_properties.py gains a property: for joint occupiers on the daily living component of Personal Independence Payment, the conditions hold exactly when housing_benefit_has_non_dependant is false. It fails on c7e610b's formula. - changelog.d/2029.fixed.md names the conditions and limits its sentence on a joint tenant with no rent to the Housing Benefit rules it covers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ions After the merge, the bounds property covered only applicants under the scheme of the household head's family. council_tax_reduction_individual_non_dep_deduction reports that scheme, and main recomputes the deductions of an applicant under the other one (#2015). An applicant under the other scheme, such as a pensioner who shares the rent with a working-age household head, had no upper bound. The test now builds the same population with council_tax_reduction_pensioner reversed for each household head's family, and reads each person's deduction under the other scheme from it. Every applicant, and the joint occupiers' parts under each scheme, are bounded by the household's deductions under that scheme. The test does not call the model's helper (individual_non_dep_deduction) for this. Outside a formula, Simulation.calculate returns enum names, so the helper's comparisons with Country and EducationType members fail and every amount comes back zero. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
vahid-ahmadi
left a comment
There was a problem hiding this comment.
1. The base branch is dead.
- This PR targets
in-unit-non-dep-deductions, the branch of #2017. #2017 was closed on 2026-11-09 without being merged. - No checks have run at this head, and the last commit is from 2026-10-02.
- To land, the PR needs retargeting to
mainand rebuilding on main's non-dependant code.
2. Main has since fixed C1's Scottish CTR path.
- At this head,
is_child_or_young_person_for_legacy_benefits.py:41still removes adoption-placed children, and Scotland's working-age CTR reads that definition. - On
main,is_child_or_young_person_for_council_tax_reduction.py:56-67switches Scotland's working-age scheme (whereyoung_person_follows_universal_creditholds) to the UC child/QYP flag. Its comment at:61-62says that flag leaves out only a looked-after child, in line with SSI 2021/249 reg 7(8), which excludes only foster placements. - So a rebuild on
mainwould inherit the fix for C1.
3. S1 is still open.
- The body still says a joint occupier's own in-unit non-dependant is "that occupier's only".
housing_benefit_claimant_has_non_dependant.py:52poolsother_family | own_family.- Either the text or the code needs to change in the rebuild.
Review drafted with AI assistance and checked against the code at c98930c.
UC Regs 2013 Sch 4 para 28(3)-(4): a specified renter is not responsible for a child or qualifying young person and has no non-dependant, both in Universal Credit's terms (regs 4-5 and para 9). lha_renter_has_non_dependant is already UC-only for other families (uc_non_dependants_counted with other_family_non_dependants, kept as is), but its in-unit part still read a blend: a child or young person under either scheme, a placed child, or anyone aged 16. It now reads is_benefit_unit_non_dependant_for_universal_credit, which already leaves out the claimant or partner, a qualifying young person and the renter's foster child (para 9(2)(c)). The union responsibility term in is_lha_shared_accommodation_rate_specified_renter existed to cover the blend: a Child Benefit young person who is not a UC qualifying young person (a 19-year-old in non-advanced education past the UC terminal date) was not on the flag. They are now a non-dependant on it, so the specified-renter test reads UC responsibility only. is_responsible_for_child_or_young_person_for_uc_or_housing_benefit keeps its formula; no formula reads it now, and its docstring says so. In the C4 case of LHA_other_families_children_and_additional_bedrooms.yaml, the sharer's looked-after 17-year-old is the sharer's foster child, so not the sharer's own non-dependant: the sharer's flag goes from true to false. The sharer is 40, so no category changes. Rebuilds part of #2030 (c51820e) on #2035. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HB Regs 2006 reg 13D(2)(a)(i) gives the shared accommodation rate to a young individual "who has no non-dependant residing with him". Reg 3(1) makes a non-dependant anyone who normally resides with the claimant except those in reg 3(2): (a) a member of the claimant's family, whose young person is the Child Benefit one (reg 19), and (c) a child or young person placed with the claimant (reg 21(3)). No provision makes every 16-year-old a dependant for the year, yet housing_benefit_has_non_dependant's in-unit part treated one as such. A 16-year-old outside the Child Benefit young person test was then neither in the claimant's family (so the claimant was a single claimant) nor a non-dependant, and a young claimant living with them got the shared rate. The in-unit part now reads is_benefit_unit_non_dependant_for_legacy_benefits (not the claimant or partner, not a Child Benefit child or qualifying young person, which takes in placed children, and not the household head or a member paying the head as a boarder or lodger), the definition housing_benefit_non_dep_deductions already uses for in-unit non-dependants. The other-family part, #2035's per-joint-occupier attribution (non_dependants_residing_with), is unchanged. Rebuilds part of #2030 (c51820e) on #2035. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LHA_shared_accommodation_non_dependants.yaml has nine cases with each scheme's flag, responsibility and category: a 16-year-old in education and one outside both young person tests; a 19-year-old past the UC terminal date (a UC non-dependant, an HB young person); a looked-after 17-year-old in education and one who has left (a UC foster child, an HB non-dependant); a foster child under 16; a joint tenant's adult son; a lodger's adult son; and a looked-after 16-year-old school leaver. The 16-year-old cases set is_before_first_september_following_16th_birthday to false for everyone, so neither UC reg 5(1)(a) nor Child Benefit (General) Regs 2006 reg 4 holds. The joint tenant's son follows #2035's attribution: he counts for his own family only in housing_benefit_has_non_dependant, while housing_benefit_non_dep_deductions apportions his deduction to both joint occupiers (reg 74(5)). The case pins both. HB regs 3(1) and (4) give one residence test for both, so this is left as an open question rather than changed here. test_lha_shared_rate_non_dependant_properties.py states four invariants. The deduction-implies-non-dependant invariant excepts, for HB, a joint occupier charged part of another joint occupier's in-unit non-dependant (the same split), and an example pins it. The UC and HB person-level definitions agree below 19 except for a looked-after person, whom UC's person-level definition already leaves out as a foster child. The generator draws whether a 16-year-old is before the 1 September after their 16th birthday and whether a 19-year-old is before the UC terminal date. The existing UC flag expectations in LHA_claimant_composition.yaml and rent_of_sharers_boarders_and_lodgers.yaml gain the matching HB flag; the two schemes agree in each. Rebuilds #2030's tests (0b99784, ba6e554, f71697e) on #2035. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n_dependant The flag has been Universal Credit's only since main gave Housing Benefit housing_benefit_has_non_dependant; the name now says so, as #2030 named it. Only the name, the label and the references change: the variable file moves with git mv, and every test and docstring that read the old name reads the new one, #2035's LHA_joint_tenants_shared_non_dependant.yaml and test_joint_tenant_shared_non_dependant_properties.py included, as does OUTPUTS in test_household_head_agreement_properties.py. This commit sits last so the hub can drop it and keep main's name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt tests The in-unit terms of universal_credit_renter_has_non_dependant and housing_benefit_has_non_dependant now read the scheme's own person-level non-dependant definitions, which leave out the household head and a member who pays the head as a boarder or lodger (UC Sch 4 para 9(2)(d)-(e); HB reg 3(2)(d)-(e) and (4)). Say so in both docstrings and in the changelog fragment, and say which tests read the union responsibility variable that no formula reads. Documentation only: no formula changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests LHA_shared_accommodation_non_dependants.yaml: - A lodger's adult son who pays the householder himself is neither family's non-dependant under either scheme (UC Sch 4 para 9(2)(d); HB reg 3(2)(e)(i) and (4)), so both families get A and neither bears a deduction. - A household head in the claimant's benefit unit is not the claimant's non-dependant (UC para 9(2)(d)-(e); HB reg 3(2)(d), (e)(ii)). - The joint-tenant case now pins housing_benefit_shares_accommodation and the bedrooms, and says that 13D(2)(a)(ii) gives the sharer A as well as (a)(i). A new variant rebuts the exclusive-use presumption, so that (a)(i) alone decides and the case turns on whether the other tenant's adult son is the sharer's non-dependant. test_lha_shared_rate_non_dependant_properties.py: invariants 1 and 2 leave out the household head and a member who pays the head, the generator draws payers among a lodger's members aged 16 or over, and explicit payer and member-head examples check the narrowing from the other side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…renter The production UC specified-renter test now reads is_responsible_for_child_or_qualifying_young_person_for_universal_credit (UC Sch 4 para 28(3)) and this PR's UC non-dependant flag. The reference in test_benefit_cap_lha_scheme_split_properties.py already read the new flag but still read the union of both schemes' responsibility tests, so the two could differ outside the benefit-cap split the file compares (inferred, not run: for example a 16-year-old past the UC reg 5(1)(a) date who has left education and pays the householder, or one looked after by a local authority). Read the UC test there too, and say so in the file's header. The reference cap rate keeps the union: invariant 1 relies on the old cap rate taking responsibility under either scheme. The union variable's docstring now names that one reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e disability premium test The premium's within-family term counted any adult outside the claimant's couple, so a household head in the claimant's benefit unit, or a lodger's son who pays the householder, stopped the premium and with it the shared rate exception (HB reg 13D(2)(a), Sch 3 para 14). It now reads is_benefit_unit_non_dependant_for_legacy_benefits, as housing_benefit_has_non_dependant does (reg 3(2)(a), (c)-(e) and (4)). Two shared-rate cases pin both exclusions with a qualifying benefit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c98930c to
5380030
Compare
…ibility f04c111 changed the reference specified renter to read Universal Credit responsibility (UC Regs 2013 Sch 4 para 28(3)) instead of the union of both schemes' tests, but no test told the two apart: the generated children cannot be past the 1 September after their 16th birthday or pay the householder. A lodger aged 25 whose son, 16, has left education, is past that date (reg 5(1)) and pays the householder (para 9(2)(d)) does: the union counts him, UC responsibility and the UC non-dependant test do not, so the lodger is a specified renter under the production test and the reference, and would not be under the union. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The case "A 16-year-old in full-time education is a dependant under both schemes" left the September flag to its formula, so the son was a young person before the 1 September after his 16th birthday (UC Regs 2013 reg 5(1)(a)) whatever his education. Set it false for him and the parent, as the school-leaver case does, so the case differs from that one only in education. No expected value changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…remium change Towncrier supplies the bullet. Add a sentence for 5380030: the Housing Benefit severe disability premium's non-dependant test also leaves out the household head and a member who pays them (HB Regs 2006 reg 3(2)(d)-(e) and (4); Sch 3 para 14(2)(a)(ii)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its one explicit example, the 19-year-old in education, is outside the property's under-19 predicate, so it checked nothing. The 16-year-old school leaver is a non-dependant under both schemes, so the property now compares the two definitions on at least one fixed member. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles; standard reform costings (change in gov_balance); standard reforms: change in each reform's target. Checks failing on both base and head (1)
Counted-once checkThe check raised each of 92 components by £1 per unit in 2026-27 and read every head of its totals household by household: its own head must rise by exactly £1, no other tax head may move, no other benefit may rise, and the model's own total must move by what its heads moved. A response that is not finite breaks every rule. The check measures a head that breaks a rule twice more: once holding every other head at its baseline value, and once holding every other head at its value after the first £1 while the component rises again. The head fails where either measurement still shows the response. The check cannot hold a head at a value that is not finite. In each unit where another head is not finite after the first £1, it holds that head at its baseline value, and the second measurement judges no household the unit belongs to. There a head fails wherever it first broke a rule, or wherever the check could not confirm whether its response contains the component. 0 failed and the check skipped 0.
Provenance
Dataset: Receipts by tax head: head levels
Spending by benefit and service: head levels
Caseloads: head levels
Government balance, each component counted once: head levels
Model totals: head levels
Household income totals: head levels
Population: head levels
Poverty rates: head levels
People in poverty: head levels
Inequality: head levels
Mean household net income in each side's own deciles: head levels
Standard reform costings (change in gov_balance): head levels
Standard reforms: change in each reform's target: head levels
|
The introduction said every 16-year-old outside the young person tests is a non-dependant and everyone aged 16 or over has a bedroom. Both hold only for the first three cases; later cases cover the exclusions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, María and Vahid. I've rebuilt this PR on María's review
Vahid's review
|
Summary
Main applies the LHA shared accommodation rate's non-dependant condition through two flags, one per scheme. Within the benefit unit, the UC flag treated a young person under either scheme as a dependant, and both flags treated every 16-year-old as a dependant for the year. This PR gives each flag its own scheme's person-level definition.
universal_credit_renter_has_non_dependant(renamed fromlha_renter_has_non_dependant)is_benefit_unit_non_dependant_for_universal_credit: aged 16 or over, and not the claimant or partner, a UC qualifying young person (reg 5), the renter's foster child (para 9(2)(c)), the household head, or a member who pays the head as a boarder or lodger (para 9(2)(d)-(e))housing_benefit_has_non_dependantis_benefit_unit_non_dependant_for_legacy_benefits: not the claimant or partner, a Child Benefit child or qualifying young person (reg 19, which takes in one placed with the family, reg 3(2)(c)), the household head, or a member who pays the head (reg 3(2)(d)-(e), (4))The UC specified-renter test,
is_lha_shared_accommodation_rate_specified_renter, now reads UC responsibility only (is_responsible_for_child_or_qualifying_young_person_for_universal_credit, para 28(3)). The UC flag now counts a Child Benefit young person past the UC terminal date, such as a 19-year-old in non-advanced education, as a non-dependant. Main counted them through responsibility, so their renter's category does not change.Both flags now read the definitions that main's deduction formulas already use, and those leave out the household head and a member who pays the head. So a lodger's adult son who pays the householder himself no longer stops the lodger's shared rate (UC B to A, HB C to A). Nor does a household head inside a young claimant's benefit unit (UC B to A, HB C to A). The model takes the head to be liable for the dwelling and a payment to the head to be commercial.
On top of #2035, this PR changes the in-unit terms of both flags, which responsibility test the UC specified-renter test reads, the severe disability premium (below) and the UC flag's name, and adds tests. It no longer adds
housing_benefit_claimant_has_non_dependantor pools every family's non-dependants for HB joint occupiers. Main'shousing_benefit_has_non_dependant, whichhousing_benefit_LHA_categoryalready reads, and #2035's per-occupier input do that work. It also drops its own UC foster-child exclusion, which main's person-level definition already has, and keeps main's UC other-family term.Dropping the HB pooling changes results. At the earlier head
c98930c3a, the HB test counted a joint occupier's own non-dependant, such as the head's adult son, for every joint occupier. This head follows #2035, where he counts for his own family's claim only. So the joint-tenant case expects HB flags of[true, false], where that head expected[true, true]. In the variant where the other tenant has exclusive use, the flag alone decides that tenant's category, and they get the shared rate.Other families' non-dependants
uc_non_dependants_counted). That is the household head's family if it claims UC, otherwise the first family liable for a share of the rent that does. The flag reads the same helper as the size criteria (other_family_non_dependants), and this PR leaves it unchanged.non_dependant_normally_resides_withgives. By default that is every joint occupier (LHA Guidance Manual 2.110); one who lives with one joint tenant counts for that tenant alone (2.093, example 2). A boarder's or lodger's family has none from the householder's household.Severe disability premium
housing_benefit_severe_disability_premium_appliescounted any adult in the claimant's benefit unit, other than the couple and its young people, who neither received a qualifying benefit nor was blind. Its within-family term now readsis_benefit_unit_non_dependant_for_legacy_benefits, as the HB flag does. So the household head and a member who pays the head no longer stop the premium (Sch 3 para 14(2)(a)(ii) with reg 3(2)(d)-(e), (4)). The premium keeps a young claimant off the shared rate (reg 13D(2)(a)), and onlyhousing_benefit_LHA_categoryreads it. Had only the flag changed, a claimant on a qualifying benefit who lives with such a member would have got the shared rate. In the two cases that pin this, the HB category stays C, as before this PR, now because the premium applies.The 16-year-old rule
Main left
(age >= 16) & (age < 17)out of both flags' non-dependants. No provision makes every 16-year-old a dependant for the year, and each scheme's young person test already places a 16-year-old's dates:is_before_first_september_following_16th_birthday).A 16-year-old in the claimant's benefit unit still stops the shared rate under either scheme, unless they are placed with the claimant, looked after by a local authority, the household head or paying the head. Under UC they are a qualifying young person the renter is responsible for (para 28(3)) or a non-dependant (para 28(4)). Under HB they make the claimant a lone parent (reg 2(1)) or are a non-dependant (reg 3).
The rule changed the HB category where a 16-year-old fell outside the Child Benefit test. They were then neither in the claimant's family nor a non-dependant, so a young single claimant living with them got the shared rate. For example, a parent aged 33 whose son of 16 has left education, and is past the 1 September after his 16th birthday, got HB category A before this PR and gets C here. The parent's UC category stays C, because main's UC specified-renter test counted every 16-year-old through responsibility. A looked-after 16-year-old school leaver now stops a young single HB claimant's shared rate in the same way.
Invariants
test_lha_shared_rate_non_dependant_properties.pychecks four invariants on 15 derandomised generated populations per property, plus explicit examples:The generator concentrates ages around 16 to 20 and draws payers among a lodger's members aged 16 or over. It never draws a household head, so an explicit example covers one. Invariant 4's property also runs on an explicit example, a 16-year-old school leaver whom both definitions count as a non-dependant.
Tests
LHA_shared_accommodation_non_dependants.yamlhas 14 cases. Most expect both schemes' flags, and many also expect responsibility, the premium or the category. They cover:Other test changes:
LHA_claimant_composition.yaml,rent_of_sharers_boarders_and_lodgers.yamland one case inLHA_other_families_children_and_additional_bedrooms.yamlgain an HB flag beside the UC flag, and the schemes agree in each.LHA_other_families_children_and_additional_bedrooms.yaml, a sharer's looked-after 17-year-old is the sharer's foster child, so the sharer's UC flag goes from true to false with no change of category.test_benefit_cap_lha_scheme_split_properties.pyreads UC responsibility, as production now does.test_the_reference_specified_renter_reads_universal_credit_responsibilitypins this with a lodger aged 25 whose son of 16 has left education, is past the 1 September after his 16th birthday and pays the householder.is_responsible_for_child_or_young_person_for_uc_or_housing_benefit, which the reference read before, counts him as a 16-year-old. UC responsibility and the UC non-dependant test do not, so production and the reference both make the lodger a specified renter.Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_shared_accommodation_non_dependants.yaml::A looked-after 16-year-old school leaver stops a young single HB claimant's shared rate
Local runs at
db8f457a8:LHA_shared_accommodation_non_dependants.yaml: all 14 cases passed, in two separate runs.test_benefit_cap_lha_scheme_split_properties.py: all 8 tests passed, in two separate runs. On a copy whose reference readsis_responsible_for_child_or_young_person_for_uc_or_housing_benefitagain, the new test fails at its last assertion, that the reference makes the lodger a specified renter.test_lha_shared_rate_non_dependant_properties.py: all 5 tests passed, and the property for invariant 4 passed in a second run.LHA_joint_tenants_shared_non_dependant.yaml(24),LHA_claimant_composition.yaml(17),LHA_other_families_children_and_additional_bedrooms.yaml(45),LHA_young_person_bedroom.yaml(15),rent_of_sharers_boarders_and_lodgers.yaml(19),housing_benefit_lha_category.yaml(9) andclaims_as_single_person.yaml(33) passed.test_severe_disability_premium_reads_the_same_residenceandtest_lha_categoriespassed.538003073left all 14 passing.Local runs at earlier commits:
f04c1115c, the commit before the premium change: the YAML's 12 cases other than the two premium cases,LHA_joint_tenants_shared_non_dependant.yaml(24),LHA_claimant_composition.yaml(17), the 5 tests intest_lha_shared_rate_non_dependant_properties.pyand the 7 intest_benefit_cap_lha_scheme_split_properties.pypassed.f04c1115cwith the same premium formula as538003073: those 12 cases,LHA_joint_tenants_shared_non_dependant.yaml(24),housing_benefit_lha_category.yaml(9),rent_of_sharers_boarders_and_lodgers.yaml(19),test_severe_disability_premium_reads_the_same_residenceandtest_lha_categoriespassed. The two premium cases take their expected values from a run of that copy.e8e8fe369, under the old variable name, 6 of those 12 cases fail: the 16-year-old who has left education, the 19-year-old, the looked-after 17- and 16-year-olds who have left education, and the head and payer cases.The head,
c39a1ffe7, differs fromdb8f457a8only in the YAML file's introductory comment, so the runs atdb8f457a8cover it too.On GitHub, a manual run of the
Code changesworkflow on the branch at538003073passed, including the YAML job and all eight Python shards (run). Atdb8f457a8, the first attempt of the pull request'sCode changesrun passed the YAML job and seven of the eight Python shards, and GitHub cancelled shard 4/8 at the 90-minute job limit (run). Atc39a1ffe7, all 21 checks pass. TheCode changesrun passed the YAML job and all eight Python shards on its second attempt; on the first, GitHub cancelled shard 3/8 at the same limit (run).Impact
CI's aggregate impact run at
c39a1ffe7passed (run). It compared main at2c570224b1with the merge of this pull request into it (9831355c12), on the certified enhanced FRS 2024-25 (policyengine-uk-data 1.58.1), for each fiscal year from 2025-26 to 2031-32. No household's net income changes in any year, and receipts, the government balance, poverty and inequality do not move. The change broke none of the report's checks, and the report flagged no move for review.Runs at earlier commits
An earlier head of this branch,
ef6c77fbe, sat on94380e076, a merge of #2017 at155766bd8and #2016 at9311e4e99. We ran Microsimulation on the released enhanced FRS 2024-25 (sha256 03fe15e40a4c) with base94380e076and branchef6c77fbe. The table gives aggregates only and suppresses any cell under 10 survey households.At
ef6c77fbe:No mutation run of the production code covers the current property tests.
Open items
housing_benefit_has_non_dependantcounts a joint occupier's in-unit non-dependant, such as the head's adult son, for that occupier only, buthousing_benefit_non_dep_deductionsapportions his deduction to every joint occupier (reg 74(5)). HB reg 3(1) and (4) give one residence test for both. Main already gave the same split. Let a non-dependant live with only some joint tenants in Housing Benefit and Council Tax Reduction #2035 addsnon_dependant_normally_resides_with.pyand changeshousing_benefit_non_dep_deductions.py, and this PR changes neither file. The joint-tenant case pins the split, and invariant 3 excepts it.is_lha_foster_childreads the UC "foster child" as a looked-after person under 18 placed with the claimant or partner, through the reg 2 foster parent definition. The WRA 2012 s.40 reading (a child is under 16) would make a looked-after 16- or 17-year-old outside reg 5 a non-dependant. The guidance does not settle it (POLICY-G1 in María's review).is_responsible_for_child_or_young_person_for_uc_or_housing_benefitnow, and it still counts every 16-year-old. The benefit-cap property file's reference cap rate and new test read it, as do two YAML expectations. Removing it is a separate change.fixedtype, but this PR also renames a public variable,lha_renter_has_non_dependant.Stack
main. Built on Let a non-dependant live with only some joint tenants in Housing Benefit and Council Tax Reduction #2035 (hb-joint-tenant-shared-non-dependant, heade8e8fe369), so the diff includes Let a non-dependant live with only some joint tenants in Housing Benefit and Council Tax Reduction #2035 until it lands.axiom:
renter_responsible_for_child_or_qualifying_young_personandnon_dependant_in_relation_to_renter).🤖 Generated with Claude Code