Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docstrings only: uc_award_upper_bound names who deducts, awards and sets the minimum, and has_uc_award_with_carer_element states the nil-bound rule plainly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docstrings and one label only. uc_award_upper_bound's label names it an upper bound on the award; the attribution, addition, CTR carer premium and CTR premiums docstrings name who reads or pays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve it Case 12 sets £270 of the allowance against dividends above the basic rate limit, with £300 of savings between the pay and the dividends inside the savings allowance. The search finds that share only through the line where the pay reaches the basic rate limit. The changelog fragment now names the model as the actor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model's Scottish scale carries its 2017-18 values back to 2015-16 and 2016-17, so the rate test's empty-scale branch never ran and it read the 31,500 Scottish higher-rate start for those years. In 2016-17 s. 11A(1) charged the Scottish basic rate on income that would otherwise bear the basic rate, and 2015-16 had no Scottish rate, so the test now uses the basic rate limit before 2017-18. The property test leaves Scottish taxpayers out before 2017-18, where the model's liability uses the carried-back scale, and Ruff formats its limits table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only: DWP deducts and the council counts, and the disabled person keeps the premium in law. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
property_income is profit, and with no receipts given the model applies no property allowance to a profit above 1,000, so the two cases now give 31,092 and 31,093 of profit directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scenario's parameter_changes takes numbers only, so a list of bands failed validation before the removal check. The test now passes the saved list through Reform.from_dict and Scenario.from_reform, which check the path first, and checks the alias stays in the parameter tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FA 2014 Sch. 38 para. 12 gives s. 11A effect from the year the Treasury appointed under s. 25(5) of the Scotland Act 2012, and SI 2015/2000 art. 3 appoints 2016-17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Property income of £40,000 and savings of £20,000 in 2026-27: under ITA 2007 s. 25(2) the model sets £10,270 of the Personal Allowance against savings, which keeps the property income at the basic rate limit and puts the £500 savings allowance against savings taxed at 40%. Savings tax falls from £5,846 to £3,692 and income tax from £11,332 to £11,232. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under a starting rate limit raised to 40,000, the model charges 37,700 of 38,000 of interest at the starting rate for savings and the rest at the savings nil rate, both of which s. 55B(2)(b) allows. Baseline limits never separate the starting rate from the savings nil rate in this test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pension_credit_follows_model_formulas now asks replaces_definition about all five Pension Credit variables. It compares every attribute Core calculates a variable from (formula for the period, default, defined_for, adds and subtracts, period, neutralization, end) with the model's own class, and counts an input for the period. A reform that keeps the formula but gives a family outside defined_for a default of £2,000 now drops the age and take-up conditions, so the man aged 40 who would get that £2,000 gets no ESA. Tests: the four reforms (entitlement default, entitlement default with another payment formula, payment default, eligibility default), a reform that changes only the guarantee credit's coverage, the model's own definitions registered again (shortcut kept), and an exhaustive change of each attribute of each variable. The parameter reform test now also asserts the shortcut on the lifted couple. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The screen read would_claim_pc in the simulation itself to skip couples that would not claim. A reform that gives take-up a formula reading the family's ESA then closed esa_income -> esa_income_eligible -> would_claim_pc -> esa_income. pension_credit_follows_model_formulas now returns false when would_claim_pc has a formula for the period, so the screen reads Pension Credit without the award for every couple whose claim passes the other tests. Supplied take-up and parameter reforms keep the shortcut. Tests: the take-up formula and its control with Pension Credit by another formula (ESA [0, 5000, 0], Pension Credit [8091.20, 0, 8091.20]), and the exhaustive guard test's take-up rows (formula drops the shortcut; default and input keep it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DWP applies the higher earnings disregard while the claimant or partner receives ESA (SPC Regs 2002 Sch VI para 4(1)(a)(vii)); a member outside the couple keeps their own claim; the 40-year-old claims in their own right; nobody owes income tax or primary Class 1 contributions in cases 13 and 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s income Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mutant that keeps the shortcut then fails on the award it pays, or on the cycle it closes, rather than on the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only: the Treasury adds the Scottish basic rate, a reform raises the starting rate limit, and the model reads its 2017-18 Scottish scale in earlier years. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test looped over the model's own list, so a variable dropped from that list dropped out of the test too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under ITA 2007 s. 25(2) the model can set allowances against savings or dividends while property income is left, so: - the accounting invariant subtracts the savings and dividends left after the allowances set against them; - the monotonic invariant tests income tax, since more property income can lower savings tax: property income of £30,000 to £40,000 with savings of £20,000 takes savings tax from £3,800 to £3,692 while income tax rises from £7,286 to £11,232, which a new test pins; - the higher-rate check pins savings tax of £3,692, income tax of £11,232 and non-savings taxable income of £37,700 for property income of £40,000 and savings of £20,000. The file now loads the model once through cloned_uk_tax_benefit_system, as other test files do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generators draw tax-credit reports; Core reads a branch's inputs from its parent branches; the model pays the reported award and applies no Universal Credit cap in case 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notes now say the model sets the allowances under ITA 2007 s. 25(2), rather than the section or the allowance doing it. Comments and docstrings only; the code and the YAML data don't change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e award Allowlist the strict expected failures under #2795 so CI's outcome check accepts them, and add the third route: a carer with limited capability for work and a £600 council rent, whose award comes to nil under the lower work allowance while the bound's calculation without housing costs leaves £461.10. The test asserts the law's £4,474.60 premium and raises RuntimeError when a premise fails. test_upper_bound_matches_real_award_endpoints compares the bound exactly with the larger of two real awards, one with non-dependant deductions supplied as nil and one with the housing costs element supplied as nil, before the cap and finally, over every element, both work allowances and rows within a few float32 steps of a nil award. test_the_bound_reads_every_component_of_the_maximum_amount checks that the bound reads each element of uc_maximum_amount in order and every input of the award's steps apart from the deduction, the Tax-Free Childcare choice and the claim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2-25 reading The bound's documentation and the readers that cite it now name all three ways it can exceed a nil award (#2795): a non-dependant deduction, Tax-Free Childcare, and a small housing costs element with a work allowance. They limit the upper-bound claim to awards the model's formulas calculate; a stored award can exceed it, and the carer test then reads it. The Scottish premium's documentation, parameters, YAML comments and changelog state the 2022-23 to 2024-25 nil-award rule as the model's reading of reg 4, which UC Claims and Payments Regs reg 32A(1)(a), the SSI 2025/24 policy note and Ipswich BC v TD [2024] UKUT 117 (AAC) leave open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The attribution's documentation, the two YAML files' comments and case names, the property test's docstring and comments, and the allowlist reasons now name who acts and use verbs in place of be-verb complements. No formula or expected value changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 13(2) charges the dividend upper rate on dividends that would otherwise bear the higher rate, which s. 10(3) starts at the basic rate limit. The model's dividend scale holds 37,500 in 2015-16, against a 32,000 basic rate limit, so the test read it there and admitted dividends the statute charges at the upper rate. The property ties the dividend scale to a reformed basic rate limit instead of drawing it on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FA 2016 s. 4 inserted the savings nil rate (ss. 12A and 12B) and added it to s. 55B(2)(b), with effect for 2016-17 and later years (s. 4(17)). The model's Personal Savings Allowance amounts start in 2005, so the test counted a nil rate in 2015-16 that the law didn't have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test The test's table holds main's awards, and this branch pays those six families through the working-age route. Hand arithmetic reproduces each award CI printed and gives the Welsh single person's in each year. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
housing_benefit_reported doesn't show whether a Northern Ireland award takes the form of a rate rebate or of a rent rebate or allowance, and tenure doesn't settle it: SR 2006/405 reg. 13(1)(f) and (g) pays a rent rebate or allowance on mooring charges and site payments, so an owner can get one, and SR 2016/226 reg. 6(2A) runs it on. The first-day test now reads housing_benefit_report_is_rate_rebate_only, false by default, so a report takes the run-on unless the input marks it as a rate rebate alone. Case 47 covers an owner with a rent allowance, who keeps Universal Credit of £4,062.96. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same test update as the allowance order branch's latest commit. 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: 79 (thresholds in Notes
Moves flagged for review
39 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
|
|
This run finished at
Main passes that last test only on the examples it happens to draw. Where the rest stand with #1966 on main:
Each merge with a changelog fragment makes Versioning push a version commit to main, and the queue then rebuilds the groups behind it. #1966 merged alone at 11:44Z, and #2002's and #2300's groups restarted at 11:45Z. On 5 November #2850, #2843 and #2849 merged in one go, so I'd enqueue the ready batch together. I'm closing this draft and deleting its branch. #2887 tests the larger set and moves to the new main next. |
I merged four more approved pull requests onto the branch of #2885 and resolved their conflicts, so CI can test all 18 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.
On top of
a2e5eb14fI merged, in this order:I also added the test update from #2830's new head,
aed86e9a3, so this tree matches what landing that head produces.The resolutions change code in one place. #2834 moved the Council Tax Reduction deduction into
council_tax_reduction_tax_deduction, so #2002's rule on the tax that uncounted rent would bear without earnings moves there too. Elsewhere they change tests, comments and documentation, including the figures in one case ofcouncil_tax_reduction_tax_deduction.yaml, where #2828 takes the Marriage Allowance at Step 6.The four pull requests' own branches stay as they are until the batch lands on main.
Reproducer:
policyengine_uk/tests/test_price_base_year.py::test_reform_changes_the_base_year🤖 Generated with Claude Code