Skip to content

Apply Housing Benefit and national Council Tax Reduction non-dependant deductions as legislated - #2007

Draft
MaxGhenis wants to merge 9 commits into
mainfrom
hb-ctr-non-dep-exemptions
Draft

MaxGhenis wants to merge 9 commits into
mainfrom
hb-ctr-non-dep-exemptions

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2004. Also fixes the non-dependant half of #1934; its pensioner-gate half stays open.

Summary

Housing Benefit and the national Council Tax Reduction schemes now make non-dependant deductions the way the regulations set them. Law was read on legislation.gov.uk at the 7 April 2025 point in time, plus each year's version for the CTR scales.

Housing Benefit (SI 2006/213 reg 74; SI 2006/214 reg 55 is the same for these rules):

Rule Before Now
Banding, reg 74(2) right=True, so £192.00 a week fell in the band below and £0 paid nothing Bands include their lower edge ("not less than"). An in-work non-dependant with no income pays the reg 74(1)(b) amount
Remunerative work, reg 74(1)-(2), reg 6(1) and (6) Everyone banded on their own income Only a non-dependant working 16+ hours, and not on IS, JSA(IB) or ESA(IR), is banded. Anyone else pays the (1)(b) amount (£20.40 a week in 2026-27)
Couples, reg 74(3)-(4) Each member charged, on their own income One deduction for the couple, the higher, banded on the couple's joint income. Any other adult in the family (for example a young person on approved training) is a separate non-dependant on their own income
Non-dependant exemptions, reg 74(7), (8), (10) None Full-time students; State Pension Credit recipients; under-25s on Income Support, income-based JSA, or Universal Credit calculated on no earned income
Claimant exemption, reg 74(6) None No deduction for anyone if the claimant or partner is blind or receives AA, the DLA care component, the PIP daily living component or AFIP

Council Tax Reduction: the England pensioner (SI 2012/2885 Sch 1 para 8), Welsh (WSI 2013/3029 Sch 1 para 3 and Sch 6 para 5) and Scottish (SSI 2012/319 reg 48; SSI 2012/303 reg 67, then SSI 2021/249 reg 90) schemes.

  • Scales. These used the Housing Benefit scale. Each scheme now has its own weekly scale for 2013-14 to 2026-27, with the amending instrument cited for every year.
    • 2026-27: England £5.20 to £15.95 on £279/£485/£605; Wales £6.70 to £20.05 on the same bands; Scotland £5.55 to £16.55 on £286/£497/£614. The HB scale was £20.40 to £131.45.
    • Pensioner and working-age scales are identical in Wales and in Scotland in every year.
    • From 2027-28 the scales are uprated by gov.benefit_uprating_cpi, as Set DWP benefit rates to the announced amounts, not CPI projections #1925 does for the HB scale.
  • Banding and couples. As for HB. In addition, Wales's working-age scheme deducts for both members of a couple with a Universal Credit award (Sch 6 para 5(3), "other than where there is an award of universal credit"). I read that award as the non-dependant couple's.
  • Exemptions, at any age (para 8(7)-(8) and equivalents):
    • full-time students;
    • non-dependants on IS, income-based JSA, income-related ESA or State Pension Credit. Scotland's working-age scheme, from 1 April 2022, also exempts one whose partner is on IS, income-based JSA or income-related ESA and who is not on Universal Credit. SSI 2021/249 reg 90(8)(a) exempts a "qualifying income-related benefit claimant", which reg 4(1) defines as one "who is, or who has a partner who is," on one of them. The definition opens with "an applicant", but read that way the limb could never apply to a non-dependant, so it is read for the non-dependant. Before April 2022 (SSI 2012/303 reg 67(8)(a)), and in Scotland's pension-age scheme (SSI 2012/319 reg 48(8)(a)), only the person on the benefit is exempt;
    • an adult for whom someone else is entitled to child benefit (LGFA 1992 Sch 1 para 3, via para 8(8)(b) and equivalents). Entitlement needs a claim (SSAA 1992 s.1(1)), so the family must claim child benefit (would_claim_child_benefit). An election not to be paid keeps entitlement (s.13A), so the opt-out flag is not read;
    • from the year each scheme added it, Universal Credit calculated on no earned income: England 2015-16 (SI 2014/3312), Wales 2015-16 (WSI 2015/44), Scotland 2016-17 (SSI 2016/81).
  • Applicant exemption (para 8(6)): council_tax_reduction_household_has_non_dep_exemption existed but only the local schemes used it. It now applies to the national schemes too.
  • English working-age local schemes (Merton, Kingston, Newham, Westminster, Oxford) keep their own variables. They share council_tax_reduction_individual_non_dep_deduction_eligible, so the national exemptions are applied inside council_tax_reduction_individual_non_dep_deduction, not there.

New variables:

  • housing_benefit_non_dep_deduction_exempt (Person)
  • housing_benefit_non_dep_deductions_claimant_exempt (BenUnit)
  • council_tax_reduction_non_dep_deduction_exempt (Person)

New parameters:

  • HB remunerative_work_hours (16)
  • HB income_related_benefit_age_limit (25)
  • per CTR scheme, non_dep_deduction/{amount, remunerative_work_hours, exempt_universal_credit_without_earned_income}

HB age_threshold (18) now starts in 2006, when the 2006 Regulations were made, not 2019.

Inputs and choices

  • Full-time student: current_education != NOT_IN_EDUCATION or in_HE, the helper the local schemes already use. In the Enhanced FRS, current_education comes from FTED/EDUCFT ("in full-time education"), so it is the full-time flag. Note the age-based default: with no input, an 18- or 19-year-old is in tertiary education and so exempt.

  • Claimant or partner: is_claimant_or_partner (Replace generic child and adult flags with each programme's legal definitions #1896), the SSCBA s.137 couple a benefit unit is formed around: the claimant and at most one partner, supplied by the dataset or inferred from the benefit unit. That matches the HB Regs 2006 (regs 2(1), 19) and the CTR regulations (reg 2(1)), where a family's other members are the children and young persons. It is used for:

    • the claimant exemption (HB, and council_tax_reduction_household_has_non_dep_exemption, which the English local schemes also read);
    • joint income, which counts only the couple;
    • the one-deduction-per-couple rule, which covers only the couple, while any other member is deducted separately;
    • benefit-receipt exemptions, which count only for the claimant or partner of the award.
  • Gross income: a person's own income is their taxable income (total_income, floored at zero) plus statutory sick, maternity and paternity pay, which are earnings (HB reg 35(1)(i)) that the model keeps outside total_income, and Maternity Allowance. A claimant or partner of the non-dependant's family is banded on the couple's own income plus the family's UC, CTC, WTC, child benefit, Income Support, income-based JSA, income-related ESA and Pension Credit. Anyone else in the family is banded on their own income.

    • UC is taken after the benefit cap. The cap is applied to the capped benefits other than Housing Benefit, which a non-dependant family does not receive, and reduces the award by the excess less the childcare costs element, or not at all where that element is greater (UC reg 81(1)-(2)). universal_credit itself depends on HB through the cap, so using it would be circular.
    • The disability benefits disregarded by reg 74(9) are untaxed and not added.
    • Other untaxed income the regulations count, such as maintenance and student support, is not added. The income-related awards are read from the benefit unit's total, which on main includes any other member's report (see "On a benefit").
  • On a benefit: the IS, JSA(IB), ESA(IR) and SPC exemptions, and HB reg 6(6), apply only to the person the award is payable to (HB reg 2(3)-(3A), "payable to him"). That is the member who reports the award, or the benefit unit's head where none does. UC counts for both joint claimants (reg 2(3B), entitlement). The award is read from the benefit unit's total, which on main includes any other member's report. Count only the claimant's and partner's legacy awards in means tests and passports #2027 adds payee-only is_on_income_support, is_on_income_based_jsa and is_on_income_related_esa, which read the couple's own award. A follow-up (task_6c880fe4) switches these exemptions to them once both PRs are on main. In the Enhanced FRS, no member outside the couple reports these awards (Count only the claimant's and partner's legacy awards in means tests and passports #2027's analysis), so the interim reading changes nothing in the data.

  • HB reg 6(6): the person an IS, JSA(IB) or ESA(IR) award is payable to is treated as not in remunerative work, so pays the lowest amount whatever their hours.

  • UC entitlement: universal_credit_pre_benefit_cap > 0, because universal_credit depends on Housing Benefit through the benefit cap and would be circular.

  • "Earned income" in the UC limb (UC regs 52-62):

    • employment income plus statutory sick, maternity and paternity pay, less relievable pension contributions (reg 55(4)-(5)). Statutory adoption, shared parental, parental bereavement and neonatal care pay have no input;
    • self-employed earnings, with a loss counting as nil and less any relievable pension contributions not already deducted from employed earnings (reg 57(2), steps 3-4). The minimum income floor applies where the UC model applies it (reg 62); it doesn't apply in the start-up period (reg 62(5));
    • other paid work.

    Testing the person's own earnings rather than a joint award's is an interpretation. The limb reads "the award is calculated on the basis that the non-dependant does not have any earned income", and a joint award is calculated on combined earnings (UC reg 22(1)(b)). I found no DWP guidance that settles it. The local-scheme work on Charge non-dependant deductions for non-dependants within the claimant's benefit unit #2017 keeps the couple reading for the five English local schemes.

Not modelled

  • Pension-age HB's 26-week deferral of a deduction increase (SI 2006/214 reg 59(10)-(13)), and the CTR applicant exemption's protection while AA, DLA or PIP is suspended in hospital (para 8(6)).
  • HB: a working full-time student's summer vacation (reg 74(7)(d)), and under-25s on assessment-phase income-related ESA (no ESA group input).
  • Wales: ESA(IR) recipients in the work-related activity group, who are not exempt. They are treated as exempt.
  • CTR: persons disregarded for council tax discounts (LGFA 1992 Sch 1) other than students and, under para 3, adults for whom someone else is entitled to child benefit, which is modelled. is_apprentice has no £195 earnings cap, so it isn't used.
  • All schemes: youth training allowances, a normal home elsewhere, long hospital stays, prison, armed forces operations, and joint-occupier apportionment (reg 74(5), para 8(5)). Apportionment is Give sharers, boarders and lodgers their own rent, tenure and LHA category #2006.
  • Gross income:
    • maintenance and student support are not added, though inputs exist (a follow-up);
    • other untaxed income besides statutory pay, Maternity Allowance and the family benefits listed above is not added;
    • statutory adoption, shared parental, parental bereavement and neonatal care pay have no inputs;
    • a self-employed non-dependant's gross income uses profit, with any loss floored at zero, because turnover has no input (DWP HB guidance A5.551 counts total income with no deduction for business expenses).
  • The benefit cap basket in the after-cap UC leaves out bereavement allowance and the widow's benefits (no inputs). Main's benefit_cap_reduction also leaves out Maternity Allowance, which this PR's helper now counts (a follow-up).
  • Joint-claim JSA couples. Both members are on income-based JSA (HB reg 2(3)(c)), but the model has no joint-claim input, so only the payee is treated as on it.
  • Scottish disability assistance (ADP, PADP, CDP, Scottish adult DLA) for the claimant exemption, which has no separate input.
  • Before 2015 the model reads parameters at 1 January, not in fiscal years. That is unchanged.

Review

  • Round 1 (independent Subfleet review of 59c7082, Opus 5.5 after a rate-limited first attempt) asked for changes.

    • It found five P1s:
      1. is_adult as claimant or partner;
      2. a dependent child's income counted as the couple's;
      3. HB reg 6(6);
      4. self-employed losses cancelling wages in the UC test;
      5. UC, tax credits and child benefit missing from gross income.
    • It also found two omissions to disclose.
    • All are fixed in this head, each with a test that fails on 59c7082 (non_dependant_deduction_review_cases.yaml and new cases in household_benefits_individual_non_dep_deduction.yaml). The response is in the PR thread.
  • What round 1 confirmed: 288 CTR fixture and parameter comparisons and the 11 HB 2026-27 values; no leak into the five English local schemes; no dependency cycle in 48 household-years; the full HB, UC and local-authority YAML suites passing.

  • Round 2 (Subfleet review of 6257277) asked for changes. Fixed in b7f9763 (e92b5d1 before the rebase), each with a test that fails on 6257277 (the "Round 2" section of non_dependant_deduction_review_cases.yaml):

    • UC earned income per regs 55 and 62: SMP, pension contributions and the minimum income floor;
    • benefit awards counted only for the person they are payable to;
    • UC after the benefit cap in gross income;
    • the LGFA Sch 1 para 3 disregard.
  • Explicit young partners (round 2's identity finding): fixed by adopting Replace generic child and adult flags with each programme's legal definitions #1896's is_claimant_or_partner after rebasing onto it. The local helper is gone. The "Round 3" section of non_dependant_deduction_review_cases.yaml adds round 2's three cases: a blind 16-year-old partner of a Welsh 19-year-old applicant (HB and CTR £0), a non-dependant couple with a partner at school banded on joint income (HB £3,346.20, CTR £551.20), and a 17-year-old partner's PIP in Merton (deduction £0). Each fails with the partner's is_claimant_or_partner set to false.

  • The round 1 and round 2 responses are in the PR thread.

  • Round 3 (Subfleet review of 452d6bb, the content rebased on Replace generic child and adult flags with each programme's legal definitions #1896) asked for changes. It confirmed every round-2 finding resolved. Fixed in 084e1f9, each with a case in the "Round 3 of the independent review" section of non_dependant_deduction_review_cases.yaml that fails without the fix:

    • P1: statutory sick, maternity and paternity pay, Maternity Allowance and the family's income-related benefits now count in gross income;
    • P1: statutory paternity pay is earned income for the UC limb (reg 55(4)(c));
    • P1: relievable pension contributions come off self-employed earnings when there are no employed earnings (reg 57(2), step 4);
    • P2: Scotland's working-age scheme exempts the partner of an IS, JSA(IB) or ESA(IR) claimant from April 2022 (SSI 2021/249 reg 90(8)(a), reg 4(1)). Contrast cases cover 2021-22 and the pension-age scheme;
    • P2: the after-cap UC in gross income keeps the cap's childcare protection (UC reg 81(1)-(2));
    • P2: the LGFA para 3 disregard needs a child benefit claim, not just qualifying young person status.
    • Tests: the property oracle now derives the claimant and applicant exemptions from the generated disability inputs and checks the model's flags against them, instead of trusting them. The generator now varies statutory pay, pension contributions, the start-up period, which member reports the award, and whether child benefit is claimed.
    • Wording: the impact narrative is rederived from the new runs (explain.py), the CTR recipient metric now counts national-scheme households only, and three YAML comments are corrected.
    • The review was cancelled by Subfleet a minute after it wrote its report; the report and the response are in the PR thread.
  • Round 4 (Subfleet review of 7a5cbe2, GPT-6.1 Sol) asked for changes. It confirmed every round-3 finding resolved, the Scottish reading defensible and disclosed, all 72 impact-table cells, and no new cycles or local-scheme leaks. Fixed in the round-4 commit, each with a case in the "Round 4 of the independent review" section that fails without the fix:

    • P1: Maternity Allowance is a capped benefit (Welfare Reform Act 2012 s.96(10)(i)), so it now counts in the after-cap UC used for gross income;
    • P1: a self-employment or property loss no longer cancels other gross income (DWP HB guidance A5.551);
    • P3: wording in the impact and mutation sections, and the "not modelled" list.
  • Round 5 (a delta review of the round-4 fixes on the final head) gates the merge.

Invariants

These hold for every input:

  1. An exempt non-dependant's deduction is zero, for HB and for CTR.
  2. An eligible, non-exempt non-dependant pays between the scale's lowest and highest amounts. The national CTR deduction is zero in English working-age households.
  3. A non-dependant working under 16 hours pays the lowest amount, whatever their income.
  4. A claimant or applicant exemption zeroes the family's deductions.
  5. A family's deductions are the sum over the other families in the household of their higher member's amount (both members for a Welsh working-age UC couple), recomputed independently.
  6. Monotonicity: raising a non-dependant's income never lowers any deduction.
  7. Exhaustively, in every year 2015-2030 (2019-2030 for HB), uprated years included: an income at a band's lower edge pays that band's amount, and the next lower representable income pays the band below's.
  8. Differential: every CTR parameter value equals the enacted sums in tests/fixtures/council_tax_reduction_non_dependant_deductions.yaml.
  9. Differential: the exemption flags equal a reading of the provisions computed straight from the inputs.

Tests

  • YAML (all with hand-worked expectations from the law):

  • test_non_dependant_deduction_properties.py: Hypothesis populations for invariants 1-6 and 9 (with explicit examples for the rare Welsh-couple and under-25 cases), the exhaustive edge check (7), and the fixture differential (8).

  • Scale verification: an independent check (Subfleet, GPT-6.1 Sol) of all 294 CTR scale values against the amending instruments as made returned ALL MATCH, 42 scheme-years. It also confirmed that every instrument applies from 1 April, and that Wales's and Scotland's pensioner and working-age scales are identical. Three drafting points don't change any value:

    • the Welsh-language text of WSI 2016/50 has £195 where the English has £194 (the parameter uses the English text and says so);
    • SI 2012/3085 left "x 1/7" off two 2013-14 English band amounts;
    • SSI 2021/249 saves the 2021-22 working-age scale for 1-3 April 2022.
  • Mutation testing (on 7a5cbe2, mutate3.py): 31 hand-made mutations, each reverting one rule. They cover HB banding, exemptions, couples, the claimant exemption, reg 6(6) and the under-25 limit; CTR banding, exemptions, the Welsh and Scottish couple rules, the applicant exemption, the UC limb and LGFA para 3; and the shared gross-income, earned-income, cap and claimant-or-partner rules.

    • The YAML suites kill 30. The 31st, the Scottish rule's "not on Universal Credit" condition, was killed by the property tests, and the round-4 commit adds a YAML case that kills it too.
    • The property tests kill 21. The ten survivors change specific amounts or inputs the generator doesn't vary: family benefits, statutory pay, the cap and its childcare protection, the floor, self-employed pensions, the child benefit claim, and the any-adult couple and claimant mutations. YAML cases kill all ten.
  • Commands:

    Targeted tests only. The full suite is left to CI.

Impact (Enhanced FRS 2024-25)

Real runs of main (9eccc54) and this branch (d872f57) on the same dataset. Every row equals the run of 7a5cbe2 against main 6fa14dc, before the round-4 fixes; the fixes change no aggregate in this dataset. Nothing is scaled. compare.py and decompose.py produce the tables; explain.py and explain_ctr.py produce the figures in the bullets (weighted aggregates only).

Change 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31
Housing Benefit (£m) +17.3 +7.5 +7.5 +8.1 +8.8 +8.9
Council Tax Reduction (£m) +3.1 +3.1 +3.3 +3.6 +3.8 +4.0
Household net income (£m) +20.3 +10.5 +10.9 +11.6 +12.6 +12.9
HB families gaining (k) 5.9 4.2 4.2 4.2 4.5 4.5
HB mean gain (£ a year) 3,341 2,394 2,408 2,415 2,378 2,385
HB families losing (k) 2.2 2.2 2.2 1.8 1.6 1.6
HB mean loss (£ a year) 1,074 1,136 1,136 1,155 1,162 1,162
CTR families gaining (k) 2.9 3.1 3.1 3.1 3.1 3.7
CTR mean gain (£ a year) 1,041 999 1,083 1,150 1,210 1,093
CTR caseload (k) +2.2 +2.3 +2.3 +2.3 +2.4 +2.9
People in poverty, BHC (k) +0.0 +0.0 +0.9 +0.9 +0.9 +0.9
People in poverty, AHC (k) +0.0 +0.0 +0.0 +0.0 -0.0 +0.0
  • CTR losers, and the changes in Universal Credit and Pension Credit, round to zero (under 0.05k families; under £0.05m).

  • 2025-26 is larger. That year 15.7k non-dependants live with HB recipients (14.1k in 2026-27), and HB recipients' non-dependant deductions are £23.6m (£14.1m in 2026-27). The effect grew with main, not with this branch:

    • against main 3c48247 (1 October) it was +£7.0m (compare4.md);
    • between that main and this one, the 2025-26 HB caseload rose from 1,663.5k to 1,671.1k (base4.json, base6.json).

    2025-26 also uses main's 2025 HB scale, which Set DWP benefit rates to the announced amounts, not CPI projections #1925 corrects.

  • Housing Benefit, decomposed. Separate real runs of this branch for 2026-27, adding one part at a time (variable overrides in a separate process per run):

    Step HB (£m)
    Inclusive bands alone, everyone banded on their own taxable income -7.4
    Only remunerative work banded (reg 6(6) included), on the couple's gross income (statutory pay, family UC after the cap, tax credits, child benefit and income-related benefits) +0.4
    One deduction per couple, other members separate 0.0
    Non-dependant exemptions +4.2
    Claimant exemption +10.2
    Total +7.5
  • Who is affected (2026-27). 14.1k non-dependants live with HB recipients:

    • 3.6k are now exempt;
    • 11.3k work under 16 hours a week, and the 8.0k of them who are not exempt pay the lowest amount whatever their income;
    • the deductions taken from HB recipients fall from £14.1m to £6.0m.
  • HB losers (2026-27). All 2.2k losing families live with a charged non-dependant who has no taxable income, and who now pays the lowest amount (£20.40 a week); before, zero income paid nothing. Losers with a charged non-dependant who has positive income round to zero (under 0.05k). 2.0k lose exactly £20.40 a week. In 2027-28, 0.9k people move below the BHC poverty line, all in households whose HB falls, and under 0.05k move above it; 2028-29 to 2030-31 show the same net +0.9k.

  • Council Tax Reduction.

    • Almost all in England's pensioner scheme: £3.04m of the £3.06m in 2026-27. The rest is in Scotland (£0.02m), and by 2030-31 Wales adds £0.05m. Very few applicant families with a non-dependant deduction receive CTR in either run: 3.0k of 621k in England's pensioner scheme, and under 0.05k of 122k in Wales and 167k in Scotland (2026-27). So lower deductions rarely change an award outside England.
    • Where deductions disappear. Among national-scheme CTR recipients, non-dependant deductions fall from £14.9m to under £0.1m (2026-27). Of the 13.6k recipient households with a non-dependant, 86% have an applicant or partner who is blind or on AA, DLA care, PIP daily living or AFIP. In the rest, 1.9k of the 2.2k non-dependants are exempt themselves.

Merge order and overlaps

Axiom

axiom: uk/regulation/uksi/2006/213/74, uksi/2006/214/55, uksi/2012/2885/schedule/1/paragraph/8, wsi/2013/3029/schedule/1/paragraph/3 and schedule/6/paragraph/5, ssi/2012/319/48, ssi/2021/249/90 queued TheAxiomFoundation/rulespec-uk#407

  • HB. rulespec-uk's HB pipeline (uk/policies/housing_benefit_composed_entitlement_pipeline.yaml) has the reg 74 bands for 2026-27 only, with inclusive >= edges. But it bands every non-dependant, multiplies one amount by a non-dependant count, and has no couple rule or exemptions. The 2025-26 amounts are in rulespec-uk#382.
  • CTR. Every CTR spine takes non-dependant deductions as a supplied input.
  • The issue. All seven provisions are in axiom-corpus. rulespec-uk#407 is dispatch-ready: module paths, verbatim law, required outputs, a pasteable review_finding, and companion tests from the same 2026-27 law as this PR's YAML tests. It carries the pe-parity label.
  • Why queued. The signed encodes are OpenAI-billed, so they need Max's approval.

🤖 Generated with Claude Code

@MaxGhenis

MaxGhenis commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Composition note: #2015 (stacked on #2009 → #2006) deletes the two household flags this PR reads. council_tax_reduction_household_has_pensioner becomes council_tax_reduction_pensioner and council_tax_reduction_household_has_non_dep_exemption becomes council_tax_reduction_applicant_has_non_dep_exemption; both are BenUnit, so each jointly liable claimant uses its own family. #2015 does not add the national applicant exemption; that stays here. Whichever lands second should do three things:

  1. Read the applicant's own exemption flag for applicant_exempt.
  2. Do not substitute the family flag into each_member_deducted: that is evaluated on the non-dependant family, and Sch 6 para 5(3) turns on the applicant's scheme. Instead build two household pools of non-dependant families' deductions, the higher member's and the sum for a non-dependant couple on UC. Each claimant takes the sum pool when it is in Wales and its own council_tax_reduction_pensioner is false, and the higher-member pool otherwise.
  3. Pick England's pensioner scale in the person-level variables by country only. Each claim's own scheme already decides whether its award uses it. The two tests that pin "no national deduction in English working-age households" then check that the working-age award is unaffected instead.

See the "National schemes and the exemption" section of #2015. (Corrected per this PR's author.)

MaxGhenis added a commit that referenced this pull request Oct 1, 2026
Cherry-picks #2007 (59c7082: HB reg 74 / SPC
reg 55 bands, remunerative-work test, couple rule and exemptions; national
CTR own scales and exemptions) onto the in-unit non-dependant change (#2014)
and the #2006 rent shares, as agreed with #2007's author:

- HB and national CTR aggregation: one deduction for a non-dependant couple
  (the claimant and partner of a non-dependant family, the higher amount;
  both for a Welsh working-age couple on UC), any other adult in that family
  counted separately, in-unit non-dependants pooled and apportioned by rent
  share (HB) or joint-liability share (CTR), and the claimant's exemption.
- Joint income for the bands is the couple's only (reg 74(4), para 8(4));
  another adult is banded on their own income.
- The IS, income-based JSA, income-related ESA, Pension Credit and UC
  exemptions apply only to the award's claimant and partner.
- The HB claimant exemption reads is_claimant_or_partner, not is_adult.

Drops council_tax_reduction_pension_credit.yaml and the
in_receipt_of_guarantee_credit output, which depend on #1909 (main only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 1, 2026
Cherry-picks #2007 (59c7082: HB reg 74 / SPC
reg 55 bands, remunerative-work test, couple rule and exemptions; national
CTR own scales and exemptions) onto the in-unit non-dependant change (#2014)
and the #2006 rent shares, as agreed with #2007's author:

- HB and national CTR aggregation: one deduction for a non-dependant couple
  (the claimant and partner of a non-dependant family, the higher amount;
  both for a Welsh working-age couple on UC), any other adult in that family
  counted separately, in-unit non-dependants pooled and apportioned by rent
  share (HB) or joint-liability share (CTR), and the claimant's exemption.
- Joint income for the bands is the couple's only (reg 74(4), para 8(4));
  another adult is banded on their own income.
- The IS, income-based JSA, income-related ESA, Pension Credit and UC
  exemptions apply only to the award's claimant and partner.
- The HB claimant exemption reads is_claimant_or_partner, not is_adult.

Drops council_tax_reduction_pension_credit.yaml and the
in_receipt_of_guarantee_credit output, which depend on #1909 (main only).

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

Copy link
Copy Markdown
Collaborator Author

Response to review r1 of #2007 (59c7082)

The review asked for changes and was right on all five P1s. Each is fixed below with the law, the change, and a test that fails on 59c7082 and passes now.

# Finding Disposition Change Test
1 is_adult is not "claimant or partner" (an 18-year-old dependant's PIP exempted the claimant; a 17-year-old claimant's PIP did not) Fixed New helper is_claimant_or_partner: the benefit unit's head, or any member who is not an SSCBA s.142 child or qualifying young person (is_child_or_qualifying_young_person_for_child_benefit, already on main). That is how HB Regs 2006 regs 2(1) and 19 and the English and Welsh CTR regs (reg 2(1)) define a family's members other than claimant and partner. It is used in the HB claimant exemption and in council_tax_reduction_household_has_non_dep_exemption (which the local schemes also read) non_dependant_deduction_review_cases.yaml: "A dependent 18-year-old's PIP does not exempt the claimant" (HB £6,232.20, CTR £691.60); "A 17-year-old claimant's PIP exempts their family"
2 A dependent child's income was added to the couple's Fixed Joint income (reg 74(4), para 8(4)) sums only the claimant and partner of the non-dependant's family. Other members are banded on their own income. One deduction per couple (reg 74(3)) covers only the couple; each other member is deducted separately "A parent non-dependant is banded on their own income…" (HB £1,060.80, CTR £270.40); household_benefits_individual_non_dep_deduction.yaml "A dependent young person in the family is banded on their own income"
3 HB reg 6(6): a person on IS, JSA(IB) or ESA(IR) is not in remunerative work Fixed The HB individual deduction treats the claimant or partner of an IS, JSA(IB) or ESA(IR) award as not in remunerative work. CTR exempts those recipients outright, so it needs no equivalent "On income-related ESA, 16 hours is not remunerative work" (£1,060.80)
4 A self-employment loss cancelled wages in the UC no-earned-income test Fixed has_earned_income: employment income plus self-employed earnings floored at nil (UC reg 57(2) step 3) "A self-employed loss does not cancel wages…" (both exemptions false; HB £1,060.80, CTR £270.40)
5 Taxable total_income omits UC, tax credits and child benefit Fixed Gross income for a claimant or partner adds the family's UC (before the benefit cap, which would be circular through HB), CTC, WTC and child benefit to the couple's taxable income. The disability benefits disregarded by reg 74(9) are still excluded, since they are untaxed and not added "Universal Credit counts towards gross income" (£290 a week, £3,346.20)

Also from the review:

  • Benefit receipt (IS, JSA(IB), ESA(IR), SPC, UC) now exempts only the claimant or partner of the award, in both exemption variables.
  • Two omissions are now listed as not modelled, because no input exists:
    • pension-age HB's 26-week deferral of a deduction increase (SI 2006/214 reg 59(10)-(13));
    • the CTR applicant exemption's protection while AA, DLA or PIP is suspended in hospital (para 8(6)).
  • The property tests' generator now includes dependent young people with their own income (in full-time education, or on approved training and so not exempt) and self-employed losses. The oracles use the claimant-or-partner rule, reg 6(6) and the floored earnings.
  • The Welsh "award of universal credit" reading stays as stated in the PR description, an interpretation.

Not changed: the review's UNVERIFIED items on impact (exact zeros, decomposition, poverty causation). The impact is rerun on the new head after the host is free (the Axiom build has priority until about 10:00Z). The PR description's impact section is replaced with the rerun.

MaxGhenis added a commit that referenced this pull request Oct 2, 2026
Applies #2007 at 6257277 (59c7082 plus the
r1 review commit) onto #2017 (in-unit non-dependants, #2006 rent shares):

- One definition of claimant or partner: #1896's is_claimant_or_partner
  variable. #2007's proxy helper (benefit-unit head or any member who is not
  a Child Benefit child or QYP) is removed and its call sites read the
  variable.
- HB and national CTR aggregation: another family's non-dependants per
  deduction_per_family (the couple's higher amount, both for a Welsh
  working-age UC couple, and each other member's own), counted once per
  family and apportioned by rent share (HB) or joint-liability share (CTR);
  a family's own in-unit non-dependants in full (LHA Guidance Manual 2.093;
  HBGM A5 5.622); the claimant exemptions. charged_to_other_families
  ("household minus own family") is no longer used and is removed.
- #2007's property oracle reads is_claimant_or_partner; the in-unit
  property oracle counts a couple once and applies the claimant exemptions.
- Drops council_tax_reduction_pension_credit.yaml and the
  in_receipt_of_guarantee_credit output (#1909, main only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 2, 2026
Carries 2d54628 (review r2 F3-F5) onto the composition with #2007:
- HB pools every non-dependant family amount, in-unit ones included, through
  #2007's deduction_per_family and apportions it by rent share; a boarder or
  lodger also bears its own in full; the claimant exemption still zeroes the
  claim.
- National CTR pools every family's amount (one per couple, the higher, or
  both for a Welsh working-age UC couple), replaces the applicant's own
  family amount with its in-unit non-dependants only, and apportions by
  joint-liability share; the per-applicant exemption still zeroes the claim.
- CTR eligibility includes a lodger's adult son; the local schemes stay
  neutral.

The blind-sharer case now expects the non-exempt head to bear half of the
sharer's son (para 8(5)).

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

Copy link
Copy Markdown
Collaborator Author

Response to review r2 of #2007 (6257277)

The review asked for changes again and was right on all five P1s. Findings 2-5 are fixed in the next commit, each with a YAML test that fails on 6257277 (non_dependant_deduction_review_cases.yaml, "Round 2" section). Finding 1 is fixed by adopting #1896's is_claimant_or_partner when #1896 lands; it is about to merge, and its owner asked #2007 to use it.

# Finding Disposition Change Test
1 Claimant or partner via "head or not a child benefit QYP" misclassifies explicit young partners (HB reg 2(1) "partner"), and in the reverse direction a third adult; this reaches the English local schemes through the shared exemption flag Fixed with #1896 The helper is replaced by #1896's is_claimant_or_partner, which caps the set at the head and one partner (SSCBA s.137 couple) and can be supplied as an input for explicit couples. The r1 original student case also resolves, since #1896 presumes a 19-year-old 26 years younger than the parent is their child The r2 explicit-couple cases are added after the rebase, along with the r1 cases
2 "No earned income" missed SMP, relievable pension contributions and the minimum income floor (UC regs 55 and 62) Fixed has_earned_income: employment income plus SSP and SMP, less relievable pension contributions (reg 55(4)-(5)); self-employed earnings, a loss nil (reg 57(2)), with the minimum income floor where the UC model applies it (reg 62); and other paid work SMP £8,000 → not exempt (£1,060.80/£270.40); wages all paid into a pension → exempt (£0/£0); MIF applies → not exempt (£1,060.80/£270.40)
3 ESA(IR) receipt was extended to the working partner (HB reg 2(3A): "payable to him") Fixed is_award_payee: IS, JSA(IB), ESA(IR) and SPC count only for the member who reports the award, or the head where none does; UC still counts for both joint claimants (HB reg 2(3B): entitlement). Used for the exemptions and for HB reg 6(6) Recipient and partner earning £210 a week at 16 hours → HB £2,436.20, CTR £270.40
4 Pre-cap UC overstated gross income (UC reg 81) Fixed Gross income now uses UC after the benefit cap. The cap is applied to the capped benefits other than Housing Benefit, which a non-rent-liable family does not receive; this avoids the HB → UC → cap → HB cycle Pre-cap £30,000, cap £20,000 → HB £5,470.40 (365 band), CTR £551.20
5 CTR's LGFA 1992 Sch 1 para 3 disregard (an adult for whom another person is entitled to child benefit) was omitted although inputs exist Fixed The CTR exemption adds an adult qualifying young person (child benefit, s.142) who is not the claimant or partner of their family 19-year-old on approved training with child benefit → CTR exempt, parent alone £270.40; HB still charges both (£3,497.00)

On the property tests, the review said the oracles repeat the implementation's classification. They now take the payee as the head (the generator reports no awards) and read the child benefit QYP flag from the model. After the #1896 rebase they read is_claimant_or_partner from the model, which is not code under test. The generator now draws dependent young people and losses. SMP, pension and MIF cases are pinned in YAML rather than generated.

@juaristi22

Copy link
Copy Markdown
Collaborator

Codex review — changes required

Reviewed commit e92b5d107d48fe6d6cd62927059e092a75d585c2. PARTIAL; 1 confirmed blocking finding(s). Independent code/test and policy/source reviews were consolidated for the changed behavior and affected dependencies.

code-1 — [P1] Replace the QYP-complement helper with actual claimant/partner roles

The current helper _non_dependants.py:28–36 still defines the claimant/partner set as the head or anybody who is not a Child Benefit child/qualifying young person. That is neither a relationship test nor a two-person limit. It can exclude an actual young partner in education and include a third adult. The helper controls the new disability exemptions, joint gross income and one-deduction-per-couple aggregation, so this is a material remaining integration blocker. The author's latest response also explicitly defers this finding to adoption of #1896; the captured head has not adopted it.

Executed illustration: a reported continuing HB award for an intended couple aged70/19, both parent-flagged, with the19-year-old in qualifying education and receiving standard PIP daily living, plus a separate40-year-old working non-dependant earning£30,000. The QYP complement excludes the young partner and sets the claimant exemption false. With £10,000 council rent and HB assessable income isolated at zero, the deduction is£6,232.20 and final HB£3,767.80. A control supplying the legally appropriate claimant/partner disability exemption gives deduction£0 and final HB£10,000. This snapshot lacks the canonical explicit claimant/partner input; the diagnostic's relationship is stated as the intended premise, while the code defect is the inability of this helper to honor that premise.

Adopt the canonical relationship/role variable after the prerequisite lands, then add explicit young-partner and third-adult regression cases through final awards. Do not repeat the other four r2 findings: the current tree now includes statutory sick/maternity pay, employed pension deductions and MIF; the benefit-payee test; UC after the benefit cap; and CTR's adult Child Benefit QYP exemption. Confidence: high for the current unresolved helper/integration defect.

Independent source review corroborates the actual-couple and claimant/partner conditions in HB regulation 74(3)–(6), HB interpretation and England CTR paragraph 8. The overlapping code and policy finding is counted once.

The current tree addresses round-two findings 2–5; this review does not repeat those stale blockers. Current 2026 scale values were corroborated. The remaining confirmed blocker is adoption of the canonical claimant/partner roles and coverage of their downstream HB/CTR behavior.

Outstanding evidence/decision:

  • The prerequisite claimant/partner implementation is absent, so the eventual composed behavior cannot yet be tested.
  • Historical CTR rates/dates for 2013–2025 were not all corroborated. Complete UC net-earnings treatment, including self-employed pension contributions, remains source-unresolved and is not asserted as a second confirmed defect.

Validation: 123 focused tests passed, including round-two regression tests. An executed controlled diagnostic isolates the missing partner disability exemption's final-HB effect. The intended relationship is an explicit scenario premise, and supplied benefits/HB assessable income isolate this path; the run does not establish any actual data record's demographics. Six official source originals were inspected and their cached bytes verified.

Focused tests used an existing cached Python 3.13 environment (Core 3.32.9, NumPy 2.1.3, pandas 2.3.1, microdf-python 1.2.1, Hypothesis 6.168.2, pytest 8.4.2) with this PR’s isolated source snapshot. No dependencies were installed; this was not a freshly synced lock environment or a full-suite/population run. This is a review comment, not a formal GitHub review vote.

Live check before posting (2026-10-02T10:41:08.415704+00:00): same commit, UNSTABLE; 0 failed checks; 1 pending checks.

@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

Review pass (Claude Code, on Vahid's behalf) at e92b5d10

Short version: the rules match the law I read, and the tests pass locally. Two things before merge: the claimant-or-partner helper still needs #1896's role variable (the Codex review's P1, which I agree with and won't repeat), and one new should-fix on the student exemption's age default in the household calculator.

1. Should-fix: with no education input, every 18- or 19-year-old non-dependant counts as a full-time student and is exempt. housing_benefit_non_dep_deduction_exempt and the CTR equivalent use is_full_time_student_non_dep, which reads current_education. That variable's formula defaults ages 18–19 to TERTIARY when nothing is supplied (variables/household/demographic/current_education.py:36). The PR body notes this, but the effect in the household calculator is large. Probe at this head, 2026, a 45-year-old HB claimant (council rent £10,000) with a 19-year-old non-dependant earning £30,000 at 37.5 hours a week:

Non-dependant current_education Exempt HB deduction
age 18, no input TERTIARY (default) yes £0
age 19, no input TERTIARY (default) yes £0
age 20, no input NOT_IN_EDUCATION no £6,232.20
age 19, NOT_IN_EDUCATION supplied NOT_IN_EDUCATION no £6,232.20

On main this non-dependant is charged, so the PR introduces the gap for HB and the national CTR schemes (the English local schemes already had it through the same helper). Datasets are unaffected, since the Enhanced FRS stores current_education. Suggested fix: base the student exemption on a stored or supplied education value only, not the age default. Alternatively, don't treat the default as full-time study for someone in remunerative work (16+ hours). Either way, add the 19-year-old case above as a test.

2. The claimant-or-partner helper (Codex P1). _non_dependants.py:28-36 is still "head or not a child-benefit QYP". The author has said it will switch to #1896's is_claimant_or_partner, and #1896 is still open, so this PR should wait for that rebase and add the explicit young-partner and third-adult cases the r2 response lists.

Checked and correct:

  • Law: I read HB Regs 2006 reg 74 and HB (SPC) Regs reg 55 on legislation.gov.uk.
    • The bands are "not less than" at the lower edge, and the 2026-27 amounts are £20.40 to £131.45 on £192/£279/£365/£485/£605.
    • Couples get one deduction, the higher, on joint income (reg 74(3)-(4)).
    • The claimant exemption covers blindness, AA, the DLA care component, the PIP daily living component and AFIP (reg 74(6)).
    • The student exemption is reg 74(7)(c)-(e); the under-25 IS/JSA(IB)/ESA(IR)/UC-no-earned-income exemption is reg 74(8); SPC is reg 74(10) (reg 55(9) for pension age).
    • England CTR Sch 1 para 8 has £5.20/£10.60/£13.30/£15.95 on £279/£485/£605, with its own para 8(7)-(8) exemptions, including the LGFA Sch 1 disregard and the UC limb.
  • Remunerative work: banding applies only at 16+ hours and not on an income-related benefit (reg 6(6)); anyone else pays the (1)(b) amount.
  • has_earned_income counts miscellaneous_income, the same as the UC model's own uc_mif_capped_earned_income, so it is consistent within the model.
  • Tests at this head: the HB and local-authority YAML suites pass 205/205, and test_non_dependant_deduction_properties.py passes 6/6. CI's Test job was still running when I checked; the other six checks pass.

MaxGhenis added a commit that referenced this pull request Oct 2, 2026
A person is on income-based JSA or income-related ESA on a day it "is
payable to him" (reg 2(3), (3A)), and a person on income support is one "in
receipt of" it (reg 2(1)). A couple's award is paid to the claimant, not the
partner. is_on_income_related_esa, is_on_income_based_jsa and
is_on_income_support now hold, of the claimant and partner, only for the
payee: the one who reports the award, or the claimant where neither does
(is_payee_of_couple_award). Another member's report never moves the payee.
Anyone else is unchanged (their own report while the award is modelled as
paid).

Agreed with #2007, whose round-2 review raised the same point and which
applies the same reading through its is_award_payee helper; the codebase now
reads "who is on" one way.

Effects: in the local working-age CTR schemes a non-dependant couple on one
of these benefits pays the partner's deduction (one deduction per couple, the
higher: Default Scheme Sch para 30(3)); the maintenance-loan ESA proxy follows
the student's own award, not their partner's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the hb-ctr-non-dep-exemptions branch from e92b5d1 to f5aae26 Compare October 2, 2026 14:09
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Composition note from #2078 (stacked on #2009), which makes the CTR means test assess the applicant and partner rather than the benefit unit's claimant and partner.

#2078 changes council_tax_reduction_household_has_non_dep_exemption to read is_council_tax_reduction_applicant_or_partner (new Person variable) in place of is_claimant_or_partner, following "the applicant or his partner" in SI 2012/2885 Sch 1 para 8(6). The two differ where the household head is liable but is not the benefit unit's claimant or partner. Example: a blind grandmother head sharing a benefit unit with a young couple, who were not exempt before.

When this PR's national exemption (council_tax_reduction_non_dep_deduction_exempt) composes with #2078, it should use the same identity for the applicant or partner. #2015 replaces the household flag with a per-family one and gets the same note.

MaxGhenis and others added 6 commits October 3, 2026 07:47
Housing Benefit (SI 2006/213 reg 74; SI 2006/214 reg 55):
- bands include their lower edge, and only a non-dependant in remunerative
  work (16+ hours, reg 6(1)) is banded, on the couple's joint income; anyone
  else pays the reg 74(1)(b) amount;
- one deduction per couple, the higher (reg 74(3));
- no deduction for full-time students, State Pension Credit recipients, or
  under-25s on IS, income-based JSA or UC without earned income
  (reg 74(7), (8), (10)), nor for any non-dependant when the claimant or
  partner is blind or on AA, DLA care, PIP daily living or AFIP (reg 74(6)).

Council Tax Reduction (SI 2012/2885 Sch 1 para 8; WSI 2013/3029 Sch 1
para 3 and Sch 6 para 5; SSI 2012/319 reg 48; SSI 2012/303 reg 67 and
SSI 2021/249 reg 90):
- each national scheme's own weekly scale for 2013-14 to 2026-27, instead
  of the Housing Benefit amounts;
- the same banding and couple rules, with Wales's working-age exception for
  couples on UC;
- the schemes' any-age exemptions, the UC limb from the year each scheme
  added it, and the existing applicant exemption.

Fixes #2004; the non-dependant half of #1934.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, gross income

- Identify the claimant or partner as the benefit unit's head or any member
  who is not an SSCBA s.142 child or qualifying young person (HB Regs 2006
  regs 2(1) and 19; CTR regs 2(1)), replacing is_adult in the HB and CTR
  claimant exemptions.
- Band a couple on the couple's joint income only, give the couple one
  deduction and any other adult in the family their own, and count benefit
  receipt (IS, JSA(IB), ESA(IR), SPC, UC) only for the award's claimant or
  partner.
- Treat a non-dependant on IS, JSA(IB) or ESA(IR) as not in remunerative work
  for HB (reg 6(6)).
- Take self-employed losses as nil in the UC no-earned-income test
  (UC reg 57(2)).
- Add the family's UC (before the cap), tax credits and child benefit to gross
  income.
- Tests: the review's counterexamples, a non-vacuous SPC exemption case, and
  property-test generators and oracles for dependent young people and losses.

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

- "No earned income" follows UC Regs 2013 regs 52-62: employment income plus
  SSP and SMP less relievable pension contributions (reg 55(4)-(5)),
  self-employed earnings with losses nil and the minimum income floor where
  the UC model applies it (regs 57(2), 62), and other paid work.
- IS, JSA(IB), ESA(IR) and SPC count only for the person they are payable to
  (HB Regs 2006 reg 2(3)-(3A)): the member reporting the award, or the head;
  used for the exemptions and HB reg 6(6). UC still counts for both joint
  claimants.
- Gross income uses UC after the benefit cap (UC reg 81), applying the cap to
  the capped benefits other than HB, which a non-dependant family does not
  receive.
- CTR exempts an adult for whom another person is entitled to child benefit
  (LGFA 1992 Sch 1 para 3, via para 8(8)(b) and equivalents).
- Tests: the review's counterexamples, and property oracles for the payee and
  the child benefit disregard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the local claimant-or-partner helper (benefit unit head, or anyone
not a child benefit child or qualifying young person) with the
is_claimant_or_partner variable: the SSCBA s.137 couple, at most two people.
A partner at school is now a partner, and a third adult in a benefit unit is
deducted separately. Adds the round-2 review cases: a blind 16-year-old
partner (Wales), a non-dependant couple with a partner at school, and a
17-year-old partner's PIP in Merton.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The changelog and the property generator's comment now name
is_claimant_or_partner instead of the SSCBA s.142 definitions, and
is_award_payee says that both members of a joint-claim jobseeker's allowance
couple are on it (HB reg 2(3)(c)), which the model cannot identify.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ap childcare, child benefit claims

- Gross income adds statutory sick, maternity and paternity pay (earnings,
  HB reg 35(1)(i)) and Maternity Allowance to each person's taxable income,
  and the family's IS, JSA(IB), ESA(IR) and Pension Credit to a couple's.
- Earned income for the UC limb adds statutory paternity pay (UC reg
  55(4)(c)), and relievable pension contributions come off self-employed
  earnings when there are no employed earnings (reg 57(2), step 4).
- Scotland's working-age scheme exempts a non-dependant whose partner is on
  IS, JSA(IB) or ESA(IR) and who is not on Universal Credit, from April 2022
  (SSI 2021/249 reg 90(8)(a), reg 4(1)).
- The after-cap UC in gross income keeps the cap's childcare protection (UC
  reg 81(1)-(2)).
- The LGFA 1992 Sch 1 para 3 disregard needs a child benefit claim.
- The property oracle derives the claimant and applicant exemptions from
  the generated inputs, and the generator varies statutory pay, pension
  contributions, the start-up period, the award's reporter and child
  benefit claims.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the hb-ctr-non-dep-exemptions branch from f5aae26 to 084e1f9 Compare October 3, 2026 12:19
MaxGhenis added a commit that referenced this pull request Oct 3, 2026
HB(SPC) Sch 3 para 6 has the working-age premium's conditions and para
12 its amounts, so the pension-age premium is severe_disability_premium
for a family over State Pension age. A Pension Credit reform no longer
moves pension-age HB or CTR. The schedule property keeps the Pension
Credit addition as a cross-check. References add the CTR nomination
rule and the other premium schedules; the conditions YAML notes the
three income-rule defects its awards include (#1908, #2112, #2007).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Takes main's uv.lock, which drops an unintended one-line lock change from
this branch's first commit.

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

Copy link
Copy Markdown
Collaborator Author

Independent review, round 3 (452d6bb)

Review text

VERDICT: REQUEST CHANGES

Reviewed #2007 at 452d6bba36c1, relative to #1896's 207e225c6. All deductions below are annual 2026 amounts. Production files and the PR were not edited.

  1. P1 wrong result — joint gross income still omits available taxable statutory pay. File: policyengine_uk/variables/gov/dwp/housing_benefit/non_dep_deduction/_non_dependants.py:36 (also lines 37–42).

    Pension-age HB reg 55(4) requires the couple's “joint weekly gross income”; HB reg 35(1)(i) expressly includes “statutory maternity pay” in earnings. CTR para 8(4) likewise uses joint gross income.

    Fresh input: England applicant 80; explicit non-dependant couple aged 30/28, worker earning £260/week at 16 hours, partner receiving £1,560 annual SMP (annualised £30/week) at zero hours; other benefits zero. Actual HB £2,436.20, CTR £270.40; expected £3,346.20/£551.20. The helper sees £260 instead of £290, missing both £279 thresholds.

    A second fresh input, ESA(IR) £100/week paid to the 45-year-old recipient plus the 40-year-old partner's £180/week wages at 16 hours, gives actual £1,060.80/£270.40; expected £3,346.20/£551.20, using joint income £280. The round-2 ESA case passes only because £210 and the correct £260 share the same bands. ESA(IR) falls within the PR's generic untaxed-income limitation; that caveat does not cover missing taxable statutory pay.

  2. P1 wrong result — statutory paternity pay is omitted from earned income. File: _non_dependants.py:71.

    UC reg 55(4)(c) includes “statutory paternity pay”. Its existing model input is absent from the helper's add list.

    Fresh input: England applicant 80; single non-dependant 24, SPP £300 (two weeks at £150), UC £2,000, zero other wages/hours, outside education, explicit claimant identities. Actual HB/CTR £0/£0; expected £1,060.80/£270.40 (£20.40/£5.20 weekly). The award is calculated with earned income, so the UC exemption does not apply. This omission is not disclosed. This ordinary-award probe replaces the initial £8,000 SPP stress input, which exceeds a normal two-week award.

  3. P1 wrong result — relievable pensions are not deducted from self-employed earnings. File: _non_dependants.py:75.

    UC reg 57(2), step 4 says “deduct from that amount any relievable pension contributions”. The helper subtracts contributions only from employed earnings.

    Fresh input: England pensioner applicant; single non-dependant 24, £6,000 self-employed profit, £6,000 relievable personal pension contributions, start-up period true, ten weekly hours, UC £2,000, no other earnings. Actual HB £1,060.80, CTR £270.40; expected £0/£0. Step 4 leaves nil earnings, and UC reg 62(5) excludes the minimum income floor during the start-up period. This omission is not disclosed.

  4. P2 material gap — Scotland's working-age partner-inclusive definition is unaddressed. File: policyengine_uk/variables/gov/local_authorities/council_tax_reduction/council_tax_reduction_non_dep_deduction_exempt.py:60.

    SSI 2021/249 reg 90(8)(a) exempts a “qualifying income-related benefit claimant”. Reg 4(1) defines that category to include someone “who has a partner who is” on a qualifying benefit.

    Fresh input: Scottish applicant 50; explicit non-dependant couple aged 35/34, one reports and receives IS £5,000, the other has nil income/hours; UC zero. Actual CTR £288.60; expected £0 on the partner-inclusive reading. The helper exempts only the payee and charges the partner £5.55 × 52. The Scotland pension-age provision instead uses the individual receipt test. Reg 4 begins its definition with “an applicant”; a strictly literal reading would make this non-dependant exemption inoperative. Settled interpretation of that drafting is UNVERIFIED, so this is a material legal-justification gap rather than a definitive P1. The PR does not address the distinction.

  5. P2 material gap — the new after-cap UC helper reproduces the omitted childcare protection. File: _non_dependants.py:56.

    UC reg 81(2) states “no reduction is to be applied where the amount of the childcare costs element is greater than the excess”.

    Fresh input: England applicant 80; non-dependant guardian 20 earning £180/week at 16 hours, children aged 4/2, UC before cap £22,000, childcare element £12,000, Child Benefit £2,500, cap £22,020. Excess is £2,480, below childcare costs, so lawful UC remains £22,000. Actual HB £6,232.20, CTR £691.60; expected £6,835.40/£829.40. The helper instead cuts UC to £19,520 and bands £603.46 rather than £651.15 weekly. This approximation is inherited from the upstream cap formula but newly copied here and not disclosed. Excluding HB itself is supported by UC reg 80(2A).

  6. P2 material gap — the Child Benefit disregard checks qualifying-young-person status without entitlement. File: council_tax_reduction_non_dep_deduction_exempt.py:71.

    LGFA 1992 Sch 1 para 3(1)(b) requires a person “in respect of whom another person is entitled to child benefit”. SSAA 1992 s.1(1) requires a claim for entitlement.

    Input: England pensioner applicant; non-dependant parent earning £200/week at 16 hours and a 19-year-old in approved training begun at 16, outside full-time education; nobody claims Child Benefit (would_claim_child_benefit: false), UC zero. Actual CTR £270.40; expected £540.80, charging both parent and trainee. The positive claimed-benefit control gives the correct £270.40. QYP status alone is an undisclosed entitlement proxy. A payment opt-out must remain distinct: SSAA s.13A preserves entitlement despite no payment. The probe assumes no separate youth-training exemption.

Round-2 findings

Finding Disposition and evidence
1: claimant/partner identity RESOLVED. Explicit flags for every person: Welsh blind 16-year-old partner gives HB/CTR £0/£0; non-dependant couple 20/18 gives £3,346.20/£551.20; Merton partner 17 on PIP gives deduction £0 and award £1,800. No removed helper remains. Merton's shared exemption already works on the #1896 base.
2: SMP, employed pension, MIF RESOLVED for all original counterexamples. SMP £8,000 + UC £2,000 gives £1,060.80/£270.40; £6,240 wages fully into pension gives £0/£0; applicable £20,000 MIF parent 24 gives £1,060.80/£270.40. New SPP/self-employed-pension gaps are findings 2–3 above.
3: ESA working partner RESOLVED for receipt attribution. Original case gives £2,436.20/£270.40; assigning the award reporter to the younger, non-head partner also works. Missing gross benefits and Scotland's distinct rule remain separate findings.
4: capped-UC guardian RESOLVED for the original case. Live Maidstone guardian calculation gives £6,232.20/£691.60; the original pre-cap overstatement is gone. Childcare protection remains finding 5.
5: Child Benefit disregard RESOLVED for the original claimed-benefit case. Child Benefit £1,406.60 is computed; parent-only CTR £270.40 and HB £3,497.00. The no-claim negative control remains finding 6.

Tests and legal coverage

Round-2/3 YAML expectations are hand-derivable from the legislation with explicit roles. The ESA comment omits £50/week from joint income but lands in the same band; the cap comment's pre-cap £576.92 should be £577.92; the school-couple comment's £269 threshold should be £279. The MIF test exercises an explicitly supplied applicability flag: the upstream default trigger requires positive profit, so this test does not prove inference at zero profit. That upstream approximation is disclosed as applying the MIF where the UC model does.

Reading #1896's is_claimant_or_partner makes the oracle independent of #2007's identity consumers, but it cannot independently validate couple identity. Supplying flags from the generated family structure would isolate this PR. More seriously, property-test lines 467–469 and 487–490 use production claimant-exemption flags to zero expected totals, without checking generated disability inputs. A runtime mutant proves the gap: a non-disabled claimant's lawful HB deduction £6,232.20 becomes £0 under a wrong all-exempt flag, yet all assertions in the generated invariant function pass for that household. Statutory pay, pensions, reported payees and a binding cap are absent from the generator. Bounds and monotonicity do not validate the legally correct gross-income band.

No new entity-projection error or dependency cycle was found. The live smoke covers computed UC, the cap, tax credits, Child Benefit and the MIF path. Relative to #1896, #2007 does not change any local-scheme formula, shared eligibility or the shared household exemption; national exemptions stay inside the national amount path.

Impact and wording

The displayed impact table matches compare3.md. Decomposition increments B−A, C−B, D−C, E−D are +£0.939109m, £0, +£4.230793m, +£9.653085m, supporting the rounded +£0.9m/£0/+£4.2m/+£9.7m explanations.

The PR still names old main 7b9fc3792/old head 62572778f, describes the removed identity helper, and says reg 6(6) applies to the award's claimant or partner although code now uses the payee. It must describe #1896 base 207e225c6 and head 452d6bba3. “All” CTR change in England pensioners is overstated: 2026 total +£3.1m versus England pensioners +£3.0m. The preserved applicant probe reports 10.8% claiming, contradicting “fewer than one in ten”. Under-16-hour counts include exempt people and do not mean everyone pays the lowest amount.

UNVERIFIED: clean-base impact provenance (compare3.md records dirty=True), penny-exact decomposition reproduction, record-level claims including zero CTR losers and unchanged UC/PC, and the claim that all HB losers have nil income. Raw arrays are absent; 2026 microsimulation was not rerun. Also, compare.py:37 filters recipients using council_tax_reduction_scheme_supported, which includes the five English local schemes: its £14.9m deduction metric is not demonstrably national-only. Dataset magnitude of that denominator issue is UNVERIFIED. Individual-versus-joint UC earnings and the Welsh UC-couple exception remain disclosed legal interpretations, not proved new failures.

Commands and outcomes

  • Repository-local UV_CACHE_DIR and UV_PYTHON_INSTALL_DIR exports, then uv sync --extra dev: PASS, 148 packages resolved, 142 checked.
  • uv run policyengine-core test policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit policyengine_uk/tests/policy/baseline/finance/benefit/family/universal_credit policyengine_uk/tests/policy/baseline/gov/local_authorities -c policyengine_uk: 412 passed, 0 failed, 635.35 seconds.
  • uv run pytest -q -p no:cacheprovider policyengine_uk/tests/test_non_dependant_deduction_properties.py: RUNNING; two tests passed so far, allowed to finish.
  • uv run python review-artifacts/r3-cont-root/rerun_round2.py: PASS, 10 households, 21/21 comparisons. Each person has an explicit claimant/partner flag; simulations reuse model definitions with independent inputs and caches.
  • uv run python review-artifacts/r3-cont-root/fresh_probes.py: 2 fresh households, 0/4 law-derived comparisons pass; gross SMP and childcare failures above.
  • uv run python review-artifacts/r3-cont-root/valid_spp_probe.py: 1 fresh household, 0/2 law-derived comparisons pass; the ordinary £300 SPP failure above.
  • uv run python review-artifacts/r3-cont-tests/fresh_probes.py: 2 fresh households, 0/4 comparisons pass; ESA gross-income failure and an initial £8,000 SPP synthetic stress input. The latter is not used as the legal finding.
  • uv run python review-artifacts/r3-cont-tests/oracle_mutant.py: 1 surviving mutant verified in completed output; every invariant assertion accepts £0 rather than £6,232.20 for a non-disabled claimant. The wrapper was interrupted after producing that output (exit 130), so this is not a completed pytest mutation run.
  • uv run python review-artifacts/r3-cont-law/fresh_probes.py: 6 fresh households, 3/12 comparisons pass, 9 fail; includes self-employed pensions, the qualified Scottish interpretation, childcare and no-claim probes. Initial £500 SPP and £9,000 SSP stress inputs are not used for the findings.
  • uv run python review-artifacts/r3-cont-root/cycles.py: 3 household-years, 39 calculations, 0 errors/cycles.
  • Scoped uv run ruff format and uv run ruff check on review-artifacts/r3-cont-root, r3-cont-tests and r3-cont-law: PASS, seven Python files. Scoped formatting preserves pre-existing scratch files and keeps reviewed production unchanged.
  • Initial extra round-2 scratch run: interrupted after 10/10 successful comparisons to reuse model definitions; an intermediate attempt to pass tax_benefit_system to the UK wrapper failed with TypeError. The corrected core-engine runner completed all 21 checks above. These are scratch-run failures, not policy-test failures.
  • Full model suite, 2026 survey rerun and optional fresh local-scheme differential: UNVERIFIED / not completed.

Direct Git commits are blocked by the filesystem sandbox: the checkout's index.lock resides outside the writable workspace. Review commits are preserved in a workspace-local Git bundle. No push, GitHub comment or PR edit was made.

Response to review r3 of #2007 (452d6bb)

The review asked for changes. It confirmed every round-2 finding resolved, and found three P1s, three P2s, a test-oracle gap and wording points. All are addressed. Each fix has a YAML case that fails on the previous head (75604f5, the rebased 452d6bb content) and passes now: the "Round 3 of the independent review" section of non_dependant_deduction_review_cases.yaml.

The review was cancelled by Subfleet at 2026-10-02 15:55Z, a minute after it wrote its report. The report is complete apart from the property-test run it had left going.

# Finding Disposition Change Test (expected, 2026)
1 P1: joint gross income omits taxable statutory pay and untaxed income-related benefits Fixed non_dependant_weekly_gross_income: a person's income adds statutory sick, maternity and paternity pay (earnings, HB reg 35(1)(i), kept outside total_income by the model) and Maternity Allowance. A couple's income adds the family's IS, JSA(IB), ESA(IR) and Pension Credit alongside UC, tax credits and child benefit "Statutory maternity pay counts towards a non-dependant couple's gross income" (HB £3,346.20, CTR £551.20); "A couple's income-related ESA counts towards their joint gross income" (£3,346.20 / £551.20)
2 P1: SPP missing from earned income Fixed has_earned_income adds statutory paternity pay (UC reg 55(4)(c)). Adoption, shared parental, bereavement and neonatal care pay have no input, which the PR states "Statutory paternity pay is earned income for the Universal Credit exemption" (£1,060.80 / £270.40)
3 P1: pension contributions not deducted from self-employed earnings Fixed Contributions come off employed earnings where there are any (reg 55(5)(a)), otherwise off self-employed earnings (reg 57(2), step 4: "unless a deduction has been made ... in calculating the person's employed earnings") "Pension contributions are deducted from self-employed earnings in the start-up period" (£0 / £0)
4 P2: Scotland's working-age partner-inclusive definition Fixed New parameter scotland/.../working_age_exempt_partner_of_income_related_benefit_claimant: true from 2022-04-01, when SSI 2021/249 came into force (reg 1). Reg 90(8)(a) and reg 4(1) are read for the non-dependant; the literal "applicant" would leave the limb with no application. SSI 2012/303 reg 67(8)(a) (before April 2022) and SSI 2012/319 reg 48(8)(a) (pension age) are individual "Scotland's working-age scheme exempts the partner of an Income Support claimant" (CTR £0, HB £1,060.80); contrasts "Before April 2022 ..." (£223.60) and "Scotland's pension-age scheme ..."
5 P2: after-cap UC ignores the childcare protection Fixed universal_credit_after_benefit_cap: reduction = max(0, excess − uc_childcare_element) (UC reg 81(1)-(2)). The upstream benefit_cap_reduction has the same gap; that is a follow-up outside this PR "The benefit cap does not reduce Universal Credit when childcare costs exceed the excess" (£6,835.40 / £829.40)
6 P2: LGFA para 3 checks QYP status without entitlement Fixed The disregard needs a positive child_benefit_respective_amount and would_claim_child_benefit (SSAA 1992 s.1(1)). The opt-out flag is not read, since s.13A keeps entitlement "A young person no one claims child benefit for is not disregarded for CTR" (CTR £540.80)

Tests.

  • The property oracle no longer uses the model's claimant-exemption flags to zero expected totals. It derives the claimant (HB) and applicant (CTR) exemptions from the generated disability inputs, asserts the model's flags equal them, and uses the derived values.
  • The generator now varies statutory sick, maternity and paternity pay, pension contributions, the UC start-up period, which non-dependant reports IS, JSA(IB), ESA(IR) and SPC (the payee), and whether child benefit is claimed. Invariant 9's reading of the exemptions covers each of these, and the Scottish working-age partner rule.
  • A binding benefit cap is still not generated; the YAML cases cover the cap.
  • The three YAML comments are corrected: the ESA case's joint income now includes the £50 a week of ESA, the cap case's pre-cap income is £577.92, and the school-couple case's HB band is £279.

Wording and impact.

  • The impact is rerun on the new head against current main. Each sentence of the narrative is rederived from those runs by explain.py (aggregates only).
  • The CTR recipient metric in compare.py now counts national-scheme households only. Its values are unchanged, so the English local schemes contributed nothing to it.
  • "All" of the CTR change in England's pensioner scheme becomes the measured split: £3.04m of £3.06m in 2026, with the rest in Scotland.
  • The "fewer than one in ten claiming" sentence is replaced by a measured count of applicant families with a deduction who receive CTR.
  • The PR text now describes reg 6(6) by payee and the under-16-hours counts with and without exempt people.

Still interpretations, disclosed in the PR. The per-person UC earned-income reading, the Welsh UC-couple reading, and now the Scottish working-age reading of reg 4(1) for a non-dependant.

MaxGhenis and others added 2 commits October 3, 2026 12:10
… in gross income

- The after-cap UC used in a couple's gross income counts Maternity
  Allowance among the capped benefits (Welfare Reform Act 2012
  s.96(10)(i)).
- A self-employment or property loss no longer cancels other gross income:
  it is added back to taxable income (DWP HB guidance A5.551).
- A YAML case for the Scottish partner rule's "not on Universal Credit"
  condition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves the HB docs notebook: main's text with #2000's passport paragraph,
plus this PR's reg 74 description after the reg 70 sentence.

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

Copy link
Copy Markdown
Collaborator Author

Independent review, round 4 (7a5cbe2)

Review text

VERDICT: REQUEST CHANGES

Reviewed exact head 7a5cbe28c2af against main 6fa14dc0e, including the round-3 fix diff and the whole PR. All amounts below are annual 2026 deductions.

  1. P1 wrong result — Maternity Allowance is omitted from the UC cap basket. File: _non_dependants.py:39, applied at line 85.

    Welfare Reform Act 2012 s.96(10)(i) includes “maternity allowance under section 35 or 35B” among capped welfare benefits. UC regs 79–81 implement the cap.

    Fresh input: England applicant 80; explicit non-dependant couple: worker 20 earning £9,200 at 16 hours/week, partner 38 receiving MA £6,000 at zero hours; children 16/15/13/11/0; UC before cap £14,000; Child Benefit £5,129.80; cap £22,020; childcare and other awards zero.

    Actual: helper UC £14,000; HB £6,835.40, CTR £829.40.
    Expected: UC £10,890.20; HB £6,232.20, CTR £691.60.

    Capped benefits total £25,129.80, giving excess £3,109.80. Correct joint income is £600.38/week; the helper bands £660.19/week. The PR explicitly supports MA in gross income without disclosing its cap omission.

  2. P1 wrong result — a business loss cancels known gross wages. File: _non_dependants.py:64.

    Pension-age HB reg 55(2) requires “normal weekly gross income”; England pensioner CTR para 8(2) uses the same test. DWP Guidance A5, paragraph 5.551 specifies “total income with no deductions for business expenses”.

    Fresh input: England applicant 80; non-dependant 30, outside education, 16 hours/week, wages £15,600 (£300/week), self_employment_income: -10400, all awards zero. The specified business has no receipts and £10,400 costs.

    Actual: HB £1,060.80, CTR £270.40.
    Expected: HB £3,346.20, CTR £551.20.

    total_income nets the business loss against wages before the helper floors it, leaving £100/week. Known gross wages establish £300/week independently of missing turnover information. The PR describes its taxable-income method but does not disclose this loss cancellation or the net-profit versus gross-receipts limitation. Round 1 fixed losses in the UC earned-income test only.

  3. P3 wording — impact and mutation statements need qualification. Supplied pr-body.md:198, :140–147, :176–199, and :73.

    • HB recipient deductions should round to £6.0m, rather than £5.9m: decomposition E reports £5.968834307m.
    • The body says 23 exact-head mutations; mutate3.py defines 31. Its explanation that SMP and pensions are absent from the generator is stale. The exact-head mutation log was absent; outcome counts are UNVERIFIED.
    • Older-main +£7.0m and 1,663.5k→1,671.1k caseload claims are unsupported by the supplied named aggregates.
    • Penny-exact reproduction and “no non-dependant couples” are UNVERIFIED. Zero incremental couple impact does not prove zero couples.
    • Exact unchanged UC/PC awards, zero CTR losers, and universal claims about HB losers are not established by rounded aggregates. Later poverty entry/exit claims have individual evidence for 2027, but only net totals for 2028–2030.
    • “Not modelled (no input)” is too broad for expressly omitted existing maintenance/student-support inputs.

    These are nonblocking wording points; legal quotes and failing household inputs are not applicable. All 72 main impact-table cells match. The decomposition increments and corrected CTR country split, recipient filter, and exemption counts are supported.

Round-3 findings

Finding Disposition and evidence
1. Gross statutory pay and family awards RESOLVED. SMP partner: £3,346.20/£551.20. ESA(IR) £100/week plus partner £180/week at 16h: £3,346.20/£551.20.
2. SPP earned income RESOLVED. £300 SPP, UC £2,000, age 24: £1,060.80/£270.40.
3. Self-employed pensions RESOLVED. £6,000 profit less £6,000 pension, start-up period, UC £2,000, age 24: £0/£0.
4. Scottish partner rule RESOLVED. Working-age CTR £0 in 2022/2026. In 2021 only the payee is exempt, deduction £223.60; pension-age 2026 likewise, deduction £288.60. Eight amount/flag checks pass.
5. Childcare protection RESOLVED. Original case: £6,835.40/£829.40. Fresh partial-reduction control also passes, including UC £21,520.
6. Child Benefit entitlement RESOLVED. No claim for the 19-year-old trainee: CTR £540.80. Payment opt-out control correctly retains the disregard, giving parent-only £270.40.
Claimant-exemption oracle RESOLVED. Expectations derive from generated disability inputs. Both incorrect HB/CTR exemption mutants are rejected: 2 killed, 0 survived.

The Scottish reading is defensible and adequately disclosed. Reg 90(8)(a) applies the defined category to a non-dependant; the context-dependent reg 4(1) reading makes that limb operative while retaining partner inclusion. The temporal and pension-age distinctions are tested. Settled administrative guidance remains UNVERIFIED.

Round-2 preserved probes pass 21/21 comparisons across 10 households. Earlier-round policy regressions also pass.

No automatic double counting or entity projection error was found. The newly added income classes are outside total_income/social_security_income. The live smoke completes 39 calculations without cycles. Both fresh local-scheme probes pass across all five English schemes.

The claimant oracle is now independent where required. Remaining upstream identity/QYP/MIF classifications are unchanged. Coverage still omits generated binding caps and MA; the generator also pins total_income without its separately generated self-employment income, so it cannot catch the gross-loss failure.

The scope list is incomplete for the two findings above and should explicitly identify the net-profit/gross-receipts limitation. Actual-period tax/NI, carried losses, surplus/notional income and mixed-employment excess-pension offsets remain UNVERIFIED, without additional established failures from matching inputs.

Commands and results

All uv commands used the requested repository-local cache and Python-install directories.

  • uv sync --extra dev: PASS, 150 packages resolved, 144 installed. Original uv.lock restored after normalization; dependency versions unchanged.
  • uv run policyengine-core test policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit policyengine_uk/tests/policy/baseline/finance/benefit/family/universal_credit policyengine_uk/tests/policy/baseline/gov/local_authorities -c policyengine_uk: 458 passed, 0 failed, 366.68 seconds.
  • Same runner on LHA_claimant_composition.yaml and gov/dwp/benefit_cap.yaml: 31 passed, 0 failed; combined 489 passed.
  • uv run pytest -q -p no:cacheprovider policyengine_uk/tests/test_non_dependant_deduction_properties.py: 6 passed, 0 failed, one Pydantic deprecation warning, 37:22. Allowed to finish.
  • uv run python review-artifacts/preserved/root/rerun_round2.py: 21 passed, 0 failed.
  • Preserved root fresh_probes.py and valid_spp_probe.py: 4/4 and 2/2 comparisons passed.
  • Preserved tests and law fresh_probes.py: 4/4 and 12/12 passed.
  • uv run python review-artifacts/scotland_controls.py: 8 passed, 0 failed.
  • Preserved cycles.py: 3 household-years, 39 calculations, 0 errors/cycles.
  • uv run python review-artifacts/r4-fresh-code-probes.py: 9 checks passed, 5 failed across six households. Failures are three MA-cap checks and two gross-loss checks.
  • uv run python review-artifacts/oracle_mutants.py: 2 killed, 0 survived.
  • Local isolation probe: 15 passed, 0 failed. Local differential smoke: 120 passed, 0 failed, 30 households.
  • Scoped Ruff formatting/lint: PASS. Production format check: 10 files already formatted.

Full model suite, survey reproduction, CI status, independent legislative scale re-verification, and author mutation outcomes: UNVERIFIED / not run. No individual survey records were printed.

Saved full review and verified commit bundle, containing commits 34ac57aaa and 6297631a3.

Direct commits were blocked because the worktree’s Git index is outside the writable workspace. Production files remain unchanged at 7a5cbe28c; no push, GitHub comment or PR edit was made.

Response to review r4 of #2007 (7a5cbe2)

The review asked for changes. It confirmed:

  • every round-3 finding resolved;
  • the Scottish reading defensible and disclosed;
  • all 72 impact-table cells;
  • no new cycles or local-scheme leaks.

Its two P1s are fixed in aa44a1a, each with a YAML case in the "Round 4 of the independent review" section that fails on 7a5cbe2 and passes now. The P3 wording points are addressed in the PR body. Main is merged in as d872f57; the only conflict was the HB docs notebook.

# Finding Change Test (2026)
1 P1: Maternity Allowance missing from the cap basket (WRA 2012 s.96(10)(i)) CAPPED_BENEFITS_EXCEPT_HOUSING_BENEFIT adds maternity_allowance, summed over members with add "Maternity Allowance counts towards the benefit cap on a non-dependant's Universal Credit": UC 10,890.20 after the cap, HB £6,232.20, CTR £691.60
2 P1: a business loss cancels gross wages non_dependant_weekly_gross_income adds any self-employment or property loss back to taxable income. DWP HB guidance A5.551 (read in the source PDF): gross income for self-employed non-dependants is "their total income with no deductions for business expenses, or tax and national insurance contributions". Turnover has no input, so profit floored at zero is used; this is disclosed "A self-employment loss does not cancel a non-dependant's gross wages": HB £3,346.20, CTR £551.20
3 P3: wording £6.0m (not £5.9m); mutation section rewritten from the 31-mutation log on 7a5cbe2; the 2025-26 claims now cite compare4.md and base4.json/base6.json; the couple step is described as changing no deduction, not as "no couples"; HB losers and poverty movers stated as measured, with zero rows given as "under 0.05k"; "Not modelled" no longer says "no input" for maintenance and student support, which have inputs —

Mutation: the YAML suites killed 30 of 31 on 7a5cbe2. The survivor was the Scottish rule's "not on Universal Credit" condition, which the property tests killed. aa44a1a adds a YAML case that kills it ("Scotland's partner rule does not cover a couple on Universal Credit", CTR £288.60).

Tests on d872f57: targeted YAML 499 passed, properties 6 passed.

MaxGhenis added a commit that referenced this pull request Oct 4, 2026
Review r5 (P3-3): the case is Scottish, so cite SSI 2021/249 reg 20(2)
and reg 79(4) for the student exclusion and the divisor, and note that
reg 90(7)(c) makes no deduction for a full-time student non-dependant.
The model's national deduction is nil there only because the head has no
income; #2007 adds the student exemption. Comment only.

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

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.

Housing Benefit non-dependant deductions: exclusive band edges, no remunerative-work test, one deduction per person, no exemptions

3 participants