Repository navigation
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>
Collaborator
Author
|
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 |
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.
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.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.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