Repository navigation
Conversation
The Council Tax Reduction (Scotland) Regulations 2021 reg. 6(1), in force 1 April 2022, define a young person as a qualifying young person under UC Regs 2013 reg. 5. The model used the Child Benefit definition for every scheme: is_lone_parent in the applicable amount and the legacy flag for the members whose income counts. Add is_child_or_young_person_for_council_tax_reduction (the Universal Credit test, minus the claimant and partner, in Scotland's working-age scheme from 2022-23; the legacy flag elsewhere), with the responsibility and lone-parent flags built on it, and read them in council_tax_reduction_applicable_amount and council_tax_reduction_applicable_income. England, Wales, Scotland's pension-age scheme (SSI 2012/319 reg. 4) and Scotland before 2022-23 (SSI 2012/303 reg. 4) keep the Child Benefit definition. Fixes #2286 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mutation testing showed the generated benefit units rarely draw a Scottish working-age 19-year-old past the Universal Credit terminal date, so the scheme-selection property passed with the Scottish branch removed. Add an exhaustive grid (ages 14 to 21, every education value and flag, each country and pensioner test, 2021, 2022 and 2026) that also asserts the two definitions part only there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…scheme Mutation testing showed that dropping the claimant filter from the Scottish branch failed only one generated-unit property. Add each subject of the exhaustive grid as the claimant of a benefit unit of their own, with a check that some are qualifying young persons by status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 11, 2026
Review round 1 of #2288: a household head aged 18 or 19 who applies alone is not the benefit unit's claimant, and the income mask reached them only as a Child Benefit young person. Past the Universal Credit terminal date the Scottish working-age scheme no longer reads them as a young person, and their earnings dropped out. The applicant stays counted (SSI 2021/249 reg. 36(1)). Adds YAML Cases 9 and 10 and a property test, documents the looked-after approximation, and corrects a test comment. Not yet run locally: the host was over its memory limit. CI runs them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2286
Summary
Scotland's working-age Council Tax Reduction scheme defines a "young person" as a Universal Credit qualifying young person (QYP). The model used the Child Benefit QYP for every scheme, so in Scotland it could treat as a lone parent someone the Scottish regulations do not, and count the income of someone outside the family.
On
main(9475c95), 2026-27: a single claimant aged 22 in Edinburgh, not on Universal Credit, with a 19-year-old at school who is past Universal Credit's 1 September and earns £2,000:maincouncil_tax_reduction_applicable_amountcouncil_tax_reduction_applicable_income(The model counts a young person's own earnings as the family's. That is an older approximation, not the law: SSI 2021/249 reg. 36(2) says a young person's income "is not to be treated as the income and capital of the applicant". The row shows who the model counts as family, not a statutory income figure.)
This is a follow-up from #2279.
The law
Council Tax Reduction (Scotland) Regulations 2021 (SSI 2021/249), in force 1 April 2022 (reg. 1):
The other schemes use the Child Benefit definition, as the model already does:
Where the two definitions differ today: a 19-year-old on a non-advanced course begun before 19 is a Child Benefit QYP until 20 (Child Benefit (General) Regulations 2006 reg. 3), but a Universal Credit QYP only until the 1 September after their 19th birthday (UC Regs 2013 reg. 5(1)(b)). After #2279 they also differ for a 16-year-old outside education, until Child Benefit's own 16-year-old rule is modelled.
Change
is_child_or_young_person_for_council_tax_reduction(Person). In Scotland, for a family that is not a pensioner for Council Tax Reduction, from 2022-23:is_child_or_qualifying_young_person_for_universal_credit(which already leaves out a looked-after child) and not the claimant or partner. Everywhere else:is_child_or_young_person_for_legacy_benefits, as before.gov.local_authorities.scotland.council_tax_reduction.working_age.young_person_follows_universal_credit: false, then true from 1 April 2022.is_responsible_for_child_or_young_person_for_council_tax_reductionandis_council_tax_reduction_lone_parent(BenUnit), built on that flag.council_tax_reduction_applicable_amountreads the new lone-parent flag; a single person is a claimant with no partner who is not that lone parent.council_tax_reduction_applicable_incomecounts the claimant, the partner and the members the new flag names, where it counted the legacy flag's. It also keeps counting a Council Tax Reduction applicant who is a Child Benefit young person (see below).A household head who applies alone. When the person liable for the council tax heads the household but is not the benefit unit's claimant or partner (
council_tax_reduction_head_applies_alone), they are the applicant.main's income mask (claimant and partner, plus the legacy young person flag) reached such a head only if they were a Child Benefit young person. A first version of this PR swapped in the new flag, so a 19-year-old head in training past the Universal Credit terminal date dropped out of their own means test, earnings and all. The applicant's own income always counts (SSI 2021/249 reg. 36(1)), so the mask now keeps an applicant who is a Child Benefit young person (YAML Cases 9 and 10). The review of this PR found it. An applicant who is neither the claimant, the partner nor a young person still does not count: that is #2078's fix (means-test the applicant and partner), not this one's.is_lone_parentandis_single_personare unchanged; Income Support, Housing Benefit and the pensioner earnings disregard still read them.Invariants
Tests
test_council_tax_reduction_young_person_properties.py(four countries; years 2021, 2022 and 2026):council_tax_reduction_young_person.yaml, ten cases hand-computed from the allowance parameters:Mutation checks, each applied alone in a copy of the branch:
The first run of these showed the generated-unit property passing with the Scottish branch removed, because random families rarely include a Scottish working-age 19-year-old past the terminal date. The exhaustive grid, and its lone-claimant half, were added for that reason.
Run locally at 41b1d31:
pytest policyengine_uk/tests/test_council_tax_reduction_young_person_properties.py: 6 passed (the five before, and invariant 6's).policyengine-core testoncouncil_tax_reduction_young_person.yaml: 10 passed.ruff format --checkandruff checkon the changed files: clean.Mutation check of the new term (
mutation/prF_r1.json): dropping the applicant term fails YAML Case 9 andtest_applicants_own_earnings_count_under_every_scheme; Case 10 (England) passes either way, as it should, because there the legacy flag already counts the head.Earlier runs (the model code at a7d0127; 76ed60e and 9dc3e3c add the exhaustive test):
pytest policyengine_uk/tests/test_council_tax_reduction_young_person_properties.py: 5 passed.policyengine-core teston the new file: 8 passed. On the 28 YAML files that mention Council Tax Reduction,is_lone_parentoris_single_person: 370 passed.pyteston the 10 other Python test files that read Council Tax Reduction outputs (claimant, family scheme, pensioner earnings disregard, Pension Credit, carer income, legacy award readers, means-test income, pension-age severe disability premium, sharers and lodgers, State Pension Credit qualifying age): 89 passed.ruff format --checkandruff checkon the changed files: clean.The full suites run in CI.
Microsimulation impact
Real runs on Enhanced FRS 2024-25 (uk-data 1.58.0, sha256
5ba399ea5ab9a6c7),main9475c95 against this branch at 41b1d31, one run each for 2024-25 to 2030-31, exact comparison of every record (113,589 people). The branch was first run at a7d0127 and re-run at 41b1d31 after the income-mask change; both give the same result.No record changes in any year.
council_tax_reduction,council_tax_reduction_applicable_amount,council_tax_reduction_applicable_income,simulated_council_tax_reduction_benunit,household_net_income,universal_credit,housing_benefit,pension_creditand both poverty flags are identical in every record. There are no winners or losers.The reason is in the data, not the rule:
is_before_universal_credit_qualifying_young_person_terminal_dateto true for all 102 Child Benefit QYPs aged 19, so the one differencemaincan express never arises in it.The change therefore affects household calculations now (the table at the top), and the microdata once the two definitions diverge there, as they will for 16-year-olds outside education when #2279 lands.
Not in this PR
is_lone_parentand the legacy flag: the personal allowance, the earnings disregard, the childcare deduction and the child amounts. For Scotland each should readis_council_tax_reduction_lone_parentandis_child_or_young_person_for_council_tax_reduction. I will leave a note there.council_tax_reduction_applicable_amount, the same premiums line Scottish working-age Council Tax Reduction: severe disability premium reads a Child Benefit young person as family, not as a non-dependant #2295 needs, and the same income mask: it counts the applicant and partner. Whichever lands second keeps both changes; after Means-test the Council Tax Reduction applicant and partner, not the benefit unit's claimant #2078 the applicant term added here is redundant.axiom: SSI 2021/249 regs 4, 6 and 7 TheAxiomFoundation/rulespec-uk#448 queued (blocker stated there: the rows are not cited by any module and a billed encoder run needs approval; UC reg 5 itself is encoded at
uk:regulations/uksi/2013/376/5#qualifying_young_person; addendum adds the reg. 4 "family" output and regs 8 and Sch. 1 para. 13)🤖 Generated with Claude Code