Repository navigation
Let a non-dependant live with only some joint tenants in Housing Benefit and Council Tax Reduction - #2035
Let a non-dependant live with only some joint tenants in Housing Benefit and Council Tax Reduction#2035MaxGhenis wants to merge 15 commits into
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>
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>
…' into hb-joint-tenant-shared-non-dependant
…' into hb-joint-tenant-shared-non-dependant
…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, |
…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:
|
juaristi22
left a comment
There was a problem hiding this comment.
Reviewed b435c91e2fee7f6834264f307e653905e5f14e15 against the pinned #2016 parent (1f3ce21a08e8341b25af524bc04d3c940ad844bd). The review of this PR's changes is complete, with no additional findings.
The shared/non-shared residence routing agrees with the DWP joint-tenant examples and the HB/CTR deduction rules. All 29 focused repository tests passed, together with a native six-world diagnostic through final Housing Benefit and CTR routing. The diagnostic also confirmed that changing this HB/CTR residence input leaves final Universal Credit and household income unchanged in the UC control. Local validation used Core 3.33.2 rather than the snapshot lock's 3.32.9; it is not a full-suite or population validation.
I am leaving a comment rather than approving: the three findings on parent #2016 remain open, this PR is still a draft on that stack, and there are no passing checks at this exact head. In particular, the parent fix for the adoption-placement mask must compose with this PR's new claimant-specific callback. Please carry the parent fixes through the stack, then retarget after the parent merges and run the required checks. This review does not clear the parent findings or certify that future combined head.
juaristi22
left a comment
There was a problem hiding this comment.
CI follow-up at b435c91e2fee7f6834264f307e653905e5f14e15: REQUEST CHANGES — C1: add the required named reproducer.
Fix evidence fails with Missing named reproducer. The current description has no Reproducer: line. The trusted-main contribution rule/checker requires a named executable regression for a fix that changes model source; this PR adds 2029.fixed.md, so the n/a exemption does not apply.
Add the appropriate changed regression selector to the description and rerun the evidence check. An existing selector was verified by inspection: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::Joint tenants with a shared non-dependant each count them (LHA Guidance Manual 2.110). Its execution was not repeated in this CI-only follow-up.
The targeted evidence-gate review is complete. The Draft/integration hold remains after #2016’s merge: integrate the current parent/main, resolve conflicts and validate the resulting head before approval. This follow-up does not certify the integrated model result or transfer the parent’s approval.
juaristi22
left a comment
There was a problem hiding this comment.
Follow-up at unchanged b435c91e2fee7f6834264f307e653905e5f14e15: C1 RESOLVED within the CI/repository-evidence scope.
The description now names the exact changed regression selector requested in the prior review:
policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::Joint tenants with a shared non-dependant each count them (LHA Guidance Manual 2.110).
The unique named case exists in the file added by this PR and has executable output assertions. The current trusted-base checker and contribution guide still require that evidence for this fix, and official Fix evidence job 132929680110 passed at this exact head, replacing the earlier Missing named reproducer failure. No new tests or model calculations were needed to verify this PR-description-only remediation.
The overall review remains PARTIAL for whole-PR approval readiness. This follow-up does not recertify the historical country-model/source inventory or an integrated child head. The existing parent-integration/provenance/required-check holds and Draft status remain; parent approval is not transferred. There is no newly confirmed statutory or model defect from this evidence-gate check, and this comment is not an approval.
#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>
juaristi22
left a comment
There was a problem hiding this comment.
Review status: COMPLETE — 0 open findings and 0 material evidence gaps at e8e8fe369528e3379186266a9c12d41fce065036.
The previous named-reproducer finding C1 remains resolved. This round reviewed the current 13-file feature against integrated main, including the residence input, HB size criteria/SAR, severe-disability attribution, deduction apportionment and affected CTR/UC dependencies. Both current main and the reviewed #2016 parent are actual ancestors; the previous integration and source-provenance holds are resolved by current evidence.
Independent policy/source and code/test reviews found no new blockers. 128 tests passed (120 YAML, 8 Python), plus three source-qualified continuing-HB households covering six final claims. Shared residence produces £9,889.10 for each joint tenant; sole-host residence produces £9,378.20 for the host and £5,323.24 for the other tenant, reversed when the other tenant is the host. These use actual demographic/income inputs, computed eligibility and deductions, and an explicit 2025 continuing-award/no-UC/no-expired-migration-notice premise.
The official LHA Manual examples at 2.110 and 2.093 support the shared/sole-host distinction. HB regulation 74(5) supports allocation among relevant joint occupiers with regard to rent proportions; CTR uses the relevant liable-person unit instead. The affected SDP dependency was checked against HB Schedule 3 paragraph 14. The current source packet contains 24 validated official original/extract pairs.
This remains bounded by the disclosed DWP-versus-literal occupier interpretation, arbitrary subsets of three-or-more sharer families, in-unit adult coordination, CTR couple-liability convention and unrepresented SDP carer relationships. The tests do not certify all such factual arrangements. Historical population figures remain attributed to their stated old heads/data; no current population rerun was performed.
Approval deferred: this PR is still a draft, and hosted Python/aggregate checks are still running at the reviewed head. I will revisit readiness and exact-head CI on a later run without repeating this completed code review.
juaristi22
left a comment
There was a problem hiding this comment.
Review status: COMPLETE — 0 open findings or material evidence gaps at unchanged head e8e8fe369528e3379186266a9c12d41fce065036, with the updated title and description reviewed.
The new description now matches integrated main, the actual HB non-dependant/SDP routing, the sole/subset-host feature and the documented default/no-sharer exceptions. All three named reproducers are valid current YAML cases. The 18→20→24 case history and seven property functions/eight invariants were checked from the git objects. C1 remains resolved; the prior parent-integration and source-provenance holds remain closed.
The exact code, dependencies, tests and workflows are unchanged. I retained the independently validated 128 passing tests and three residence households/six final-HB claims from the completed same-head review; no tests or model calculations were rerun. Author-reported larger local runs and old population comparisons remain attributed historical evidence rather than newly certified current-head results.
The new official Parliament V9 guidance quotation was verified on physical page 2 and agrees with the previously checked UC one-claim provision. The current source packet has 25 validated official original/extract pairs. The arbitrary-subset, in-unit adult, DWP/literal occupier, CTR couple-liability and SDP carer limitations remain explicit.
Approval remains deferred: the PR is still a draft and aggregate CI is pending at this exact head. Completed observed checks pass. Future readiness/CI changes can be checked without repeating the completed code review.
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
|
juaristi22
left a comment
There was a problem hiding this comment.
Review status: COMPLETE — approved at e8e8fe369528e3379186266a9c12d41fce065036, with 0 open findings and 0 material evidence gaps.
The updated description's CI completion and aggregate-report attribution have been reconciled. Code, tests, dependencies and workflows are unchanged from the completed independent policy/source and code/test review. C1 remains resolved, and the previously reviewed parent integration and source-provenance holds remain closed.
I retained the exact-head 128 passing tests plus three source-qualified residence households/six final Housing Benefit claims, and validated the current evidence custody and 25 official original/extract pairs. No tests, household calculations or private population runs were repeated for this readiness update.
The PR is Ready. All 21 latest checks pass at this exact head, including current Fix evidence, YAML, all eight Python shards, Result and aggregate impact. Older superseded attempts are not counted as current successes. The final publication guard also verifies applicable required checks and current review activity.
The official aggregate report supports the new description: it compares main d3db7ac07d with synthetic merged head 479615141a on certified data 1.58.1, reporting no household-net-income change and no newly broken check. Its inherited VAT-sign failure on both sides is retained as such. These remain attributed CI measurements, without independent private-data recertification.
Approval covers the reviewed changed behavior and affected dependencies with the disclosed residence-input, arbitrary-subset, in-unit adult, DWP/literal occupier, CTR couple-liability and SDP-carer limitations preserved.
|
An independent review of this PR at e8e8fe3 (the diff from Two comments still say every non-dependant normally resides with every joint occupier ( María, with your approval at e8e8fe3 and all 21 checks passing there, you can merge it now. |
juaristi22
left a comment
There was a problem hiding this comment.
Review status: COMPLETE for this documentation follow-up at e8e8fe369528e3379186266a9c12d41fce065036. No new calculation blocker or material evidence gap; one nonblocking suggestion.
S1 — Qualify the universal-residence comments. The comments in housing_benefit_non_dep_deductions.py:89–92 and council_tax_reduction_non_dep_deductions.py:74–79 still say the non-dependant normally resides with every joint occupier. Although inherited, that wording no longer covers the new HOUSEHOLD_HEAD_FAMILY and OTHER_JOINT_OCCUPIERS choices, whose deductions follow the selected hosts. Please qualify the sentences as the default/applicable own-family case and refer to non_dependant_normally_resides_with for the other choices. One suggestion covers both locations.
This records the documentation follow-up you identified. C1 remains resolved. I checked the comments and surrounding routes statically; no model tests, source audit or private review process was repeated or certified. This comment does not renew approval or certify integration with newer main.
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>
Fixes #2029
Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::Joint tenants with a shared non-dependant each count them (LHA Guidance Manual 2.110)
Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::A joint tenant's sister counts only for that tenant (LHA Guidance Manual 2.093 example 2)
Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::A disabled joint tenant keeps the severe disability premium conditions when the non-dependant lives with the other tenant only
Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::A sharer with no rent is never its own or the head's non-dependant
Reproducer: policyengine_uk/tests/policy/baseline/finance/benefit/family/LHA_joint_tenants_shared_non_dependant.yaml::A sharer given no share of the rent is not a non-dependant in the severe disability premium conditions
This branch contains
mainat d3db7ac, merged in c7e610b, and two fixes after the merge: b0584b6 and e8e8fe3. It targetsmain. It sat on #2016's branch until #2016 merged as d9b95fd. Review 5884862880 asked for the merge withmain.What changes
On
main, Housing Benefit counts a household's non-dependants for every family liable for the rent, in the size criteria and in the shared accommodation test.mainalso apportions their Housing Benefit and Council Tax Reduction deductions between those families (#2006). That matches a non-dependant shared by all the joint tenants (LHA Guidance Manual para 2.110).The manual also describes a non-dependant who lives with one joint tenant only. In para 2.093 example 2, Susan counts for her sister Sarah and not for Sarah's joint tenant Rachel.
maincannot represent that household: it gives both tenants the bedroom and charges both part of the deduction.This PR adds a BenUnit input,
non_dependant_normally_resides_with, set on the non-dependant's family:EVERY_JOINT_OCCUPIER(default)mainHOUSEHOLD_HEAD_FAMILYOTHER_JOINT_OCCUPIERSWhere no family shares the rent, every value means the household head's family, and each result equals
main's. Where a family shares the rent and the input keeps its default, each result equalsmain's, with one exception. A member of a joint occupier's family is never a non-dependant, even where that family has no rent of its own (68647f9). Both statements come from reading the formulas. Invariants 2, 3 and 5 test the deductions and the households without sharers, and 48 ofmain's YAML files pass unchanged at this head.These formulas read the input:
housing_benefit_LHA_allowed_bedroomscounts the occupiers outside the liable families through a new helper,housing_benefit_other_occupiers. The members of a non-dependant's family count for each joint occupier the family normally resides with. A couple among them takes one bedroom, and their children share rooms as the size criteria set out.housing_benefit_LHA_additional_bedroomsreads the same helper for an occupier who requires overnight care (13D(3A)(a)(iii)).housing_benefit_LHA_categoryreads two non-dependant tests, and both follow the input:housing_benefit_has_non_dependant,main's flag for the young individual's test (reg 13D(2)(a)(i)). It replaceshousing_benefit_claimant_has_non_dependant, which this PR added before the merge.housing_benefit_severe_disability_premium_applies, the severe disability premium conditions (Sch 3 para 14(2)(a)(ii); SPC Sch 3 para 6). The conditions fail when a non-dependant aged 18 or over normally resides with the claimant, unless that person is blind or receives a qualifying benefit. A claimant who meets them avoids the shared accommodation rate.housing_benefit_non_dep_deductions(reg 74(5), SPC 55(5)) andcouncil_tax_reduction_non_dep_deductions(SI 2012/2885 Sch 1 para 8(5); WSI 2013/3029 Sch 1 para 3(5), Sch 6 para 5(5); SSI 2021/249 reg 90(5); SSI 2012/319 reg 48(5)) read it. So do the five local schemes (Kingston upon Thames, Merton, Newham, Oxford, Westminster), through_legacy.local_non_dep_deductions.main's formula. HB charges each family itsshare_of_household_rentof the household's deductions, supplied shares included. CTR charges each applicant itscouncil_tax_reduction_joint_liability_shareof the deductions outside its own family and within its own benefit unit.council_tax_reduction_joint_liability_sharedoes.main's rule of one deduction for each non-dependant couple, and before the claimant's exemption.main.mainflags a non-dependant by rent:benunit_is_rent_liabletests whether the family's rent exceeds zero. Somainreads a sharer as the head's non-dependant where the household has no rent, or where the sharer has a supplied zero share. This PR keeps the head's and the sharers' families out ofhousing_benefit_has_non_dependantand the severe disability premium conditions in both situations. It also keeps a sharer with a supplied zero share out of the Housing Benefit deductions, asmainalready does where the household has no rent.main(reg 13D(12)). The input does not move them. It moves the members of their family who pay nothing.main's formula: the household head's family, the only one that claims, bears every other family's deductions and those within its own benefit unit.uc_non_dependants_counted), and no UC formula reads the input. DWP's UC guidance on joint tenancies (version 9, deposited in Parliament as DEP2025-0769) says the same: "a non-dependent living in the property can only be linked to one Universal Credit award".Merge with
mainand the two fixesThe PR's base was 1f3ce21, an earlier head of #2016. Since then
maingained the formulas this PR now builds on:housing_benefit_has_non_dependant, andhousing_benefit_severe_disability_premium_applies, whichhousing_benefit_LHA_categoryreads beside the flag.benunit_contains_household_head).lha_renter_has_non_dependantreads the non-dependants its own claim counts (e2f368d).The merge (c7e610b).
main's formulas stay, and the input goes on top of them. Ten files conflicted.main's text whole:LHA_allowed_bedrooms.py,lha_renter_has_non_dependant.pyandtest_lha_bedroom_young_people_properties.py. Nothing onmaincalls this PR'scount_other=hook or itshas_non_dependant_in_benefit_unitfunction, so both go.main's formula. Five add this PR's routing: the Housing Benefit bedrooms, additional bedrooms and deductions, and the national and local CTR deductions. Two change documentation only: the Housing Benefit category andis_non_dependant_of_household_head.main'shousing_benefit_has_non_dependanttakes the routing and this PR's duplicate flag goes. The helper module readsbenunit_contains_household_head, asmaindoes.main's results. A paying lodger counts in each joint tenant's size criteria ([2, 2, 1]). In the two national CTR cases without sharers, only the claiming family bears deductions ([500, 0, 0]).count_other=callback is gone, so Count other families' children and add the foster and overnight-care bedrooms in the LHA size criteria #2016's placed-child mask (02125f5) applies as onmain. A child placed with the claimant or partner stays out of their own claim. A child placed with a non-dependant counts for each joint occupier that non-dependant resides with.b0584b6: the severe disability premium conditions read the input. The merge sent
housing_benefit_has_non_dependantthrough the input and left the severe disability premium conditions onmain's household count.housing_benefit_LHA_categoryreads both, so the two tests could name different non-dependants. A disabled joint tenant then lost the conditions for a non-dependant who lives with the other tenant only, or for another joint tenant with no rent. A local YAML run of the first household at c7e610b gave the disabled head the shared rate (A) in place of the one-bedroom rate (B): category [A, C, A]. The fix sends the conditions' test for non-dependants outside the family throughnon_dependants_residing_with. It adds four YAML cases and invariant 8.e8e8fe3: the CTR bounds property covers every applicant. After the merge, invariant 2 bounded only the applicants under the scheme of the household head's family.
mainrecomputes an applicant under the other scheme (#2015), such as a pensioner who shares the rent with a working-age head. The test now builds the same population withcouncil_tax_reduction_pensionerreversed for each household head's family, and bounds every applicant by the household's deductions under its own scheme. This commit changes the property test only.Law and guidance (verbatim)
The legislation quotes come from legislation.gov.uk (valid 2026-07-16 for the HB regulations, 2026-02-13 for SI 2012/2885).
Divergence, recorded. Literally, 13D(12) counts every occupier who is not a joint tenant, including another joint tenant's own non-dependant. The model follows DWP (2.093, HB circular A21/2013 para 25: "each tenant's individual household size"), as #2016 does for joint tenants' children. A boarder or lodger who pays the household head follows the literal reading, as on
main.Limitations.
OTHER_JOINT_OCCUPIERSmeans all the sharer families together. The input cannot place a non-dependant with one of several sharers and not with the others.main's other severe disability premium tests do not read the input:has_non_dependant_for_severe_disability_premium,has_non_dependant_for_council_tax_reduction_severe_disability_premiumand the CTR premiums of a household head who applies alone. They keepmain's own rules for joint occupiers. The first readsmain's explicit input,severe_disability_premium_joint_occupier_exclusion_applies.Invariants (Hypothesis,
test_joint_tenant_shared_non_dependant_properties.py)Seven test functions check eight invariants.
main's formula.share_of_household_renttimes the household's deductions. CTR deductions equal the deductions outside the family timescouncil_tax_reduction_joint_liability_share, for applicants under the household head's scheme. Both hold in households where every joint occupier has rent of its own.LHA_allowed_bedrooms,uc_non_dep_deductionsandlha_renter_has_non_dependantnever depend on the input.housing_benefit_has_non_dependantis false, and only then, for any mix of residence values and rents.Tests
LHA_joint_tenants_shared_non_dependant.yaml, 24 cases. The PR had 18 before the merge. The merge added 2 and b0584b6 added 4. Againstmain's formulas, by reading them:maindoes not give. Nine set the input to a non-default value in a household that shares the rent. Two need no new variable: the sharer with no rent, and the sharer given no share of the rent.main's values, so onmainthey fail only because the variable is missing. The 2.110 case is one of them. Review 5912639221 accepted it as the reproducer at b435c91, before the merge.main's values. They pin behaviour this PR keeps.The first reproducer above is the 2.110 case. The next two come from the first group and set the input, so on
mainthey fail at least because the variable is missing. Theirmainvalues in the table come from readingmain's formulas. The last two are the cases in the first group that need no new variable. A local run onmainat d3db7ac gives themainvalues in their rows, and both pass at e8e8fe3:mainhousing_benefit_has_non_dependant[true, true]; category [B, B]housing_benefit_has_non_dependant[true, true]; conditions [false, false]; category [A, A]Local runs at e8e8fe3, one file or one test per process, on Python 3.12.14 and Hypothesis 6.170.15. Each run in the table passed.
main's policy YAML files, each identical tomain's copymain'stest_rent_of_sharers_boarders_and_lodgers_properties.pymain'stest_legacy_award_readers_properties.pyThe 48 YAML files cover the LHA size criteria and category, the HB and CTR non-dependant deductions, the severe disability premium, joint liability, boarders and lodgers, the household head and the local CTR schemes.
Invariant 8 fails on the merge's formula. With the conditions' file restored to c7e610b's version, its test fails (a local run: 1 failed).
Local runs on the merge, before the two fixes. These ran on the merge's code, and no rerun followed at e8e8fe3. Most ran on tree b1e9614c1. The merge commit c7e610b has the same code: its tree differs only in the changelog fragment and two added YAML cases.
main's Python test files passed, each file identical tomain's copy: 53 on tree b1e9614c1 and 19 at c7e610b. They include all 9 tests oftest_lha_bedroom_young_people_properties.py, with its reference count of the size criteria.test_changelog_fragments.pydid not collect, because towncrier was missing. Intest_ci_test_shards.py, 49 tests passed and 5 failed, because their child pytest could not import the package.Not run locally: the full YAML and Python suites, and any microsimulation. A third test of
test_legacy_award_readers_properties.py,test_adult_non_dependant_ends_the_severe_disability_premium, did not finish locally at e8e8fe3. It passed at the merge, c7e610b, and in CI at this head (Test / Python 5/8).CI at e8e8fe3, read at 05:40 UTC on 16 November: all 21 checks passed.
Impact
CI's Aggregate impact report measures
main(d3db7ac) against this head merged withmain(4796151). It runs the enhanced FRS 2024-25 (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 no check breaks. No other microsimulation has run at this head.Released data. Before the merge, two runs of the released enhanced FRS 2024-25 (uk-data 1.57.4, sha256 03fe15e40a4c, 2026) compared Count other families' children and add the foster and overnight-care bedrooms in the LHA size criteria #2016's then head e5c36dc with this branch at 68647f9. That data has no
liable_for_share_of_household_rentinput, so no household in it has joint occupiers. Every compared output matched between the two runs:That pair predates the merge and compares neither side with
main. At this head, invariant 5 checks that the input changes nothing where no family shares the rent, and invariant 2 checks CTR againstmain's formula there.When this starts to bite. No comparison with
mainhas run on data with sharers. The change matters once the data carries sharers (policyengine-uk-data#512, open). Settingnon_dependant_normally_resides_withfrom the FRS relationship grid is a separate data follow-up (policyengine-uk-data#522, open).Coordination
mainthrough Give benefit-unit members aged 16 or over a bedroom under LHA rules #2010 (73abf3f). This PR keepsmain's treatment. A non-dependant within a joint occupier's own benefit unit is every joint occupier's for the deductions, and counts only in its own family's size criteria. So a joint tenant can bear part of a deduction for a person who adds no bedroom to that tenant's claim. The case "A sharer's own adult son is every joint tenant's non-dependant while the head's friend is the head's alone" pins the deduction side.housing_benefit_claimant_has_non_dependant, which this merge removes formain'shousing_benefit_has_non_dependant. It also edits the Housing Benefit bedrooms, additional bedrooms and category formulas, so it will conflict with this PR.axiom: TheAxiomFoundation/rulespec-uk#406 queued (addendum TheAxiomFoundation/rulespec-uk#406 (comment): HB reg 3(1)/(4), 13D(2)(a)(i), 13D(3)/(3A)/(12) per joint occupier, reg 74(5)/SPC 55(5), CTR Sch 1 para 8(5) and equivalents; companion cases from the same LHA Guidance Manual examples)
🤖 Generated with Claude Code