Repository navigation
Set the Personal Savings Allowance on rest-of-UK bands for Scottish taxpayers - #2348
Merged
Merged
Conversation
…axpayers ITA 2007 s. 12B(8)(a)(iv) and (b)(iv) count a Scottish or Welsh taxpayer's higher- and additional-rate income as what would be charged at those rates if they were not a Scottish or Welsh taxpayer. savings_allowance read tax_band, which follows the Scottish bands, so a Scottish taxpayer with taxable income from £62,430 to £125,140 got no allowance (law: £500) and one from £31,092 to £37,700 got £500 (law: £1,000). It now works out the band on the rest-of-UK thresholds itself; tax_band keeps the Scottish bands for the Marriage Allowance conditions. This also corrects 2016-17, where tax_band put the higher band at £150,000. Fixes #2347 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes for #2348: - ITA 2007 s. 10(2)-(3) charges income up to a limit at the lower rate and only income above it at the higher one, so taxable income exactly at the basic rate limit has no higher-rate income (£1,000) and exactly at the higher rate limit no additional-rate income (£500). The test is now ">". - YAML Cases 8-11 at and one pound over each limit; Case 7 for period 2017, which the old tax_band formula also covered; the property tests always run the boundary rows and the statute oracle uses ">". - Changelog and comment wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 11, 2026
MaxGhenis
marked this pull request as ready for review
October 11, 2026 22:47
Collaborator
Author
|
CI run cancelled to free runners (UK hub, 2026-10-11 23:30Z). The PolicyEngine org is at GitHub's limit of 60 concurrent jobs, with about 360 queued. Fleet ops asked the hub to let the Budget-critical #2305 take runners first. This PR's queued run had not started, so I cancelled it. Nothing is wrong with the PR. Please don't re-run it or push just to retrigger CI. The hub re-runs this run itself once #2305 has runners. The record is |
This was referenced Oct 11, 2026
Collaborator
Author
|
Hand-off to the UK hub (session local_66e4b1fd, PolicyBench UK round 2).
|
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 #2347
axiom: ukpga/2007/3/12B encoded-correct (rulespec-uk c65fd7df,
uk/statutes/ukpga/2007/3/12B.yaml, which carries the s. 12B(8)(a)(iv) and (b)(iv) Scottish and Welsh limbs at lines 85 and 110, as inputs, from 2024-04-06)What changes
ITA 2007 s. 12B gives a Personal Savings Allowance of £1,000 with no higher-rate income, £500 with higher-rate but no additional-rate income, and nil with any additional-rate income. For a Scottish or Welsh taxpayer, s. 12B(8)(a)(iv) and (b)(iv) count as higher- or additional-rate income what "would, if the individual were not a Scottish taxpayer or Welsh taxpayer", be charged at those rates. So the allowance follows the rest-of-UK bands for everyone.
savings_allowancereadtax_band, which follows the Scottish bands for a Scottish taxpayer. In 2026-27:savings_allowancenow works out the band itself on the rest-of-UK thresholds (rates.uk.thresholds[1]and[2]), with taxable income taken as adjusted net income less allowances, astax_banddoes. Income exactly at a limit has none in the band above (ITA 2007 s. 10(2)-(3)). So £37,700 of taxable income gives £1,000 and £125,140 gives £500; the old>=gave £500 and nil.tax_bandis unchanged: the Marriage Allowance conditions read it and do look at the Scottish rates.This also fixes the periods 2016 and 2017, which
tax_band's earlier formula covers. It put the higher band atthresholds[-2](£150,000), so a higher-rate taxpayer on £60,000 got £1,000 (law: £500) and an additional-rate taxpayer on £200,000 got £500 (law: nil). The same formula still feeds Marriage Allowance in those years: #2356.Impact (real run)
Measured on
enhanced_frs_2023_24.h5(local policyengine-uk-data storage, 6 October build) for 2026. This branch and main's code (c6d15c8) each ran a full simulation of the same data (impact_psa.py).Tests
New YAML (
gov/hmrc/income_tax/allowances/savings_allowance.yaml):a Scottish taxpayer on £80,000 with £1,000 of interest: £500 allowance and £200 savings tax (main: £0 and £400);
a Scottish taxpayer on £45,000: £1,000 and £0 (main: £500 and £100);
an English taxpayer on £80,000, unchanged;
a Scottish taxpayer on £130,000: nil;
2016-17 at £60,000 (£500) and £200,000 (nil).
period 2017 (Case 7);
exactly at, and £1 over, each limit (Cases 8-11).
On main, Cases 1, 2, 5, 6 and 7 fail and Cases 3 and 4 pass. At the previous head, Cases 8 and 10 failed.
Changed YAML (
allowances.yaml): the three allowance cases settax_bandas an input, which no longer drives the allowance. They now set adjusted net income and allowances for the same three bands.Property tests (
test_savings_allowance_properties.py, Hypothesis, 12 single adults per example):The first fails on main.
The property tests always run four boundary rows: taxable income at, and £1 over, each limit.
Run locally at 49fad84:
Review: a GPT-6.1 Sol review agreed with the s. 12B(8)(iv) reading and asked for the boundary fix, which is made here. Its follow-ups are handled as follows:
🤖 Generated with Claude Code