Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cases 4, 5, 6, 12, 13 and 14 of esa_income_pension_age.yaml assert a full-year income-related ESA award in 2026-27. Each ESA reporter now has the art. 3A(2) appointee saving, so the 1 July 2026 abolition leaves the award payable for the whole year and each case still tests the pension-age bar and the Pension Credit condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6G23mTmYu4Zu1DbAPa
…s test #2340 reads a basic State Pension recipient aged 80 or over as reporting the 25p age addition. The basic reporter is 85, so it now reports the full basic rate plus the addition, and the test checks that the model pays the addition at the data year's 25p in every year. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6GwwVa9CRxP94r4i4J
The 2026 examples of test_esa_income_pension_age_properties.py draw saved awards, and the three 2026 example tests give each reporter the art. 3A(2) appointee saving, so each award stays payable for the whole year and the tests still check the pension-age bar and the Pension Credit condition. legacy_award_work_reference.esa_abolition_claim reads the saving. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6G23mTmYu4Zu1DbAPa
…ls test The household's stocks-and-shares ISA reaches Universal Credit capital through share_like_capital, which UC values less its sale-expense rate (UC Regulations 2013 reg. 49(1)(a)). Build the expected capital from savings, the cash ISA and the ISA less that rate, read from the parameters, and keep the check that capital keeps one ratio to savings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Kxyq1frfihPSQorLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6G23mTmYu4Zu1DbAPa
FA 2004 s. 192(4A) raises the Scottish basic rate limit and the Scottish rate limits above it, where a Scottish rate above the Scottish basic rate is chargeable. The docstring and one comment said "the Scottish rate limits". Text only; the AST with docstrings blanked matches 3b54d53. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The excess comes in whole pence only for a limit in whole pence. numpy reports both nextafter from zero and spacing of the subnormal it returns as underflow, so both stay inside the errstate blocks. Text only; the AST with docstrings blanked matches df78930 in both files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On macOS arm64 numpy reports np.spacing(np.float32(0)) as underflow, at the locked 2.4.6 and at 2.1.3, 2.4.2 and 2.5.4; CI's Linux arm64 runners pass the same check at 2.4.6. Under the strict state in test_stored_pence.py, stored_pence of a zero amount then raises on a Mac, so both zero tests fail there. The Class 1 tolerance in carers_allowance_earnings takes the same step for a person with no NI income. Both now work it out under np.errstate(under="ignore"), which changes no value and restores numpy's error state when the block ends. At macOS arm64 and numpy 2.4.6, test_stored_pence.py gives 2 failed on the two zero tests before this commit and 11 passed after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cut the changelog fragment to one sentence, as the repository's rule asks, rewrap the one docstring line over 88 characters, and state what the generator comment holds for inferred roles too. Text only; the test file's AST with docstrings blanked matches e700316. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
state_pension_reported's documentation says the three components divide the report by 52, but on this tree they read it less any age addition. Say so. Rewrite the test docstring's sentence on the ages at which the model gives a woman the basic type. Text only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WRA 2007 Sch 1 para 6(1)(c) and (d) make the two awards exclusive. Where the couple's Pension Credit without the award is nil, the model pays the award and no Pension Credit, whatever the award would add through the SPC Regs 2002 Sch VI para 4(1)(a)(vii) disregard. Case 18 now expects that, case 25 states the para 4(2) limit, and the combined property requires no family to have both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KPXgYTCw1EWx4JK8T
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KPXgYTCw1EWx4JK8T
Takes #2010's side for its own five files: the merge's second base reverts them to main, which #2010's versions already contain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KBpj2nEGrPeiuxZmW
…eduction T(E, S, U) now zeroes income_tax_charges beside the uncounted income: the High Income Child Benefit Charge recovers Child Benefit, which the pensioner schemes do not count, and the pension annual allowance charge falls on contributions. Add YAML cases for the charge, a working-age partner's Class 1 in a pensioner scheme, reg 37(1)'s personal relief with Marriage Allowance, and the Scottish Marriage Allowance cliff; a property test that a Child Benefit claim leaves the pensioner deduction unchanged; and assert invariant 5 on a simulation with the tax cliffs held, in place of the exemption. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HngezwZWa7uwAqaXr
… contribution LHA_allowed_bedrooms reads is_benefit_unit_non_dependant_for_universal_credit, the definition uc_non_dep_deductions uses, and counts an in-unit non-dependant of a family that makes no claim in the claim that counts the household's non-dependants, as uc_non_dep_deductions does. Adds the adult son's case through final UC and household income, its own-unit control, a non-claiming head's son in a sharer's claim, and properties tying rooms to contributions and to the coding of the benefit unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KBpj2nEGrPeiuxZmW
Keep #2279's own-right documentation for Pension Credit's young person and this branch's 1 September end; drop the sentence that said the model did not apply that end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Jra6ok6eCQvZUMMLg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Jra6ok6eCQvZUMMLg
…date Add YAML cases 13 and 14: a 19-year-old at school before the 1 September following their 19th birthday who reports their own Universal Credit or income-related ESA is a qualifying young person for neither programme. State Income Support as the exception to Universal Credit and Pension Credit agreeing, assert the agreement grid holds nobody on it, and test that own Income Support in 2025-26 ends the Pension Credit status only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Jra6ok6eCQvZUMMLg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Jra6ok6eCQvZUMMLg
The UC qualifying young person predicate now skips a report of income-related ESA or Housing Benefit when a reform neutralises esa_income or housing_benefit, and checks Child Tax Credit and Working Tax Credit each against its own variable or tax_credits, in the couple branch too. New Python tests cover each benefit under a reform that neutralises it. Also: Case 13 pins a Scottish CTR award that the reg 5 reading raises; the qualifying generator draws no reg 5(5) report; review wording rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HB6mSfknnmvFfWQja
The specified-benefit oracle now counts a young person's income-based JSA report as an own award only in a year the model pays income-based JSA, as the UC predicate does under SI 2014/1230 reg 28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HB6mSfknnmvFfWQja
…B CTR case Main's case predates the in-unit non-dependant deduction: the mother and father are the grandmother's non-dependants, one deduction of 5.20 a week. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KBpj2nEGrPeiuxZmW
…he counting claim A family that is not benunit_is_rent_liable (no rent input) can still be the claim uc_non_dependants_counted selects; family_rooms already holds the bedroom there, as uc_non_dep_deductions charges the contribution once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KBpj2nEGrPeiuxZmW
…ing alone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KBpj2nEGrPeiuxZmW
The exact reg 28 property now gives each qualifying member at most one existing benefit report, so reg 28 leaves more of them in the test and the property catches a couple-sum mutant again. The changelog fragment says the predicate reads a report only while the model pays the benefit and no reform neutralises it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6HB6mSfknnmvFfWQja
Conflicts: - test_benefit_cap_specified_benefits_properties.py: the reference keeps #2299's school-leaver role for both schemes (Child Benefit reg 4) and #2279's UC own-award filter for older young persons. - test_child_and_adult_definitions_properties.py: invariant 5 keeps #2299's Child Benefit reg 4 sentence; #2279's supplied-roles invariant stays 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FJSEjTyXcaymMgSqM
No conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FJSEjTyXcaymMgSqM
Main added this case after this branch's last CI run. With the allowances set for the least tax, the parent's income tax falls by 100, so the case now expects 15,935, with 7,540 on the pay and a deduction of 13,649. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s new tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 294 (thresholds in Notes
Moves flagged for review
254 more flags are in the report artifact. Receipts by tax head
Spending by benefit and service
Caseloads
Government balance, each component counted once
Model totals
Household income totals
Poverty rates
People in poverty
Inequality
Mean household net income in each side's own deciles
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileMean change in household net income per household, and as a share of the decile's base income; households stay in the base run's deciles.
No change in any year: population. Checks failing on both base and head (1)
Counted-once checkThe check raised each of 92 components by £1 per unit in 2026-27 and read every head of its totals 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 response that is not finite breaks every rule. The check measures a head that breaks a rule twice more: once holding every other head at its baseline value, and once holding every other head at its value after the first £1 while the component rises again. The head fails where either measurement still shows the response. The check cannot hold a head at a value that is not finite. In each unit where another head is not finite after the first £1, it holds that head at its baseline value, and the second measurement judges no household the unit belongs to. There a head fails wherever it first broke a rule, or wherever the check could not confirm whether its response contains the component. 0 failed and the check skipped 0.
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
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3780857 to
7639262
Compare
This draft now sits on main at
a866277e9, which holds #1966, so CI can test 27 open pull requests as one tree. Please don't merge it: I'll close it and delete the branch when the run finishes, and post the result here first.I merged these in order, and the ones after "with" arrive inside the pull request they follow:
ffa8651ff, its real merge of mainNo single pull request's CI tests these combinations, and the merges here fix them:
enhanced_disability_premiumandis_enhanced_disabled_for_benefits, the flag Count enhanced PIP daily living and AFIP for the enhanced premium #2808 retires. The route now readscouncil_tax_reduction_enhanced_disability_premiumand its condition, and four new cases cover it.council_tax_reduction_tax_deduction.yamland its property file from Deduct only the tax Council Tax Reduction schemes allow #2834. At pay of 43,661 the deduction rises from 8,542.56 to 8,555.16, and two more pounds of pay raise it by 252.79 in place of 265.39.council_tax_reduction_applicable_income.council_tax_reduction_tax_deduction, and with a working-age UC award it leaves out the tax the rent would bear without earnings.test_means_tests_see_the_loss_only_through_tax. Hypothesis seeds a derandomized test from its source, so the edit draws new examples, and Run CI on 18 approved PRs merged together (not for merging) #2886 drew a Scottish mixed-age couple on UC with an award of 711.32 with the loss and nil without it. SSI 2021/249 reg 51 adds each trade's profit or loss, and the route follows it through UC's earnings, so I changed the test and left the model. The no-loss run now holdsuc_individual_earned_incomeanduc_individual_earned_income_before_mifas it holds the award, along with the trade's part of the tax and the Welsh route'scouncil_tax_reduction_working_age_unearned_income_tax.boarders_and_lodgers_non_dependants.yamlon four readings:Simulation.subsample, so the guard failed onutils/subsample.py. I added that file toEXEMPT, since it draws only when a caller asks for a sample and no formula reads the draw. No other entry there allows a draw, so please check that this one reads right to you.#1966 and #2834 leave two readings of the tax on pay in place. #2834 deducts the tax the pay adds, and #1966 takes the UC split, with earnings as the lowest slice, so the Child Benefit charge no longer reaches a Scottish working-age award. I kept both here, and the difference needs its own decision.
Each fix moves into the real merge of whichever pull request in its pair lands second. #2828's head already carries its fixes for #1966's route, main's Step 6 order test and the 2019 row of the pensioner tariff table.
Reproducer:
policyengine_uk/tests/test_price_base_year.py::test_reform_changes_the_base_year🤖 Generated with Claude Code