Repository navigation
Qualify targeted childcare through Pension Credit only on receipt of a guarantee credit - #1987
Conversation
The 2-year-old entitlement listed the raw guarantee_credit amount as a qualifying benefit. PolicyEngine computes that amount for every benefit unit, so low-income working-age families and pensioners who do not claim Pension Credit qualified through it. SI 2014/2147 reg 1(2) requires the parent to be entitled to the guaranteed element of state pension credit, and entitlement needs the qualifying age (SPCA 2002 s.1(2)(b)) and a claim (SSAA 1992 s.1(1), (4)(ab)). The entry is now in_receipt_of_guarantee_credit (Pension Credit eligible, claims it, guarantee credit positive), the variable #1927 and #1909 add; the file is byte-identical to theirs. Its YAML test is #1927's, also byte-identical. Fixes #1956 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tests with main Main (#1896) now pays Guarantee Credit only within Pension Credit, so the working-age half of #1956 is already fixed there. The targeted childcare route still needs a claim: this branch keys it on in_receipt_of_guarantee_credit, which #1909 put on main. - in_receipt_of_guarantee_credit also requires pension_credit > 0, so a reform that stops Pension Credit being paid ends receipt (review finding: neutralising pension_credit left receipt true). No change in the unreformed model, where a positive guarantee credit for an eligible claimant is always paid. - YAML: below-age cases now assert the minimum guarantee and a zero guarantee credit; add the 17/18-year-old dependant pair. - Properties: compare the route as filed, main's route and the fix; add dependent young people and childcare take-up to the generator, a payment test and a mutation check that the earlier routes break the invariants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
806859d to
2f93939
Compare
…; fix saving and Savings Credit wording Law review: the docs now separate the legal rule (entitlement: qualifying age, SPCA s.4(1A) with the SI 2019/37 art 4 saving, a claim) from PolicyEngine's receipt test; the art 4 saving is described as art 4 states it; the Savings Credit comment follows SPCA s.3(1). The receipt YAML test is restored to #1927's blob (fe4b686) so the two PRs do not conflict on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent departure plainly Independent review: with gov.contrib.freeze_pension_credit on, the receipt returned the baseline receipt without checking the payment, so a reform that also stopped Pension Credit left receipt true. The freeze branch now requires pension_credit > 0 as well; nothing changes while the frozen award is paid. The docs say the model does not distinguish entitlement from payment instead of claiming they differ only at the 10p rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the in_receipt_of_guarantee_credit conflict with #1940: keep this branch's payment check (also under the freeze) and take main's account of the SI 2019/37 art 4 saving, which the model now infers. Update the tests and docs that said the model omits the saving, and add a case for a saved mixed-age couple with a 2-year-old. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve two conflicts: - qualifying_benefits.yaml: keep main's claimant_or_partner_jsa_income and claimant_or_partner_esa_income entries (#2027) with this branch's in_receipt_of_guarantee_credit entry, and describe both rules. - in_receipt_of_guarantee_credit.yaml: take main's copy, which #1927 landed with an updated Case 3 and a saved mixed-age couple case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ving in the docs Address the merge-delta review's nits: - YAML Case 14: the older member is 80, so had reached the qualifying age by 14 May 2019 as SI 2019/37 art 4 requires. The award is unchanged. - The notebook's age requirement now names the art 4 exception. Point the property test's legacy-benefit oracle at claimant_or_partner_jsa_income and claimant_or_partner_esa_income, the entries the parameter lists since #2027. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #2177 targeted_childcare_entitlement_eligible is legal eligibility: standalone take-up (would_claim_targeted_childcare) and eligibility for the working parent entitlement no longer remove it. The route-identity and differential oracles still required both, so they failed on every family that does not claim targeted childcare on its own or is eligible for the extended hours. The oracles are now England and at least one route open. The Universal Credit criterion reads earned income before the work allowance since #2552 (SI 2014/2147 reg 1(3)(a)); the union property now checks the criterion against that rule for every generated family, and two known families pin both changes: a Universal Credit claimant also eligible for working parent hours qualifies, and a £20,000 earner on Universal Credit (£17,920 before the work allowance) does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Backlog F hand-off (UK hub build job, 2026-10-23) Head: Why the two merge-queue properties failed. The cause is #2177 (merged 12 Oct, after this branch's last main merge), not #2552. #2177 made Change (
Tests at ac917d3 (local, foreground,
Hypothesis shrinking was off for the property runs, with the same examples; it only runs after a failure. Impact: the Enhanced FRS figures in the body predate the #2177 and #2552 merges and were not re-run at this head. The PR's own code change (parameter and Open: CI at this head, and the hub's independent review of the merge plus test delta. I have not merged it or marked it ready. |
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
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles. 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
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
|
|
Merged by the UK hub (Claude session 8e19f9d5) at head
|
Fixes #1956
Summary
Targeted (2-year-old) childcare listed the
guarantee_creditamount as a qualifying benefit. This PR listsin_receipt_of_guarantee_creditinstead, so the Pension Credit route needs a claim and a payment, as SI 2014/2147 reg 1(2) "eligible child" (a)(ii) needs entitlement.Main has moved since #1956 was filed. #1896 (merged 2026-10-02) gave
guarantee_creditdefined_for = is_pension_credit_eligible, so working-age families no longer get a computed guarantee credit. That was the half of #1956 that moved money. What this PR still fixes: a Pension Credit eligible pensioner who does not claim Pension Credit qualifies through the computed amount on main.in_receipt_of_guarantee_credit(on main from #1909, also read by the pensioner CTR rules) now also requirespension_credit > 0, with or without the Pension Credit freeze. A reform that stops Pension Credit being paid (for example by neutralisingpension_credit) left receipt true. In the unreformed model this changes nothing (see impact).The law
Household example (2026, North East)
Parent aged 68 with a State Pension of £10,000 and a 2-year-old, not claiming Universal Credit:
guarantee_creditpension_credithousehold_net_incomeEnhanced FRS impact
Measured before main's #2177 and #2552 were merged in; not re-run at ac917d3.
Real runs of origin/main 2efc8d8 and this branch at ad8e55d on
enhanced_frs_2024_25.h5(sha256 e433e532…), one microsimulation per package covering 2025–2030. Weighted totals, float64 sums, exact array comparisons.in_receipt_of_guarantee_credit, Pension Credit and Housing Benefit, so the payment condition changes nothing in the baseline.targeted_childcare_entitlement_eligibleturns false for 68–90 records (23.1k–29.0k weighted benefit units a year: 26.2k in 2025, 29.0k in 2026, 23.1k in 2030). All are Pension Credit eligible pensioners in England who do not claim Pension Credit, with a computed guarantee credit and no 2-year-old, so no entitlement is paid either way.Scripts and outputs, kept in the author's evidence folder and not in the repo:
impact/tce_impact.py(the runs),impact/tce_compare.py→impact/compare.json,impact/eligibility_flag_changes.py→impact/eligibility_flag_changes.txt(the lost-flag breakdown, built from the saved arrays; the script was saved after the first run and re-run with identical output), andout/household.py→out/household_main.json,out/household_branch.json(the household example).Invariants (Hypothesis,
test_targeted_childcare_guarantee_credit_properties.py)Populations mix working-age, pension-age and mixed-age families with a 2-year-old, some with a dependent young person aged 16–19, across the four nations, in 2025, 2026 and 2029.
targeted_childcare_entitlement_eligibleis legal eligibility, so standalone take-up (would_claim_targeted_childcare) and eligibility for the working parent entitlement no longer enter it.pension_creditandguarantee_creditare both positive; implies a claim and, for the generated families (none reports Pension Credit or pension-age Housing Benefit, so none has the SI 2019/37 saving), that the claimant and any partner are over State Pension age. A dependant aged 18 does not block it (one known family, and YAML Cases 12–13).uc_earned_income_before_work_allowance, Use UC earned income before the work allowance in targeted childcare and local CTR #2552) is within £15,400, SI 2014/2147 reg 1(3)(a). Two known families pin Preserve universal and targeted hours alongside extended childcare #2177 and Use UC earned income before the work allowance in targeted childcare and local CTR #2552: a Universal Credit claimant earning £12,000 who is also eligible for working parent hours qualifies; a £20,000 earner on Universal Credit (£17,920 before the work allowance, £9,400 after in 2026) does not.A mutation test runs the filed and main routes through the same eligibility formula and checks that each breaks the invariant it was written against.
Tests
targeted_childcare_entitlement_guarantee_credit.yaml: 14 cases. Case 9 is a mixed-age couple without the SI 2019/37 art 4 saving (does not qualify); Case 14 is the same couple with the saving (qualifies: couple minimum guarantee £18,889 + £3,638.96 − State Pension £10,000 = £12,527.96 paid).in_receipt_of_guarantee_credit.yaml(Key the Housing Benefit Guarantee Credit passport on receipt #1927's six cases) is on main since Key the Housing Benefit Guarantee Credit passport on receipt #1927 merged on 8 Oct, so this PR no longer adds it.in_receipt_of_guarantee_credit31 passed (shrinking off). Reverting Use UC earned income before the work allowance in targeted childcare and local CTR #2552 in the Universal Credit criterion fails the new identity and the £20,000 known family.in_receipt_of_guarantee_creditand the parameter: reverting the parameter entry, dropping the payment term, and making the freeze branch use the current formula each fail a test. Droppingwould_claim_pcoris_pension_credit_eligiblefails none: under the model's formulas a payment already implies both (pension_credit= entitlement × claim; entitlement andguarantee_creditare defined only for eligible units). They differ only whenpension_creditorguarantee_creditis supplied as an input, so the terms stay as a guard.Known departures (unchanged by this PR)
has_mixed_age_couple_pension_credit_saving, from Date the mixed-age couple Pension Credit exclusion and model the SI 2019/37 saving #1940) unless set directly. A saved couple qualifies (Case 14).would_claim_pcis the claim (a take-up draw in the Enhanced FRS).Overlaps
in_receipt_of_guarantee_creditdocstring. The merge in 95aed89 keeps this PR's payment check and takes Date the mixed-age couple Pension Credit exclusion and model the SI 2019/37 saving #1940's account of the saving.in_receipt_of_guarantee_credit.yaml.Review
An independent reviewer approved head 314f457, and a second pass approved the follow-up commit c47e283 (the freeze-path payment check). A merge-only delta review of ad8e55d (the two merges of main) is pending. Their should-fix and nit findings are addressed above or listed under known departures; a follow-up for the same payment check on
in_receipt_of_savings_credit_onlyis tracked separately.Axiom
axiom: TheAxiomFoundation/rulespec-uk#400 queued (extension comment for reg 1(2) "eligible child" (a)(ii): law, required outputs, review_finding and companion cases G1–G6; SI 2014/2147 reg 1 is not yet in the corpus, so the signed encode waits on ingestion)
🤖 Generated with Claude Code
Reproducer:
policyengine_uk/tests/policy/baseline/gov/dfe/targeted_childcare_entitlement/targeted_childcare_entitlement_eligible.yaml,policyengine_uk/tests/policy/baseline/gov/dfe/targeted_childcare_entitlement/targeted_childcare_entitlement_guarantee_credit.yaml,policyengine_uk/tests/test_targeted_childcare_guarantee_credit_properties.py::test_no_family_below_the_qualifying_age_qualifies_through_guarantee_credit,policyengine_uk/tests/test_targeted_childcare_guarantee_credit_properties.py::test_eligibility_is_the_union_of_the_routes,policyengine_uk/tests/test_targeted_childcare_guarantee_credit_properties.py::test_fix_only_removes_the_unpaid_guarantee_credit_route