Skip to content

Apply the Marriage Allowance rate test at the statutory limits - #2913

Merged
juaristi22 merged 23 commits into
mainfrom
fix-ma-rate-test-room
Nov 16, 2026
Merged

juaristi22 merged 23 commits into
mainfrom
fix-ma-rate-test-room

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2912

What and why

Since #2830, the model sets reliefs and allowances against non-savings income, savings and dividends in the share that gives the least tax (ITA 2007 s. 25(2)). It also counts the Marriage Allowance reduction each share wins. To guard against float32 rounding, its search counts a share as meeting the rate test (s. 55B(2)(b) and (ba)) only with room below each limit. The room comes to about 3.9p near the £37,700 basic rate limit. Parliament charges the basic rate on income up to the basic rate limit (s. 10(2)), so non-savings income at the limit meets the test. Where every share that meets the test leaves income within the room, the search finds none, and the model denies the reduction.

For example, take a recipient in England in 2026-27 whose partner has no income, with pay of £40,200, savings of £9,000 and dividends of £1,570:

  • Income after the £12,570 Personal Allowance comes to £38,200 and exceeds the £37,700 basic rate limit, so Parliament gives a £500 savings allowance in every share (s. 12B(3)).
  • To meet the rate test, a share must leave no dividends, at most £500 of savings and at most £37,700 of pay. Only one share does: £2,500 against pay, £8,500 against savings and £1,570 against dividends.
  • Under that share the recipient pays 37,700 × 20% = £7,540 before the reduction, and £7,288 after it. The reduction is 20% of £1,260: 10% of the Personal Allowance, rounded up to a multiple of £10 (s. 55B(3) to (5)).
  • Without the reduction, the recipient pays least, £7,440, under any share that leaves £500 of dividends and at least £500 of savings. Each of those shares leaves dividends above the limit, so none meets the test.
Pay / savings / dividends, 2026-27 Law main This PR, situation entry (local runs)
£40,200 / £9,000 / £1,570 £7,288.00 £7,440.00 £7,288.00
£40,199.98 / £9,000 / £1,570 £7,287.996 £7,439.996 £7,287.996
£50,000 / £500 / £270 £7,288.00 £7,486.00 £7,288.00
£50,269.99 / £500 / 1p £7,288.00 £7,539.998 £7,288.00
£6,214.61 / £367.26 / £47,955.74, with £4,267.61 of other deductions £3,707.52 £3,747.00 £3,707.52
£40,000 / £9,000 / £1,570 £7,248.00 £7,248.00 £7,248.00
£50,270 / £500 / 1p £7,540.00 £7,540.00 £7,540.00

main denies the reduction in the first four rows, where the qualifying share leaves pay at the limit or, in the second row, 2p below it, inside the room. The recipient gains £252 less the extra tax that share costs: £152 in the first row. In the fifth row main gives the reduction but keeps the old order of pay, then savings, then dividends. That order sets £367.26 against savings that bear no tax at the 0% starting rate. Setting it against dividends instead costs £39.48 less and also leaves income at the limit. In the last row, a penny more pay than in the fourth leaves income a penny over a limit under every share, so neither gives it. By reading, every share leaves at least £37,700 of pay, so the law charges 37,700 × 20% = £7,540.

The law column follows ss. 10, 12B, 25 and 55B, as the YAML cases and test docstrings work rows 1 to 6. Each main figure comes from a run at the PR's merge base, b007ac8. The last column comes from runs that entered every amount in the situation: rows 1 to 5 on the working tree before commit 6aa9124, and rows 6 and 7 at 5c8c5e1. At e4ad32c, CI's YAML job failed rows 1 to 4 as Cases 24 to 27, and the property test failed row 2. By reading, both put the pay in employment_income, as set_input does. At e521645, CI's YAML job passed Cases 24 to 27, Python 7/8 passed the property test, and Python 2/8 passed test_rate_test_lets_income_reach_the_basic_rate_limit. YAML Cases 24 to 27 assert rows 1 to 4, and that test asserts row 5. The property test runs rows 1 to 4 as examples, but requires the reduction only in row 2. By reading, e521645 applies the same rule to these rows whether the pay comes from a situation, a dataset, a YAML case or Simulation.set_input.

The change

The search in policyengine_uk/utils/income_tax_allocation.py now applies the rate test at the statutory limits, unless one of two rules finds that float32 could hold income entered over a limit at the limit. It adds £0.000001 (TIE) to the non-savings and basic rate limits to absorb float64 rounding. Where a share leaves savings within TIE of the savings allowance, or dividends within TIE of nil, the search still sets them to the allowance or to nil.

The model holds amounts in float32, and each amount and each float32 sum can sit half a float32 step from the amount entered. Under £65,536 the step stays at 0.39p or less, so it takes more than five roundings the same way to hide a penny. From £65,536 the step reaches 0.78p, and three roundings can hide one. From £131,072 it reaches 1.56p, and two whole-pence amounts can store as one. A recipient entered a penny over a limit can then hold income at the limit.

So the float64 test keeps main's room below each limit for a person either rule catches (c.low_precision). The room comes to £0.001 (RATE_TEST_ROOM) plus a millionth (RATE_TEST_ROOM_FRACTION) of the larger of the limits and the income after the deductions: 3.9p at £37,700 and 13.9p at £138,255. It comes off the limit on non-savings income, the basic rate limit and the starting rate limit for savings.

  • The first rule keeps the room where an amount the test reads reaches £65,536 (LOW_PRECISION). _low_precision reads net income, net income before the trade loss relief, that relief, the allowances, savings, dividends, an exclusion from earned income, the grossed-up Gift Aid gift and the two limits.
  • The second rule keeps the room where the model cannot bound the float32 error under the least amount the entries can sit over a limit (_can_hide_an_excess). That amount is a penny where the limits fall on whole pence. A Gift Aid gift raises the limits by its grossed-up amount (s. 414(2)(b)), five quarters of the gift at the 20% basic rate. A limit can then fall between two pence, and the least excess comes to a quarter, a half or three quarters of a penny.

How the second rule bounds the error

_can_hide_an_excess adds bounds on net income, the allowances, the grossed-up gift and the other amounts the test reads. _held_error works each bound from the entries up:

  • An entry is a variable with no formula, or any amount supplied as an input for the year (is_supplied_input). The function asks that question first. Under £131,072 (INDISTINCT) an entry sits within 0.39p of the whole-pence amount entered, so its bound is its distance from whole pence. From £131,072 an entry gets no bound. For a supplied amount, the function reads none of the parts its formula or sum would.
  • For each sum on the way to net income and the allowances (adds and subtracts, or an entry in SUMS), the function starts from the parts' bounds. It adds the distance between the amount held and the float64 sum of the parts as held, which measures the float32 rounding in the sum. Where a reform replaces a formula, the amount stops matching its parts, and the distance takes the difference.
  • The trade loss relief takes the loss's bound where the relief equals the whole loss, and pension relief takes the contributions' bound where the relief equals all of them. A relief the law caps gets no bound.
  • The Personal Allowance gets a bound of nil: the model works it in whole pounds, which float32 holds without rounding.
  • Any other formula gets no bound unless its amount is nil, for example the State Pension or a company car benefit.

Then _can_hide_an_excess bounds, on its own, each amount in READ_WITH_NET_INCOME that the walk did not reach: taxable savings, dividends and property income, the trade loss relief and pension relief. The walk stops short of them where a caller supplies net income, net income before the relief or the allowances, or a reform takes savings or dividends out of net income. A grossed-up gift supplied as an input is an entry. Otherwise the gift's bound is the distance between the grossed-up gift held and five quarters of the gift, and a gift of £131,072 or more gets none. An exclusion from earned income, which only a reform gives, gets no bound.

For example, pay of £148,609.46 less £108,409.45 of expenses comes to £40,200.01. With £9,000 of savings and £1,570 of dividends, the Personal Allowance leaves £38,200.01, a penny over the limit plus the savings allowance, so the law gives no reduction. Float32 holds the pay as £148,609.453125, so the model holds taxable pay of £40,200.00. Every amount the test reads sits under £65,536, so the first rule does not catch this recipient. The pay exceeds £131,072, so the second rule finds no bound, and, by reading, the model denies the reduction, as main does.

Amounts supplied as inputs

is_supplied_input(population, name, period, value), new in policyengine_uk/utils/supplied_inputs.py, says whether the value the engine returned is the input supplied for that year. That input can come from a situation, a dataset, a YAML case or Simulation.set_input. By reading, the constructor moves a situation's or dataset's pay into employment_income_before_lsr, and the walk reaches it through employment_income's sum. Simulation.set_input, a YAML case and a rebuild in place leave pay in employment_income, where the walk stops.

The helper needs no entry in SUPPLIED_INPUT_VARIABLES. By reading, a value set_model_value stores over no supplied value, a neutralized variable, and a value the engine carries over or uprates from another year read as not supplied. So does every value under policyengine-core's legacy mode, which keeps no record of inputs. Only the set_model_value case has a test.

By reading, the helper reads the stored input as supplied_input does, and also requires it to equal the value the engine returned. policyengine-core 3.34.9, the least version pyproject.toml allows, marks each value it fills in as derived: a formula result, or a carried-over, uprated or default value (Simulation._cache_result). By reading, stored_supplied_value reads only a storage tier where Holder._stores_user_input finds a value core did not mark derived.

Two review findings at e4ad32c bear on this rule:

  • Review 5915401118 reports (C2) that the guard read pay set with Simulation.set_input, or in a YAML case, as formula error. Lawful recipients at a limit then lost the reduction, and Cases 24 to 27 failed in the review's runs. By reading, at e521645 that pay is an entry. Float32 arithmetic on each case's entries and one three-part sum, a shorter tree than the model's, gives bounds of 0, 0.05p, 0 and 0.34p for Cases 24 to 27. Each sits under the penny of least excess.
  • Review 5915859074 reports (C3) that test_data_built_imputations.py::test_rebuilding_in_place_follows_the_new_source raised ValueError for shapes (80,) and (2,) in CI. On a simulation rebuilt in place from a dataset, the guard worked out the parts of employment_income. One part, employer_ni_fixed_employer_cost_change, read the old two-person baseline. By reading this branch's tree, build_from_multi_year_dataset stores each column through Simulation.set_input. The guard then stops at the supplied employment_income and calculates none of its parts. By reading, main at d3db7ac keeps that loop, and its set_input adds checks only for stored draws and student loan take-up.

The search

For a recipient either rule catches, the search decides and stores as main's does (_moves_with_room). It counts on the reduction only where the exact share meets the test with the room, and it stores the float32 values nearest that share's deductions. The model's answer keeps main's float32 test, so such a recipient can still get the reduction where that test passes.

For anyone else, the search rounds each deduction of the least-tax share down and up to float32 and keeps the rounding that leaves the least tax after the reduction (_stored_share). Among roundings within £0.001 (TOLERANCE), it prefers one that sets the whole shared amount and no more. A rounding ranks last if it sets more than half a penny beyond that amount (OVER_DEDUCTION), or meets a recipient's rate test only in float32. Neither rule applies to the nearest rounding. The search moves a person only where the stored share saves more than £0.001 against the old order.

A share meets the test where it does in either arithmetic (_rate_test_on_stored): in float32 as on main, or in float64 from the amounts held, with the room for a person held to it. Pay of £37,401.34, savings of £5,081.08 and dividends of £7,787.58 in 2026-27 leave income at the £37,700 limit, but, by reading, main's float32 test reads it £0.0039 over (test_rate_test_on_stored_counts_shares_that_meet_the_test_only_in_float64). meets_marriage_allowance_income_conditions applies the same function to the stored deductions, so the model gives the reduction wherever the search counted it.

Limits

  • The room still denies the reduction to some recipients the law gives it to, as on main. Pay of £148,609.45 less £108,409.45 of expenses comes to £40,200.00, at the limit with £9,000 of savings and £1,570 of dividends, but float32 holds that pay as it holds £148,609.46. The law charges £7,288, and, by reading, the model charges £7,440: the room costs £152. Three of the supplied-amount tests below pin a £152 cost of the room.
  • By reading, is_supplied_input cannot tell an entry from a value the model computed and stored with plain Simulation.set_input, not set_model_value. The CPS marriage reform sets each comparison branch's net_income with plain set_input (policyengine_uk/reforms/cps/marriage_tax_reforms.py, lines 206 and 219). On those branches the guard reads that net income as an entry. An amount hidden behind it, such as pay less expenses, does not keep the room there, though the main simulation's walk still reaches it.
  • The labour supply (dynamics/labour_supply.py, through input_variable, employment_income by default), participation (dynamics/participation.py) and marginal-rate (variables/household/marginal_tax_rate.py) paths also set pay with plain set_input, so the guard reads that pay as an entry too. No run measures the effect of either item on tax.
  • By reading, a supplied adjusted_net_income keeps the room unless the parts SUMS lists add up to the net income worked back from it. net_income's formula then works net income back from it (net_income_from_adjusted_net_income) without reading those parts. The guard checks that net income against their sum, and any difference counts as error.
  • By reading, the second rule assumes entries in whole pence. An entry with fractions of a penny can sit less than a penny over a limit, and the rule does not guard that case.
  • CI time: at e521645, Python 3/8 took 87 of its 90 minutes. At e4ad32c, CI cancelled Python 3/8 at its 90-minute limit. Shards 1, 2 and 4 to 7 took 1 to 7 minutes longer than at 200dc10, by the start and end times in the e4ad32cbb run and the 200dc10e0 run. No profile ties that time to the guard.

What stays as on main

The float32 test stays, so rounding can still put income entered over a limit back on it.

Storing savings in float32 can move them over the savings nil rate band. A 2026-27 recipient with pay of £157,600, savings of £140,500.01, £140,000.01 of deductions against them and a £96,000 gift has £500 left, at the band, so the law gives the reduction. The model holds the savings as £140,500.015625, and only the nearest rounding puts them back on the band. One entered 0.7p over the band can hold the same amounts, so the model gives both the reduction, as main does. test_search_keeps_the_nearest_rounding_where_stored_savings_sit_over_the_band asserts both. It passed on the working tree before 6aa9124 and in CI's Python 6/8 at e521645.

The search rounds only the share with the least tax after the reduction, so it can miss a share that meets the test only once rounded. Take pay of £37,500, savings of £11,000.03 and dividends of £2,069.97 in 2026-27. The one qualifying share clears the dividends, leaves £500 of savings and sets nothing against pay, so the law charges 37,500 × 20% less £252: £7,248. The model holds savings and dividends 0.024p over the £13,070 entered, so the share the search scores fails the float64 test. The model charged £7,329.78 on main and at 5c8c5e1.

The model still sums net income in float32. Pay of £44,266.35, savings of £4,869.28 and dividends of £1,634.37 sum to £50,770, but the model computed £50,770.0039 and charged £7,440.001, on main and at 5c8c5e1, against the law's £7,288. By reading, e521645 treats these three cases the same: the savings reach £65,536, and the other two bounds stay under a penny.

Tests

What the tests pin

Supplied amounts, in test_income_tax_allocation.py. Each but the last asserts a 2026-27 recipient's reduction and tax to the penny. The "fails if" notes come from reading the code.

  • test_rate_test_reads_an_amount_supplied_in_place_of_its_formula_as_an_entry: taxable pay of £40,200 supplied as an input, with £9,000 of savings and £1,570 of dividends. It asserts £252 and £7,288, a nil bound on net income, and that the walk stops at taxable pay. It fails if _held_error does not ask is_supplied_input first.
  • test_rate_test_reads_pay_set_as_an_input_as_an_entry: the same recipient with pay in the situation and with pay set by set_input("employment_income", 2026, [40_200, 0]), the review's call. Both routes assert £252, £7,288, a nil bound and no flag. Only the first reaches employment_income_before_lsr.
  • test_rate_test_keeps_room_for_pay_set_as_an_input_from_131_072: pay of £148,609.45 and £148,609.46 set with set_input, less £108,409.45 of expenses. Both store as £148,609.453125 and get no bound, so the test asserts £7,440 for both, though the law gives the first the reduction. It fails if an entry from £131,072 gets a bound.
  • test_rate_test_keeps_room_where_a_reform_replaces_a_formula: a reform takes £10,000 off pay in taxable pay, so pay of £50,200 leaves £40,200. The check against the model's own formula leaves a £10,000 bound, and the model charges £7,440. It fails without the check of each sum against its parts.
  • test_rate_test_bounds_the_amounts_behind_a_supplied_net_income: net income of £50,770 supplied for two recipients. Dividends of £201,570 less £200,000 of deficiency relief get no bound, so it asserts £7,440 for the first; for the second, with £1,570 of dividends, it asserts £252 and £7,288. It fails without the READ_WITH_NET_INCOME loop.
  • test_rate_test_reads_a_gross_gift_supplied_as_an_input_as_an_entry: a £1,000 grossed-up gift supplied with no gift behind it raises the limit to £38,700. With pay of £41,200 it asserts £252 and 38,700 × 20% − 252 = £7,488. It fails if the guard checks a supplied gross gift against the gift.
  • test_held_error_gives_a_value_the_model_stored_no_bound: a £500 trading allowance deduction stored with set_model_value gets no bound, and the same £500 set with set_input gets a nil bound.

The rate test at the limits, and the two rules:

  • least_tax_allocation.yaml Cases 24 to 27 pin the table's first four rows, and each fails on main at b007ac8. test_rate_test_lets_income_reach_the_basic_rate_limit pins the fifth.
  • test_model_tax_is_the_least_liability_the_law_allows in test_marriage_allowance_least_liability_properties.py (new) checks the model against an oracle. Its oracle reads only rates, limits and allowances from the parameter tree. Hypothesis draws 40 examples of eight married recipients each, in London in 2026-27 or 2027-28. The test asserts that the model charges the law's liability at its own share, gives the reduction wherever a strict rate test passes, and gives it nowhere a loose one fails. It also asserts that no share on its grid leaves less liability, under the strict test, than the model charges. Rows 1 to 4, the £37,500 recipient and four more recipients run as explicit examples. The test sets its amounts with set_input.
  • For the first rule, test_rate_test_denies_a_penny_over_the_limit_that_float32_cannot_hold runs C1: pay of £190,529.99, savings of £9,000.02, dividends of £1,570, a £50,275 trade loss and an £80,044 gift. That leaves a penny over the raised limit plus the savings allowance. A twin with pay of £190,529.98 sits at it. Both hold £190,529.984375 of pay, and the test asserts that both pay £27,451. Review 5915401118 reports no reduction and £27,451 of tax for the first at e4ad32c (C1). test_rate_test_denies_a_penny_over_a_limit_at_low_precision, its _from_2027 twin and test_rate_test_keeps_room_where_an_amount_reaches_65_536 pin the £65,536 line.
  • For the second rule, test_rate_test_reads_the_amounts_behind_the_income_it_tests runs 16 recipients. Nine sit over a limit with every amount the test reads under £65,536, behind pay less expenses, profits less capital allowances, dividends less relief, or a gift. It asserts no reduction for each, nor for two at the limit whose amounts float32 holds as it holds amounts a penny over. It asserts the reduction for five at the limit whose bound stays under a penny. test_held_error_follows_the_formulas_behind_the_rate_test checks _held_error on five people.

What ran, and on which code

CI at e521645, merged into main at d3db7ac (code run), read at 08:45 UTC on 16 November:

  • Test / YAML passed 6,787 tests, among them all 27 cases in least_tax_allocation.yaml, Cases 24 to 27 included.
  • Test / Python 2/8 passed the pytest Reproducer, test_rate_test_lets_income_reach_the_basic_rate_limit.
  • Test / Python 4/8 passed test_data_built_imputations.py::test_rebuilding_in_place_follows_the_new_source.
  • Test / Python 7/8 passed test_model_tax_is_the_least_liability_the_law_allows, whose explicit examples include the £40,199.98 row.
  • The seven supplied-amount tests passed: two in Python 2/8, one in Python 4/8, one in Python 6/8 and three in Python 7/8.
  • All eight Python shards passed inside their 90-minute limit. Python 3/8 took the longest: 87 minutes, from 07:02 to 08:29 UTC.
  • Lint, Changelog fragments, the documentation build and the four install checks passed.
  • Aggregate impact passed on certified data (policyengine-uk-data 1.58.1, 2025-26 to 2031-32), base d3db7ac against the merged head db70037. Its report flags no move for review, and this change breaks no check and fixes none. The one check that fails on both sides is the VAT sign check (sign:vat).

CI at earlier commits:

Local runs at earlier commits. These entered amounts in the situation unless this section says otherwise.

  • On the working tree before commit 6aa9124, which brought the second rule, though no record ties these runs to its exact code: the 42 functions then in test_income_tax_allocation.py passed. One of them then asserted £7,440 for supplied taxable pay; at this head, under a new name, it asserts £7,288. Seven sweeps entered 46,500 synthetic 2026-27 households a penny under, at or a penny over a limit. The model gave the reduction over a limit only where main does, and denied it to none main gives it to. It gave every household it held to room main's share and, to within £0.0001, main's tax.
  • At 5c8c5e1: the 39 functions then in the file, the property test and nine YAML files, least_tax_allocation.yaml among them, passed. The property test's checks held for 600 further draws. A sweep of 24,000 households a penny over a limit, each with an amount of £65,536 or more, gave all of them main's tax and share. test_marriage_allowance_follows_the_liability_with_nil_rates failed on one drawn 2019-20 Scottish reform, as on main; Marriage Allowance: which allowance share does the s. 55B(2)(ba) dividend test read? #2915 asks which share s. 55B(2)(ba) means.

The sweep at 5c8c5e1 ran before the second rule existed, so its counts describe that commit. The property test and the Scottish property file (test_tax_band_scottish_properties.py) set pay with set_input, and their local results above come from that commit too. By reading, the pay they set is an entry at e521645. The property test's docstring argues that its recipients' bounds then stay under a penny.

Not run locally at e521645

No test, YAML case or simulation has run locally at c7cf190, dc87f9c, 2441024 or e521645, because the host was under a disk write-stop.

CI runs this branch merged into main at d3db7ac. Since b007ac8, main has changed simulation.py and supplied_inputs.py, adding stored draws and checks on dataset periods. The claims above read this branch's tree. Of main's code, this description reads only the dataset loop, set_input and the helpers _supplied_value calls. By reading, main leaves those helpers as at b007ac8. No reading covers the rest of main's changes, but CI passed on the merged tree (see the block under Tests).

Test plan

  • YAML tests whose expected values come from the legislation: Cases 24 to 27 of least_tax_allocation.yaml work the tax from ITA 2007 ss. 10, 12B, 25(2) and 55B. CI's YAML job passed them at e521645 (see the block under Tests).
  • Formatting: CI's Lint job passed at e521645
  • Changelog fragment changelog.d/marriage-allowance-rate-test-limit.fixed.md
  • CI's Python test jobs and Aggregate impact passed at e521645 (see the block under Tests)

Reproducer

Reproducer: policyengine_uk/tests/test_income_tax_allocation.py::test_rate_test_lets_income_reach_the_basic_rate_limit
Reproducer: policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/allowances/received_allowances/least_tax_allocation.yaml::Case 24, a recipient's only qualifying share leaves pay exactly at the basic rate limit

The first enters its amounts in the situation and asserts the law's £3,707.52 for the table's fifth row, where main charges £3,747. Case 24 asserts the first row's £7,288, where main charges £7,440.

axiom: TheAxiomFoundation/rulespec-uk#545 queued

🤖 Generated with Claude Code

MaxGhenis and others added 3 commits November 13, 2026 13:12
The least-tax search counted a share as meeting the rate test only with
about 3.9p of room below each limit. Where every qualifying share leaves
non-savings income at the limit, which s. 10(2) allows, the search found
none and denied the reduction: pay 40,200, savings 9,000 and dividends
1,570 in 2026-27 paid 7,440 in place of 7,288. The search now applies
the limits themselves and keeps the TIE snapping for savings and
dividends.

Adds Cases 24 to 26 to least_tax_allocation.yaml and a property test
that checks the model's tax against an oracle working ITA 2007 directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d757380 took the room out of the search's rate test but left the model
to test the float32 deductions on its own. Where the income left sat at
the basic rate limit, rounding could carry it over, so the model denied a
reduction the search had counted on.

The search now rounds the least-tax share's deductions to float32
(_stored_share) and moves a person only where that stored share beats the
old order as stored. meets_marriage_allowance_income_conditions reads the
stored deductions through the same float64 arithmetic
(share_meets_marriage_allowance_rate_test), so the model gives the
reduction exactly where the search counted it.

The rate test counts income within half a penny above a limit as at the
limit (RATE_TEST_SLACK). Float32 carries a net income under £65,536 to
within a fifth of a penny, so a recipient at the limit keeps the
reduction and one a penny over it does not.

Tests follow in the next commits.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3d8460e tested a stored share in float64 with half a penny of slack
(RATE_TEST_SLACK). The slack granted the reduction to some people a
fraction of a penny over a limit, where both the law and the model's
float32 test deny it.

The slack goes. A share now meets the test where it does in float64 from
the stored amounts or in float32 as main applied it
(_rate_test_on_stored). The search prices the stored share and the old
order with that function, and share_meets_marriage_allowance_rate_test
gives the model's answer through it, so the model grants the reduction
where the search counted it.

_stored_share keeps the rounding with the least tax after the reduction
and, among roundings within TOLERANCE of each other, prefers one inside
the first component's bounds. It ranks last a rounding that sets more
than half a penny beyond the shared allowances (OVER_DEDUCTION), since
the test would then read less income than the law taxes. From 2027-28
the shared amount comes from float32 net income, so there the rounding
nearest the exact deductions keeps its rank.

Tests: no-room moves in 2026-27 and 2027-28; a recipient at the basic
rate limit; seven recipients a penny over a limit; a 2028-29 recipient
at a limit a Gift Aid gift raises; three 2026-27 recipients whose only
passing rounding over-deducts; two Scottish recipients a penny inside a
limit whom only the nearest rounding passes. The property test's oracle
works ITA 2007 s. 55B(2)(b) and (ba) directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_stored_share ranked every rounding that sets more than half a penny
beyond the shared amount last, except the nearest rounding from 2027-28.
In 2026-27 that removed the nearest rounding even where the exact share
meets the rate test, so a recipient with no non-savings income and
deductions above £131,072 lost the £252 reduction the law gives. It also
moved non-recipients off the float32 value the model has always stored.

Now the nearest rounding keeps its rank in every year unless it meets the
rate test where the exact share fails it. Any other rounding more than
half a penny beyond the shared amount still ranks last.

Also corrects the docstrings on float32 storage of high incomes, the
Gift Aid limit in the float64 test and the over-deduction test's
expected tax, and rewords the changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Aggregate impact on certified data: pass

Base d3db7ac07d against head db700379c2, both on enhanced_frs_2024_25.h5 (policyengine-uk-data 1.58.1, sha256 056e80fd8e91), fiscal years 2025-26 to 2031-32. Each year is a full microsimulation run on each side.

Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in report_spec.yaml; a flag does not fail the job).

Workflow run and full report

Notes

  • In the years a figure from fewer than 10 records is suppressed (spending.disabled_students_allowance), every total containing it, and the decile incomes, are rebuilt from their other components, so no published total includes it. Those totals are marked †. A change is withheld where the two sides leave out different figures and can't be lined up.

Moves flagged for review

None.

Receipts by tax head

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Income tax -£0 +£0 -£0 -£0 +£0 +£0 0

Spending by benefit and service

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed

Caseloads

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed

Government balance, each component counted once

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Government receipts, each component once -£0 +£0 -£0 -£0 +£0 +£0 0
Government balance, each receipt once -£0 † +£0 † -£0 † -£0 † +£0 † +£0 † 0 †

Model totals

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
gov_tax -£0 -£0 -£0 0 0 0 0
household_tax -£1 -£0 0 0 0 0 0
pre_budget_change_household_tax +£0 -£0 -£0 -£0 0 0 0
gov_balance -£0 † +£0 † -£0 † -£0 † +£0 † +£0 † 0 †

Household income totals

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Household net income +£0 † -£0 † +£0 † +£0 † -£0 † -£0 † 0 †

Mean household net income in each side's own deciles

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Decile 1: mean household_net_income per household -£0.00 † +£0.00 † +£0.00 † 0 † 0 † 0 † 0 †
Decile 2: mean household_net_income per household 0 † 0 † -£0.00 † +£0.00 † 0 † 0 † 0 †
Decile 3: mean household_net_income per household +£0.00 † -£0.00 † 0 † 0 † 0 † 0 † 0 †
Decile 4: mean household_net_income per household +£0.00 † -£0.00 † 0 † -£0.00 † 0 † 0 † 0 †
Decile 5: mean household_net_income per household +£0.00 † 0 † 0 † 0 † -£0.00 † 0 † 0 †
Decile 6: mean household_net_income per household 0 † +£0.00 † 0 † -£0.00 † 0 † 0 † 0 †
Decile 7: mean household_net_income per household -£0.00 † -£0.00 † 0 † -£0.00 † -£0.00 † -£0.00 † 0 †
Decile 8: mean household_net_income per household +£0.00 † 0 † 0 † 0 † -£0.00 † 0 † 0 †

Standard reform costings (change in gov_balance)

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp 0 +£0 -£0 0 0 0 0
Raise higher rate by 1pp 0 +£0 0 0 0 0 0
Raise personal allowance by ~800GBP/year +£2 +£1 +£0 0 0 +£0 0
Raise child benefit by 25GBP/week per additional child 0 0 -£0 0 0 0 0
Reduce Universal Credit taper rate to 20% 0 +£0 0 0 0 0 0
Raise Class 1 main employee NICs rate to 10% 0 +£0 -£0 0 0 0 0
Raise VAT standard rate by 2pp +£2 +£0 +£0 0 0 0 0
Raise additional rate by 3pp 0 0 -£0 0 0 0 0
Raise the Universal Credit standard allowance by 10% 0 +£0 0 0 0 0 0
Raise the State Pension by 10% +£2 +£0 -£0 0 0 0 0

Standard reforms: change in each reform's target

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp: change in income_tax +£0 +£0 +£0 +£0 -£0 +£0 0
Raise higher rate by 1pp: change in income_tax +£0 0 0 +£0 -£0 +£0 0
Raise personal allowance by ~800GBP/year: change in income_tax +£0 -£0 +£0 -£0 +£0 +£0 0
Raise additional rate by 3pp: change in income_tax 0 0 -£0 +£0 -£0 +£0 0

Household net income by decile

No household's net income changes in any year.

No change in any year: population; poverty rates; people in poverty; inequality.

Checks failing on both base and head (1)
  • VAT excluding private school fees is never negative (sign:vat): 2025-26: 76 units below zero, a weighted £-52,314,332 in total; 2026-27: 76 units below zero, a weighted £-54,150,722 in total; 2027-28: 76 units below zero, a weighted £-56,043,426 in total
Counted-once check

The 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.

  • widowed_parents_allowance: pension_credit responds only through other heads in fewer than 10 households (other heads that moved there: carers_allowance; gov_spending; not a failure)
  • widowed_parents_allowance: pension_credit responds only through other heads in fewer than 10 households (other heads that moved there: carers_allowance; household_benefits; not a failure)
Provenance
Side Commit Runtime Environment hash Partition hash Time
base main d3db7ac07d uk 2.179.0 (files e9748fe839a4), core 3.34.9, py 3.13.18 aarch64 07a3f9a06f5f f5dab8526157 2919.86s
head #2913 merged into main db700379c2 uk 2.179.0 (files dd0c351a4fca), core 3.34.9, py 3.13.18 aarch64 07a3f9a06f5f f5dab8526157 3119.88s

Dataset: hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@2526edbbb687a3b54dbb11272e5389e4b62d2ac2, sha256 056e80fd8e9151d78f432a25cde863340baee81304c6216a37fb575ce8563784 (verified on both sides), policyengine-uk-data 1.58.1.

Receipts by tax head: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Final charge on cash interest in non-cash ISAs £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Lifetime ISA withdrawal charge £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Income tax £294.44bn £315.21bn £335.80bn £351.25bn £366.92bn £385.32bn £399.96bn
National Insurance (employee and self-employed) £51.70bn £54.14bn £56.13bn £57.73bn £59.76bn £61.64bn £63.51bn
National Insurance (employer) £148.71bn £155.37bn £160.88bn £165.09bn £172.06bn £177.36bn £182.57bn
Employer NI change borne by capital £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Employer NI change borne by consumers £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Capital gains tax £12.60bn £13.15bn £13.60bn £14.11bn £14.67bn £15.24bn £15.80bn
Student loan repayments £7.82bn £8.13bn £8.39bn £8.58bn £8.79bn £9.04bn £9.29bn
VAT excluding private school fees £242.22bn £249.47bn £258.67bn £264.86bn £270.95bn £277.04bn £283.21bn
Change in VAT from its baseline £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
VAT on private school fees £1.95bn £2.01bn £2.09bn £2.14bn £2.20bn £2.26bn £2.31bn
Change in private school VAT from its baseline £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Fuel duties £24.71bn £24.13bn £26.00bn £26.83bn £26.51bn £25.78bn £24.63bn
Alcohol duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Tobacco duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Vehicle excise duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Betting and gaming duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
TV licence fee £4.26bn £4.40bn £4.41bn £4.42bn £4.43bn £4.44bn £4.45bn
Council tax £49.21bn £52.16bn £54.89bn £57.95bn £61.16bn £64.47bn £67.91bn
High value council tax surcharge £0.00bn £0.00bn £0.00bn £0.48bn £0.49bn £0.50bn £0.51bn
Northern Ireland domestic rates £0.55bn £0.58bn £0.60bn £0.63bn £0.66bn £0.69bn £0.72bn
Business rates £34.68bn £36.20bn £38.00bn £39.46bn £42.27bn £43.25bn £44.29bn
Stamp duty land tax on the household's own purchases £6.88bn £7.32bn £7.66bn £8.06bn £8.47bn £8.91bn £9.35bn
Stamp duty land tax paid by companies £4.72bn £4.57bn £5.29bn £6.03bn £6.37bn £6.92bn £7.45bn
Land transaction tax (Wales) £0.07bn £0.08bn £0.08bn £0.09bn £0.10bn £0.10bn £0.11bn
Land and buildings transaction tax (Scotland) £0.31bn £0.32bn £0.33bn £0.35bn £0.36bn £0.38bn £0.40bn
Unspecified tax change borne by capital £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Unspecified tax change borne by consumers £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Wealth tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Wealth tax excluding the main residence £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Land value tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Carbon tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Spending by benefit and service: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Lifetime ISA bonus £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
State Pension £121.68bn £125.92bn £126.72bn £129.48bn £132.98bn £136.65bn £140.41bn
Pension Credit £6.21bn £6.46bn £6.68bn £6.82bn £6.89bn £7.07bn £7.22bn
Winter Fuel Payment £1.86bn £1.85bn £1.79bn £1.77bn £1.78bn £1.78bn £1.78bn
Pension Age Winter Heating Payment (Scotland) £0.19bn £0.20bn £0.20bn £0.21bn £0.21bn £0.22bn £0.22bn
Universal Credit £75.71bn £81.81bn £84.29bn £86.34bn £87.51bn £89.06bn £89.70bn
Housing Benefit £8.57bn £8.52bn £8.85bn £9.06bn £9.29bn £9.57bn £9.84bn
Council Tax Reduction £2.19bn £2.32bn £2.44bn £2.58bn £2.72bn £2.87bn £3.02bn
Employment and Support Allowance (income-related) £0.79bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Employment and Support Allowance (contribution-based) £5.20bn £5.37bn £5.56bn £5.69bn £5.82bn £5.95bn £6.09bn
Jobseeker's Allowance (income-based) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Jobseeker's Allowance (contribution-based) £0.29bn £0.30bn £0.31bn £0.31bn £0.32bn £0.33bn £0.34bn
Income Support £0.11bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Working Tax Credit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Child Tax Credit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Incapacity Benefit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Personal Independence Payment £26.95bn £28.03bn £29.05bn £30.09bn £30.75bn £31.51bn £32.21bn
Disability Living Allowance £7.49bn £7.79bn £8.07bn £8.36bn £8.55bn £8.76bn £8.95bn
Attendance Allowance £8.68bn £9.03bn £9.36bn £9.69bn £9.90bn £10.15bn £10.38bn
Carer's Allowance £4.48bn £4.66bn £4.83bn £5.00bn £5.11bn £5.27bn £5.42bn
Carer Support Payment (Scotland) £0.31bn £0.32bn £0.33bn £0.34bn £0.35bn £0.36bn £0.37bn
Scottish Carer Supplement £0.00bn £0.04bn £0.04bn £0.05bn £0.05bn £0.05bn £0.05bn
Severe Disablement Allowance £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn
Industrial Injuries Disablement Benefit £0.50bn £0.52bn £0.54bn £0.55bn £0.56bn £0.58bn £0.59bn
Armed Forces Compensation Scheme £0.61bn £0.63bn £0.65bn £0.66bn £0.68bn £0.69bn £0.71bn
War Widow's or Widower's Pension £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Child Benefit £16.20bn £16.82bn £17.39bn £18.01bn £18.40bn £18.84bn £19.26bn
Scottish Child Payment £0.49bn £0.52bn £0.53bn £0.55bn £0.56bn £0.57bn £0.56bn
Two Child Limit Payment (Scotland, counterfactual) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Healthy Start vouchers £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn
Maternity Allowance £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Statutory Maternity Pay £3.30bn £3.41bn £3.54bn £3.62bn £3.70bn £3.78bn £3.87bn
Statutory Paternity Pay £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Statutory Sick Pay £1.12bn £1.16bn £1.20bn £1.23bn £1.26bn £1.29bn £1.32bn
Sure Start Maternity Grant £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn
Bereavement Support Payment £0.67bn £0.69bn £0.71bn £0.73bn £0.75bn £0.76bn £0.78bn
Widowed Parent's Allowance £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Tax-Free Childcare £0.56bn £0.57bn £0.57bn £0.58bn £0.60bn £0.61bn £0.59bn
Extended childcare entitlement £2.99bn £3.50bn £3.59bn £3.71bn £3.78bn £3.86bn £3.93bn
Universal childcare entitlement £2.06bn £2.22bn £2.29bn £2.37bn £2.43bn £2.48bn £2.53bn
Targeted childcare entitlement £0.50bn £0.51bn £0.52bn £0.54bn £0.55bn £0.57bn £0.56bn
Childcare Offer for Wales £0.26bn £0.28bn £0.28bn £0.29bn £0.30bn £0.31bn £0.32bn
Care to Learn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Childcare Grant £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Parents' Learning Allowance £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn
Adult Dependants' Grant £0.06bn £0.06bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn
Travel Grant £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed
16 to 19 Bursary Fund £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
NHS spending £203.89bn £204.30bn £204.56bn £204.91bn £205.34bn £205.85bn £206.35bn
State education spending £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn
Transport subsidy spending £25.05bn £25.10bn £25.14bn £25.18bn £25.23bn £25.30bn £25.36bn
Cost-of-living support payment £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Energy Bills Rebate £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Household Energy Payment £0.00bn £2.11bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Energy Price Guarantee subsidy £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Basic income £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Disability basic income £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Other public spending budget change £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Caseloads: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Lifetime ISA bonus 0k 0k 0k 0k 0k 0k 0k
State Pension 11,264k 11,145k 10,819k 10,700k 10,723k 10,750k 10,776k
Pension Credit 1,489k 1,484k 1,476k 1,454k 1,452k 1,457k 1,466k
Winter Fuel Payment 7,844k 7,783k 7,473k 7,375k 7,391k 7,409k 7,427k
Pension Age Winter Heating Payment (Scotland) 803k 802k 800k 797k 799k 801k 802k
Universal Credit 6,343k 6,419k 6,408k 6,369k 6,364k 6,343k 6,295k
Housing Benefit 1,249k 1,182k 1,181k 1,165k 1,164k 1,166k 1,168k
Council Tax Reduction 3,326k 3,344k 3,351k 3,364k 3,375k 3,388k 3,395k
Employment and Support Allowance (income-related) 71k 0k 0k 0k 0k 0k 0k
Employment and Support Allowance (contribution-based) 719k 720k 721k 722k 724k 726k 728k
Jobseeker's Allowance (income-based) 0k 0k 0k 0k 0k 0k 0k
Jobseeker's Allowance (contribution-based) 67k 67k 67k 67k 67k 68k 68k
Income Support 25k 0k 0k 0k 0k 0k 0k
Working Tax Credit 0k 0k 0k 0k 0k 0k 0k
Child Tax Credit 0k 0k 0k 0k 0k 0k 0k
Incapacity Benefit 0k 0k 0k 0k 0k 0k 0k
Personal Independence Payment 3,567k 3,575k 3,579k 3,585k 3,593k 3,602k 3,611k
Disability Living Allowance 1,291k 1,294k 1,296k 1,298k 1,300k 1,304k 1,307k
Attendance Allowance 1,695k 1,698k 1,700k 1,703k 1,707k 1,711k 1,715k
Carer's Allowance 1,034k 1,037k 1,038k 1,040k 1,042k 1,060k 1,062k
Carer Support Payment (Scotland) 71k 71k 71k 72k 72k 72k 72k
Scottish Carer Supplement 0k 71k 71k 72k 72k 72k 72k
Severe Disablement Allowance 4k 4k 4k 4k 4k 4k 4k
Industrial Injuries Disablement Benefit 137k 137k 137k 138k 138k 138k 139k
Armed Forces Compensation Scheme 93k 93k 94k 94k 94k 94k 94k
War Widow's or Widower's Pension 0k 0k 0k 0k 0k 0k 0k
Child Benefit 8,124k 8,121k 8,121k 8,131k 8,146k 8,162k 8,179k
Scottish Child Payment 351k 352k 352k 353k 350k 348k 337k
Two Child Limit Payment (Scotland, counterfactual) 0k 0k 0k 0k 0k 0k 0k
Healthy Start vouchers 200k 200k 200k 201k 201k 201k 202k
Maternity Allowance 0k 0k 0k 0k 0k 0k 0k
Statutory Maternity Pay 333k 333k 334k 334k 335k 336k 337k
Statutory Paternity Pay 0k 0k 0k 0k 0k 0k 0k
Statutory Sick Pay 181k 182k 182k 182k 182k 183k 183k
Sure Start Maternity Grant 26k 26k 26k 26k 26k 26k 26k
Bereavement Support Payment 98k 98k 98k 98k 98k 99k 99k
Widowed Parent's Allowance 0k 0k 0k 0k 0k 0k 0k
Tax-Free Childcare 1,043k 1,027k 1,014k 1,009k 1,011k 1,009k 993k
Extended childcare entitlement 795k 800k 796k 797k 798k 798k 792k
Universal childcare entitlement 1,071k 1,072k 1,072k 1,073k 1,076k 1,079k 1,074k
Targeted childcare entitlement 165k 156k 154k 154k 155k 155k 150k
Childcare Offer for Wales 39k 39k 39k 39k 39k 39k 39k
Care to Learn 0k 0k 0k 0k 0k 0k 0k
Childcare Grant 0k 0k 0k 0k 0k 0k 0k
Parents' Learning Allowance 98k 98k 98k 99k 99k 99k 99k
Adult Dependants' Grant 18k 18k 12k 12k 12k 12k 12k
Travel Grant 0k 0k 0k 0k 0k 0k 0k
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed
16 to 19 Bursary Fund 0k 0k 0k 0k 0k 0k 0k
Cost-of-living support payment 0k 0k 0k 0k 0k 0k 0k
Energy Bills Rebate 0k 0k 0k 0k 0k 0k 0k
Household Energy Payment 0k 21,065k 0k 0k 0k 0k 0k
Energy Price Guarantee subsidy 0k 0k 0k 0k 0k 0k 0k
Basic income 0k 0k 0k 0k 0k 0k 0k
Disability basic income 0k 0k 0k 0k 0k 0k 0k
Government balance, each component counted once: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Government receipts, each component once £884.82bn £927.25bn £972.82bn £1,008.07bn £1,046.18bn £1,083.32bn £1,116.48bn
Government spending £529.29bn † £545.33bn † £550.40bn † £559.11bn † £566.74bn † £575.46bn † £583.07bn †
Government balance, each receipt once £355.53bn † £381.92bn † £422.41bn † £448.95bn † £479.44bn † £507.86bn † £533.41bn †
Benefits in household_benefits but not in gov_spending £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Model totals: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
gov_tax £884.82bn £927.25bn £972.82bn £1,008.07bn £1,046.18bn £1,083.32bn £1,116.48bn
household_tax £491.95bn £520.39bn £551.18bn £575.98bn £600.96bn £626.66bn £648.39bn
pre_budget_change_household_tax £484.13bn £512.26bn £542.79bn £566.92bn £591.68bn £617.12bn £638.58bn
gov_spending £529.29bn † £545.33bn † £550.40bn † £559.11bn † £566.74bn † £575.46bn † £583.07bn †
household_benefits £529.29bn † £545.33bn † £550.40bn † £559.11bn † £566.74bn † £575.46bn † £583.07bn †
gov_balance £355.53bn † £381.92bn † £422.41bn † £448.95bn † £479.44bn † £507.86bn † £533.41bn †
Household income totals: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Household market income £1,637.96bn £1,702.77bn £1,757.35bn £1,806.41bn £1,855.97bn £1,912.43bn £1,970.44bn
Household net income £1,636.63bn † £1,687.51bn † £1,715.12bn † £1,747.12bn † £1,778.28bn † £1,816.57bn † £1,859.19bn †
Household net income (HBAI definition) £1,449.51bn £1,499.52bn £1,530.52bn £1,564.80bn £1,597.47bn £1,635.15bn £1,676.12bn
Population: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
People 69,245k 69,383k 69,473k 69,592k 69,738k 69,912k 70,080k
Benefit units 35,110k 35,181k 35,226k 35,286k 35,360k 35,449k 35,534k
Households 31,046k 31,108k 31,149k 31,201k 31,267k 31,345k 31,420k
Poverty rates: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Absolute poverty, before housing costs: everyone 16.2% 15.4% 16.3% 16.2% 16.4% 16.4% 16.5%
Absolute poverty, before housing costs: children 24.6% 21.8% 23.0% 22.7% 22.9% 23.0% 23.2%
Absolute poverty, before housing costs: working-age adults 14.0% 13.7% 14.6% 14.6% 14.7% 14.7% 14.9%
Absolute poverty, before housing costs: pensioners 13.7% 13.4% 14.0% 13.9% 14.0% 14.0% 13.9%
Absolute poverty, after housing costs: everyone 21.5% 21.0% 22.0% 22.5% 22.8% 23.0% 23.4%
Absolute poverty, after housing costs: children 33.1% 31.2% 32.1% 32.4% 32.8% 33.2% 34.0%
Absolute poverty, after housing costs: working-age adults 19.9% 19.8% 20.8% 21.5% 21.8% 22.0% 22.2%
Absolute poverty, after housing costs: pensioners 12.7% 12.4% 13.2% 13.2% 13.3% 13.4% 13.6%
Relative poverty, before housing costs: everyone 16.9% 15.9% 16.3% 16.2% 16.3% 16.2% 16.5%
Relative poverty, before housing costs: children 25.7% 22.6% 23.0% 22.7% 22.8% 22.6% 23.2%
Relative poverty, before housing costs: working-age adults 14.4% 14.0% 14.6% 14.6% 14.7% 14.6% 14.9%
Relative poverty, before housing costs: pensioners 14.5% 14.1% 14.0% 13.8% 13.8% 13.9% 13.9%
Relative poverty, after housing costs: everyone 21.4% 20.9% 21.2% 21.3% 21.3% 21.5% 21.7%
Relative poverty, after housing costs: children 32.9% 31.0% 31.1% 31.0% 31.0% 31.2% 31.7%
Relative poverty, after housing costs: working-age adults 19.8% 19.7% 20.2% 20.4% 20.4% 20.6% 20.8%
Relative poverty, after housing costs: pensioners 12.5% 12.4% 12.2% 11.8% 11.7% 11.8% 12.1%
People in poverty: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Absolute poverty, before housing costs: everyone 11,246k 10,704k 11,333k 11,298k 11,407k 11,448k 11,584k
Absolute poverty, before housing costs: children 3,676k 3,270k 3,455k 3,406k 3,441k 3,463k 3,509k
Absolute poverty, before housing costs: working-age adults 5,947k 5,858k 6,277k 6,330k 6,387k 6,400k 6,490k
Absolute poverty, before housing costs: pensioners 1,624k 1,576k 1,602k 1,562k 1,579k 1,585k 1,584k
Absolute poverty, after housing costs: everyone 14,869k 14,565k 15,263k 15,690k 15,910k 16,094k 16,373k
Absolute poverty, after housing costs: children 4,940k 4,671k 4,814k 4,873k 4,931k 5,015k 5,145k
Absolute poverty, after housing costs: working-age adults 8,424k 8,435k 8,943k 9,324k 9,474k 9,559k 9,683k
Absolute poverty, after housing costs: pensioners 1,504k 1,460k 1,505k 1,493k 1,505k 1,520k 1,545k
Relative poverty, before housing costs: everyone 11,694k 11,032k 11,318k 11,297k 11,348k 11,350k 11,584k
Relative poverty, before housing costs: children 3,847k 3,389k 3,454k 3,406k 3,427k 3,414k 3,509k
Relative poverty, before housing costs: working-age adults 6,128k 5,990k 6,270k 6,330k 6,356k 6,359k 6,490k
Relative poverty, before housing costs: pensioners 1,719k 1,652k 1,594k 1,561k 1,565k 1,576k 1,584k
Relative poverty, after housing costs: everyone 14,800k 14,518k 14,756k 14,791k 14,867k 15,002k 15,214k
Relative poverty, after housing costs: children 4,916k 4,649k 4,661k 4,651k 4,673k 4,701k 4,796k
Relative poverty, after housing costs: working-age adults 8,396k 8,414k 8,699k 8,813k 8,870k 8,959k 9,049k
Relative poverty, after housing costs: pensioners 1,488k 1,455k 1,395k 1,326k 1,324k 1,342k 1,369k
Inequality: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Gini coefficient, equivalised HBAI income before housing costs 0.3076 0.3049 0.3055 0.3054 0.3059 0.3064 0.3080
Mean household net income in each side's own deciles: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Decile 1: mean household_net_income per household £17,748 † £17,980 † £17,927 † £18,181 † £18,318 † £18,538 † £18,742 †
Decile 2: mean household_net_income per household £28,029 † £29,037 † £28,754 † £28,997 † £29,258 † £29,676 † £30,171 †
Decile 3: mean household_net_income per household £34,252 † £35,426 † £36,069 † £36,548 † £37,157 † £37,774 † £38,103 †
Decile 4: mean household_net_income per household £38,926 † £40,769 † £41,716 † £42,763 † £43,387 † £44,167 † £44,499 †
Decile 5: mean household_net_income per household £43,346 † £45,603 † £46,054 † £47,001 † £47,755 † £48,626 † £50,309 †
Decile 6: mean household_net_income per household £47,933 † £49,175 † £50,879 † £52,032 † £52,922 † £53,942 † £54,719 †
Decile 7: mean household_net_income per household £55,672 † £56,650 † £57,493 † £57,674 † £58,791 † £59,706 † £61,106 †
Decile 8: mean household_net_income per household £68,786 † £70,811 † £71,870 † £73,483 † £73,890 † £75,325 † £77,181 †
Decile 9: mean household_net_income per household £78,891 † £81,011 † £80,860 † £82,646 † £85,464 † £86,940 † £89,508 †
Decile 10: mean household_net_income per household £116,864 † £120,162 † £124,545 † £126,420 † £125,756 † £128,269 † £130,694 †
Standard reform costings (change in gov_balance): head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp £6.41bn £6.66bn £6.63bn £6.85bn £7.03bn £7.25bn £7.47bn
Raise higher rate by 1pp £3.61bn £3.87bn £4.00bn £4.22bn £4.44bn £4.71bn £4.83bn
Raise personal allowance by ~800GBP/year £-3.82bn £-3.93bn £-4.01bn £-4.05bn £-4.11bn £-4.24bn £-1.95bn
Raise child benefit by 25GBP/week per additional child £-1.99bn £-1.75bn £-1.55bn £-1.38bn £-1.30bn £-1.18bn £-1.07bn
Reduce Universal Credit taper rate to 20% £-20.83bn £-21.38bn £-21.81bn £-22.02bn £-22.37bn £-22.77bn £-22.96bn
Raise Class 1 main employee NICs rate to 10% £10.89bn £11.30bn £11.71bn £12.01bn £12.31bn £12.62bn £13.00bn
Raise VAT standard rate by 2pp £24.17bn £24.97bn £25.86bn £26.46bn £27.07bn £27.68bn £28.31bn
Raise additional rate by 3pp £2.90bn £3.15bn £3.22bn £3.41bn £3.61bn £3.85bn £4.14bn
Raise the Universal Credit standard allowance by 10% £-3.06bn £-3.23bn £-3.30bn £-3.40bn £-3.48bn £-3.53bn £-3.55bn
Raise the State Pension by 10% £-7.76bn £-7.99bn £-8.22bn £-8.44bn £-8.79bn £-8.52bn £-8.86bn
Standard reforms: change in each reform's target: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp: change in income_tax £6.55bn £6.86bn £6.79bn £7.00bn £7.20bn £7.44bn £7.66bn
Raise higher rate by 1pp: change in income_tax £3.61bn £3.92bn £4.01bn £4.23bn £4.45bn £4.72bn £4.84bn
Raise personal allowance by ~800GBP/year: change in income_tax £-3.94bn £-4.07bn £-4.14bn £-4.18bn £-4.22bn £-4.40bn £-1.76bn
Raise child benefit by 25GBP/week per additional child: change in child_benefit £2.33bn £2.14bn £1.95bn £1.76bn £1.65bn £1.52bn £1.40bn
Reduce Universal Credit taper rate to 20%: change in universal_credit £20.79bn £21.36bn £21.84bn £22.07bn £22.39bn £22.80bn £23.01bn
Raise Class 1 main employee NICs rate to 10%: change in national_insurance £11.15bn £11.63bn £12.00bn £12.29bn £12.61bn £12.94bn £13.31bn
Raise VAT standard rate by 2pp: change in vat £23.98bn £24.77bn £25.66bn £26.24bn £26.85bn £27.46bn £28.07bn
Raise additional rate by 3pp: change in income_tax £2.90bn £3.15bn £3.22bn £3.42bn £3.62bn £3.86bn £4.12bn
Raise the Universal Credit standard allowance by 10%: change in universal_credit £3.06bn £3.22bn £3.32bn £3.41bn £3.48bn £3.54bn £3.55bn
Raise the State Pension by 10%: change in state_pension £10.68bn £11.17bn £11.28bn £11.60bn £12.03bn £12.46bn £12.96bn

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6788c8e39144c633c0ae7fa8c8c20a6a905ab47b: COMPLETE — request changes for one confirmed critical finding (C1); no material evidence gaps.

C1 — A rounded share can win an ineligible Marriage Allowance reduction. At income_tax_allocation.py:414, removing the below-limit safety room can award the whole £252 reduction after float32 rounding erased a real penny above the limit.

A source-qualified 2026–27 England couple, both 40, has a zero-income donor and a recipient with pay £190,529.99, savings £9,000.02, dividends £1,570, a genuinely qualifying current-year trade-loss claim of £50,275, and qualifying cash Gift Aid of £80,044. Assume a valid election, UK residence and no Married Couple’s Allowance claim.

  • The loss fits s.24A’s cap: 25% of total income is £50,275.0025. Section64 permits the qualifying loss deduction.
  • Gross Gift Aid is £100,055, giving an extended basic limit of £137,755 and adjusted net income of £50,770.01; the full £12,570 Personal Allowance applies (s.35, s.58 and s.414).
  • Exact taxable income is £138,255.01, one penny above the extended basic limit plus the £500 savings allowance. Any share either leaves higher-rate income or disallowed counterfactual upper-rate dividends, so it cannot meet s.55B.

The current head rounds net income to £150,825, chooses deductions of £2,499.98046875 / £8,500.01953125 / £1,570, grants £252 and charges £27,299. The captured baseline allocator/rate-test control denies the reduction and charges £27,451, matching the statutory least liability (about £27,451.004) to pence. This PR therefore introduces an annual undercharge of about £152, rather than a penny-sized discrepancy.

Please preserve lawful equality at the limit while preventing low-precision totals from manufacturing an entitlement, and add this final-tax counterexample. The causal control replaces only the two baseline entrypoints in the same environment; it is not a separate full-main suite.

Validation: 116 focused tests passed (90 YAML, 26 Python), plus the source-qualified current/control reproduction above. The independent policy review corroborated the same finding from 24 verified official source/extract pairs; it is counted once. The queued RuleSpec545 packet is adequate. Current hosted checks were refreshed; their passing cases do not cover C1.

The search now always keeps the rank of the rounding nearest the exact
deductions, as main does. 6788c8e ranked it last where it met the rate
test and the exact share did not. Such a household can store the same
float32 amounts as one entered at the limit, which the law gives the
reduction: savings of £140,500.01 against £140,000.01 of shared deductions
leave £500, but the model holds the savings as £140,500.015625, 0.56p over
the band. The rule denied that recipient the £252 that main and the law
give. A recipient entered 0.7p over the band holds the same amounts as one
entered just under it, so no rule on the stored amounts can tell them
apart. The model now gives both the reduction, as it does where float32
rounding of net income or the allowances puts income onto a limit.

A new test pins the at-band recipient and the two twins. The over-deduction
test keeps its two recipients whose passing rounding is not the nearest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review of 7877bca514da83cc81e0b62059e7151353258671, incremental from 6788c8e: COMPLETE — request changes; C1 STILL OPEN; no new findings or material evidence gaps.

C1 — The same source-qualified household still receives an ineligible Marriage Allowance reduction. The new nearest-rounding exception at income_tax_allocation.py:919 does not repair the lost input precision behind the original finding.

The original 2026–27 England couple, both40 with a zero-income donor, still has recipient pay£190,529.99, savings£9,000.02, dividends£1,570, a genuinely eligible current-year trade loss£50,275 and qualifying cash Gift Aid£80,044. Valid election/residence and no Married Couple’s Allowance claim remain explicit premises.

The loss fits s.24A’s cap, and s.64 permits the qualifying deduction. Gross Gift Aid£100,055 gives adjusted net income£50,770.01, full Personal Allowance£12,570 and extended basic limit£137,755 (s.35, s.58, s.414). Exact taxable income£138,255.01 is a penny above that limit plus the£500 savings allowance. No feasible share qualifies under s.55B.

At this new head, the native model again grants £252 and charges £27,299, approximately £152 below the statutory least liability of£27,451.004. The original baseline-feature control charging£27,451 is retained separately; the current-head household was rerun with identical inputs. This is the same C1, counted once.

The new test’s stored-identical examples document a precision limitation; they do not establish a statutory entitlement exception. Please correct the source-qualified final-tax case and add it as a regression while preserving lawful equality at the limit.

Validation: 114 current tests passed (90YAML,24Python), zero failures/skips; three unaffected CPS results were retained separately and are not added to that count. Both independent roles completed;24 official source/extract pairs were byte-validated and reused, with no new source acquisition. Hosted CI is separately pending at the latest capture and Fix evidence is cancelled; neither passing focused tests nor a later CI clearance resolves C1. The PR remains Draft.

MaxGhenis and others added 2 commits November 14, 2026 13:32
The search could pick a float32 rounding of the deductions from savings
and dividends for the slack in the float32 rate test alone. For a
recipient entered a penny or two over a limit, whose exact share fails
the test in float64, that gave the Marriage Allowance reduction that
main and the law deny. Such a rounding now ranks below every other,
unless it is the rounding nearest the exact deductions, which the model
has always stored.

A new test holds a 2026-27 recipient whose savings sit 1p over the
savings nil rate band once a Gift Aid gift raises the basic rate limit
(s. 414(2)(b) ITA 2007). The model gives no reduction and charges
£21,547.83, as the law does. Two tests take names, and a third a
docstring, that say why the nearest rounding keeps its rank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The r1 review found that no test needed the float64 arm of
_rate_test_on_stored, and that the property test's explicit examples
could not fail on main.

- A unit test checks that the float64 arm counts an old order and a
  moved share that leave income at the limit in float64 but £0.0039
  over it in float32.
- A model test gives the reduction to two 2026-27 recipients whose pay,
  savings and dividends come to £50,270, which main denies. It denies
  the reduction a penny over.
- The property test runs the table's second row, whose share leaves pay
  2p under the limit, where the strict test passes too.
- Docstrings now give the property test's margins and what invariant
  10's last check guards. They also note that the 24% savings rate adds
  an announced rise, and that sub-penny float32 gaps can add up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review of 965b9d177f2057ecb09d155920582e867e25f405, incremental from 7877bca: COMPLETE — request changes; C1 STILL OPEN; no new findings or material evidence gaps.

C1 — The original source-qualified household is still undercharged about £152 annually. The new non-nearest float32-only ranking guard at income_tax_allocation.py:935 does not restore the entered penny lost upstream. This retains the existing finding, rather than adding another precision finding.

The same 2026–27 England couple, both 40 with a zero-income donor, has recipient pay £190,529.99, savings £9,000.02, dividends £1,570, a genuinely qualifying current-year trade loss of £50,275 and qualifying cash Gift Aid of £80,044. Valid residence/election and no Married Couple’s Allowance claim remain explicit premises.

The loss fits s.24A’s cap. After the loss, gross Gift Aid and Personal Allowance, exact taxable income is £138,255.01: one penny above the £137,755 extended basic limit plus the £500 savings allowance (s.58, s.414). No feasible share meets s.55B.

The current head was rerun with identical inputs and again grants £252 Marriage Allowance, charging £27,299 instead of the statutory least liability of approximately £27,451.004. The original independently corroborated legal derivation and baseline-feature control are retained separately. Please correct this final-tax case and add it as a regression while preserving lawful equality at the limit.

Validation: 117 current tests passed (90 YAML, 27 Python), zero failures/skips. Three unaffected ordinary-pay-only CPS results were retained separately and are not added to that count. Both independent roles completed, reusing 24 hash-validated official source/extract pairs with no new acquisition. The new float64-boundary tests cover existing reader behavior; the changed ranking guard and final-tax controls were executed. No new parameter or statutory-rate claim is inferred from the pre-existing 2027 model fixtures.

The exact PR snapshot was tested. Its merge base is b007ac82; captured main has advanced to d3db7ac0, whose composition was not separately executed. Hosted CI remains pending and the PR remains Draft; neither a later CI clearance nor passing focused tests closes C1.

Before publication, both original reviewers assessed the updated description (bb27dbc…). It documents the reviewed guard and examples without changing the C1 disposition; no additional model or test run was required.

MaxGhenis and others added 7 commits November 14, 2026 23:47
The property test asserted that no share leaves less liability under its
strict rate test than the model charges. That was false for a recipient
whose only qualifying share sets nothing against pay and leaves savings at
the top of the savings nil rate band. Pay of £37,500, savings of £11,000.03
and dividends of £2,069.97 in 2026-27 is one: the law charges £7,248, and
the model charges £7,329.78, as on main. Float32 holds the savings and
dividends 0.024p over the £13,070 entered, so the share the search scores
leaves the savings that much over the band. The search rounds only the
share it scores lowest, so it never tries the rounding that puts them back.

Check 2's strict test now asks for the savings above the limit to sit a
penny inside the band, as it already asks for pay a penny under the limit.
Check 1, at the model's own share, keeps its half penny. The test still
fails on main, on the example whose share leaves pay a penny under the
limit and savings a penny inside the band.

The test runs that recipient and two more of the same shape as explicit
examples. The docstring says why the strict check stops inside the band,
and no longer says that only one share qualifies in the fourth example,
where pay has 2p of room.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The property test was false for a recipient entered exactly at a step of
the Personal Allowance or the savings allowance, where float32 net income
falls on the other side of the step. With pay of £44,703.42, savings of
£1,673.39 and dividends of £3,893.19 in 2026-27, Step 3 income is the
£37,700 basic rate limit, so the law gives a £1,000 savings allowance
(s. 12B). The model sums net income to £50,270.0039, gives £500 and
charges £100 more, as on main. With net income entered at £110,002 and
held as £110,001.992, the model gives a Personal Allowance of £7,570 where
s. 35 gives £7,569. Neither concerns the share or the rate test.

Both checks now leave out a recipient for whom the law's Personal Allowance
or savings allowance differs between the model's net income and the net
income entered. The test first asserts that the two net incomes agree
within its tolerance. On 4,200 recipients at the rate test's edges and
2,400 drawn ones, it leaves none out.

The oracle also rounds the sum of the amounts entered to whole pence. For
pay of £42,146.41, savings of £6,022.65 and dividends of £2,100.94, float64
addition carried the £50,270 sum over the limit, and the oracle took the
£500 allowance where the model rightly gives £1,000.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
No test failed when OVER_DEDUCTION fell to TIE, or when _stored_share
ranked last every rounding that passes only in float32.

A new test runs a 2027-28 recipient with pay of £53,841.65, savings of
£141,016.82, dividends of £17,661.55, other deductions of £174,818.25 and
a £1.77 trading loss. Step 3 income is the £37,700 basic rate limit, so
the law gives the reduction and charges £4,962.09. The model holds the
shared amount midway between two float32 values. The one below leaves
income 0.39p over the limit; main stores it and charges £5,214.10. The one
above sets 0.39p more than the shared amount, within OVER_DEDUCTION, and
meets the rate test. The model stores it and charges £4,962.09. The test
fails with OVER_DEDUCTION at TIE.

A second test pins the condition that the float32-only rule applies only
where the exact share fails in float64. For a 2027-28 recipient whose
exact share meets the test, two roundings leave the same f and one passes
only in float32. _stored_share keeps that one, which it tries first.
Without the condition it stores the other. On 384,936 synthetic recipients
the condition changed the pair stored for two, each time between pairs
that leave the same f, and the _stored_share docstring now says so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Pay of £50,269.99, savings of £500 and dividends of 1p in 2026-27 ran only
as an explicit example of the property test. Its one qualifying share
leaves pay at the basic rate limit, where only the property test's loose
rate test passes, so that example cannot fail on main.

Case 27 of least_tax_allocation.yaml now pins the row. The share sets 1p
against dividends and £12,569.99 against pay, which leaves £37,700 of pay
and £500 of savings: £7,540 before the £252 reduction and £7,288 after it.
main keeps the old order, denies the reduction and charges £7,539.998, so
the case fails there.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tion

One test guarded two rules: that a moved share counts where it meets the
rate test only in float32, and that the rule ranking such a rounding last
spares the nearest rounding. The test is the 2028-29 recipient at a basic
rate limit that a Gift Aid gift raises to £38,909.30, and it guarded both
only through a float32 tie that its docstring did not describe.

The docstring now states the mechanism. The model holds Step 3 income
0.18p over the limit, so no share meets the test in float64. The float32
value nearest the deduction from dividends leaves float32 amounts that sum
to the float32 value of the limit, so it meets the test in float32 alone.

Two unit tests now pin each rule on the amounts the model holds for that
recipient. The first asserts that the share fails _meets_rate_test, passes
_float32_meets_rate_test and counts in _rate_test_on_stored. It fails when
_rate_test_on_stored drops its float32 arm. The second asserts that
_stored_share keeps the nearest rounding, which passes only in float32,
where the exact share fails in float64. It fails when the float32-only
rule applies to the nearest rounding too.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The TOLERANCE comment said a float32 step moves a deduction only through
tax at the person's rates. A step can also carry a Marriage Allowance
recipient's share across a limit of the rate test and win the reduction,
and the comment now says so.

The module docstring and _old_order_meets_rate_test said the float32 test
never denies the reduction where main's gave it. main rounds a limit to
float32 before it adds a Gift Aid gift; the float32 test here rounds the
sum. The two agree where the statutory limit is a float32 amount, as every
limit from 2015-16 to 2028-29 is. The Scottish higher rate threshold is
not one from 2029-30, when the two limits can sit a float32 step apart for
a Scottish taxpayer with a gift. Both docstrings now state that condition.

In test_income_tax_allocation.py:

- The PENNY_OVER comment said float32 puts some recipients under the
  limit. The model holds all seven 0.2p to 0.5p over it.
- test_rate_test_fails_a_rounding_that_sets_more_than_the_shared_allowances
  asserted £31,520 where its docstring works £31,520.005. It now asserts
  the docstring's figure.
- The Scottish recipients' docstring said net income sums a fraction of a
  penny high. It is 0.69p high in 2027-28 and 1.375p high in 2028-29.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The docstring said the gaps between the amounts the model holds and the
amounts entered can add up to a penny while net income and the allowances
stay under £131,072. They can add up to more. A 2026-27 Scottish recipient
with a £2,127.75 Gift Aid gift and £128,677.12 of net income sits 1.25p
over the raised limit under every share, and the model gives the
reduction, as main does.

It also said the model stores no rounding other than the nearest more than
half a penny beyond the shared amount because rounding both deductions
down never sets more than that amount. The reason is the ranking: any
other rounding that sets more than half a penny beyond the shared amount
ranks last, and the nearest never does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review of 200dc10e0c3181fd8c2d234ba423c284b9317d79, incremental from 965b9d1: COMPLETE — request changes; C1 STILL OPEN; no new findings or material evidence gaps.

C1 — The original source-qualified household remains undercharged about £152 annually. The complete production-module AST, excluding docstrings, is identical to the last reviewed head; dependencies and parameters are unchanged. The new tests and documentation do not repair the existing finding. The stored rate test is now at income_tax_allocation.py:873, with the rounding-ranking guard at lines 946–948.

The same 2026–27 England couple, both 40 with a zero-income donor, has recipient pay £190,529.99, savings £9,000.02, dividends £1,570, a genuinely qualifying current-year trade loss of £50,275 and qualifying cash Gift Aid of £80,044. Valid residence/election, eligibility of the loss and Gift Aid, and no Married Couple’s Allowance claim remain explicit premises. The loss fits s.24A’s cap, and the calculation retains the s.64 loss relief, s.414 Gift Aid, s.25 allocation and s.55B conditions.

At this exact head, identical unforced household inputs again grant £252 Marriage Allowance and charge £27,299, instead of no Marriage Allowance and approximately £27,451.004 statutory least liability. The independent policy check preserves this conclusion under both stated dividend-counterfactual readings discussed in #2915; it does not resolve every inherited case in that issue. Please correct this final-tax case and add it as a regression while preserving lawful equality at the limit.

Validation: 34 current selected tests passed (27 YAML, seven Python), zero failures/skips: the allocation YAML including new Case 27, the revised independent oracle, and six relevant rounding/final-tax tests. The original C1 household was separately recalculated once. Prior 117 selected passes and three unaffected CPS cases were retained after executable/dependency/fixture relevance checks; they are historical, overlap current coverage, and are not added to the 34. Both independent roles completed; 24 official source/extract pairs were revalidated with no new acquisition.

Case 27’s penny-level final tax is supported, while its unique-allocation explanation is qualified by the unresolved fixed-share/counterfactual question. The revised oracle deliberately excludes PA/PSA step mismatches and requires savings a penny inside the band for strict minimization; its passing result does not certify excluded boundary cases or close C1. Broad author sweep counts and generic-deduction fixtures were not independently certified as statutory household outcomes.

The exact PR snapshot was tested and removed normally afterward. Captured main is d3db7ac0, distinct from merge base b007ac82; no synthetic current-main composition was executed. Current-head hosted checks and Draft status are refreshed before publication. Neither passing focused tests nor later CI clearance resolves C1.

MaxGhenis and others added 5 commits November 15, 2026 15:45
From £65,536 the float32 step is 0.78p or more, so the amounts the model
holds can put a recipient entered a penny over a limit of the Marriage
Allowance rate test at the limit. The search then gave that recipient the
£252 reduction, which main and the law deny. The #2913 review's C1 is one:
pay £190,529.99, savings £9,000.02, dividends £1,570, a £50,275 trade loss
and an £80,044 Gift Aid gift. The model charged £27,299; it now charges
£27,451, as main does.

Where any amount the test depends on reaches £65,536 (LOW_PRECISION), the
float64 test keeps main's room below each limit (RATE_TEST_ROOM plus
RATE_TEST_ROOM_FRACTION of the limits and the income after deductions).
The amounts are net income, net income before the trade loss relief, the
relief, the allowances, savings, dividends, an exclusion from earned
income, the grossed-up gift and the limits it raises (_low_precision).
For a recipient with such an amount the search decides the move as main
does (_moves_with_room) and stores the nearest float32 rounding, and the
model's answer keeps the float32 test, so the model gives main's result.

A recipient entered exactly at a limit, with such an amount, is denied
wherever main denies: the model holds pay of £190,529.98 as the same
float32 value as £190,529.99. Under £65,536 nothing changes, and income at
a limit still meets the test.

_stored_share no longer asks that the exact share fail in float64 before
it ranks last a rounding that passes only in float32. That condition only
ever changed the share stored for recipients with large amounts, who now
get the nearest rounding. On 671,793 synthetic recipients with every
amount under £65,536 it changed no stored share.

Tests: C1 and its £190,529.98 twin through a full Simulation; eight more
recipients a penny over a limit with an amount of £65,536 or more
(England, Scotland, Gift Aid, trade loss, 2026-27) and one in 2027-28;
the limits each side of £65,536; a 2027-28 recipient at the limit who
keeps main's nearest rounding. Three tests move to recipients with every
amount under £65,536, so they still pin OVER_DEDUCTION and the
float32-only rule.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Check 1 asks that the model's share is one the law allows: each
deduction within its component. It allowed half a penny, the margin the
rate test allows at the savings nil rate band. The model works the share
from the float32 amounts it holds, so a deduction can pass its component
by more. Two valid 2027-28 draws failed with "model share infeasible":
pay £8,542.77, savings £58,071.67, dividends £9,471.52 (the model sets
£4,027.2383 against savings, 0.83p more than the law leaves for them),
and pay £11,743.36, savings £6,860.08, dividends £23,171.51 (0.52p less).

feasibility_margin bounds that error: half a float32 step of each
component, five half steps of net income (three additions and the old
order's two subtractions), a step of the allowances, and a step of each
stored deduction. Check 1 uses it for feasibility only. The rate test
keeps its half penny, and no recipient is left out. Both rows run as
explicit examples.

The docstring and a comment said float32 leaves net income under a
penny from the amounts drawn. That holds near the rate test's limits. A
draw of £263,789.16 in all holds net income 3.5p lower, and the text
now says so. The docstring also says why the room the search keeps from
£65,536 never decides a recipient these strategies draw.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two tests for a recipient the rate test holds to room (an amount of
£65,536 or more).

A 2026-27 recipient with £400,000 of dividends and £100,000.30 of
deductions. The nearest float32 value of the deduction sits 0.3p under
it. The value above sits within OVER_DEDUCTION and saves 0.3p of tax, and
the search stored it before the room rule. The search now stores the
nearest value, as main does.

A Scottish recipient in 2027-28 whose least tax leaves as much property
income as the rate test allows. The search finds that share on the line
it adds at the limit less the room. With the line at the statutory limit
only, it leaves £500 more of savings at 24% and charges £15 more.

Each fails with the module of 200dc10, and with the one line it pins
changed.

On the message of 259bbb9: two tests moved to recipients with every
amount under £65,536; test_search_ranks_last_a_rounding_more_than_half_a_
penny_beyond_the_allowances is new; and the unit test of the exact-share
condition went with the condition.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… income tested

The room rule read only the amounts the Marriage Allowance rate test reads:
net income, the allowances, savings, dividends, the gift and the limits. A
penny can hide behind them. Pay of £148,609.46 less £108,409.45 of expenses
is £40,200.01, but float32 holds that pay as £148,609.453125 and the model
holds £40,200.00, at the limit, with every amount the test reads under
£65,536. The model then gave the £252 reduction where the law and main deny
it.

_can_hide_an_excess now bounds the float32 error in net income, the
allowances and the grossed-up gift, from the inputs up (_held_error):

- an input's distance from whole pence, under £131,072, and no bound above;
- for each sum on the way (adds, subtracts and the formulas in SUMS), the
  distance from the amount held to the float64 sum of its parts as held;
- no bound for an amount the function cannot follow: another formula, a
  capped relief, or an amount supplied in place of its formula.

The test keeps main's room where the bound reaches the least amount the
entries can sit over a limit. That is a penny for whole-pence entries, and a
quarter, a half or three quarters of a penny where a Gift Aid gift's gross
amount leaves the limit between two pence. The search and the model's answer
read the same flag (c.low_precision), with the £65,536 rule as before.

Tests pin the review's rows (pay or profits less expenses, a gift, and the
at-limit twin denied as on main), a hidden dividend row, three quarter-penny
gift rows, an amount supplied in place of its formula, and five recipients at
the limit who keep the reduction. Docstrings, the changelog fragment and the
property test's note now state the rule as the code applies it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
No code changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review status: COMPLETE — request changes at e4ad32cbb34fdfb0bf4167122e9ba92d7aec5c80.

C1 — RESOLVED. The original source-qualified over-limit household now receives £0 Marriage Allowance and pays £27,451 income tax, rather than £252/£27,299. The original negative result remains supported under both stated s.55B(2)(ba) readings.

C2 — Preserve the supported raw-input/YAML route in the precision guard (critical). At income_tax_allocation.py:709, _held_error treats a supplied employment_income value as unexplained formula error when its employment_income_before_lsr component is absent. For the ordinary 2026 married recipient with a zero-income spouse, pay £40,200, savings £9,000 and dividends £1,570, constructor inputs produce MA £252/final tax £7,288. The supported Simulation.set_input("employment_income", 2026, [40200, 0]) route with the same financial inputs produces MA £0/tax £7,440: the guard interprets the £40,200 as error and restores the room below the limit. Supplying the before-LSR component instead restores £7,288.

The source-qualified allocation leaves pay £37,700, savings £500 and dividends £0, so the reduction is available under ITA 2007 ss.10, 12B, 25 and 55B. Clearing dividends avoids the disputed ba counterfactual. The current campaign returned 118 passes and 5 failures: retained YAML Cases 24–27 and the new least-liability property's explicit £40,199.98 case. A narrow unmodified input-route replay established the cause; no second suite was run. Please make the guard recognize ordinary supported setter/YAML inputs consistently while retaining protection for genuine uncertain overrides. This blocks the PR's advertised boundary feature and functional tests; it is not a claim of a new £152 regression against main, which already missed this boundary.

A1 — Refresh the description (nonblocking). The present-tense text still says the room constants are removed and describes former high-income grants as current behavior. The new adaptive guard conditionally restores the room. Update that algorithm section and qualify the obsolete examples; results explicitly attributed to 200dc can remain historical.

Independent policy/source and code/test roles completed with no material evidence gaps; 24 official original/extract pairs were retained and validated. Hosted YAML CI also fails at this exact head; Python and aggregate checks remain pending. The hosted failure's cause is not inferred from the local log. The PR remains a draft. Remaining high-income precision approximations and the separate #2915 interpretation question are not certified by closing C1.

MaxGhenis and others added 3 commits November 16, 2026 01:17
_held_error checked every amount with a sum (adds, subtracts or SUMS)
against its parts. Pay set through Simulation.set_input, a YAML test or a
dataset rebuilt in place sits in employment_income itself, and its parts
are nil, so the check read the whole of the pay as unexplained error and
the rate test kept its room. A married recipient with pay of £40,200,
savings of £9,000 and dividends of £1,570 in 2026-27 was then denied the
£252 reduction and charged £7,440, where the same amounts given to the
constructor (which moves pay to employment_income_before_lsr) were charged
the law's £7,288 (ITA 2007 ss. 10, 12B, 25 and 55B).

The walk also calculated the parts of a supplied amount, which the tax
calculation never does. After a rebuild in place from a dataset, that ran
employer_ni_fixed_employer_cost_change against the previous population's
baseline and raised (test_rebuilding_in_place_follows_the_new_source).

An amount supplied as an input for the year is now an entry, whatever
formula or sum the variable has: its bound is its distance from whole
pence under £131,072 and infinite from there, and the function reads none
of its parts. is_supplied_input in supplied_inputs.py answers for any
variable from the value the engine returned: the walk follows lists a
reform can change, so its names cannot all sit in
SUPPLIED_INPUT_VARIABLES. A value the model stored itself
(set_model_value), a neutralized variable and a formula a reform replaces
keep the earlier rules.

The test of taxable pay supplied in place of its formula now expects the
law's answer: the reduction, £7,288, and a nil bound.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…n the rule

With a supplied amount read as an entry, _held_error stops at it. The
Marriage Allowance rate test also reads savings, dividends, property
income, the trade loss relief and pension relief on their own, so a
supplied net income (or net income before the relief, or allowances)
would leave those without a bound. _can_hide_an_excess now bounds each
one the walk from net income and the allowances did not reach
(READ_WITH_NET_INCOME). The rule replaces the check for savings and
dividends a reform takes out of the parts of net income, and gives the
same answer there.

A grossed-up gift supplied in place of its formula is an entry too: its
bound is its own distance from whole pence, not its distance from five
quarters of a gift that was never entered.

Tests, each with the law's or main's answer worked by hand:

- pay of £40,200 set through Simulation.set_input after construction, and
  the same household through the constructor: the reduction and £7,288;
- pay of £148,609.45 and £148,609.46 set through set_input, less
  £108,409.45 of expenses: no bound from £131,072, so the room stays and
  both are charged £7,440;
- a reform that takes £10,000 off pay in taxable_employment_income: the
  amount held stops matching its parts, the room stays, £7,440;
- a supplied net income with dividends of £201,570 less £200,000 behind
  it: the room stays, £7,440; with dividends of £1,570, £7,288;
- a gross gift of £1,000 supplied as an input: £7,488;
- a value stored with set_model_value gets its variable's own rule, and
  the same value set through set_input is an entry.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hangelog

The module docstring said an amount supplied in place of its formula gets
no bound. It now says what the code does: an amount supplied as an input
for the year is an entry, bounded by its distance from whole pence under
£131,072, and the guard reads none of the amounts its formula would; a
value stored with set_model_value keeps its variable's rule; and where the
walk stops at a supplied net income or supplied allowances,
_can_hide_an_excess bounds the other amounts the test reads on their own.
The changelog fragment gains one sentence with the same rule, and the
property test's note says its amounts are set through set_input.

No code changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review status: COMPLETE for this CI follow-up — request changes at unchanged head e4ad32cbb34fdfb0bf4167122e9ba92d7aec5c80.

C3 — Keep precision-error traversal safe after rebuilding a simulation (critical). The completed Python 4/8 job fails test_data_built_imputations.py::test_rebuilding_in_place_follows_the_new_source. A supported cloned simulation is rebuilt from a two-person situation into an 80-person dataset. Calculating attends_private_school reaches the new _inputs → _can_hide_an_excess → _held_error traversal at income_tax_allocation.py:703–709, then employer_ni_fixed_employer_cost_change.py:56, mixing current-population pay and baseline salary-sacrifice arrays. It raises ValueError: operands could not be broadcast together with shapes (80,) (2,).

Please keep the precision-error traversal compatible with rebuilt simulations. This is a distinct integration/functional-test blocker from C2; no new cash-error or standalone-main-control reproduction is claimed. The official log reports 1 failed, 1,981 passed, 6 skipped. Its checkout is synthetic merge 1614385aad8e5f95bdda32420e557891b8b7960c, explicitly merging this exact PR head into main d3db7ac07d3cc718400f38ba8ede429d38d6855e.

C2 remains open. The Python 7/8 job independently fails the known least-liability property's eight £40,199.98 rows: model £7,439.99609375 versus strict least liability £7,287.998. Its 1 failure, 2,064 passes and 11 skips corroborate C2 and are not another finding. The Result failure and Python 3 cancellation are not separate defects.

C1 remains resolved; A1 remains open. The code and description are unchanged from the prior reviewed head. This bounded follow-up used official job logs and a code trace, with no new local model or test execution and no repeat statutory review. The prior valid programme/source review remains applicable; hosted shard counts are separate from the retained local 118 passes/5 failures. Two critical findings remain: C2 and C3.

The reform and supplied-net-income tests now say the law gives the
reduction and £7,288, so the £7,440 they assert is the cost of the room.
The SUMS comment notes that a supplied amount is an entry. The
KEEPS_ROOM_AT_THE_LIMIT dividend row's comment no longer says float32
holds £201,570 and £201,570.01 as one value (it holds 201,570.0 and
201,570.015625); both entries are £131,072 or more, so they get no bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review status: COMPLETE at e5216457d7f311807db6d85682f0ebabda1122d8 — C1, C2 and C3 resolved; A1 remains open and nonblocking.

C1 remains resolved. The original source-qualified over-limit household still receives MA £0 and pays £27,451 income tax. The retained large-input precision limitations remain qualified; this does not claim every lawful boundary outcome is solved.

C2 is resolved. The original constructor, raw employment_income setter and employment_income_before_lsr setter routes now all give MA £252/final tax £7,288 for the qualified £40,200 pay / £9,000 savings / £1,570 dividends household. The raw setter still leaves the backing before-LSR value zero, so the actual representation mismatch is exercised. The former five failed selectors also pass.

C3 is resolved. The actual previously failing test_rebuilding_in_place_follows_the_new_source test passes in 3.623 seconds on this captured head. It rebuilds the two-person clone into an 80-person multi-year dataset through the affected path, with no forced guard or replacement witness.

One combined campaign passed 191 tests (100 Python, 91 YAML), 0 failures, including changed guard tests, shared-input regressions, the actual C3 rebuild, direct MA/YAML/CPS regressions and the original financial controls. The exact snapshot/runtime, 17 lock pins and 194 Core payload files were verified. Independent policy/source review retained and validated 24 official original/extract pairs. No new source acquisition, dependency installation or population run was required. This is not an execution claim for a fresh synthetic merge with current main.

A1 — STILL OPEN: the description is unchanged. It still says the room constants are removed and presents older high-income grants as current behavior. Please describe the conditional room and new supplied-entry handling, and qualify obsolete examples by their historical heads. The Local-results section already labelled 200dc can remain historical.

Approval remains deferred while A1 is open, the PR is a draft and required hosted CI is incomplete. Current-head Python shards and aggregate checks were still running at the review capture; no old-head CI success or failure is transferred.

@MaxGhenis
MaxGhenis marked this pull request as ready for review November 16, 2026 08:58
@MaxGhenis
MaxGhenis requested a review from juaristi22 November 16, 2026 08:58

@juaristi22 juaristi22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at e5216457d7f311807db6d85682f0ebabda1122d8 after the same-head description and readiness follow-up.

A1 is resolved. The rewritten description now explains the conditional precision room, supplied-input handling, historical results and remaining limitations. Independent code/test and policy/source review agree. C1, C2 and C3 remain resolved on this unchanged commit; no open findings or material evidence gaps remain in the reviewed scope.

The current-head evidence remains 191 passing tests (100 Python, 91 YAML), zero failures, including the qualified final-tax/input-route controls and the actual rebuild regression. Its runtime and source custody were revalidated, including 24 official original/extract pairs. These are retained results; this follow-up did not rerun model tests or simulations. All 21 latest CI contexts pass at this exact head, including Result and Fix evidence, and the PR is ready for review.

The documented inherited precision limits, unexecuted-path caveats and the existing section 55B interpretation qualification remain as recorded in the full review. The current aggregate report is official CI evidence, with no independent private-data rerun. This approval does not adjudicate issue #2915 or broaden the prior legal interpretation into a unique oracle.

@juaristi22
juaristi22 added this pull request to the merge queue Nov 16, 2026
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

I've now run locally at e521645 the checks this description lists as not run there. Each compares this head with main at the merge base, b007ac8.

  • The seven households in the first table give the values in its last column.
  • Sweeps of 11,208 synthetic households sit a penny under, at and over each limit, some with Gift Aid and some with shares that spill into savings or dividends. None pays more tax than on main, and none pays less than the law. This head charges at least 2p more than the law in 1,125 of them, against 3,258 on main.
  • That count rose by 65 since 965b9d1. Each of the 65 has £65,536 or more of total income and pays exactly main's tax, since the first rule keeps the room there.
  • A fuzz of 20,052 synthetic people found two moved shares that cost more than the old order, by £0.0001 and £0.009, at incomes over £2.5 million. Another 18 people pay up to 10p more than the least tax any share allows, and each has an amount of £65,536 or more.

@MaxGhenis
MaxGhenis marked this pull request as draft November 16, 2026 15:29
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

An independent review of e521645 requested changes for six P1 issues. I reproduced five on this head against main at the merge base, b007ac8:

  • Private-use payments leave a £0.01 company car benefit, but float32 stores zero. This PR gives the £252 reduction; main and the law deny it.
  • I set the personal allowance taper to start at £50,768. This PR gives the reduction; main and the law deny it.
  • I entered pay of £40,200.001, which float32 stores as £40,200. This PR gives the reduction; main and the law deny it.
  • I set the Scottish higher rate threshold to £31,092.005, with pay of £43,662.03 and a 2p Gift Aid donation. main gives the reduction, which the reformed law allows; this PR denies it and charges £252 more.
  • I added a parameter to the list of allowances. This PR fails with an error; main runs.

This head also treats computed amounts as entries when callers use plain set_input, including net income in the CPS marriage reform; I haven't run that sixth case.

I'm changing _held_error to return no bound unless a closed list of cases proves one. I'm also preserving computed values' provenance where callers store them and restoring main's float32 operation order. The description's claims about the bound and about keeping main's float32 test overstate what this head does; I'll correct them with the fix.

I've moved the PR back to draft. María, your approval at e521645 came before these findings.

Merged via the queue into main with commit c8b1aa2 Nov 16, 2026
23 checks passed
@juaristi22
juaristi22 deleted the fix-ma-rate-test-room branch November 16, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model denies the Marriage Allowance where the only qualifying share leaves income at a limit

2 participants