Repository navigation
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>
MaxGhenis
force-pushed
the
targeted-childcare-gc-entitlement
branch
from
October 2, 2026 19:36
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>
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 #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
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.
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).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(not on main): Key the Housing Benefit Guarantee Credit passport on receipt #1927's six cases. Case 3's name and comment now describe main's inferred saving (Date the mixed-age couple Pension Credit exclusion and model the SI 2019/37 saving #1940), so the file is no longer byte-identical to Key the Housing Benefit Guarantee Credit passport on receipt #1927's; whichever merges second keeps this wording.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.yamltoo (see Tests); it already conflicts with main elsewhere.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