Repository navigation
Fix Care to Learn, extended childcare, maintenance loan and Tax-Free Childcare legal gaps - #2079
Merged
Merged
Conversation
…Childcare legal gaps - Care to Learn: pay each qualifying child's childcare costs up to the ESFA weekly maximum per child, once per child, and only to young parents on a study programme. - Extended childcare: add the SI 2022/1134 reg 13 young-child condition and the reg 14(4)/15(4) route for a parent or partner with limited capability for work or a specified benefit; fix the reg 18 and reg 14(3)(c) boundaries. - Maintenance loans: add the Sch 4 para 2(1)(a) age-25 independence test to the dependent-student proxy. - Tax-Free Childcare: use the SI 2015/448 reg 13(1) benefit list and deem the reg 13(2)(b) minimum income. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd maintenance loan against scalar references Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3) to (1)(b) benefits - Extended childcare: reg 11A(1)(c) is the carer element of a Universal Credit award, so count it for the carer only, and only where the benefit unit's UC award includes it (receives_uc_carer_element), not for both partners of any benefit unit with a carer. - Tax-Free Childcare: reg 13(3) excludes a working partner who receives a reg 13(1)(b) benefit, not one on carer's leave under 13(1)(c). Move carer's leave out of the benefit list into its own dated switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tighten citations Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-support-gaps # Conflicts: # policyengine_uk/parameters/gov/dfe/extended_childcare_entitlement/disability_criteria.yaml # policyengine_uk/tests/policy/baseline/gov/hmrc/tax_free_childcare/tax_free_childcare_income_condition.yaml
…ded childcare lists SI 2015/448 reg 13(1)(b) and SI 2016/1257 reg 9(1)(b) say "paid or entitled to", and SI 2022/1134 regs 14(4)/15(4) ask about entitlement. #1994 reduces Carer's Allowance and Carer Support Payment by overlapping benefits, so the payable amount can be nil while entitlement remains. Use carers_allowance_pre_overlap/receives_carers_allowance before 1 December 2022 (no Scottish carer's assistance yet) and is_entitled_to_carer_benefit from then, as #1994 did for extended childcare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Case 21 checks that a parent entitled to Carer's Allowance reduced to nil still meets the extended childcare work condition. With regs 14(4)/15(4) applied, that holds only when the other parent meets reg 14(3): qualifying paid work with the reg 18 minimum income. The case's working parent had in_work but no earnings, so give them £20,000 of earnings at a £10 minimum wage. The expected [1, 1, 0] is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mits - Tax-Free Childcare: reg 13(3) excludes a working partner who is "paid" a reg 13(1)(b) benefit or allowance (or entitled to a credit), not one merely entitled to it. A partner whose Carer's Allowance is overlapped to nil still counts as the partner in qualifying paid work. New caring_or_incapacity_benefits_in_payment list; 13(1)(b) itself keeps "paid or entitled to". - Extended childcare before 1 December 2022 (SI 2016/1257): reg 9 deemed only qualifying paid work, so the £100,000 limit (reg 4(5), (7)) still applied to the person using it, and reg 9(3) did not count a working partner paid or entitled to a listed benefit. Dated parameters switch both off when SI 2022/1134 takes over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Guard the empty reg 9(3) list with a boolean zero array, not ~False.
- Count a carer benefit supplied as received in the reg 13(3) payment
list (receives_carers_allowance; receives_carer_benefit from
1 December 2022), since an input flag means it is paid.
- Pin the two choices that separate SI 2016/1257 reg 9(3) from reg
13(3): an allowance overlapped to nil still excludes the working
partner ("entitled to"), and an LCWRA determination does not.
- Rewrap a docstring line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Merged at the reviewed head
Follow-ups: #1930, #1931 and #1932. Axiom parity: TheAxiomFoundation/rulespec-uk#363, #364, #365 and #381. 🤖 Generated with Claude Code |
This was referenced Oct 4, 2026
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 #1920
Uses
is_claimant_or_partnerand the programme child definitions from #1896.What was wrong, and what changes
1. Care to Learn paid one maximum per claimant, and paid young parents not in education
The model paid every eligible young parent the weekly maximum × 52 (£9,360, or £10,140 in London), whatever the number of children or the childcare costs. The ESFA 2026-27 conditions of grant pay "towards the cost of childcare and travel up to a maximum of: £180 per child per week [...] outside London; £195 per child per week [...] in London" (section 4.1; also section 2.2). They require you to "evidence [...] the actual amount of support each student needs, based on actual childcare and travel costs". The grant also funds childcare "while the young parent is engaged in a study programme" (section 1.2). The model excluded only higher education, so it paid young parents who were not in education at all.
care_to_learn_qualifying_child: a Child Benefit child or qualifying young person in the benefit unit other than a parent (the section 2.2 "main carer [...] in receipt of Child Benefit" condition).care_to_learnsums each qualifying child'schildcare_expensescapped at the per-child maximum × 52. It pays once, to the eldest eligible young parent, because only one parent claims for a child. Travel costs are not modelled.care_to_learn_eligiblerequires enrolment in non-higher education (current_educationnotNOT_IN_EDUCATIONorTERTIARY).2. Extended childcare had no young-child condition, and its reg 14(4)/15(4) route never applied
Young child. The model never checked for a young child. The new
extended_childcare_entitlement_qualifying_childapplies Childcare Act 2016 s.1(2)(a)-(b) (under compulsory school age, in England) and SI 2022/1134 reg 13(2). Reg 13(2)(a) sets the minimum age: "three" as made, "two" from 1 April to 31 August 2024, and "nine months" from 1 September 2024 (SI 2023/1330 reg 2(5); new parameteryoung_child_minimum_age). Reg 13(2)(b) excludes a child looked after by a local authority. Eligibility requires such a child, and the amount counts only such children's hours.PolicyEngine reads a year's parameters on 30 April, so the nine-month rule applies from 2025, and 2024 uses "two". The Enhanced FRS records whole-year ages, so
age >= 0.75excludes every age-0 child in microsimulation. Household calculations with fractional ages capture 9-11-month-olds.Reg 14(4)/15(4). A parent or partner with limited capability for work, or entitled to a specified benefit (reg 11A), meets the conditions when the other member of the couple meets reg 14(3)/15(3). They need neither the work nor the income condition. The model required every parent to pass the income test, so this route never applied.
extended_childcare_entitlement_work_conditionis now the per-person reg 14(2)/15(2) test: reg 14(3)/15(3) (in work, minimum income, adjusted net income not above £100,000), or reg 14(4)/15(4). The status isextended_childcare_entitlement_limited_capability_or_specified_benefit.Before 1 December 2022. SI 2016/1257 applies through dated parameters:
exemption/income_limit_applies: reg 4(5) and (7) keep the £100,000 limit on the person using the caring or incapacity route, because reg 9 deems only qualifying paid work;exemption/partner_exclusion_criteria: reg 9(3) does not count a working partner paid or entitled to a listed benefit.Both switch off when SI 2022/1134 takes over.
The list.
disability_criterianow follows SI 2016/1257 reg 9(1)(b) before 1 December 2022, and reg 14(4)-(5) and 11A from then. That adds:carer_support_payment);uc_limited_capability_for_WRA.Carer's allowance entitlement. The lists read entitlement, not payment, since Reduce Carer's Allowance and Carer Support Payment by overlapping benefits #1994 can reduce Carer's Allowance and Carer Support Payment to nil through overlapping benefits. The extended list (regs 14(4)/15(4), "entitled to a specified benefit") and the Tax-Free Childcare list (reg 13(1)(b), "paid or entitled to") use
carers_allowance_pre_overlaporreceives_carers_allowancebefore 1 December 2022, and Reduce Carer's Allowance and Carer Support Payment by overlapping benefits #1994'sis_entitled_to_carer_benefit(Carer's Allowance or Carer Support Payment) from then.The UC carer element. It now counts only for the carer, and only on a UC award that includes it (new
receives_uc_carer_element). Reg 11A(1)(c) is "the carer element under [...] regulation 29"; reg 14(5)(a) as made required "an award of universal credit [...] that includes the carer element". This changes no dataset total. Before, the benefit-unituc_carer_elementcounted, and it is calculated for any unit with a carer.Boundaries. Reg 18 is "equal to or greater than", and regs 14(3)(c)(i)/15(3)(b)(i) are "exceed £100,000". The model had
>and<.3. Maintenance loan: no age-25 independence test
maintenance_loan_household_incomeadded a detected sponsor's income for dependent students of any age. A student "aged 25 or over on the first day of the relevant year" is independent (Education (Student Support) Regulations 2011 Sch 4 para 2(1)(a)). The new parameter isgov.dfe.maintenance_loans.independent_student_age(25, from academic year 2012-13, reg 1(3)). The same variable feeds the Childcare Grant, Parents' Learning Allowance, Adult Dependants' Grant and Travel Grant.4. Tax-Free Childcare: the caring and incapacity route used the Pension Credit list, and never applied
tax_free_childcare_work_conditiontreated a non-working partner as meeting the work condition if they received:SI 2015/448 reg 13(1)(b) lists:
Reg 13(1)(c) adds carer's leave from 6 April 2024. Reg 13(3) excludes a working partner who is "paid" a (1)(b) benefit or allowance, or entitled to a (1)(b) credit. Mere entitlement to an allowance reduced to nil by an overlapping benefit, or carer's leave, does not have that effect. Reg 13(2)(b) regards the person as having the minimum income, but the model did not apply that. So the non-earning partner always failed
tax_free_childcare_meets_income_requirements, and no such couple was ever eligible.caring_or_incapacity_benefits: the (1)(b) list, "paid or entitled to" (SI 2022/1148 reg 2(6)(b));caring_or_incapacity_benefits_in_payment: amounts paid, plus the credit, for the reg 13(3) partner exclusion;carers_leave_qualifies: (1)(c), from 6 April 2024 (SI 2024/266 reg 8(2)).tax_free_childcare_caring_or_incapacity_benefit;tax_free_childcare_regarded_as_in_paid_work, for reg 13(1)(a), (2) and (3);tax_free_childcare_on_carers_leave, an input.tax_free_childcare_work_conditionrequires every applicant and partner to be 16 or over and in, or regarded as in, qualifying paid work.tax_free_childcare_meets_income_requirementsaccepts reg 13(2)(b)'s deemed minimum income. The £100,000 limit still applies.receives_limited_capability_for_work_credits(Credits Regulations 1975 reg 8B), shared with extended childcare. It is not in the survey data, so it is false unless supplied.Microsimulation impact (Enhanced FRS 2024-25, real runs of main vs this branch)
Real runs, one process each, on
enhanced_frs_2024_25.h5(sha256e433e532…). The base ismainat6ae9c5ee(the commit this branch last merged); the branch is787d83ad. The210df5a1run gave identical results. Figures are weighted.6ae9c5ee)2025: Care to Learn −£10.8m, extended +£184.4m, universal −£59.8m, Tax-Free Childcare +£1.4m, maintenance loans +£6.7m, household net income +£115.1m.
What drives it (2026):
uc_limited_capability_for_WRA, whose dataset value isis_disabled_for_benefits, i.e. reported DLA/PIP: +£69.8m extended, −£48.3m universal. Treat that part as proxy-dependent.extended_childcare_entitlementcaps hours by the dataset's benefit-unitmaximum_extended_childcare_hours_usage, which is under 15 hours a week for about 17% of these families (weighted median 17.3). The universal entitlement has no such cap. This asymmetry predates this PR: it applies to every extended-eligible family on main. Follow-up: Extended childcare eligibility can lower a family's modelled funded hours below the universal entitlement #1930.Invariants
Property-tested in
test_dfe_childcare_student_support_properties.py. Each property compares the model with an independent scalar reference over random families, batched into one Simulation per example (Hypothesis, derandomized, 25 examples each; 52 s).Care to Learn conservation. Per benefit unit, the amounts paid sum to the sum over Child Benefit children of min(costs, per-child maximum × 52) if some parent is eligible, else 0. At most one person is paid: an eligible parent of the greatest age. Children are never paid, and the total never exceeds the number of children × the cap.
Extended childcare differential. A family is eligible if and only if two things hold:
The UC carer element counts only for the carer on an award that includes it (random draws plus four explicit cases). PIP itself never matters. In datasets, reported DLA/PIP can reach the condition only through
uc_limited_capability_for_WRA's default (is_disabled_for_benefits), which these families leave false. Years 2023-2026; the boundary earnings (£8,316, £8,320, £100,000, £100,001) are in the draw.Tax-Free Childcare differential.
regarded_as_in_paid_workis true exactly when the person has a reg 13(1)(b) benefit or is on carer's leave (13(1)(c)), and has a working partner who is not paid a (1)(b) benefit (the tests supply benefits as amounts, so paid and entitled coincide). Carer's leave never excludes the partner. The work condition holds for the applicant and partner exactly when each works or is regarded, and it is false for children. Anyone regarded meets the income requirement. DLA, PIP and income-related ESA never matter.Maintenance loan differential. A student's assessed income is their own income, plus the parent's only when the student is under 25 and a sponsor is detected. At 25 or over it equals their own income exactly, and it is never below their own income.
Mutation check. Each old defect was put back one at a time, and the matching property failed. All 13 were caught:
The final reviews' fixes are pinned by hand-computed YAML cases. Three of them fail on the previous head
ed741972and pass now:Further cases pin the choices that separate the regimes:
Tests
care_to_learn.yaml(8 cases) andcare_to_learn_eligible.yaml(+1);extended_childcare_entitlement_eligible.yaml(17),extended_childcare_entitlement_work_condition.yaml(21),extended_childcare_entitlement_income_condition.yaml(+4 boundary cases) andextended_childcare_entitlement.yaml(+1 looked-after);tax_free_childcare_work_condition.yaml(+17),tax_free_childcare_income_condition.yaml(+3) andtax_free_childcare_eligibility.yaml(+2 end to end);maintenance_loan.yaml(+2).carers_allowance_overlapping_benefits.yamlkeeps its expected[1, 1, 0], but its working parent now has earnings (£20,000 at a £10 minimum wage). Under reg 14(4)/15(4), the carer's partner must meet reg 14(3), including the reg 18 minimum income; within_workand no earnings it would not.policyengine-core test policyengine_uk/tests/policy/baseline/gov/dfe policyengine_uk/tests/policy/baseline/gov/hmrc/tax_free_childcare policyengine_uk/tests/policy/baseline/gov/dwp/carers_allowance_overlapping_benefits.yaml -c policyengine_uk: 359 passed.pyteston code_health/, the new property file,test_child_and_adult_definitions_properties.py,test_maintenance_loan_proxies.py,test_parameter_descriptions.py,test_parameter_metadata.py,test_build_metadata.py,test_deterministic_variables.py,test_fiscal_year_parameters.pyandtest_latest_data_smoke.py: 1,928 passed, 7 skipped (the data smoke tests skip without dataset credentials).ruff formatandruff check.make test. The host was short of RAM, so targeted suites only; CI runs the rest.Independent review
First Claude Opus 5.5 review (Subfleet, read-only, against the fetched sources): APPROVE. It found two real code gaps, both fixed here:
Delta review of those fixes: APPROVE.
Final reviews after Replace generic child and adult flags with each programme's legal definitions #1896 merged and main was merged in.
ed741972: APPROVE, with one should-fix.Both pointed at the same regression from the carer-entitlement change: reg 13(3) says "paid", not "entitled". Sol also found that SI 2016/1257 kept the £100,000 limit on the exempt adult.
7375f2d4fixes all three, along with the review nits:The three new cases above fail on
ed741972and pass now.Delta reviews of
210df5a1.787d83adalready fixes both.787d83adalso adds Opus's two pre-2022 edge cases and the description fixes.Axiom parity
axiom: TheAxiomFoundation/rulespec-uk#364 queued (SI 2022/1134 regs 11A, 13, 14(4), 15(4) and 18: extension comment with verbatim law, review_finding and companion cases A-Q)
axiom: TheAxiomFoundation/rulespec-uk#363 queued (SI 2015/448 reg 13: extension comment with verbatim law, review_finding and cases A-N)
axiom: TheAxiomFoundation/rulespec-uk#365 queued (SI 2011/1986 Sch 4 para 2(1)(a): extension comment with verbatim law, review_finding and cases A-F)
axiom: TheAxiomFoundation/rulespec-uk#381 queued (ESFA Care to Learn 2026-27 conditions of grant,
uk/policies/govuk/care-to-learn.yaml: new pe-parity issue)No existing rulespec-uk module encodes any of these provisions, and none is in a corpus scope; axiom-corpus#765, still open, ingests only the neighbouring SI 2022/1134 regs 14-15, SI 2015/448 regs 3 and 9 and SI 2011/1986 regs 42, 45 and 46. The issues carry the ingest-then-encode landing path.
Not in this PR
childcare_expenseson the parent, but the Enhanced FRS records them on children, so the grant is £0 in microsimulation. Follow-up: Childcare Grant reads the parent's childcare costs, which the Enhanced FRS records on children #1931.targeted_childcare_entitlement_eligibleexcludes extended-eligible families in the same way as the universal entitlement. There is no measured change here; Extended childcare eligibility can lower a family's modelled funded hours below the universal entitlement #1930 covers it.uc_limited_capability_for_WRA, whose default isis_disabled_for_benefits(reported DLA/PIP in the data). The microsimulation above shows how much of the extended childcare change runs through that proxy.🤖 Generated with Claude Code