Repository navigation
Count only the claimant's and partner's income in the legacy means tests - #2387
Conversation
Fixes #2385. Housing Benefit, Income Support, tax credit and Council Tax Reduction applicable income counted the family's own children's and young persons' income, tax, contributions and personal benefits too, an approximation each formula's comment called a follow-up. The law counts the claimant's and partner's alone: HB Regs 2006 reg 25(3) and IS Regs 1987 reg 23(2) say in terms that a child's or young person's income is not the claimant's; the tax credit income regulations (reg 3(1)) and every Council Tax Reduction scheme count the claimant or applicant and partner (SSI 2021/249 reg 36(2) says so in terms). The household head who applies alone for Council Tax Reduction keeps the treatment #2288 gave them. Tests: new YAML (three cases, each failing on main), a property test that a dependant's income never changes any of the seven income totals, and the Scottish CTR young-person tests updated to the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent's means tests Review round 1 of #2299: a young person who qualifies through reg. 7 and works 24 hours stays a young person, so their earnings must not enter the parent's Housing Benefit, Income Support or Council Tax Reduction income. #2387, merged in here, makes that so; Case 11 now has £20,000 of earnings and asserts the three applicable incomes are nil. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main has moved the tax credit member mask into tax_credits_current_year_income and, through #2078, means-tests the Council Tax Reduction applicant and partner. Both conflicts take main's code and re-apply this PR's change where the masks now live: the tax credit income counts the claimants alone, and the CTR income the applicant and partner alone, dropping the family's children and young persons that #2078 still counted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; components the model counts twice; 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 checkEach of 84 components was raised by £1 per unit in 2026-27, and every head of its totals was read 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 head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.
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
Components the model counts twice: 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
|
|
Hand-off to the UK hub from the QYP follow-ups session (
|
|
Merged by the UK hub (session local_8e19f9d5, Opus 5.5) as
🤖 Generated with Claude Code |
|
Merged by the UK hub (session local_8e19f9d5, Opus 5.5) on its merge gates (hand-off line 91, QYP session local_1b6fef51). One merge-queue enqueue, pinned to head
🤖 Generated with Claude Code |
Fixes #2385
Summary
Housing Benefit, Income Support, tax credit and Council Tax Reduction applicable income counted the family's own children's and young persons' income, and subtracted their tax, National Insurance and pension contributions. Each formula's comment said the law counts only the claimant's and partner's, and that "dropping dependants' own income is a follow-up". This PR does that.
On
main(a8b2848), 2026-27, England, a lone parent with a 17-year-old at school who earns £8,000 (YAML Case 1):mainhousing_benefit_applicable_incomeincome_support_applicable_incometax_credits_applicable_incomecouncil_tax_reduction_applicable_incomeIt is needed by #2299 (Child Benefit routes for young people who have left education), whose review ran a working 18-year-old school-leaver: once rightly a young person, their £20,000 of earnings entered the parent's Housing Benefit, Income Support and Council Tax Reduction means tests.
The law
Change
The four formulas' member mask is now the claimant and partner alone (
is_claimant_or_partner; for Council Tax Reduction,is_council_tax_reduction_applicant_or_partner), where it was that or the programme's own child or young person. That covers the income components, the personal benefits, tax, National Insurance and pension contributions they add up. Unchanged: who is a child or young person, the allowances for them, and the benefit-unit awards these formulas add (Child Benefit, Income Support, the claimant-or-partner JSA and ESA, Universal Credit, tax credits). Onmain, tax credits' mask now sits intax_credits_current_year_income, and Council Tax Reduction's starts from #2078'sis_council_tax_reduction_applicant_or_partner, which counts a household head who applies alone as the applicant whatever their age; this PR drops only the children-and-young-persons term from each.Invariants
Tests
test_means_test_income_properties.py: newtest_income_of_children_and_young_persons_never_counts(invariant 1), on generated families with a child under 16 or a young person at school, each with up to £50,000 of earnings, pension and savings income, with every family on and off Universal Credit, across all seven income totals. It first checks that the dependant is each legacy programme's own child or young person, so the property cannot pass by excluding them. The existing outside-member property (invariant 3) is unchanged.means_tests_young_person_income.yaml, three cases hand-computed (2026-27), each failing onmain:main£26,514)council_tax_reduction_young_person.yamlCases 2 and 3 counted the young person's £2,000 of earnings (£3,406.60); they now give Child Benefit alone, £1,406.60.test_council_tax_reduction_young_person_properties.pyinvariant 6: a non-applicant young person's earnings never count; the applicant's always do.Mutation checks at fafd220, before the merge of
mainthat moved the tax credit mask and brought in #2078's CTR mask, each applied alone in a copy of the branch (mutation/prG2.txt):Run locally at 78a8cca (
maina8b2848 merged):policyengine-core teston the 141 YAML files that mention Housing Benefit, Income Support, tax credits or Council Tax Reduction (the new one included): 1,700 passed.pyteston the 29 Python test files that read the four totals: 210 passed.maina8b2848: all 3 cases fail (HB applicable income £8,000, £11,700 and £26,514 against £0, £3,700 and £18,514); a direct calculation there gives the table above for all four.ruff format --checkandruff checkonpolicyengine_uk: clean.policyengine-core teston the 248 YAML files that mention these programmes, 2,685 passed;pyteston the 135 Python test files that mention them, 1,930 passed, 1 xfailed and 6 failed, none in this PR's files. The six had two causes above this PR, both since fixed: Add the Child Benefit qualifying young person routes for young people who have left education #2299's benefit cap oracle and a test generator on Count 16-year-olds outside education as UC and Pension Credit qualifying young persons until the 1 September after their 16th birthday #2279; the two files pass at 98a4739 (64 passed).At fafd220, before the merge: the 103 YAML files then matching, 1,140 passed (the two changed CTR expectations were the only failures before they changed); 18 Python files, 105 passed.
The full suites run in CI.
Microsimulation impact
Aggregate impact report (CI)
The report runs
maina8b2848 against this PR merged into it (78a8cca) on the certified Enhanced FRS 2024-25 (policyengine-uk-data 1.58.1), one full run per side for each year 2025-26 to 2031-32. Result: pass, 0 checks broken, no moves flagged, and no change in any year: no household's net income, receipt, spending line, poverty count or standard reform costing moves. The local run below agrees: its only award change is in 2024-25, before the report's first year.Local runs
Real runs on Enhanced FRS 2024-25 (uk-data 1.58.0, sha256
5ba399ea5ab9a6c7),maine01f2f5 against this branch at fafd220, one run each for 2024-25 to 2030-31, exact comparison of every record (impact/prG2/in the session folder).Household incomes change only in 2024-25, for 2 records (343 weighted households), +£42,197 in working tax credit (mean £123). No household loses, and no Housing Benefit, Income Support, Council Tax Reduction, Universal Credit or Pension Credit award changes in any year: few families in the data have a dependant with income of their own, and those that do are not on these benefits.
The applicable incomes move (£ million a year; records that differ in brackets):
tax_credits_applicable_incomehousing_benefit_applicable_incomeincome_support_applicable_incomecouncil_tax_reduction_applicable_incomeTax credits count investment income at step one, so children's savings and the like drop out there in many more records than in the other three. In the other three, the change can be upward: where a dependant paid income tax on income those formulas never counted,
mainsubtracted the tax from the family's income. In 2030-31, 10 records rise and 2 fall in each of the three; each value appears in two records. Each rise equals a dependant's own income tax (£337.18, £110.64 twice, £484.63, £2,199.95), and each fall is a 19-year-old's own social security income of £4,880.24 (impact/prG2/dependants_2030.txt).Reproducer: policyengine_uk/tests/test_means_test_income_properties.py::test_income_of_children_and_young_persons_never_counts
axiom: SI 2012/2885 Sch 1 para 11 encoded-correct (
uk/regulations/uksi/2012/2885/schedule/1/paragraph/11.yaml, companion testhousehold_member_is_not_treated_without_polygamous_marriage); HB Regs 2006 reg 25, HB (SPC) Regs 2006 reg 23, IS Regs 1987 reg 23, SI 2002/2006 reg 3, WSI 2013/3029 Sch 1 para 5, SSI 2012/319 reg 21 and SSI 2021/249 reg 36 TheAxiomFoundation/rulespec-uk#463 queued (blocker stated there: no module cites the rows, and a billed encoder run needs approval)🤖 Generated with Claude Code