Repository navigation
Read only the parent's and partner's ESA in extended childcare, and test two more legacy award readers - #2261
Conversation
housing_benefit_pension_age_regulations_apply (#1944) reads council_tax_reduction_relevant_income_based_benefit, which #2027 scoped to claimant_or_partner_esa_income and claimant_or_partner_jsa_income, so the reader needs no change. Reg 5(1)(b) asks whether the claimant "or if he has a partner, his partner" is on Income Support, income-based JSA or income-related ESA; another member of the benefit unit claims in their own right. Adds YAML cases where another member's own ESA or JSA leaves a pensioner under the pension-age regulations, with partner controls, and adds the reader to FAMILY_READERS with the pension-age and young-single family shapes. The two excluded-adult cases fail with the CTR passport as it was before #2027 (88ecf58). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
has_mixed_age_couple_pension_credit_saving (#1940) already reads only the claimant's and partner's Income Support, JSA and ESA reports (#1940's 9423120), so the reader needs no change. SI 2006/214 reg 5 takes a couple out of the pension-age Housing Benefit regulations only where the claimant "or, if he has a partner, his partner" is on one of these awards; another member of the benefit unit claims in their own right. Adds YAML cases where another member's own ESA or Income Support leaves the couple's Housing Benefit saving in place, with a partner and a no-award control, and adds the reader to FAMILY_READERS, entering is_mixed_age_couple in the pension-age property so the reader is tested on the reports alone. The two excluded-adult cases fail when the reports are summed over every member of the benefit unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…riteria gov.dfe.extended_childcare_entitlement.disability_criteria (#2079) listed esa_income from 1 December 2022, read for each person by extended_childcare_entitlement_limited_capability_or_specified_benefit. That total also holds an award another member of the benefit unit claims in their own right, so another adult's own ESA let a non-working parent or partner meet SI 2022/1134 reg 14(4) or 15(4) ("a person entitled to a specified benefit", reg 11A(1)(e)). The list now names claimant_or_partner_esa_income, which keeps the model's convention that the couple's award counts for both members. Adds YAML cases, among them review r7's reproduction on #2027 (a working parent, a non-working partner, a three-year-old and an outside adult with ESA), which fail before the switch, and partner controls. Adds the reader to MEMBER_READERS. The working-age property seldom draws a family whose only award is the outside member's, so it did not catch the old list; the further family shapes now also check member readers and gain a working-parents shape, on which the old list fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he YAML notes The extended childcare file attributed reg 14(4)(b)(iii)'s words to reg 15(4); reg 15(4)(c) reads "is entitled to a specified benefit" and needs the partner of a parent who meets reg 14(3). The mixed-age couple file now quotes reg 5(2) as written. Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 (nit): the further-shapes comment said the added member's award survives tariff income on every savings draw, but the pension-age and working-parents shapes also draw £20,000, above the £16,000 limit for income-related ESA and income-based JSA. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
CI status at head
#2258 raises the limit to 120 minutes. Once it lands, this PR gets a fresh run, and it merges when every check passes. Reviews r1 and r2 (GPT-6.1 Sol) approved |
|
CI status at head
Next: once main's round-trip fix merges, close and reopen this PR again (no push, so the approved head stands), and merge with |
Brings the branch to main 1d3abec. No conflicts and no hand edits: the tree (8af097f) is the one CI run 38345117240 tested as this PR's merge ref, and the one the 2026-10-13 Enhanced FRS run used. The new head also drops the stale 'Test' check from run 38148277687 (main's red test of 10/11), which the split Test jobs never supersede. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Status at 2026-10-13 05:40Z (lane run for the reader switches):
|
#2261 said the benefit cap still counts every member's award, so a binding cap could carry another member's award to a reader through Universal Credit. #2076 merged right after it, in the same merge-queue group: benefit_cap_reduction now counts only the couple's own awards and the family's. The note now says so, and points to JSA_COUPLE_WITH_LODGER, which the first property checks: it is £1,952.48 below the cap in 2025, so an added member's £3,000 of JSA would take it over if the cap counted it. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to #2026 and #2027.
Summary
#2027 added
claimant_or_partner_esa_income,claimant_or_partner_jsa_incomeand the person-levelis_on_*variables, and switched the readers on main that the law ties to the claimant and partner. PRs written in parallel added more readers of the benefit-unit totalsesa_incomeandjsa_income. Those totals also hold an award that another member of the benefit unit (neither the claimant, the partner nor a child or young person they are responsible for) claims in their own right. This PR finishes the readers whose source PRs have merged:esa_income, so another adult's own income-related ESA let a non-working parent or partner meet SI 2022/1134 reg 14(4) or 15(4). It now namesclaimant_or_partner_esa_income.Reader by reader
extended_childcare_entitlement_limited_capability_or_specified_benefit, throughgov.dfe.extended_childcare_entitlement.disability_criteria(from 1 December 2022)esa_income, so any member's own income-related ESA counted for every memberclaimant_or_partner_esa_income. The couple's award still counts for both members of the couple, as before; reading who the award is payable to (is_on_income_related_esa) would change that convention and is not part of this switchhousing_benefit_pension_age_regulations_applycouncil_tax_reduction_relevant_income_based_benefit, which #2027 scoped toclaimant_or_partner_*has_mixed_age_couple_pension_credit_savingadd_for_membersoveris_claimant_or_partner, #1940's 9423120)in_receipt_of_income_support_jsa_ib_or_esa_irhousing_benefit_applicable_income_disregard, throughhousing_benefit_on_passporting_benefitThe only formula input that changes is the extended childcare list. The other changes are tests, a docstring, comments and the changelog.
Sweep of the remaining readers on main
git grepon main (e89b8abcf) for"esa_income"/"jsa_income"in variables and for unquoted names in parameters. Every remaining reader is one #2027 left on the totals on purpose, or is owned elsewhere:esa.py,jsa.py,claimant_or_partner_*, the own-report screen inis_on_*);gov_spending,pre_budget_change_household_benefits;benefit_cap_reduction,is_benefit_cap_exempt_*), Lift the benefit cap only for the support component and the people HB reg 75F and UC reg 83 name, and cap only the family's benefits #2076;cost_of_living_support.means_tested_households.qualifying_benefits): another member's own award entitles them, so the household test counts it (Count only the claimant's and partner's legacy awards in means tests and passports #2027's table);income_support_eligible, whose ESA and JSA limbs Fix disable_simulated_benefits and read one claimant-or-partner award #2075 switches.No new reader turned up.
Still waiting, not in this PR: #1966 (Scotland and Wales personal allowance), #2019 (Pension Credit earnings disregard) and #2007 (non-dependant exemptions) are open, and #2075 owns the Income Support gate.
Invariants
test_legacy_award_readers_properties.py) on the working-age families, and on three further shapes: pension-age claimants (some in mixed-age couples), single applicants under 25 in Scotland or Wales, and parents of a child aged one to four in England of whom only one works. The further shapes now also check the member readers. As Count only the claimant's and partner's legacy awards in means tests and passports #2027 notes, this holds while the benefit cap does not bind, since the cap counts every member's award (Lift the benefit cap only for the support component and the people HB reg 75F and UC reg 83 name, and cap only the family's benefits #2076).0 <= claimant_or_partner_esa_income <= esa_income, likewise for JSA, with equality when nobody outside the couple reports the award (Count only the claimant's and partner's legacy awards in means tests and passports #2027's existing property, unchanged).Tests
New YAML in
policyengine_uk/tests/policy/baseline/finance/benefit/family/legacy_award_readers/. Expectations come from the regulations and parameter values cited in each file.extended_childcare_entitlement.yaml: 4 cases. Review r7's reproduction on Count only the claimant's and partner's legacy awards in means tests and passports #2027 is the first: a working parent, a non-working partner, a three-year-old and an outside adult with £5,000 of ESA. There is also a 2023 variant and two controls in which the partner's own ESA meets the condition.housing_benefit_pension_age_regulations.yaml: 4 cases (another member's ESA or JSA; the partner's ESA or JSA).mixed_age_couple_pension_credit_saving.yaml: 4 cases (another member's ESA or Income Support; the partner's ESA; no award).Each case passes with the switch, and the cases fail without it (
check_switch.sh, which restores only the switched file):disability_criteria.yamlat the branch pointe89b8abcfcouncil_tax_reduction_relevant_income_based_benefit.pybefore #2027 (88ecf58b8)in_receipt_of_income_support_jsa_ib_or_esa_ir.pyat88ecf58b888ecf58b8Properties:
housing_benefit_pension_age_regulations_applyandhas_mixed_age_couple_pension_credit_savingjoinFAMILY_READERS, with the pension-age and young-single shapes. The pension-age property entersis_mixed_age_couple, so the saving is tested on the award reports alone. The extended childcare reader joinsMEMBER_READERS. The working-age generator seldom draws a family whose only award is the outside member's, and in 15 examples it did not catch the old list. So the further shapes now check member readers, and a working-parents shape is added. With the old code, each new entry fails its property in the generate phase:On the working-parents shape the old list also moved
targeted_childcare_entitlement_eligible, which is already listed: targeted childcare excludes a family eligible for extended childcare.Run on this branch (the YAML and source pytest runs were on
f5286b054, which differs from the head only in comments):test_benefit_cap_and_ctr_pension_age_properties.py,test_housing_benefit_income_related_benefit_passport_properties.py,test_housing_benefit_earnings_disregard_properties.py,test_housing_benefit_pension_age_properties.py,test_mixed_age_couple_properties.py,test_dfe_childcare_student_support_properties.py,test_claimant_or_partner_awards_entered_directly.py): 49 passed;test_legacy_award_readers_properties.pyat4b43357d6: 14 passed (7 min 55 s on one process; the three further-shape properties take about 2.5 minutes of it);ruff format --checkandruff check: clean.Enhanced FRS impact
Real
Microsimulationruns on a private copy of the Enhanced FRS 2024-25 (sha256e433e532…), one per package state: base maine89b8abcfand this branch at4b43357d6, both clean trees. Each run stores 131 benefit-unit, person and household arrays per year. They cover every household benefit, the readers above, the extended and targeted childcare entitlements and eligibility, household net income, government spending and the poverty flags. They are compared exactly (no tolerance) for each year 2025-2030.Why: on this dataset
claimant_or_partner_esa_incomeequalsesa_income, andclaimant_or_partner_jsa_incomeequalsjsa_income, for every benefit unit in every year. About 18,000 people (weighted) are members outside the couple and its dependants, and none of them reports one of these awards. The YAML and property tests cover the case where one does. Review r1 made its own branch run atd5ce48f39and also found every array identical against the same base.Re-run on 2026-10-13 after the main merge, on the same dataset copy: base main
1d3abecefagainst main +4b43357d6(tree8af097fcc, the tree of the head123f06332), both clean trees. All 132 arrays are identical in every year 2025-2030, so the impact is still £0. The scoped awards still equal the benefit-unit totals for every benefit unit.Review
d5ce48f39with one nit, a comment that said the added member's award survives tariff income on every savings draw. The reviewer re-derived every YAML expectation, reran the YAML,check_switch.sh, the vacuity checks and the three further-shape properties, and made its own Enhanced FRS run.4b43357d6fixes the comment (no code change).4b43357d6.123f06332merges main1d3abecefwith no conflicts or hand edits. That drops a staleTestcheck from an old run, which the splitTest / …jobs never supersede. Review r3 (Subfleet, Opus 5.5) approved123f06332. It checked the merge tree, checked the YAML expectations against the law and main's current code and re-swept main for new readers (none). It reran the legacy-reader YAML (84 passed),check_switch.sh(OK for all three) and the property file (15 passed), and re-checked the Enhanced FRS records.Axiom
axiom: TheAxiomFoundation/rulespec-uk#416 queued (addendum TheAxiomFoundation/rulespec-uk#416 (comment)); rulespec-uk#389 (HB reg 5), #375 (HB Sch 4 para 12, Sch 5 para 4, Sch 6 para 5), #359 and #370 (SI 2019/37); extended childcare: rulespec-uk#416 (addendum 2, companion test 19: TheAxiomFoundation/rulespec-uk#416 (comment)) with #364 (SI 2022/1134 regs 11A, 14, 15).
🤖 Generated with Claude Code
Reproducer:
policyengine_uk/tests/policy/baseline/finance/benefit/family/legacy_award_readers/extended_childcare_entitlement.yaml,policyengine_uk/tests/policy/baseline/finance/benefit/family/legacy_award_readers/housing_benefit_pension_age_regulations.yaml,policyengine_uk/tests/policy/baseline/finance/benefit/family/legacy_award_readers/mixed_age_couple_pension_credit_saving.yaml,policyengine_uk/tests/test_legacy_award_readers_properties.py::test_other_members_awards_never_change_the_readers_at_pension_age,policyengine_uk/tests/test_legacy_award_readers_properties.py::test_other_members_awards_never_change_the_readers_for_young_singles,policyengine_uk/tests/test_legacy_award_readers_properties.py::test_other_members_awards_never_change_the_readers_for_working_parents