Repository navigation
Conversation
Each of the fifteen gambling inputs declares the uprating index of its duty, and dataset projection grows it by the same series. The series come from RECEIPTS_SERIES_SPECS: the OBR's October 2026 betting and gaming forecast breakdown (receipts Table 4.10), after HMRC's 2024-25 and 2025-26 receipts, less Autumn Budget 2026 measure 56 for Machine Games Duty, divided by the rates the model charges. The model then applies the April 2026 Remote Gaming Duty and April 2027 remote betting rate rises once, not twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new tests pin the Remote Gaming, General Betting and Machine Games Duty indices to Table 4.10 and the rates by hand, check that dataset projection and Core's variable uprating agree, and check that bases giving HMRC's 2024-25 receipts give HMRC's 2025-26 receipts and then Table 4.10, less measure 56, in every year to 2031-32. A property test checks that a rate reform leaves the bases alone and moves receipts by the rate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Machine Games Duty paragraph now says that the OBR's tables do not show which line holds the Remote Gaming Duty that measure 56's costing moves online, so taking the whole measure off may understate the base. The approximations give the size of each five-day rate overlap and note that March 2026's Table 3.10 forecast £1,008.6 million of Lottery Duty for 2026-27. Spread betting's zero weight now rests on Microcosm's split alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #2731 (higher-stake Machine Games Duty), whose new input needs the Machine Games Duty base index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndex #2731 added machine_games_standard_rate_higher_stake_net_takings, a part of the standard-rate base that pays the higher rate from 1 April 2027. It now declares the Machine Games Duty index, as the standard-rate input it belongs to does, and dataset projection grows it by the same series. The series takes measure 56 off Table 4.10's line, so the model adds the higher-stake rise once; a new test checks the duty from 2027-28 to 2031-32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model stores inputs and duties as float32, so the test compares them to one part in a million, and the rise, a difference of two duties, to one part in 100,000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both economic assumptions README paragraphs: the gambling duty base series and #2700's national living wage projection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rise in it Table 4.10's Machine Games Duty line no longer loses Autumn Budget 2026 measure 56. The series divides it by an effective rate that charges the Gambling Commission's Category B share of the standard-rate base (90.78%, 2024-25 machine yield in Categories B and C) at the higher rate on the days the model's higher-stake switch is on, from 1 April 2027. The behavioural response, the supplier-liability yield and any Remote Gaming Duty substitution stay in the base, as for every other duty. ReceiptsMeasure goes with the subtraction. A rate part can now follow a dated switch, read with the rates from the parameter tree. The importer refuses growth that would round the model's five-decimal index to zero. Tests add the reconciliation invariant at any share, the zero-share rule, index positivity, the 100-at-20% / 80-at-25% example, the shortfall when a dataset lacks the higher-stake input, rate reforms that leave the base alone, and a model-to-importer differential of every rate path's wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The projection notes now give the Machine Games Duty rate with the higher-stake share at 25% from 2027-28, the share's source and what it leaves out (pubs, clubs and Northern Ireland), and the 18.3% shortfall against Table 4.10 a dataset without the higher-stake input gives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #2735 (Northern Ireland Council Tax Rebate and Alternative Fuel Payment), which merges without conflict. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The positivity check ran on the forecast's growth, before the earnings tail joined it, so a tail could still round the model's index to zero. Compound the finished series as the model does and refuse that case. Correct the machine category reasoning in the docs and drop a README step for a series the importer no longer has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A value dated mid-year applies from the next January, as the model reads it, so it must not replace that year's January value in the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles. Checks failing on both base and head (1)
Counted-once checkEach of 92 components was raised by £1 per unit in 2026-27, and every head of its totals was read 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 head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.
Provenance
Dataset: Receipts by tax head: head levels
Spending by benefit and service: head levels
Caseloads: head levels
Government balance, each component counted once: head levels
Model totals: head levels
Household income totals: head levels
Population: head levels
Poverty rates: head levels
People in poverty: head levels
Inequality: head levels
Mean household net income in each side's own deciles: head levels
Standard reform costings (change in gov_balance): head levels
Standard reforms: change in each reform's target: head levels
|
The model's indices stop at or before that year, so the check holds however long they run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dataset projection grows household weights by ons.population, so a gambling series that grew each household's input by its duty's whole base growth counted population growth twice: the weighted bases ran 1.54% above Table 4.10 by 2031-32. The seven series move to obr.per_capita.gambling_duty_bases. The importer writes each base's growth over one plus ons.population growth, to six decimals, in the forecast years and in the tail, where the base grows with average_earnings (or holds flat while its rate is zero) in every year to the last that ons.population states. check_index, population_growth, growth_in_effect and per_head_growth carry #2596's names and signatures; ReceiptsSeriesSpec.per_head marks every series under per_capita. test_gambling_duty_base_projection.py now projects two weighted households through extend_single_year_dataset and checks the weighted duty against HMRC and Table 4.10; test_weighted_gambling_bases_follow_ the_aggregate checks every weighted input against its duty's national base to 2039. A Hypothesis property checks that the per-head series, compounded with population growth, gives back the aggregate index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs' constructed-household table now comes from two households, weighted 700 and 1,900, that hold the national bases between them; its figures do not change. Comments give the division to the importer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
render_receipts_growth_yaml now divides a per-head series' forecast years in the same block #2596 uses for its clearances, and receipts_tail divides a base's tail through per_head_tail. Merged with #2596, the two blocks conflict on one condition line instead of combining into a second division of the clearance series. growth_ratio sits beside line_rate, per_head_tail before receipts_tail, and the per-head property test beside the other gambling properties, so the merge conflicts only where the two branches differ. The written series do not change. test_population_vintage.py's docstring names the three per-capita series it checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test added 2032 and 2033 after every "2031-01-01: 0.0200" line, and #2761's per-head series, indented two spaces deeper, hold that line too, so the edited fixture stopped parsing. It now edits average_earnings alone, as the test means to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dices Merges #2761 at d08fbb6. Its growth_ratio, check_index, population_growth, growth_in_effect and per_head_growth replace this branch's copies, each defined once. ReceiptsSeriesSpec.per_head now covers the clearance specs, which sit under per_capita, so the renderer and summary write them per head through the shared helper. The clearance tail and comment basis stay. The importer rebuilds the merged yoy_growth.yaml byte for byte from the real October 2026 and March 2026 tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… head A line's row may hold only its label and a value under each year. The importer used to skip any other cell, so a "kg" cell beside "Other tobacco products" let the line borrow the thousand kg its non-cigarette total states, and growth read 999.0. A clearance table's year row holds only years, and the one cell that states a clearance line's unit must describe the line: its own label, the label of the total it breaks down (the row above "of which:"), or a note. ReceiptsGrowth carries each year's growth before rounding, and per_head_growth divides that, so a gambling base with its own outturn (previous_line None) grows per head by its base growth, not by its receipts or a growth rebuilt from levels and rates. The committed yoy_growth.yaml is unchanged byte for byte. The population test now covers all 13 per-head series: after the merge with #2761 the seven gambling bases move with population too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give the importer's comment the file's real last year, say where the model's cumulative indices stop, flag the rounded operands in the equations, and give the OBR, the Treasury and Parliament the actions the text gave their tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #2738
What and why
No gambling input declared an uprating index, so dataset projection held each of the sixteen inputs at its 2024-25 cash level in every later year. This PR gives the seven betting and gaming duties a base series each and grows every input by its duty's series:
policyengine_uk/variables/input/consumption/gambling/declaresgov.economic_assumptions.indices.obr.per_capita.gambling_duty_bases.<duty>, andpolicyengine_uk/data/uprating_indices.yamlmaps it to the sameyoy_growthseries for dataset projection. Charge higher-stake machines at the Machine Games Duty higher rate from April 2027 #2731'smachine_games_standard_rate_higher_stake_net_takingstakes the Machine Games Duty index, like the standard-rate input it belongs to.policyengine_uk/utils/import_obr_forecasts.pywrites the seven series fromRECEIPTS_SERIES_SPECS, beside the SDLT and business rates series. Each series runs from HMRC's 2024-25 receipts (index 1) to their 2025-26 outturn, then through the OBR's October 2026 forecast in receipts Table 4.10, "Betting and gaming duties forecast breakdown" (2026-27 to 2031-32), then along theaverage_earningspath.ons.populationgrowth, minus one, to six decimals. Dataset projection grows household weights byons.population, so the weighted inputs grow with each duty's base. Remote Gaming Duty's base grows 9.38% into 2026-27, and its series 9.16% as population grows 0.20%. A series that held the base's own growth would count population growth twice, and the weighted bases would exceed Table 4.10 by 1.54% in 2031-32.average_earnings, or holds flat for Bingo Duty, and the importer divides that growth by population growth in every year to 2073, the last yearons.populationstates. PastPROJECTION_END_YEAR(2032), policyengine-core scales each input by its index and each household weight by the population index, so the weighted inputs keep that path until the cumulative indices stop. Those indices end in 2039 today, so inputs and weights freeze from 2040. Derive economic assumption index horizon from the growth series #2756 carries them through 2074, and on a merge with that branch every gambling index reaches 2074 with no change here.The importer reads every rate from the model's parameter files:
gov.hmrc.gambling_duty.remote_gaming.rategov.hmrc.gambling_duty.general_betting.rates.remote...general_betting.rates.fixed_odds,.exchange_commissiongov.hmrc.gambling_duty.bingo.rate...machine_games.rates.lower,.standard,.higherand...machine_games.higher_stake_machines_at_higher_rategov.hmrc.gambling_duty.lottery.rategov.hmrc.gambling_duty.pool_betting.ratehousehold.consumption.gambling.casino_effective_rateHow the rate effects come out
The equations round receipts and rates for display, and each result comes from the unrounded figures.
Remote Gaming Duty. The OBR forecasts £2,752.0 million for 2026-27 in Table 4.10, against HMRC's £1,321.0 million for 2025-26, so receipts grow 108.3%. The base grows (2,752.0 / 40%) / (1,321.0 / 21%) − 1 = 9.3757%.
General Betting Duty. The remote part makes up 45.47% of the 2024-25 base, so the rate on the whole base rises from 15% to 15% + 10% × 45.47% = 19.55% in 2027-28. Receipts grow 33.8% (£655.6 million to £877.4 million), and the base grows (877.4 / 19.55%) / (655.6 / 15%) − 1 = 2.7038%. The importer holds fixed the shares from Microcosm's split of HMRC's 2024-25 receipts by the Gambling Commission's 2024-25 gross gambling yield. Microcosm applies the Commission's remote horse racing share to all remote fixed odds and puts that part in the UK horse racing input at 15%, so the part at 25% may be larger, and the 2.70% would then overstate the base's growth. Microcosm gives spread betting no part, so the two spread-betting inputs take the duty's index with no weight in it.
Machine Games Duty. From 1 April 2027 the model charges the higher-stake part of the standard-rate base at 25% (Charge higher-stake machines at the Machine Games Duty higher rate from April 2027 #2731), and the OBR includes that rise in Table 4.10's line. The OBR says it "increases receipts by a further estimated £0.1 billion a year from 2027-28" (EFO paragraph 4.45). The series divides the line by a rate that charges 90.78% of the standard-rate base at 25% from 2027-28 (see the share below). The importer weights each band by HMRC's 2024-25 liabilities over its rate, so the rate on the whole base rises from 19.35% to 23.68%. Receipts grow 22.1% into 2027-28 (£677.1 million to £826.9 million), and the base falls by (826.9 / 23.68%) / (677.1 / 19.35%) − 1 = −0.2319%. The importer reads the switch date and the rates from their parameter files, so the series and the formula read the same dates and rates.
In its policy Table 1.1, the OBR joins two costings as measure 56, under the head Betting: the 25% rate, and the move of liability to machine suppliers from April 2028. The Treasury nets off a behavioural response in its rate costing, with an elasticity of −0.95, a quarter of the stakes lost moving to Remote Gaming Duty, and general attrition. It estimates that moving liability to suppliers reduces non-compliance and brings payments forward (Budget 2026 policy costings, pages 67 and 68). Dividing the line by the rate that produced it keeps all of these in the base, as receipts over the rate does for every other duty. Taking the measure off the line would drop them, and the model's static rates restore none of them.
Bingo Duty. Parliament abolished the duty from 1 April 2026, and a zero rate leaves no base to divide out, so the importer keeps the base at its 2025-26 level from 2026-27 on: the weighted index stays at 1.0333 while the per-person series falls as population grows. Current-law receipts come to zero whatever the base, so the model leaves out the £0.19 million of 2026-27 receipts the OBR forecasts, which a zero rate cannot produce. A reform that charges Bingo Duty again charges the 2025-26 base in cash terms.
Gaming Duty. The parameters hold marginal bands, but the household formula multiplies losses by one constant effective rate. The base therefore grows with receipts, and any change in the effective rate that the OBR forecasts stays in the base.
Lottery Duty and Pool Betting Duty. One unchanged rate each, so the base grows with receipts.
The higher-stake share
MACHINE_GAMES_HIGHER_STAKE_SHAREin the importer holds the share of standard-rate takings from machines with a maximum charge above £1 or a maximum prize above £100: 90.78%. It equals the Gambling Commission's 2024-25 gaming machine yield in Category B, £2,289.8 million, over that in Categories B and C, £2,522.3 million (Industry Statistics, April 2025 to March 2026, sheet 4, cells K34 and L34, revised figures; workbook SHA-256a6ea23b5ddff2f3839ebec2a8cc0d9a0817e218f5bf10921e0172ecae768da58). Under the Categories of Gaming Machine Regulations 2007, regulation 5, a Category B machine falls outside Categories C and D, and the Commission gives Category C's limits as a £1 charge and a £100 prize. Category D enters neither side. Its money-prize machines charge at most 20p for at most £10 in cash, which puts them in the lower-rate class (Finance Act 2012, Schedule 24, paragraph 5(2)). Its other machines pay no cash prize, so their games fall outside the duty (paragraph 2(2)).The Commission's statistics cover the premises it licenses in Great Britain: arcades, betting shops, bingo halls and casinos. They leave out pubs, which may hold only Category C and D machines; members' and commercial clubs, which may also hold Category B3A or B4 machines; and Northern Ireland. HMRC's 2024-25 standard-rate liabilities, £604.7 million at 20%, give a UK base of £3,023.7 million, which exceeds the Commission's Category B and C yield by £501.4 million (16.6% of HMRC's base). Differences in definition and timing between gross gambling yield and dutiable net takings may account for part of that gap. Leaving out pubs' Category C and D machines, which never pay the higher rate, pushes the share up, though skill-with-prize machines there fall outside the categories. Leaving out clubs' taxable Category B4 machines pushes it down; legally operated Category B3A lottery machines pay no duty. If the whole gap stayed at 20%, the share would fall to 75.73% and the 2027-28 base index would rise by 3.13%; that figure shows the sensitivity and sets no bound. The Commission's provisional 2025-26 figures give 91.41%. The importer holds the 2024-25 share in every year, as it does the band weights.
Datasets without the higher-stake input
No dataset supplies
machine_games_standard_rate_higher_stake_net_takingsyet, and neither Microcosm'smainnor policyengine-uk-data's mentions it. Microcosm's Budget data list tracks the split as item 5. Until one does,machine_games_dutycharges the pre-Budget rates on the post-response base, so it falls short of Table 4.10 by 18.3% from 2027-28: the duty equals Table 4.10's line times 19.35% / 23.68%. Two constructed households, weighted 700 and 1,900, hold the 2024-25 national bases between them, and their weighted duty comes to:A dataset that sets the input to 90.78% of its standard-rate input closes the gap.
Where the base-year link comes from
October 2026's Table 4.10 starts in 2026-27, and the March 2025 tables have no betting and gaming breakdown, so the years before 2026-27 come from HMRC's UK Betting and Gaming Statistics, July 2026 tables:
Table_1_BG_receiptsrows 45 (2024-25) and 46 (2025-26), £ thousand. The local copy's SHA-256,3979df37c0611cce371f80950bacac6bc5e9dad499c726f6138f838c882914e8, matches the hashdocs/engineering/gambling-duties.mdalready cites for that file. The Machine Games Duty band weights come from the same file'sTable_2_MGDrow 20 (2024-25 liabilities by rate).The OBR figures come from the receipts workbook in the October 2026 detailed forecast tables zip (EFO page), SHA-256
d115705716d77b11c190385d41cb1924f30080c9331a8a386c04d4e65a368e95. The reduced test fixture's Table 4.10 worksheet and shared strings match that workbook's byte for byte.Approximations
Indices by year
The model compounds each committed
yoy_growthseries into an index and rounds it to five decimals. The per-person indices, with theons.populationindex over its 2024 level:A weighted input grows by their product, the base's index:
Expected change in gambling duty receipts
These figures come from a run on two constructed households, weighted 700 and 1,900, not the Enhanced FRS. Between them they hold the 2024-25 national bases that give HMRC's 2024-25 receipts at the model's rates, with General Betting split as Microcosm's national levels and Machine Games Duty by HMRC's band liabilities, and each figure sums the households' duty times their weight. Rows marked "input at 90.78%" set the higher-stake input to that share of the standard-rate input; rows marked "absent" leave it out. The
mainrows run an export oforigin/mainat2da212abc, and the "this PR" rows rundbba5aef5, whose series the head keeps value for value. Onmainthe inputs stay at their 2024-25 cash level while household weights grow with population, so receipts move with rate changes and population alone.With the input at 90.78%, the seven duties reproduce HMRC's 2025-26 receipts and then Table 4.10 in every year to 2031-32, apart from the 6 April overlaps above. In 2026-27 the total exceeds Table 4.10's £5,092.5 million by £4.6 million; from 2027-28 it matches to the £0.1 million. policyengine-uk-data's
mainimplements no mapping for the gambling inputs, and CI's aggregate impact report on the certified dataset shows no change in any reported year, 2025-26 to 2031-32.mainmainmainmain, input at 90.78%main, input absentmainmainmainmain, input at 90.78%Invariants
These hold for every input:
test_indices_are_positive_from_the_2024_base_year). The importer refuses a series whose six-decimal growth would round the model's five-decimal index to zero, and for any positive receipts, however small, every series it writes keeps that index above zero. A Hypothesis property over the importer checks this on 60 examples (test_a_written_series_keeps_every_index_positive);test_a_fall_that_rounds_the_index_to_zero_is_refusedpins a fall from £1,000bn to £0.01bn as the rate rises from 1% to 60%. The importer then compounds each finished series, earnings tail included, as the model does, through 2074, a year past the growth file's last entries, and refuses one that reaches zero (test_a_tail_that_rounds_the_index_to_zero_is_refused,test_the_index_check_reaches_the_end_of_the_growth_file,test_the_index_check_reads_the_value_in_force_each_january). That check reads the per-person series the importer writes: if population triples in 2028 and 2029, a Bingo Duty index that holds at 0.00002 falls to zero per person, and the importer refuses it (test_the_index_check_reads_the_per_head_series).test_base_growth_is_receipts_growth_over_rate_growth, 40 examples).test_machine_games_bases_reconcile_to_receipts_at_any_share, 60 examples). £100 of higher-stake takings at 20% and £80 at 25% pay the same £20, so flat receipts give a base index of 0.8 and £20 of duty.test_a_rise_that_behaviour_offsets_gives_a_base_index_of_0_8checks the index, andtest_a_rise_that_behaviour_offsets_leaves_the_duty_where_it_waschecks the model's duty.test_a_zero_share_grows_the_machine_games_base_with_receipts, 40 examples).ons.populationseries, ending in any year from 2025 to 2045, one plus a written series' growth, times one plus population growth, equals one plus the base's growth in every year to 2060, to the rounding of the six decimals written. The base grows by receipts over the rate in the forecast years and byaverage_earningsafter them, and holds flat while its rate is zero. The per-person index, compounded with the population index, therefore gives the base's index, and a second run changes nothing (test_per_head_series_compound_to_the_aggregate_index, 40 examples).test_a_rate_reform_moves_receipts_through_the_rate_alone, a Hypothesis property over the model).extend_single_year_dataset, their weighted duty gives HMRC's 2025-26 receipts and then Table 4.10 in every year to 2031-32 for all seven duties, apart from the 6 April overlaps (test_bases_that_give_hmrc_receipts_give_the_obr_forecast). Without the input, Machine Games Duty falls short by 18.3% from 2027-28 (test_without_the_higher_stake_input_the_duty_falls_short_of_table_4_10).extend_single_year_datasetto 2032 and policyengine-core's uprating after it (test_weighted_gambling_bases_follow_the_aggregate). Bingo Duty's weighted index holds at its 2025-26 level to 2039, and in every year to 2074 one plus its per-person growth, times one plus population growth, equals one (test_bingo_base_holds_flat_once_its_rate_is_zero).test_each_series_charges_the_rates_the_model_charges). The model's formulas decide which rate each input pays, so the test fails when a series wires a part to another parameter or weights it as another part.yoy_growthseries throughuprating_indices.yaml, and Core scales a situation input by the ratio of the declared index. The two agree within 1e-4 for all sixteen inputs in every year from 2024 to 2032, and Remote Gaming Duty's 2026 input equals its 2024 input times the base's growth over population growth (test_dataset_projection_matches_core_uprating).ons.population, reproduces the committed series (test_real_october_2026_gambling_series,test_committed_gambling_series_are_the_real_bases_per_head,test_october_2026_tables_reproduce_the_committed_series,test_real_receipts_workbooks_reproduce_committed_yaml_byte_for_byte). I recomputed the seven Machine Games Duty base growth values by hand from the original OBR, HMRC and Gambling Commission workbooks, without the importer's code, and every one matches; base times rate then reproduces Table 4.10 within £0.002 million in each year.Test plan
The head adds one commit to
d08fbb6f1, which changes a comment and the documentation, and CI runs the whole suite on it. I ran each file on its own atd08fbb6f1without survey data (HUGGING_FACE_TOKENandPOLICYENGINE_UK_DEFAULT_DATASETunset), under a 4 GB memory cap and a 1,500-second time cap.policyengine_uk/tests/test_gambling_duty_base_projection.pymainexport (2da212abc)mainhas noMACHINE_GAMES_HIGHER_STAKE_SHAREpolicyengine_uk/tests/test_import_obr_forecasts.pycode_health/test_uprating_declarations.py,test_input_variable_definitions.py,test_variables.py,test_test_module_caches_released.py,test_cached_arrays_not_written_in_place.pycode_health/test_changelog_fragments.pytest_population_vintage.py,test_projection_horizon.py,test_parameter_descriptions.pytest_machine_games_higher_stake.py,test_gambling_schedules.py,test_gambling_additional_schedules.py.github/check_changelog_fragments.py --base origin/main --head HEADtest_changelog_fragments.pyran with towncrier 26.9.0 importable, since the shared environment lacks it. Lint passes on all 20 changed Python files: ruff 0.17.2format --checkandcheck,check --select F811,F821 policyengine_uk, andgit diff --check.I ran each mutant in a scratch copy of
d08fbb6f1under a 2 GB memory cap and committed none. For each I rantest_import_obr_forecasts.pytwice, against the committed series and after regeneratingyoy_growth.yamlwith the mutant importer, and ran the 17 projection tests that read the series against the regenerated file.All four fail
test_weighted_gambling_bases_follow_the_aggregate,test_gambling_series_are_written_per_head,test_committed_gambling_series_are_the_real_bases_per_headandtest_per_head_series_compound_to_the_aggregate_index.The importer's receipts tests for SDLT and business rates keep their expected values. The gambling tests now read the series under
per_capita, and the importer test fixture holds them there, with anons.populationseries that changes in 2026 and 2030.make format(ruff 0.17.2 format and check on every changed Python file)changelog.d/2738.fixed.mdOverlap and merge order
origin/mainatda31e8698, which holds Apply Housing Benefit accommodation disregards from their start date #2234, Project the minimum wage rates by the OBR's national living wage forecast #2700, Project household energy spending with retail energy price indices, not CPI #2727, Charge higher-stake machines at the Machine Games Duty higher rate from April 2027 #2731 and No Council Tax Rebate in Northern Ireland; add its £200 Alternative Fuel Payment #2735. The economic assumptionsREADME.mdkeeps both Project the minimum wage rates by the OBR's national living wage forecast #2700's national living wage paragraph and this PR's gambling paragraph.origin/mainat2da212abcadds Autumn Budget 2026 measures in current law #2719, which also editsyoy_growth.yaml, in a road fuel comment;git merge-treemerges it with this head without conflict.fix-2596-excise-quantity-indices) stacks on this branch and writes its alcohol and tobacco clearance series per head underper_capitatoo.check_index,population_growth,growth_in_effectandper_head_growthkeep Alcohol and tobacco quantity inputs are not uprated, so later years charge duty on base-year volumes #2596's names and signatures.per_head_growthhere also takes a line with rates or with its own outturn, andReceiptsSeriesSpec.per_headholds for every series underper_capita, Alcohol and tobacco quantity inputs are not uprated, so later years charge duty on base-year volumes #2596's clearance specs included. Alcohol and tobacco quantity inputs are not uprated, so later years charge duty on base-year volumes #2596's branch already mergesd08fbb6f1.fix-2721-import-nlw-forecast) stacks on this branch too.derive-index-horizons) merges with this head without conflict, and on that mergetest_gambling_duty_base_projection.pyandtest_projection_horizon.pypass (23 and 14 tests, on policyengine-core 3.34.1).Reproducer
Reproducer: policyengine_uk/tests/test_gambling_duty_base_projection.py::test_weighted_gambling_bases_follow_the_aggregate; policyengine_uk/tests/test_gambling_duty_base_projection.py::test_bases_that_give_hmrc_receipts_give_the_obr_forecast
axiom: n/a: this projects a data input from an OBR forecast and changes no rule.
🤖 Generated with Claude Code