diff --git a/data/uk/ab2026_measures.json b/data/uk/ab2026_measures.json new file mode 100644 index 000000000..31753bb1a --- /dev/null +++ b/data/uk/ab2026_measures.json @@ -0,0 +1,2305 @@ +{ + "schema_version": 1, + "fiscal_event": "autumn_budget_2026", + "event_date": "2026-10-28", + "chancellor": "John Healey", + "administration": "Burnham government (from 2026-07-20)", + "registry_rule": "One entry per measure ANNOUNCED at Autumn Budget 2026: every HM Treasury Table 6.1 line (including the lines a household model cannot touch), the one Table 6.2 financial transaction with no Table 6.1 line, and the packages producers score. It is the port's key space (#230): every staged claim's measure_key is a key from this file, null with conditions.proposed_measure_key (rule 2), or for Table 6.4 recostings the earlier event's key named in conditions.recosting_of; and every measure carries a computability verdict against the engine the Budget-day runs used. It stages NO value claims; values live in the harvest under their producers (sources/harvest-uk-ab2026-2026-10-29/).", + "measure_key_rule": "ab2026__, written out per Table 6.1 line in pipeline/ab2026_measure_keys.py so a reworded title cannot move a key; ab2026__package_ for packages; ab2026_option__ for options costed by others. The pre-event registry (data/uk/budget_2026_measures.json, #96) keeps its own keys; pre_event_outcomes records what became of each.", + "verification_note": "Every pe_reform_delta and parameter_legs path was RESOLVED against an installed policyengine-uk 2.151.0 on 2026-10-29, and engine_baseline_2026 records what that engine returns for 2026-06-01. Every not_expressible verdict carries a name_search COMPUTED over the pinned engine's parameter tree (4292 leaves) and variable list (1271), never typed. Mechanisms named in a verdict were read from the engine's source at the pin or from the dashboard's source at PolicyEngine/uk-autumn-budget-dashboard-2026@1eca3182.", + "engine_pin": { + "policyengine_uk": "2.151.0", + "resolved_on": "2026-10-29", + "pin_meaning": "The pin follows the Budget-day runs: every published receipt of the UK Autumn Budget dashboard records policyengine 6.11.1 with certified_for_model_version 2.151.0, and those runs are AB2026's PolicyEngine counterparts (tranche 3). It is NOT the certified populace pair data/uk/certified_pairs.json holds (policyengine 6.11.0, policyengine-uk 2.132.6); tranche 3 adds a 6.11.1 pair record before any counterpart is ingested.", + "budget_day_runs": { + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "computability": { + "expressible": "every leg is a resolvable parameter at the pin, or the measure was executed by a receipt-pinned dashboard modifier (construction executed_by_dashboard)", + "partial": "some legs resolve; the missing ones are named in `missing`", + "not_expressible": "the engine has no representation; `why` names the gap, `name_search` records the computed search, `action_link` says where it goes" + }, + "construction_vocabulary": { + "executed_by_dashboard": "the measure ran on Budget day as a dashboard reform; pe_modifier names the module, function, arguments, the engine variables it replaces or reads, its parameter legs, and the published receipt (path, file sha256, reform sha256, run identity)", + "delta_on_current_law": "pe_reform_delta applied to current law at the pin", + "reversal_on_certified_world": "the measure is already in the engine's current law; a counterpart executes the pre-measure world as baseline (#56 convention)", + "package_of_registry_measures": "a composition of registry measures (`package_of`, a list of keys, as in AB2025); a PolicyEngine number covers the expressible legs, stated as constructed" + }, + "exogenous_levers_note": "The engine carries exogenous incidence levers that spread a £ amount supplied as an input: gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'); gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'); gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'); gov.contrib.policyengine.budget.nhs ('Increase in NHS spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'); gov.contrib.policyengine.budget.education ('Increase in education, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'); gov.contrib.policyengine.budget.high_income_incident_tax_change ('Tax rise for high income earners (functioning proportional to income over £100,000)'). Feeding a Table 6.1 figure through one restates HM Treasury's costing rather than estimating it, so no lever makes a line expressible here.", + "action_link_rule": "Every not_expressible measure links to #230, which lists the upstream development items; the bus fare cap's partial verdict links to #106, the bus gap record.", + "pre_event_outcomes": { + "ab2026__property_income_tax_rate_rise": "an AB2025 measure (ab2025__property_income_separate_rates: 22%/42%/47% from 6 April 2027); Table 6.4 line 6 recosts it, and Table 6.1 line 61 raises those rates by a further 2ppts to 24%/44%/49% (ab2026__property_income_rates_plus_2pp)", + "ab2026__bank_profit_surcharge_increase": "announced: Table 6.1 line 55 (ab2026__bank_surcharge_6pc_temporary), temporary, 3% to 6% for 15 months", + "ab2026__business_rates_warehouse_up_pub_down": "partly: Table 6.1 line 12 raises pubs' relief (ab2026__business_rates_pubs_relief_35pc); no warehouse surcharge line in Table 6.1 or 6.4", + "ab2026__high_value_council_tax_surcharge": "an AB2025 measure; Table 6.1 line 93 changes its reliefs (ab2026__hvcts_deferrals_discounts_exemptions) and Table 6.4 line 11 recosts it", + "ab2026__cgt_align_with_income_tax_rates": "not in Table 6.1 or 6.4", + "ab2026__cgt_remove_uplift_on_death": "not in Table 6.1 or 6.4", + "ab2026__pension_tax_free_lump_sum_restriction": "not in Table 6.1 or 6.4", + "ab2026__ni_extended_to_investment_property_pension_income": "not in Table 6.1 or 6.4", + "ab2026__personal_allowance_freeze_extension": "not in Table 6.1 or 6.4", + "ab2026__wealth_tax_2pc_above_10m": "not in Table 6.1 or 6.4", + "ab2026__council_tax_and_sdlt_to_land_value_tax": "not in Table 6.1 or 6.4", + "ab2026__online_sales_levy": "not in Table 6.1 or 6.4 (line 46, online marketplace liability, is a VAT collection measure, not a levy)", + "ab2026__vape_duty_increase": "not in Table 6.1 or 6.4 (line 57 removes business rates reliefs for vape shops)", + "ab2026__ated_increase_and_sdlt_envelope_close": "not in Table 6.1 or 6.4" + }, + "triage": { + "expressible": 11, + "partial": 4, + "not_expressible": 89, + "executed_by_dashboard": 7, + "policyengine_uk_development_item": 13, + "out_of_model_scope": 76, + "announced": 104 + }, + "measures": [ + { + "measure_key": "ab2026__household_energy_payment_100_bands_a_to_d", + "title": "Household Energy Payment: £100 council tax rebate for bands A-D from January 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 1 (Spend); exchequer impact GBP m by FY: {'2026-27': '-2625', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 1, + "table_61_head": "Spend", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "household_energy_payment", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "household_energy_payment_2026", + "pe_reform_delta": null, + "pe_modifier": { + "module": "src/uk_budget_data/budget_measures/household_energy_payment_2026.py", + "function": "household_energy_payment_2026", + "arguments": { + "amount": 100, + "year": 2026, + "country": "ENGLAND", + "bands": [ + "A", + "B", + "C", + "D" + ] + }, + "replaced_variables": [ + "ebr_council_tax_rebate" + ], + "reads_variables": [ + "council_tax_band", + "country" + ], + "parameter_legs": [], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/household_energy_payment_2026/101a07dc7238a10e/receipt.json", + "receipt_file_sha256": "0fb0414b45435799fb50afa9d79c2c7af8998de2ee406d8da6c1561bd46298d4", + "reform_sha256": "ceede8365a9462ac389dc5210882ea23850babfed6e5bff8cf264e774cd616ad", + "reform_binding": "code_revision", + "generated_at": "2026-10-28T17:07:18.666809+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.treasury.energy_bills_rebate.council_tax_rebate.amount": 0 + }, + "note": "The modifier adds £100 in 2026-27 to the native ebr_council_tax_rebate formula for bands A to D in England; the native rebate's own parameter is 0 at the pin, so the payment is the whole effect. Scotland, Wales and Northern Ireland get a Barnett share instead, not modelled." + }, + { + "measure_key": "ab2026__electricity_vat_zero_rate_to_july_2027", + "title": "Support for Energy Bills: Cut VAT on domestic electricity from 5% to 0% from 1 October 2026 to 1 July 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 2 (Tax); exchequer impact GBP m by FY: {'2026-27': '-755', '2027-28': '-305', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 2, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "vat", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "domestic_electricity_zero_vat", + "pe_reform_delta": null, + "pe_modifier": { + "module": "src/uk_budget_data/budget_measures/zero_vat_on_domestic_electricity.py", + "function": "zero_vat_on_domestic_electricity", + "arguments": { + "rate_change_2026": -0.028342979605206865, + "rate_change_2027": -0.011149919361563782, + "geography": "GB", + "geography_2027": "UK" + }, + "replaced_variables": [], + "reads_variables": [ + "electricity_consumption" + ], + "parameter_legs": [], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/domestic_electricity_zero_vat/2d9c65726915303e/receipt.json", + "receipt_file_sha256": "e464b000c2af360654462efd05180d0fed272728911dc7292d932b99117246ca", + "reform_sha256": "5ee4d8844432367d5557df38ee89e23b206e2c1236bce2451b0336ada02b58b6", + "reform_binding": "code_revision", + "generated_at": "2026-10-28T17:08:09.754595+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.hmrc.vat.reduced_rate": 0.05 + }, + "note": "The modifier lowers the VAT rate on electricity_consumption by 5 points times the share of each fiscal year's use that falls in the zero-rated period (about 57% of 2026-27 in Great Britain; about 22% of 2027-28 across the UK). Electricity only, not gas." + }, + { + "measure_key": "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "title": "Fuel Duty: Extend the temporary 5p-per-litre duty cut and defer the planned Retail Prices Index (RPI) increase to 1 July 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 3 (Tax); exchequer impact GBP m by FY: {'2026-27': '-575', '2027-28': '-780', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 3, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "fuel_duty", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "fuel_duty_rise_deferral", + "pe_reform_delta": null, + "pe_modifier": { + "module": "src/uk_budget_data/reforms.py (_create_fuel_duty_rise_deferral) + src/uk_budget_data/budget_measures/pump_vat_on_fuel_duty_deferral.py", + "function": "fuel_duty_deferral_rates + pump_vat_on_fuel_duty_deferral", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [ + "petrol_spending", + "diesel_spending" + ], + "parameter_legs": [ + "gov.hmrc.fuel_duty.petrol_and_diesel" + ], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/fuel_duty_rise_deferral/e077f8d4b70440c8/receipt.json", + "receipt_file_sha256": "2f547d91b455b7e84cf8495cbfd0475ca626d7f1b4a95605de869cf61d52a30f", + "reform_sha256": "1dae41af83e4402f6b3af756d7dcdcc1dd525883dd32c3c8b9050456f52310f1", + "reform_binding": "code_revision", + "generated_at": "2026-10-28T17:06:46.194418+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.hmrc.fuel_duty.petrol_and_diesel": 0.539527397260274 + }, + "note": "Day-weighted annual fuel duty rates (fuel_duty_deferral_rates), plus the VAT on the lower pump price through a modifier on petrol and diesel spending." + }, + { + "measure_key": "ab2026__carers_allowance_earnings_taper", + "title": "Carer’s Allowance: Introduce a taper on earnings above the Weekly Earning Limit within 2030-31", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 7 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '-40', '2031-32': '-80'}", + "table_61_line": 7, + "table_61_head": "Spend", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "carers_allowance", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "carers_allowance_earnings_taper", + "pe_reform_delta": null, + "pe_modifier": { + "module": "src/uk_budget_data/budget_measures/carers_allowance_earnings_taper.py", + "function": "carers_allowance_earnings_taper", + "arguments": { + "start_year": 2030, + "first_year_share": 0.5, + "taper_rate": 1.0 + }, + "replaced_variables": [ + "carers_allowance_pre_overlap" + ], + "reads_variables": [ + "carers_allowance_earnings", + "care_hours", + "would_claim_carers_allowance", + "carers_allowance_reported" + ], + "parameter_legs": [], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/carers_allowance_earnings_taper/9458905cefca3e88/receipt.json", + "receipt_file_sha256": "0852c433f5f76cd2e7b27f1bcf6721610d8e36e80b5f416727901e8125d273f6", + "reform_sha256": "f45943c11aed787c570af3cc82d11af9cf181ce0877b5cb9350a9bc1e2f84dc8", + "reform_binding": "code_revision", + "generated_at": "2026-10-28T17:08:00.734195+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.dwp.carers_allowance.earnings_limit": 204, + "gov.dwp.carers_allowance.min_hours": 35, + "gov.dwp.carers_allowance.min_age": 16 + }, + "note": "A 100% taper above the Weekly Earnings Limit (16 hours at the National Living Wage) in England and Wales, half of 2030-31 counted because the start date within that year is not set." + }, + { + "measure_key": "ab2026__trading_allowance_3000", + "title": "Trading Allowance: Increase the Income Tax Trading Allowance to £3,000 from £1,000 from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 15 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-225', '2029-30': '-165', '2030-31': '-175', '2031-32': '-180'}", + "table_61_line": 15, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "income_tax", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "trading_allowance_raise", + "pe_reform_delta": { + "gov.hmrc.income_tax.allowances.trading_allowance": { + "2027": 3000, + "2028": 3000, + "2029": 3000, + "2030": 3000, + "2031": 3000 + } + }, + "delta_kind": "absolute_value_by_year", + "pe_modifier": { + "module": "src/uk_budget_data/reforms.py", + "function": "_create_trading_allowance_raise", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [], + "parameter_legs": [ + "gov.hmrc.income_tax.allowances.trading_allowance" + ], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/trading_allowance_raise/eddde823a65b7be4/receipt.json", + "receipt_file_sha256": "59db02ec313c62f8c194580c806e782431f67a0f3b08df34adb91445a1eb9221", + "reform_sha256": "cdcc8b19d5234afe31ae857db16a8f2d6a18578a1d7da1c890b3c5f21832c268", + "reform_binding": "content", + "generated_at": "2026-10-28T17:07:22.701184+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.hmrc.income_tax.allowances.trading_allowance": 1000 + }, + "note": "The data hold profits, not gross trading receipts, so the engine relieves a profit up to £3,000 in full and gives no relief above it (the dashboard's own description)." + }, + { + "measure_key": "ab2026__pension_tax_allowance", + "title": "Pension Tax Allowance: Remove the income tax liability for pensioners with total income up to the value of the new State Pension from 6 April 2027 until 5 April 2030", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 52 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-45', '2028-29': '-90', '2029-30': '-150', '2030-31': '50', '2031-32': '-15'}", + "table_61_line": 52, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "income_tax", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "state_pension_income_tax_protection", + "pe_reform_delta": null, + "pe_modifier": { + "module": "src/uk_budget_data/budget_measures/pension_tax_allowance.py", + "function": "pension_tax_allowance", + "arguments": { + "first_year": 2027, + "last_year": 2029, + "basic_rate": 0.2, + "taper_divisor": 3, + "weekly_rounding": 0.05 + }, + "replaced_variables": [ + "income_tax", + "uc_income_tax_on_earnings", + "uc_income_tax_on_trade" + ], + "reads_variables": [ + "total_income", + "is_SP_age" + ], + "parameter_legs": [], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/state_pension_income_tax_protection/1bfeed3c27a3c9b9/receipt.json", + "receipt_file_sha256": "4f20f3c69f9ddb3b7894d3281e9416774a1e12d747de1e573629570871b3e960", + "reform_sha256": "65a95c811e5d6c6dd0b54255dd20ab1439c542994f1918778b93769c14199524", + "reform_binding": "code_revision", + "generated_at": "2026-10-28T17:08:11.348926+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.dwp.state_pension.new_state_pension.amount": 241.3, + "gov.hmrc.income_tax.allowances.personal_allowance.amount": 12570 + }, + "note": "A non-refundable income tax reduction for people over State Pension age: 20% of the full new State Pension above the personal allowance, withdrawn £1 for every £3 of total income above the full new State Pension, 2027-28 to 2029-30." + }, + { + "measure_key": "ab2026__property_income_rates_plus_2pp", + "title": "Property Income: Increase tax rates on property income by 2ppts at the basic, higher and additional rate from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 61 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '35', '2028-29': '575', '2029-30': '435', '2030-31': '445', '2031-32': '455'}", + "table_61_line": 61, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "income_tax", + "computability": "expressible", + "construction": "executed_by_dashboard", + "dashboard_measure_id": "property_income_rates_up", + "pe_reform_delta": { + "gov.hmrc.income_tax.rates.property.basic": { + "2027": 0.24, + "2028": 0.24, + "2029": 0.24, + "2030": 0.24, + "2031": 0.24 + }, + "gov.hmrc.income_tax.rates.property.higher": { + "2027": 0.44, + "2028": 0.44, + "2029": 0.44, + "2030": 0.44, + "2031": 0.44 + }, + "gov.hmrc.income_tax.rates.property.additional": { + "2027": 0.49, + "2028": 0.49, + "2029": 0.49, + "2030": 0.49, + "2031": 0.49 + } + }, + "delta_kind": "absolute_value_by_year", + "pe_modifier": { + "module": "src/uk_budget_data/reforms.py", + "function": "property_income_rates_up", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [], + "parameter_legs": [ + "gov.hmrc.income_tax.rates.property.basic", + "gov.hmrc.income_tax.rates.property.higher", + "gov.hmrc.income_tax.rates.property.additional" + ], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/property_income_rates_up/7bf77b35e33233e0/receipt.json", + "receipt_file_sha256": "20df7073b4481a5f5b0073c6949e0d0c2894adac88d6e70778946456b2fe899d", + "reform_sha256": "d46bf10b10b298db4059d7b6a2dccac7997e09afec0a88542c2059ea70646aa0", + "reform_binding": "content", + "generated_at": "2026-10-28T17:10:45.376537+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "engine_baseline_2026": { + "gov.hmrc.income_tax.rates.property.basic": 0.2, + "gov.hmrc.income_tax.rates.property.higher": 0.4, + "gov.hmrc.income_tax.rates.property.additional": 0.45 + }, + "note": "Current law's property rates plus 2 points from 2027 (pe_reform_delta computed at the pin from each year's 6 April value). Scottish taxpayers' property income follows Scottish rates; finance cost relief follows the property basic rate UK-wide." + }, + { + "measure_key": "ab2026__savings_income_rates_plus_2pp", + "title": "Savings Income: Increase tax rates on savings income by 2ppts at the basic, higher and additional rate from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 62 (Tax); exchequer impact GBP m by FY: {'2026-27': '15', '2027-28': '125', '2028-29': '555', '2029-30': '520', '2030-31': '555', '2031-32': '590'}", + "table_61_line": 62, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "income_tax", + "computability": "expressible", + "construction": "delta_on_current_law", + "dashboard_registered_id": "savings_income_rates_up", + "pe_reform_delta": { + "gov.hmrc.income_tax.rates.savings.basic": { + "2027": 0.24, + "2028": 0.24, + "2029": 0.24, + "2030": 0.24, + "2031": 0.24 + }, + "gov.hmrc.income_tax.rates.savings.higher": { + "2027": 0.44, + "2028": 0.44, + "2029": 0.44, + "2030": 0.44, + "2031": 0.44 + }, + "gov.hmrc.income_tax.rates.savings.additional": { + "2027": 0.49, + "2028": 0.49, + "2029": 0.49, + "2030": 0.49, + "2031": 0.49 + } + }, + "delta_kind": "absolute_value_by_year", + "engine_baseline_2026": { + "gov.hmrc.income_tax.rates.savings.basic": 0.2, + "gov.hmrc.income_tax.rates.savings.higher": 0.4, + "gov.hmrc.income_tax.rates.savings.additional": 0.45 + }, + "note": "Registered by the dashboard (dashboard_registered_id) but not in its published release, and not run on Budget day, so there is no published receipt to cite; tranche 3 computes it from this delta." + }, + { + "measure_key": "ab2026__badr_lifetime_limit_500000", + "title": "Business Asset Disposal Relief (BADR): Reduce the lifetime limit to £500,000 from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 60 (Tax); exchequer impact GBP m by FY: {'2026-27': '5', '2027-28': '60', '2028-29': '180', '2029-30': '255', '2030-31': '280', '2031-32': '305'}", + "table_61_line": 60, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "capital_gains_tax", + "computability": "expressible", + "construction": "delta_on_current_law", + "pe_reform_delta": { + "gov.hmrc.cgt.badr.lifetime_limit": { + "2027": 500000, + "2028": 500000, + "2029": 500000, + "2030": 500000, + "2031": 500000 + } + }, + "delta_kind": "absolute_value_by_year", + "engine_baseline_2026": { + "gov.hmrc.cgt.badr.lifetime_limit": 1000000 + }, + "head_variables": [ + "capital_gains_tax", + "capital_gains_badr" + ], + "note": "capital_gains_tax reads gov.hmrc.cgt.badr.lifetime_limit at the pin (variables/gov/hmrc/capital_gains_tax/capital_gains_tax.py). capital_gains_badr is an input, and capital_gains_tax applies the lifetime limit to one year's qualifying gains: the variable's documentation says it does so 'as if none of the limit had been used before', so a lower limit binds only on a year's gains above it, not on gains already relieved in earlier years. Not run on Budget day." + }, + { + "measure_key": "ab2026__bus_fare_cap_2_england_outside_london_2027", + "title": "Bus Fares: Cap single bus fares at £2 in England outside London for one year from 1 January 2027, funded by reprioritising DESNZ budgets", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 4 (Spend); exchequer impact GBP m by FY: {'2026-27': '-50', '2027-28': '-180', '2028-29': '65', '2029-30': '170', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 4, + "table_61_head": "Spend", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "bus_fares", + "computability": "partial", + "intended_construction": "reversal_on_certified_world", + "pe_reform_delta": null, + "engine_baseline_2026": { + "gov.dft.bus.fares.cap": 3 + }, + "engine_parameter_history": { + "gov.dft.bus.fares.cap": { + "2023-01-01": 2, + "2025-01-01": 3, + "2027-01-01": 2, + "2028-01-01": "inf" + } + }, + "missing": "The pre-measure 2027 cap. The engine already carries the measure: gov.dft.bus.fares.cap is £2 from 1 January 2027 to 1 January 2028 (its metadata cites 'DfT two-pound bus fares from January to December 2027', https://www.gov.uk/government/speeches/2-bus-fares-from-january-2027). A counterpart reverses it, which needs the cap 2027 would have had without the measure; the parameter has one upstream revision (policyengine-uk c8d1f89a9d, 5 October 2026) and records no pre-announcement path. Supersedes data/uk/bus_fares_gap.json's not_expressible verdict at 2.89.2, which predates the bus model.", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/106" + }, + { + "measure_key": "ab2026__mileage_allowance_payments_55p", + "title": "Mileage Rates: Increase the tax-free and tax-deductible car and van rates to 55p for the first 10,000 business miles from 6 April 2026 and the higher mileage rate to 35p from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 5 (Tax); exchequer impact GBP m by FY: {'2026-27': '-30', '2027-28': '-200', '2028-29': '-220', '2029-30': '-225', '2030-31': '-235', '2031-32': '-245'}", + "table_61_line": 5, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "income_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No business mileage or mileage allowance payments: the approved rates are a tax-free amount per business mile, and the search finds no mileage in the engine.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /mileage|business_travel|approved_mileage/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: business mileage and approved mileage allowance payments for employees' own cars and vans", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__parental_allowance_fathers_partners_adopters", + "title": "Parental Pay: Establish a Parental Allowance for fathers, partners and adopters in Great Britain from April 2029", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 6 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '0', '2029-30': '-70', '2030-31': '-70', '2031-32': '-70'}", + "table_61_line": 6, + "table_61_head": "Spend", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "parental_pay", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A new benefit with no parameter or variable at the pin.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /parental_allowance|paternity|parental_leave/. Parameters: 0 node(s) []. Variables: 2 ['statutory_paternity_pay', 'tax_free_childcare_on_shared_parental_leave']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: a Parental Allowance for fathers, partners and adopters (statutory_paternity_pay is the nearest variable)", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": { + "variable": "statutory_paternity_pay", + "why_not": "an existing statutory payment; the new Parental Allowance is a separate benefit with its own rules, none of which the engine carries" + } + }, + { + "measure_key": "ab2026__uc_surplus_earnings_threshold_2500_extended", + "title": "Universal Credit: Extend the £2,500 surplus earnings threshold for one year from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 8 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-140', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 8, + "table_61_head": "Spend", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "universal_credit", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No surplus earnings rule: the search finds no parameter or variable for it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /surplus/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: Universal Credit surplus earnings carried between assessment periods", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__cash_isa_limit_held_at_20000", + "title": "Cash ISAs: Maintain the cash ISA limit at £20,000 from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 11 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-5', '2028-29': '-20', '2029-30': '-35', '2030-31': '-50', '2031-32': '-70'}", + "table_61_line": 11, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "savings", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No ISA subscription or subscription limit: the engine holds ISA balances and interest, not subscriptions, so a limit has nothing to bind.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /(^|[._])isa([._]|$)|individual_savings|subscri/. Parameters: 2 node(s) ['gov.hmrc.isa.lifetime.charge_free_age', 'gov.hmrc.isa.lifetime.withdrawal_charge']. Variables: 7 ['cash_isa', 'has_lifetime_isa', 'household_lifetime_isa_balance', 'individual_savings_account_interest_income', 'lifetime_isa_balance', 'lifetime_isa_countable_capital']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: ISA subscriptions, a subscription limit, and Lifetime and first-time-buyer ISA withdrawals", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": { + "variable": "cash_isa", + "why_not": "a holding, not an annual subscription" + } + }, + { + "measure_key": "ab2026__founders_relief_cgt", + "title": "Founders' Relief: Introduce a new CGT relief for qualifying founders of high-growth, innovative companies from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 26 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-260', '2028-29': '-180', '2029-30': '-260', '2030-31': '-285', '2031-32': '-300'}", + "table_61_line": 26, + "table_61_head": "Tax", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "capital_gains_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No founders' gains: the engine's relief-specific gains variable is capital_gains_badr (Business Asset Disposal Relief), and nothing identifies qualifying founders of high-growth companies.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /founder|capital_gains_badr|investors_relief/. Parameters: 0 node(s) []. Variables: 3 ['capital_gains_badr', 'capital_gains_badr_behavioural_response', 'capital_gains_badr_elasticity']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: capital gains by relief (founders' and other business reliefs beyond BADR)", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__first_time_buyer_isa", + "title": "First Time Buyer ISA: Introduce a new ISA for first-time buyers, replacing the Lifetime ISA for new savers from 6 April 2029", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 38 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '0', '2029-30': '110', '2030-31': '110', '2031-32': '235'}", + "table_61_line": 38, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Housing", + "program": "savings", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No first-time-buyer ISA, and no ISA subscriptions to move into one.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /first_time|(^|[._])isa([._]|$)/. Parameters: 40 node(s) ['gov.hmrc.isa.lifetime.charge_free_age', 'gov.hmrc.isa.lifetime.withdrawal_charge', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[0].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[0].amount', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[1].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[1].amount']. Variables: 6 ['cash_isa', 'has_lifetime_isa', 'household_lifetime_isa_balance', 'lifetime_isa_balance', 'lifetime_isa_countable_capital', 'stocks_and_shares_isa']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: ISA subscriptions, a subscription limit, and Lifetime and first-time-buyer ISA withdrawals", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__lifetime_isa_withdrawal_charge_20pc_above_cap", + "title": "Lifetime ISA: Reduce the withdrawal charge from 25% to 20% for first-time buyers purchasing properties above the £450,000 price cap from 29 October 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 39 (Spend); exchequer impact GBP m by FY: {'2026-27': '-15', '2027-28': '-20', '2028-29': '-20', '2029-30': '-25', '2030-31': '-25', '2031-32': '-25'}", + "table_61_line": 39, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Housing", + "program": "savings", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine's withdrawal charge (gov.hmrc.isa.lifetime.withdrawal_charge, 0.25 at the pin) is read only by lifetime_isa_countable_capital, the means-test value of a Lifetime ISA. The engine has no withdrawal or home purchase, so it cannot apply a lower charge to first-time buyers above the £450,000 cap; lowering the parameter would instead revalue every holder's countable capital.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /withdrawal_charge|first_time|home_purchase/. Parameters: 39 node(s) ['gov.hmrc.isa.lifetime.withdrawal_charge', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[0].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[0].amount', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[1].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[1].amount', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[2].threshold']. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: ISA subscriptions, a subscription limit, and Lifetime and first-time-buyer ISA withdrawals", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": { + "variable": "lifetime_isa_countable_capital", + "why_not": "applies the charge to a holder's balance for means tests; the measure changes the charge on one kind of withdrawal" + } + }, + { + "measure_key": "ab2026__pension_death_benefits_two_year_rule_removed", + "title": "Pensions Tax: Remove the two-year rule for taxation of pension and lump sum death benefits from 28 October 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 53 (Tax); exchequer impact GBP m by FY: {'2026-27': '-5', '2027-28': '-15', '2028-29': '-15', '2029-30': '-15', '2030-31': '-15', '2031-32': '-15'}", + "table_61_line": 53, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "income_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The measure changes when pension and lump sum death benefits are taxed after a member dies (the two-year rule). The engine has no death event; its one death-benefit variable, pension_annual_allowance_taxable_lump_sum_death_benefits, is an input with no formula and no rule about timing after a death.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /death|bereave|lump_sum/. Parameters: 0 node(s) []. Variables: 2 ['lump_sum_income', 'pension_annual_allowance_taxable_lump_sum_death_benefits']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: estates, death benefits and their income tax treatment", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__vat_5pc_family_days_out_summer_2026", + "title": "Great British Summer Savings Scheme: Reduce VAT to 5% on family days out from 25 June 2026 to 1 September 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 66 (Tax); exchequer impact GBP m by FY: {'2026-27': '-310', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 66, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced breathing space measures and associated funding", + "program": "vat", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine's consumption variables are by spending category (e.g. recreation_consumption); none isolates admissions to family days out, the base of this reduced rate.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /recreation|attraction|admission|day_out/. Parameters: 3 node(s) ['household.consumption.carbon.emissions.recreation', 'household.consumption.carbon.intensity.recreation_consumption', 'household.consumption.total_by_category.recreation_consumption']. Variables: 1 ['recreation_consumption']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: consumption detailed enough to separate admissions to attractions and days out", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": { + "variable": "recreation_consumption", + "why_not": "a whole spending category; the measure covers only part of it" + } + }, + { + "measure_key": "ab2026__free_bus_travel_children_august_2026", + "title": "Bus Travel: Fund free bus travel for children aged 5-15 in England from 1 August 2026 until 31 August 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 67 (Spend); exchequer impact GBP m by FY: {'2026-27': '-145', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 67, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced breathing space measures and associated funding", + "program": "bus_fares", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Free travel enters the bus model only as bus_pass_eligible, a dataset input whose documentation says it 'is not a pass-eligibility calculator'; no rule gives free travel to children aged 5 to 15, and the measure runs for one month (August 2026).", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /bus_fare|fare_allocation|bus_pass|concession/. Parameters: 19 node(s) ['gov.dft.bus.fare_allocation_weight_by_age[0].threshold', 'gov.dft.bus.fare_allocation_weight_by_age[0].amount', 'gov.dft.bus.fare_allocation_weight_by_age[1].threshold', 'gov.dft.bus.fare_allocation_weight_by_age[1].amount', 'gov.dft.bus.fare_allocation_weight_by_age[2].threshold', 'gov.dft.bus.fare_allocation_weight_by_age[2].amount']. Variables: 5 ['bus_fare_spending', 'bus_fare_spending_reported', 'bus_pass_eligible', 'household_bus_fare_age_weight', 'person_bus_fare_spending']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: a free-fare rule for children by age and month within the bus fare model", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__student_loan_interest_cap_6pc_plan_2_and_3", + "title": "Student Loans: Cap interest rates for Plan 2 and Plan 3 student loans at 6% from 1 September 2026 to 31 August 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 83 (Spend); exchequer impact GBP m by FY: {'2026-27': '-230', '2027-28': '-170', '2028-29': '-10', '2029-30': '-10', '2030-31': '-5', '2031-32': '-15'}", + "table_61_line": 83, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Priority Public Services Funding", + "program": "student_loans", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No interest cap: plan_2_interest_rate is RPI plus up to gov.hmrc.student_loans.interest_rates.plan_2.additional_rate (3%), and postgraduate_interest_rate (Plan 3) is RPI plus postgraduate_additional_rate (3%); neither formula has a ceiling.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /student_loan.*interest|interest_rates\\.plan_2|postgraduate_additional_rate/. Parameters: 4 node(s) ['gov.hmrc.student_loans.interest_rates.plan_1.boe_margin', 'gov.hmrc.student_loans.interest_rates.plan_2.additional_rate', 'gov.hmrc.student_loans.interest_rates.plan_2.upper_threshold', 'gov.hmrc.student_loans.interest_rates.postgraduate_additional_rate']. Variables: 1 ['student_loan_interest_rate']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: a cap on Plan 2 and postgraduate (Plan 3) student loan interest", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__company_car_tax_rates_2030_31", + "title": "Company Car Tax: Set the Benefit-in-Kind rates (appropriate percentages) for electric vehicles, hybrids and internal combustion engine vehicles for 2030-31", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 86 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '310', '2031-32': '345'}", + "table_61_line": 86, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "income_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No company cars or benefit-in-kind appropriate percentages: the search's only hits are council tax discount percentages.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /company_car(?!ries)|benefit_in_kind|appropriate_percentage/. Parameters: 3 node(s) ['gov.local_authorities.council_tax.discounts.appropriate_percentage.england', 'gov.local_authorities.council_tax.discounts.appropriate_percentage.scotland', 'gov.local_authorities.council_tax.discounts.appropriate_percentage.wales']. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: company cars and their benefit-in-kind appropriate percentages", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__hvcts_deferrals_discounts_exemptions", + "title": "High Value Council Tax Surcharge: Confirm eligibility for deferrals, discounts and exemptions from 1 April 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 93 (Tax); exchequer impact GBP m by FY: {'2026-27': '-5', '2027-28': '-5', '2028-29': '-45', '2029-30': '-45', '2030-31': '-50', '2031-32': '-50'}", + "table_61_line": 93, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "council_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine carries the surcharge (gov.hmrc.council_tax.high_value_surcharge, variable high_value_council_tax_surcharge) but no deferral, discount or exemption within it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /high_value|surcharge|deferr/. Parameters: 11 node(s) ['gov.hmrc.council_tax.high_value_surcharge.amount[0].threshold', 'gov.hmrc.council_tax.high_value_surcharge.amount[0].amount', 'gov.hmrc.council_tax.high_value_surcharge.amount[1].threshold', 'gov.hmrc.council_tax.high_value_surcharge.amount[1].amount', 'gov.hmrc.council_tax.high_value_surcharge.amount[2].threshold', 'gov.hmrc.council_tax.high_value_surcharge.amount[2].amount']. Variables: 2 ['early_years_school_start_deferred', 'high_value_council_tax_surcharge']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: deferrals, discounts and exemptions within the high value council tax surcharge", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__early_years_books_access", + "title": "Early Years: Fund increased access to books for children aged 0 to 5", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 9 (Spend); exchequer impact GBP m by FY: {'2026-27': '-5', '2027-28': '-5', '2028-29': '-5', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 9, + "table_61_head": "Spend", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (books for children aged 0 to 5), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.education ('Increase in education, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /early_years|childcare|book/. Parameters: 73 node(s) ['gov.dfe.childcare_funding_rate[0].threshold', 'gov.dfe.childcare_funding_rate[0].amount', 'gov.dfe.childcare_funding_rate[1].threshold', 'gov.dfe.childcare_funding_rate[1].amount', 'gov.dfe.childcare_funding_rate[2].threshold', 'gov.dfe.childcare_funding_rate[2].amount']. Variables: 76 ['WTC_childcare_element', 'childcare_expenses', 'childcare_grant', 'childcare_grant_child_eligible', 'childcare_grant_child_has_special_educational_needs', 'childcare_grant_eligible']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__food_and_heating_oil_tariff_suspensions", + "title": "Tariff Suspension Packages: Suspend tariffs on 135 food products from 21 June 2026 until 31 December 2028; 101 food products and kerosene for heating oil from 26 November 2026 until 31 December 2028; and fertiliser from 26 November 2026 until 31 December 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 10 (Tax); exchequer impact GBP m by FY: {'2026-27': '-50', '2027-28': '-75', '2028-29': '-55', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 10, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for families", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (tariffs on food products, heating oil and fertiliser), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /tariff|customs|import/. Parameters: 26 node(s) ['gov.dwp.ESA.income.capital.tariff_income.amount', 'gov.dwp.ESA.income.capital.tariff_income.step', 'gov.dwp.ESA.income.capital.tariff_income.threshold', 'gov.dwp.JSA.income.capital.tariff_income.amount', 'gov.dwp.JSA.income.capital.tariff_income.step', 'gov.dwp.JSA.income.capital.tariff_income.threshold']. Variables: 5 ['esa_income_tariff_income', 'housing_benefit_tariff_income', 'income_support_tariff_income', 'jsa_income_tariff_income', 'uc_tariff_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_rates_pubs_relief_35pc", + "title": "Business Rates: Increase business rates relief for pubs, social clubs and live music venues by 20ppts to 35% from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 12 (Tax); exchequer impact GBP m by FY: {'2026-27': '5', '2027-28': '-160', '2028-29': '-115', '2029-30': '-5', '2030-31': '-5', '2031-32': '-5'}", + "table_61_line": 12, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "business_rates", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (business rates relief for pubs and venues), out of the household model's scope. The engine carries business rates only as a household incidence, business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, so its £ change would have to be supplied as an input, restating the costing.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|non_domestic|nndr/. Parameters: 4 node(s) ['gov.hmrc.business_rates.statistics.revenue.ENGLAND', 'gov.hmrc.business_rates.statistics.revenue.NORTHERN_IRELAND', 'gov.hmrc.business_rates.statistics.revenue.SCOTLAND', 'gov.hmrc.business_rates.statistics.revenue.WALES']. Variables: 2 ['baseline_business_rates', 'business_rates']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_rates_sbrr_rhl_thresholds_raised", + "title": "Business Rates: Increase valuation thresholds for Small Business Rate Relief for retail, hospitality and leisure (RHL) properties from £12,000 to £18,000 for 100% relief and from £15,000 to £21,000 for tapered relief from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 13 (Tax); exchequer impact GBP m by FY: {'2026-27': '5', '2027-28': '-315', '2028-29': '-320', '2029-30': '0', '2030-31': '-5', '2031-32': '-5'}", + "table_61_line": 13, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "business_rates", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (small business rate relief thresholds), out of the household model's scope. The engine carries business rates only as a household incidence, business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, so its £ change would have to be supplied as an input, restating the costing.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|small_business|non_domestic/. Parameters: 4 node(s) ['gov.hmrc.business_rates.statistics.revenue.ENGLAND', 'gov.hmrc.business_rates.statistics.revenue.NORTHERN_IRELAND', 'gov.hmrc.business_rates.statistics.revenue.SCOTLAND', 'gov.hmrc.business_rates.statistics.revenue.WALES']. Variables: 2 ['baseline_business_rates', 'business_rates']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_rates_rhl_transitional_support", + "title": "Business Rates: Introduce a transitional support package, including a two-year real terms bills freeze for RHL businesses and a one-year extension of the 2023 Supporting Small Business support, part funded by extending the Transitional Relief Supplement for two years from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 14 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-10', '2028-29': '-230', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 14, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "business_rates", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (business rates transitional support), out of the household model's scope. The engine carries business rates only as a household incidence, business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, so its £ change would have to be supplied as an input, restating the costing.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|transitional|non_domestic/. Parameters: 4 node(s) ['gov.hmrc.business_rates.statistics.revenue.ENGLAND', 'gov.hmrc.business_rates.statistics.revenue.NORTHERN_IRELAND', 'gov.hmrc.business_rates.statistics.revenue.SCOTLAND', 'gov.hmrc.business_rates.statistics.revenue.WALES']. Variables: 2 ['baseline_business_rates', 'business_rates']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_tariff_suspensions", + "title": "Business Tariff Suspensions: Suspend tariffs on 72 products from 5 August 2026 and extend suspensions for 361 products in 2027-28", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 16 (Tax); exchequer impact GBP m by FY: {'2026-27': '-65', '2027-28': '-215', '2028-29': '-155', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 16, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (tariff suspensions on business inputs), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /tariff|customs|import/. Parameters: 26 node(s) ['gov.dwp.ESA.income.capital.tariff_income.amount', 'gov.dwp.ESA.income.capital.tariff_income.step', 'gov.dwp.ESA.income.capital.tariff_income.threshold', 'gov.dwp.JSA.income.capital.tariff_income.amount', 'gov.dwp.JSA.income.capital.tariff_income.step', 'gov.dwp.JSA.income.capital.tariff_income.threshold']. Variables: 5 ['esa_income_tariff_income', 'housing_benefit_tariff_income', 'income_support_tariff_income', 'jsa_income_tariff_income', 'uc_tariff_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__climate_change_levy_rates_2028", + "title": "Climate Change Levy: Freeze electricity & liquefied petroleum gas main rates, and uprate gas and solid fuels main rates by RPI from 1 April 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 17 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-25', '2029-30': '-25', '2030-31': '-25', '2031-32': '-25'}", + "table_61_line": 17, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (Climate Change Levy rates), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /climate_change_levy|ccl/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__red_diesel_duty_cut", + "title": "Red Diesel: Reduce duty rates by 3.7p-per-litre from 15 June 2026 to 1 July 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 18 (Tax); exchequer impact GBP m by FY: {'2026-27': '-60', '2027-28': '-30', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 18, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (red diesel duty), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /red_diesel|rebated|fuel_duty/. Parameters: 4 node(s) ['gov.hmrc.fuel_duty.lpg', 'gov.hmrc.fuel_duty.natural_gas', 'gov.hmrc.fuel_duty.petrol_and_diesel', 'gov.hmrc.fuel_duty.rural_fuel_duty_relief']. Variables: 2 ['fuel_duty', 'in_rural_fuel_duty_relief_area']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__alcohol_duty_small_producer_relief", + "title": "Alcohol Duty: Increase the generosity of Small Producer Relief from 1 February 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 19 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-10', '2028-29': '-10', '2029-30': '-10', '2030-31': '-10', '2031-32': '-10'}", + "table_61_line": 19, + "table_61_head": "Tax", + "table_61_heading": "Breathing space for families and businesses > Breathing space for businesses", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (alcohol duty small producer relief), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /alcohol_duty|small_producer/. Parameters: 18 node(s) ['gov.hmrc.alcohol_duty.high_abv', 'gov.hmrc.alcohol_duty.rates.beer', 'gov.hmrc.alcohol_duty.rates.cider', 'gov.hmrc.alcohol_duty.rates.draught_cider', 'gov.hmrc.alcohol_duty.rates.draught_low', 'gov.hmrc.alcohol_duty.rates.draught_other']. Variables: 1 ['alcohol_duty']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__good_growth_funds", + "title": "Good Growth Funds: Seed funding for Mayors and local leaders in England and £1.5bn finance for Mayoral Strategic Authorities with a mechanism for subsidised lending (resource impacts of subsidy)", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 20 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-340', '2028-29': '-30', '2029-30': '-35', '2030-31': '-55', '2031-32': '-60'}", + "table_61_line": 20, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Delivering Fiscal Devolution", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (Good Growth Funds for mayoral authorities): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /growth_fund|mayor|combined_authorit/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_rates_retention_mayoral_authorities", + "title": "Business Rates Retention: Devolve a share of business rates income and growth to Mayoral Strategic Authorities from April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 21 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-10', '2028-29': '-45', '2029-30': '-75', '2030-31': '-110', '2031-32': '-140'}", + "table_61_line": 21, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Delivering Fiscal Devolution", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (business rates retention by mayoral authorities), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|retention|mayor/. Parameters: 4 node(s) ['gov.hmrc.business_rates.statistics.revenue.ENGLAND', 'gov.hmrc.business_rates.statistics.revenue.NORTHERN_IRELAND', 'gov.hmrc.business_rates.statistics.revenue.SCOTLAND', 'gov.hmrc.business_rates.statistics.revenue.WALES']. Variables: 3 ['baseline_business_rates', 'business_rates', 'relative_capital_gains_retention_rate_change']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__local_apprenticeship_services", + "title": "Youth Employment and Skills: Expand local apprenticeship services to all current mayors", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 22 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-50', '2028-29': '-70', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 22, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Delivering Fiscal Devolution", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (local apprenticeship services), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /apprentice/. Parameters: 11 node(s) ['gov.hmrc.minimum_wage.apprentice', 'gov.hmrc.minimum_wage.non_apprentice[0].threshold', 'gov.hmrc.minimum_wage.non_apprentice[0].amount', 'gov.hmrc.minimum_wage.non_apprentice[1].threshold', 'gov.hmrc.minimum_wage.non_apprentice[1].amount', 'gov.hmrc.minimum_wage.non_apprentice[2].threshold']. Variables: 1 ['is_apprentice']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__regional_growth_investments", + "title": "Regional Growth: Fund priority investments and local growth & regeneration projects across the UK", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 23 (Spend); exchequer impact GBP m by FY: {'2026-27': '-20', '2027-28': '-85', '2028-29': '-45', '2029-30': '-30', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 23, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Delivering Fiscal Devolution", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (regional growth projects), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /regional|regeneration/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__cambridge_development_corporation", + "title": "Cambridge Development Corporation: Pilot a new government financing model for land, housing and infrastructure development from April 2027 (capital grant element)", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 24 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-50', '2029-30': '-60', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 24, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Delivering Fiscal Devolution", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (Cambridge Development Corporation): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /development_corporation|cambridge/. Parameters: 3 node(s) ['gov.local_authorities.council_tax.band_d.amounts.CAMBRIDGE', 'gov.local_authorities.council_tax.band_d.amounts.EAST_CAMBRIDGESHIRE', 'gov.local_authorities.council_tax.band_d.amounts.SOUTH_CAMBRIDGESHIRE']. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__strategic_authorities_capacity_funding", + "title": "Strategic Authorities: Increase funding to build capacity to deliver new powers and investment responsibilities", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 25 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-180', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 25, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Delivering Fiscal Devolution", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (strategic authorities' capacity), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /strategic_authorit|mayor/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__rd_relief_claim_notification_form_removed", + "title": "R&D Tax Reliefs: Remove the Claim Notification Form from 1 April 2027 and simplify the Additional Information Form from Autumn 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 27 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-45', '2028-29': '-60', '2029-30': '-65', '2030-31': '-65', '2031-32': '-70'}", + "table_61_line": 27, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (R&D relief claim forms), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /research_and_development|r_and_d|rd_relief/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__emi2_option_limit_120000", + "title": "Enterprise Management Incentives 2 (EMI2): Increase the individual option limit to £120,000, extending the exercise period to 15 years and remove interaction with EMI option limit from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 28 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-25', '2028-29': '-35', '2029-30': '-45', '2030-31': '-145', '2031-32': '-140'}", + "table_61_line": 28, + "table_61_head": "Tax", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (Enterprise Management Incentives share options), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /enterprise_management|share_option|emi/. Parameters: 27 node(s) ['gov.dft.vehicle_excise_duty.band_k_max_emissions', 'gov.dft.vehicle_excise_duty.zero_emission_exempt', 'gov.dft.vehicle_excise_duty.zero_emission_expensive_car_threshold', 'gov.dft.vehicle_excise_duty.zero_emission_supplement_registration_start', 'gov.dwp.carer_premium.single', 'gov.dwp.disability_premia.disability_couple']. Variables: 16 ['benefits_premiums', 'car_co2_emissions', 'carer_premium', 'council_tax_reduction_premiums', 'council_tax_reduction_severe_disability_premium', 'disability_premium']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__british_business_bank_backing_innovation", + "title": "Backing Innovation: Bring forward £1bn investment and increase financial capacity by £2bn for the British Business Bank to support additional investment in the UK (resource impacts of increased lending)", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 29 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '5', '2028-29': '0', '2029-30': '5', '2030-31': '10', '2031-32': '25'}", + "table_61_line": 29, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (British Business Bank): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_bank/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__national_wealth_fund_capital", + "title": "National Wealth Fund: Invest additional capital to support growth, including £2bn for the new Energy Wealth Fund (resource impacts of increased lending)", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 30 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '35', '2029-30': '120', '2030-31': '250', '2031-32': '470'}", + "table_61_line": 30, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (National Wealth Fund): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /wealth_fund/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__artificial_intelligence_package", + "title": "Artificial Intelligence: Strengthen the UK’s AI security, accelerate adoption across the economy, and support strategically important UK AI capabilities", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 31 (Spend); exchequer impact GBP m by FY: {'2026-27': '-35', '2027-28': '-115', '2028-29': '-185', '2029-30': '-145', '2030-31': '-5', '2031-32': '-5'}", + "table_61_line": 31, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (artificial intelligence), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /artificial_intelligence|\\bai\\b/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__ev_charging_public_chargers", + "title": "EV Charging: Reduce the cost of using local, lower-powered public chargers in Great Britain", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 32 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-50', '2028-29': '-50', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 32, + "table_61_head": "Spend", + "table_61_heading": "Good growth in every postcode > Backing British business", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (public EV charging costs), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /charg|electric_vehicle/. Parameters: 21 node(s) ['gov.dwp.housing_benefit.ineligible_charges.meals.at_least_three_a_day.aged_16_or_over', 'gov.dwp.housing_benefit.ineligible_charges.meals.at_least_three_a_day.under_16', 'gov.dwp.housing_benefit.ineligible_charges.meals.breakfast_only', 'gov.dwp.housing_benefit.ineligible_charges.meals.fewer_than_three_a_day.aged_16_or_over', 'gov.dwp.housing_benefit.ineligible_charges.meals.fewer_than_three_a_day.under_16', 'gov.hmrc.child_benefit.opt_out_charge_share']. Variables: 6 ['child_benefit_less_tax_charge', 'high_value_council_tax_surcharge', 'housing_service_charges', 'income_tax_pre_charges', 'pension_annual_allowance_chargeable_amount', 'water_and_sewerage_charges']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__rough_sleeping_investment", + "title": "Rough Sleeping: Invest in a route off the streets across the Parliament, alongside longer-term accommodation and intensive support", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 33 (Spend); exchequer impact GBP m by FY: {'2026-27': '-175', '2027-28': '-515', '2028-29': '-580', '2029-30': '-85', '2030-31': '-90', '2031-32': '-95'}", + "table_61_line": 33, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Housing", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (rough sleeping), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /rough_sleep|homeless/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__rough_sleeping_reprioritised_mhclg_budgets", + "title": "Rough Sleeping: Reprioritise existing MHCLG budgets to tackle rough sleeping", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 34 (Spend); exchequer impact GBP m by FY: {'2026-27': '120', '2027-28': '405', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 34, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Housing", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (reprioritised housing budgets), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /rough_sleep|homeless/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__social_and_affordable_homes_programme", + "title": "Social and Affordable Homes Programme: Fund delivery of around 10,000 social and affordable homes", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 35 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-250', '2028-29': '-500', '2029-30': '-500', '2030-31': '-500', '2031-32': '0'}", + "table_61_line": 35, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Housing", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (social and affordable homes), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /social_housing|affordable/. Parameters: 0 node(s) []. Variables: 1 ['in_social_housing']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__vat_zero_rate_land_for_social_housing", + "title": "Social Housing: Introduce a zero rate of VAT for land sold to registered social housing providers (relevant housing associations) from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 36 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-15', '2028-29': '-15', '2029-30': '-15', '2030-31': '-15', '2031-32': '-15'}", + "table_61_line": 36, + "table_61_head": "Tax", + "table_61_heading": "Hope for the future > Housing", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (VAT on land sold to social housing providers), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /vat|social_housing/. Parameters: 64 node(s) ['gov.contrib.conservatives.cb_hitc_household', 'gov.contrib.conservatives.pensioner_personal_allowance', 'gov.contrib.labour.private_school_vat', 'gov.economic_assumptions.yoy_growth.obr.private_pension_index', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.UNITED_KINGDOM', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.ENGLAND']. Variables: 13 ['attends_private_school', 'attends_private_school_random_draw', 'baseline_vat', 'full_rate_vat_consumption', 'full_rate_vat_expenditure_rate', 'in_social_housing']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__your_first_home_equity_loan", + "title": "Your First Home: Introduce a new equity loan scheme to support around 70,000 first-time buyers from April 2027 (net income from developer fees)", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 37 (Spend); exchequer impact GBP m by FY: {'2026-27': '-15', '2027-28': '50', '2028-29': '95', '2029-30': '95', '2030-31': '95', '2031-32': '95'}", + "table_61_line": 37, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Housing", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (an equity loan scheme for first-time buyers): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /equity_loan|help_to_buy|first_time/. Parameters: 38 node(s) ['gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[0].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[0].amount', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[1].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[1].amount', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[2].threshold', 'gov.hmrc.stamp_duty.statistics.residential.household.first_time_buyers_relief[2].amount']. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__defence_investment_plan_further_savings", + "title": "Defence Investment Plan (DIP): Commitment to further savings made at announcement on 30 June 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 40 (Spend); exchequer impact GBP m by FY: {'2026-27': '-1755', '2027-28': '-1090', '2028-29': '-1010', '2029-30': '-905', '2030-31': '-940', '2031-32': '-970'}", + "table_61_line": 40, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Investing in our national security", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (defence), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /defen[cs]e/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__defence_investment_plan_capital_reallocation", + "title": "Defence Investment Plan: Reallocate capital spending to fully fund the Defence Investment Plan", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 41 (Spend); exchequer impact GBP m by FY: {'2026-27': '145', '2027-28': '2135', '2028-29': '1420', '2029-30': '1100', '2030-31': '1135', '2031-32': '1180'}", + "table_61_line": 41, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Investing in our national security", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (defence), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /defen[cs]e/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__defence_admin_savings_reinvested", + "title": "Defence: Reinvest defence and security administration savings into frontline defence and national security", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 42 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-25', '2028-29': '-70', '2029-30': '-95', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 42, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Investing in our national security", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (defence administration), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /defen[cs]e/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__ukraine_winter_air_defence", + "title": "Ukraine: Emergency winter support for air defence", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 43 (Spend); exchequer impact GBP m by FY: {'2026-27': '-500', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 43, + "table_61_head": "Spend", + "table_61_heading": "Hope for the future > Investing in our national security", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (air defence for Ukraine), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /ukraine|defen[cs]e/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__uk_export_finance_defence_capacity", + "title": "UK Export Finance: Increase capacity to support UK defence exports from June 2026 (increased income from additional activity)", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 44 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '200', '2028-29': '200', '2029-30': '200', '2030-31': '200', '2031-32': '0'}", + "table_61_line": 44, + "table_61_head": "Tax", + "table_61_heading": "Hope for the future > Investing in our national security", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (UK Export Finance): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /export_finance/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__hmrc_tax_gap_package", + "title": "HMRC: Measures to close the tax gap", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 45 (Tax); exchequer impact GBP m by FY: {'2026-27': '10', '2027-28': '100', '2028-29': '115', '2029-30': '1980', '2030-31': '2485', '2031-32': '3160'}", + "table_61_line": 45, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "compliance_and_administration", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (HMRC measures to close the tax gap): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /tax_gap|compliance|evasion/. Parameters: 1 node(s) ['gov.dcms.bbc.tv_licence.evasion_rate']. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__online_marketplace_liability_uk_businesses", + "title": "Online Marketplace Liability: Extend to UK businesses with a minimum annual sales threshold per platform of £90,000 from 1 October 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 46 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '165', '2028-29': '320', '2029-30': '270', '2030-31': '250', '2031-32': '265'}", + "table_61_line": 46, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "compliance_and_administration", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (online marketplace VAT liability): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /marketplace|online_sales/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__dwp_fraud_and_error_prevention", + "title": "DWP Fraud and Error: Expand use of data and targeted controls to prevent fraud from entering the benefits system", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 47 (Spend); exchequer impact GBP m by FY: {'2026-27': '195', '2027-28': '-125', '2028-29': '60', '2029-30': '75', '2030-31': '155', '2031-32': '240'}", + "table_61_line": 47, + "table_61_head": "Spend", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "compliance_and_administration", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (DWP fraud and error controls): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /fraud|error/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__benefits_removed_hospitalised_serious_offenders", + "title": "Welfare Reform: Remove benefit entitlements from serious offenders hospitalised in Great Britain from 6 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 48 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '5', '2028-29': '5', '2029-30': '5', '2030-31': '5', '2031-32': '5'}", + "table_61_line": 48, + "table_61_head": "Spend", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "benefits", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A change to the benefit entitlements of serious offenders detained in hospital in Great Britain: the search finds no parameter or variable for hospital detention, prison or offending, so the engine cannot identify the people it affects.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /hospital|prison|detain|offender/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__distributions_framework_modernised", + "title": "Distributions: Modernise the distributions framework from 6 April 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 49 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '55', '2029-30': '800', '2030-31': '775', '2031-32': '785'}", + "table_61_line": 49, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (the distributions framework), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /distribution|dividend/. Parameters: 20 node(s) ['gov.hmrc.income_tax.allowances.dividend_allowance', 'gov.hmrc.income_tax.rates.dividends[0].threshold', 'gov.hmrc.income_tax.rates.dividends[0].rate', 'gov.hmrc.income_tax.rates.dividends[1].threshold', 'gov.hmrc.income_tax.rates.dividends[1].rate', 'gov.hmrc.income_tax.rates.dividends[2].threshold']. Variables: 6 ['dividend_income', 'dividend_income_tax', 'received_allowances_dividend_income', 'taxable_dividend_income', 'taxed_dividend_income', 'trade_loss_relief_against_savings_and_dividends']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__advance_corporation_tax_abolished", + "title": "Advance Corporation Tax (ACT): Abolish Advance Corporation Tax from 1 April 2031", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 50 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '0', '2029-30': '0', '2030-31': '5', '2031-32': '15'}", + "table_61_line": 50, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (Advance Corporation Tax), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /corporation_tax|advance_corporation/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__vat_reverse_charge_overseas_services_restricted", + "title": "Cross-Border Services: Restrict the reverse charge on supplies of services from overseas to VAT-registered businesses from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 51 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '70', '2028-29': '75', '2029-30': '75', '2030-31': '75', '2031-32': '75'}", + "table_61_line": 51, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (the VAT reverse charge on imported services), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /reverse_charge|vat/. Parameters: 64 node(s) ['gov.contrib.conservatives.cb_hitc_household', 'gov.contrib.conservatives.pensioner_personal_allowance', 'gov.contrib.labour.private_school_vat', 'gov.economic_assumptions.yoy_growth.obr.private_pension_index', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.UNITED_KINGDOM', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.ENGLAND']. Variables: 12 ['attends_private_school', 'attends_private_school_random_draw', 'baseline_vat', 'full_rate_vat_consumption', 'full_rate_vat_expenditure_rate', 'private_pension_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__foreign_sovereign_investments_taxation", + "title": "Modernising Taxation of Foreign Sovereign Investments: Introduce a new statutory regime for the direct taxation of foreign sovereigns from 1 January 2029", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 54 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '110', '2028-29': '495', '2029-30': '690', '2030-31': '675', '2031-32': '655'}", + "table_61_line": 54, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Modernising the tax and welfare system", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (the taxation of foreign sovereign investors), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /sovereign|foreign/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__bank_surcharge_6pc_temporary", + "title": "Bank Surcharge: Temporarily increase the Bank Corporation Tax Surcharge rate from 3% to 6%, to fund breathing space measures for households, for 15 months from 1 January 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 55 (Tax); exchequer impact GBP m by FY: {'2026-27': '305', '2027-28': '950', '2028-29': '220', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 55, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (the Bank Corporation Tax Surcharge), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /bank_surcharge|corporation_tax|bank_levy/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__machine_games_duty_higher_stake_25pc", + "title": "Machine Games Duty: Increase the rate from 20% to 25% for higher stake machines from 1 April 2027 and move duty liability to the machine supplier from 1 April 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 56 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '135', '2028-29': '150', '2029-30': '145', '2030-31': '145', '2031-32': '145'}", + "table_61_line": 56, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (Machine Games Duty), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /gambling|machine_games|gaming/. Parameters: 23 node(s) ['gov.hmrc.gambling_duty.bingo.rate', 'gov.hmrc.gambling_duty.gaming.normal_six_month_bands[0].threshold', 'gov.hmrc.gambling_duty.gaming.normal_six_month_bands[0].rate', 'gov.hmrc.gambling_duty.gaming.normal_six_month_bands[1].threshold', 'gov.hmrc.gambling_duty.gaming.normal_six_month_bands[1].rate', 'gov.hmrc.gambling_duty.gaming.normal_six_month_bands[2].threshold']. Variables: 8 ['gambling_duty', 'gaming_duty', 'machine_games_duty', 'machine_games_higher_rate_net_takings', 'machine_games_lower_rate_net_takings', 'machine_games_standard_rate_net_takings']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_rates_vape_shops_and_agcs_reliefs_removed", + "title": "Business Rates: Remove reliefs for vape shops and Adult Gaming Centres from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 57 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '10', '2028-29': '10', '2029-30': '10', '2030-31': '10', '2031-32': '10'}", + "table_61_line": 57, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "business_rates", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (business rates reliefs for vape shops and adult gaming centres), out of the household model's scope. The engine carries business rates only as a household incidence, business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, so its £ change would have to be supplied as an input, restating the costing.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|vape/. Parameters: 4 node(s) ['gov.hmrc.business_rates.statistics.revenue.ENGLAND', 'gov.hmrc.business_rates.statistics.revenue.NORTHERN_IRELAND', 'gov.hmrc.business_rates.statistics.revenue.SCOTLAND', 'gov.hmrc.business_rates.statistics.revenue.WALES']. Variables: 2 ['baseline_business_rates', 'business_rates']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__writing_down_allowance_12pc_and_fya_50pc", + "title": "Writing-down Allowances: Reduce the main rate writing-down allowance to 12% from April 2027 and increase the main rate first-year allowance to 50% from 1 January 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 58 (Tax); exchequer impact GBP m by FY: {'2026-27': '125', '2027-28': '765', '2028-29': '1040', '2029-30': '1075', '2030-31': '1100', '2031-32': '1120'}", + "table_61_line": 58, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (capital allowances), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /capital_allowance|writing_down|first_year_allowance/. Parameters: 0 node(s) []. Variables: 1 ['capital_allowances']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__private_hire_operators_vat_full_fare", + "title": "Private Hire Vehicle Operators: Deem larger operators with annual fare turnover over £50 million liable for VAT on the full value of their fares from 2 January 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 59 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '95', '2028-29': '385', '2029-30': '395', '2030-31': '410', '2031-32': '425'}", + "table_61_line": 59, + "table_61_head": "Tax", + "table_61_heading": "Funding the Budget fairly and responsibly > Making fair choices on revenue raising", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (VAT on private hire operators' fares), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /private_hire|taxi|vat/. Parameters: 64 node(s) ['gov.contrib.conservatives.cb_hitc_household', 'gov.contrib.conservatives.pensioner_personal_allowance', 'gov.contrib.labour.private_school_vat', 'gov.economic_assumptions.yoy_growth.obr.private_pension_index', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.UNITED_KINGDOM', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.ENGLAND']. Variables: 12 ['attends_private_school', 'attends_private_school_random_draw', 'baseline_vat', 'full_rate_vat_consumption', 'full_rate_vat_expenditure_rate', 'private_pension_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__civil_service_admin_budgets_cut_20pc", + "title": "Future Civil Service: Reduce administration budgets by 20% by 2029-30 compared to 16% reduction in Spending Review 2025 plans", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 63 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '185', '2028-29': '405', '2029-30': '595', '2030-31': '615', '2031-32': '635'}", + "table_61_line": 63, + "table_61_head": "Spend", + "table_61_heading": "Funding the Budget fairly and responsibly > Transforming the Civil Service", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (civil service administration budgets), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /civil_service|administration/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__civil_service_ai_fund", + "title": "Future Civil Service: Reinvest part of the administration budget savings in a new AI Fund to reduce administration burdens and improve outcomes", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 64 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-25', '2028-29': '-25', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 64, + "table_61_head": "Spend", + "table_61_heading": "Funding the Budget fairly and responsibly > Transforming the Civil Service", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (a civil service AI fund), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /civil_service/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__hgv_ved_1_for_12_months", + "title": "Heavy Goods Vehicles: Reduce Vehicle Excise Duty to £1 for 12 months from 1 July 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 65 (Tax); exchequer impact GBP m by FY: {'2026-27': '-135', '2027-28': '-50', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 65, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced breathing space measures and associated funding", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (Vehicle Excise Duty on heavy goods vehicles), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /heavy_goods|hgv|vehicle_excise/. Parameters: 93 node(s) ['gov.dft.vehicle_excise_duty.alternative_fuel_discount', 'gov.dft.vehicle_excise_duty.band_k_max_emissions', 'gov.dft.vehicle_excise_duty.band_k_registration_cutoff', 'gov.dft.vehicle_excise_duty.engine_size_threshold', 'gov.dft.vehicle_excise_duty.expensive_car_supplement', 'gov.dft.vehicle_excise_duty.expensive_car_threshold']. Variables: 2 ['car_vehicle_excise_duty', 'vehicle_excise_duty']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__foreign_permanent_establishment_exemption_mandatory", + "title": "Corporation Tax: Make the foreign permanent establishment exemption mandatory, preventing their losses from reducing UK corporation tax receipts for accounting periods beginning on or after 1 January 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 68 (Tax); exchequer impact GBP m by FY: {'2026-27': '120', '2027-28': '480', '2028-29': '495', '2029-30': '450', '2030-31': '460', '2031-32': '470'}", + "table_61_line": 68, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced breathing space measures and associated funding", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (the foreign permanent establishment exemption), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /permanent_establishment|corporation_tax/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__electricity_generator_levy_55pc", + "title": "Electricity Generator Levy: Increase the rate from 45% to 55% until 31 March 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 69 (Tax); exchequer impact GBP m by FY: {'2026-27': '60', '2027-28': '35', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 69, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced breathing space measures and associated funding", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (the Electricity Generator Levy), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /generator_levy|electricity_generator/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__british_industrial_competitiveness_scheme", + "title": "Industrial Electricity: Fund the British Industrial Competitiveness Scheme starting from 1 April 2027, including a backdated payment for eligible businesses", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 70 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-1235', '2028-29': '-65', '2029-30': '-135', '2030-31': '-420', '2031-32': '-465'}", + "table_61_line": 70, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (the British Industrial Competitiveness Scheme), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /industrial|competitiveness/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__carbon_price_support_removed", + "title": "Carbon Price Support (CPS): Remove the CPS rates to reduce energy bills from 1 April 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 71 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-165', '2029-30': '-45', '2030-31': '-15', '2031-32': '-10'}", + "table_61_line": 71, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (Carbon Price Support rates), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /carbon_price|carbon/. Parameters: 37 node(s) ['gov.contrib.ubi_center.carbon_tax.consumer_incidence', 'gov.contrib.ubi_center.carbon_tax.rate', 'gov.economic_assumptions.yoy_growth.carbon_intensity', 'gov.economic_assumptions.indices.carbon_intensity', 'household.consumption.carbon.consumption', 'household.consumption.carbon.emissions.food_and_non_alcoholic_beverages']. Variables: 2 ['carbon_consumption', 'carbon_tax']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__youth_guarantee_and_apprenticeships_spring_2026", + "title": "Spring 2026 Youth Employment and Skills Package: Expand Youth Guarantee and apprenticeship support", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 72 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-290', '2028-29': '-375', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 72, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (the Youth Guarantee and apprenticeships), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /youth_guarantee|apprentice/. Parameters: 11 node(s) ['gov.hmrc.minimum_wage.apprentice', 'gov.hmrc.minimum_wage.non_apprentice[0].threshold', 'gov.hmrc.minimum_wage.non_apprentice[0].amount', 'gov.hmrc.minimum_wage.non_apprentice[1].threshold', 'gov.hmrc.minimum_wage.non_apprentice[1].amount', 'gov.hmrc.minimum_wage.non_apprentice[2].threshold']. Variables: 1 ['is_apprentice']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__union_learning_fund", + "title": "Skills: Re-establish the Union Learning Fund in England", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 73 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-20', '2028-29': '-20', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 73, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (the Union Learning Fund), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /union_learning|skills/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__investment_for_growth", + "title": "Investment for Growth: Support strategic technologies, local growth and key industries", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 74 (Spend); exchequer impact GBP m by FY: {'2026-27': '-155', '2027-28': '-460', '2028-29': '-530', '2029-30': '-330', '2030-31': '-355', '2031-32': '-535'}", + "table_61_line": 74, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (investment for growth): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /investment|growth/. Parameters: 45 node(s) ['gov.economic_assumptions.yoy_growth.obr.rpi', 'gov.economic_assumptions.yoy_growth.obr.average_earnings', 'gov.economic_assumptions.yoy_growth.obr.consumer_price_index', 'gov.economic_assumptions.yoy_growth.obr.road_fuel_volume', 'gov.economic_assumptions.yoy_growth.obr.petrol_spending_litre_proxy', 'gov.economic_assumptions.yoy_growth.obr.diesel_spending_litre_proxy']. Variables: 3 ['charitable_investment_gifts', 'other_investment_income', 'unit_and_investment_trusts']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__growth_guarantee_scheme_expansion", + "title": "British Business Bank: Expand the Growth Guarantee Scheme to support £6.5 billion of additional SME lending across this Parliament", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 75 (Spend); exchequer impact GBP m by FY: {'2026-27': '-105', '2027-28': '-145', '2028-29': '-180', '2029-30': '-170', '2030-31': '-160', '2031-32': '-155'}", + "table_61_line": 75, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (the Growth Guarantee Scheme): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /guarantee/. Parameters: 25 node(s) ['gov.dwp.pension_credit.guarantee_credit.additions', 'gov.dwp.pension_credit.guarantee_credit.carer.addition', 'gov.dwp.pension_credit.guarantee_credit.child.addition', 'gov.dwp.pension_credit.guarantee_credit.child.disability.addition', 'gov.dwp.pension_credit.guarantee_credit.child.disability.eligibility', 'gov.dwp.pension_credit.guarantee_credit.child.disability.severe.addition']. Variables: 9 ['additional_minimum_guarantee', 'carer_minimum_guarantee_addition', 'child_minimum_guarantee_addition', 'guarantee_credit', 'in_receipt_of_guarantee_credit', 'is_guarantee_credit_eligible']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__leeds_city_fund", + "title": "Leeds City Fund: Establish the Leeds City Fund with 100% retention of business rates growth", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 76 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-25', '2029-30': '-25', '2030-31': '-25', '2031-32': '-30'}", + "table_61_line": 76, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "business_rates", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (business rates retention in Leeds), out of the household model's scope. The engine carries business rates only as a household incidence, business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, so its £ change would have to be supplied as an input, restating the costing.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|retention/. Parameters: 4 node(s) ['gov.hmrc.business_rates.statistics.revenue.ENGLAND', 'gov.hmrc.business_rates.statistics.revenue.NORTHERN_IRELAND', 'gov.hmrc.business_rates.statistics.revenue.SCOTLAND', 'gov.hmrc.business_rates.statistics.revenue.WALES']. Variables: 3 ['baseline_business_rates', 'business_rates', 'relative_capital_gains_retention_rate_change']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__uk_india_ceta_and_double_contributions_convention", + "title": "UK-India: Bring into force the Comprehensive Economic and Trade Agreement and Double Contributions Convention from 15 July 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 77 (Tax); exchequer impact GBP m by FY: {'2026-27': '-175', '2027-28': '-285', '2028-29': '-330', '2029-30': '-360', '2030-31': '-385', '2031-32': '-400'}", + "table_61_line": 77, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (tariffs and contributions under the UK-India agreement), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /tariff|customs|double_contribution/. Parameters: 26 node(s) ['gov.dwp.ESA.income.capital.tariff_income.amount', 'gov.dwp.ESA.income.capital.tariff_income.step', 'gov.dwp.ESA.income.capital.tariff_income.threshold', 'gov.dwp.JSA.income.capital.tariff_income.amount', 'gov.dwp.JSA.income.capital.tariff_income.step', 'gov.dwp.JSA.income.capital.tariff_income.threshold']. Variables: 5 ['esa_income_tariff_income', 'housing_benefit_tariff_income', 'income_support_tariff_income', 'jsa_income_tariff_income', 'uc_tariff_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__steel_tariff_and_quotas", + "title": "Steel Tariff: Change tariff rate and quotas on imported steel from 1 July 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 78 (Tax); exchequer impact GBP m by FY: {'2026-27': '85', '2027-28': '110', '2028-29': '120', '2029-30': '120', '2030-31': '120', '2031-32': '115'}", + "table_61_line": 78, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (steel tariffs and quotas), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /tariff|steel/. Parameters: 26 node(s) ['gov.dwp.ESA.income.capital.tariff_income.amount', 'gov.dwp.ESA.income.capital.tariff_income.step', 'gov.dwp.ESA.income.capital.tariff_income.threshold', 'gov.dwp.JSA.income.capital.tariff_income.amount', 'gov.dwp.JSA.income.capital.tariff_income.step', 'gov.dwp.JSA.income.capital.tariff_income.threshold']. Variables: 5 ['esa_income_tariff_income', 'housing_benefit_tariff_income', 'income_support_tariff_income', 'jsa_income_tariff_income', 'uc_tariff_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__securities_transfer_tax", + "title": "Stamp Taxes on Shares: Replace Stamp Duty and Stamp Duty Reserve Tax with the Securities Transfer Tax from late 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 79 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-15', '2028-29': '-30', '2029-30': '-30', '2030-31': '-30', '2031-32': '-30'}", + "table_61_line": 79, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (stamp taxes on shares), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /stamp_duty|stamp_tax|securities/. Parameters: 115 node(s) ['gov.hmrc.stamp_duty.abolish', 'gov.hmrc.stamp_duty.non_residential.purchase[0].threshold', 'gov.hmrc.stamp_duty.non_residential.purchase[0].rate', 'gov.hmrc.stamp_duty.non_residential.purchase[1].threshold', 'gov.hmrc.stamp_duty.non_residential.purchase[1].rate', 'gov.hmrc.stamp_duty.non_residential.purchase[2].threshold']. Variables: 1 ['stamp_duty_land_tax']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__business_rates_ev_charging_relief", + "title": "Business Rates: Introduce 100% relief for eligible Electric Vehicle Charging Points (EVCPs) and electric vehicle-only forecourts for ten years from 1 April 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 80 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-15', '2028-29': '-5', '2029-30': '-10', '2030-31': '-15', '2031-32': '-15'}", + "table_61_line": 80, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Pre-announced growth measures", + "program": "business_rates", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (business rates relief for EV charge points), out of the household model's scope. The engine carries business rates only as a household incidence, business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, so its £ change would have to be supplied as an input, restating the costing.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /business_rates|charg/. Parameters: 25 node(s) ['gov.dwp.housing_benefit.ineligible_charges.meals.at_least_three_a_day.aged_16_or_over', 'gov.dwp.housing_benefit.ineligible_charges.meals.at_least_three_a_day.under_16', 'gov.dwp.housing_benefit.ineligible_charges.meals.breakfast_only', 'gov.dwp.housing_benefit.ineligible_charges.meals.fewer_than_three_a_day.aged_16_or_over', 'gov.dwp.housing_benefit.ineligible_charges.meals.fewer_than_three_a_day.under_16', 'gov.hmrc.business_rates.statistics.revenue.ENGLAND']. Variables: 8 ['baseline_business_rates', 'business_rates', 'child_benefit_less_tax_charge', 'high_value_council_tax_surcharge', 'housing_service_charges', 'income_tax_pre_charges']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__misogyny_prevention_programmes", + "title": "Tackling Misogyny: Invest in grassroots misogyny prevention programmes", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 81 (Spend); exchequer impact GBP m by FY: {'2026-27': '-5', '2027-28': '-5', '2028-29': '-5', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 81, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Priority Public Services Funding", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (misogyny prevention programmes), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /misogyny|violence/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__infected_blood_compensation_additional_report", + "title": "Infected Blood Compensation Scheme: Implement the Inquiry's Additional Report recommendations from 24 July 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 82 (Spend); exchequer impact GBP m by FY: {'2026-27': '-360', '2027-28': '-355', '2028-29': '-265', '2029-30': '-90', '2030-31': '-75', '2031-32': '0'}", + "table_61_line": 82, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Priority Public Services Funding", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (infected blood compensation), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /infected_blood|compensation/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__waste_crime_landfill_tax_clearances", + "title": "Waste Crime: Fund Landfill Tax costs for six priority illegal waste site clearances until 31 March 2029 and a three-year pilot to fund Local Authorities' Landfill Tax liabilities arising from illegal waste site clearances from 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 84 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-5', '2028-29': '-5', '2029-30': '-5', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 84, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Priority Public Services Funding", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (Landfill Tax costs of illegal waste clearances), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /landfill|waste/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__further_priorities_nhs_and_vawg", + "title": "Further Priorities: Fund key priorities, including pressures facing the NHS and delivery of the Violence against Women and Girls Strategy", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 85 (Spend); exchequer impact GBP m by FY: {'2026-27': '-355', '2027-28': '-175', '2028-29': '-140', '2029-30': '-5', '2030-31': '0', '2031-32': '-15'}", + "table_61_line": 85, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Priority Public Services Funding", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (the NHS and the Violence against Women and Girls Strategy), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.nhs ('Increase in NHS spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /nhs|violence/. Parameters: 1 node(s) ['gov.contrib.policyengine.budget.nhs']. Variables: 7 ['childcare_grant_receives_nhs_childcare_support', 'nhs_a_and_e_spending', 'nhs_admitted_patient_spending', 'nhs_budget_change', 'nhs_outpatient_spending', 'nhs_spending']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__supported_housing_licensing", + "title": "Supported Housing: Introduce a licensing regime to enforce national standards for supported housing from 2027-28", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 87 (Spend); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-55', '2028-29': '-70', '2029-30': '-30', '2030-31': '-30', '2031-32': '-30'}", + "table_61_line": 87, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "regulation", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A regulatory change (licensing of supported housing) with no tax or benefit rule for households.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /supported_housing|exempt_accommodation/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__vat_zero_rate_donated_medicines", + "title": "Donated Medicines: Introduce a zero rate of VAT for the donation of medicines under qualifying circumstances from 23 June 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 88 (Tax); exchequer impact GBP m by FY: {'2026-27': '-15', '2027-28': '-20', '2028-29': '-20', '2029-30': '-25', '2030-31': '-25', '2031-32': '-25'}", + "table_61_line": 88, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (VAT on donated medicines), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /vat|medicine/. Parameters: 64 node(s) ['gov.contrib.conservatives.cb_hitc_household', 'gov.contrib.conservatives.pensioner_personal_allowance', 'gov.contrib.labour.private_school_vat', 'gov.economic_assumptions.yoy_growth.obr.private_pension_index', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.UNITED_KINGDOM', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.ENGLAND']. Variables: 12 ['attends_private_school', 'attends_private_school_random_draw', 'baseline_vat', 'full_rate_vat_consumption', 'full_rate_vat_expenditure_rate', 'private_pension_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__vat_medical_deputies_staffing", + "title": "Temporary Staffing: Amend Group 7 of Schedule 9 to the VAT Act 1994 to restore the tax treatment of medical deputies to its previously intended position", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 89 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '85', '2028-29': '95', '2029-30': '100', '2030-31': '100', '2031-32': '105'}", + "table_61_line": 89, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (VAT on medical deputies' staffing supplies), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /vat|staffing/. Parameters: 64 node(s) ['gov.contrib.conservatives.cb_hitc_household', 'gov.contrib.conservatives.pensioner_personal_allowance', 'gov.contrib.labour.private_school_vat', 'gov.economic_assumptions.yoy_growth.obr.private_pension_index', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.UNITED_KINGDOM', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.ENGLAND']. Variables: 12 ['attends_private_school', 'attends_private_school_random_draw', 'baseline_vat', 'full_rate_vat_consumption', 'full_rate_vat_expenditure_rate', 'private_pension_income']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__landfill_communities_fund_credit_cap", + "title": "Landfill Communities Fund: Increase the Landfill Tax credit cap from 1 April 2027", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 90 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '-10', '2028-29': '-15', '2029-30': '-15', '2030-31': '-15', '2031-32': '-15'}", + "table_61_line": 90, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (the Landfill Communities Fund credit cap), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /landfill/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__franchised_higher_education_registration", + "title": "Higher Education: Introduce registration requirements for franchise providers with 300 or more students from 1 September 2028, to strengthen quality and oversight of franchised provision", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 91 (Spend); exchequer impact GBP m by FY: {'2026-27': '30', '2027-28': '70', '2028-29': '200', '2029-30': '220', '2030-31': '200', '2031-32': '225'}", + "table_61_line": 91, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "regulation", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A regulatory change (registration of franchised higher education providers) with no tax or benefit rule for households.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /higher_education|franchise|student/. Parameters: 13 node(s) ['gov.dfe.disabled_students_allowance.maximum', 'gov.dfe.maintenance_loans.independent_student_age', 'gov.hmrc.student_loans.interest_rates.plan_1.boe_margin', 'gov.hmrc.student_loans.interest_rates.plan_2.additional_rate', 'gov.hmrc.student_loans.interest_rates.plan_2.upper_threshold', 'gov.hmrc.student_loans.interest_rates.postgraduate_additional_rate']. Variables: 22 ['adult_dependants_grant_adult_receives_student_finance', 'childcare_grant_full_time_student', 'childcare_grant_student_finance_eligible', 'disabled_students_allowance', 'disabled_students_allowance_course_eligible', 'disabled_students_allowance_eligible']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__high_needs_local_authority_spending", + "title": "Local Authority Spending: Impact of adjustments to high needs budget on local authority spending", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 92 (Spend); exchequer impact GBP m by FY: {'2026-27': '105', '2027-28': '140', '2028-29': '0', '2029-30': '0', '2030-31': '0', '2031-32': '0'}", + "table_61_line": 92, + "table_61_head": "Spend", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "public_spending", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (local authority high needs budgets), out of the household model's scope. The engine's spending channel, gov.contrib.policyengine.budget.education ('Increase in education, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset'), distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /high_needs|special_educational|send/. Parameters: 2 node(s) ['gov.dfe.childcare_grant.eligible_child.max_age.special_educational_needs', 'gov.local_authorities.council_tax.band_d.amounts.ROSSENDALE']. Variables: 1 ['childcare_grant_child_has_special_educational_needs']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__benefits_in_kind_payrolling_delay", + "title": "Benefits in Kind (BiKs): Delay mandatory payrolling of company cars, vans, fuel and medical benefits from 6 April 2026 to 6 April 2027, with remaining BiKs implemented from 6 April 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 94 (Tax); exchequer impact GBP m by FY: {'2026-27': '-30', '2027-28': '-5', '2028-29': '0', '2029-30': '0', '2030-31': '-5', '2031-32': '-5'}", + "table_61_line": 94, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "compliance_and_administration", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (the timing of mandatory payrolling of benefits in kind): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /benefit_in_kind|payroll/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__low_value_imports_customs_relief_removed", + "title": "Low Value Imports: Remove the £135 customs duty relief and introduce new customs arrangements from October 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 95 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '215', '2029-30': '0', '2030-31': '-10', '2031-32': '-15'}", + "table_61_line": 95, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (customs duty relief on low value imports), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /customs|low_value|import/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__ets_energy_from_waste_delay", + "title": "Emissions Trading Scheme (ETS): Delay the inclusion of energy from waste in the ETS", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 96 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-125', '2029-30': '-490', '2030-31': '-450', '2031-32': '-440'}", + "table_61_line": 96, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "indirect_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An indirect tax or duty collected from businesses (the Emissions Trading Scheme's coverage of energy from waste), out of the household model's scope. The engine's consumer channel, gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /emissions_trading|\\bets\\b|carbon/. Parameters: 37 node(s) ['gov.contrib.ubi_center.carbon_tax.consumer_incidence', 'gov.contrib.ubi_center.carbon_tax.rate', 'gov.economic_assumptions.yoy_growth.carbon_intensity', 'gov.economic_assumptions.indices.carbon_intensity', 'household.consumption.carbon.consumption', 'household.consumption.carbon.emissions.food_and_non_alcoholic_beverages']. Variables: 2 ['carbon_consumption', 'carbon_tax']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__gas_distribution_revenue_recognition_spread", + "title": "Corporation Tax: Spread the one-off impact of revenue recognition changes for qualifying gas distribution activities over five years for accounting periods ending on or after 31 December 2026", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 97 (Tax); exchequer impact GBP m by FY: {'2026-27': '-160', '2027-28': '40', '2028-29': '40', '2029-30': '40', '2030-31': '40', '2031-32': '0'}", + "table_61_line": 97, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (corporation tax on gas distribution revenue), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /corporation_tax|gas_distribution/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__us_llc_double_taxation_relief", + "title": "International Investors: Relieve double taxation for UK investors in US Limited Liability Companies and similar entities from early 2028", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 line 98 (Tax); exchequer impact GBP m by FY: {'2026-27': '0', '2027-28': '0', '2028-29': '-5', '2029-30': '-10', '2030-31': '-5', '2031-32': '-5'}", + "table_61_line": 98, + "table_61_head": "Tax", + "table_61_heading": "Other policy measures including pre-announced policies > Other measures", + "program": "business_tax", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (double taxation relief for investors in US LLCs), out of the household model's scope: it changes what companies owe. The engine's corporate channel, gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital'), spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /double_taxation|foreign_income|llc/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__sovereign_ai_financial_transactions", + "title": "SovAI: Additional funding for Sovereign AI to invest in and support the UK's promising AI companies", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.2 line 4 (financial transactions, no Table 6.1 line); cash impact GBP m by FY: {'2026-27': '-25', '2027-28': '-45', '2028-29': '-45', '2029-30': '-45', '2030-31': '0', '2031-32': '0'}", + "table_62_line": 4, + "program": "financial_transactions", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (Sovereign AI): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /sovereign|artificial_intelligence/. Parameters: 0 node(s) []. Variables: 0 []. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__package_total_policy_decisions", + "title": "Table 6.1 total policy decisions", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 row 'Total policy decisions'; GBP m by FY: {'2026-27': '-7595', '2027-28': '-2475', '2028-29': '730', '2029-30': '5190', '2030-31': '6135', '2031-32': '7350'}", + "program": "package", + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "ab2026__bus_fare_cap_2_england_outside_london_2027", + "ab2026__mileage_allowance_payments_55p", + "ab2026__parental_allowance_fathers_partners_adopters", + "ab2026__carers_allowance_earnings_taper", + "ab2026__uc_surplus_earnings_threshold_2500_extended", + "ab2026__early_years_books_access", + "ab2026__food_and_heating_oil_tariff_suspensions", + "ab2026__cash_isa_limit_held_at_20000", + "ab2026__business_rates_pubs_relief_35pc", + "ab2026__business_rates_sbrr_rhl_thresholds_raised", + "ab2026__business_rates_rhl_transitional_support", + "ab2026__trading_allowance_3000", + "ab2026__business_tariff_suspensions", + "ab2026__climate_change_levy_rates_2028", + "ab2026__red_diesel_duty_cut", + "ab2026__alcohol_duty_small_producer_relief", + "ab2026__good_growth_funds", + "ab2026__business_rates_retention_mayoral_authorities", + "ab2026__local_apprenticeship_services", + "ab2026__regional_growth_investments", + "ab2026__cambridge_development_corporation", + "ab2026__strategic_authorities_capacity_funding", + "ab2026__founders_relief_cgt", + "ab2026__rd_relief_claim_notification_form_removed", + "ab2026__emi2_option_limit_120000", + "ab2026__british_business_bank_backing_innovation", + "ab2026__national_wealth_fund_capital", + "ab2026__artificial_intelligence_package", + "ab2026__ev_charging_public_chargers", + "ab2026__rough_sleeping_investment", + "ab2026__rough_sleeping_reprioritised_mhclg_budgets", + "ab2026__social_and_affordable_homes_programme", + "ab2026__vat_zero_rate_land_for_social_housing", + "ab2026__your_first_home_equity_loan", + "ab2026__first_time_buyer_isa", + "ab2026__lifetime_isa_withdrawal_charge_20pc_above_cap", + "ab2026__defence_investment_plan_further_savings", + "ab2026__defence_investment_plan_capital_reallocation", + "ab2026__defence_admin_savings_reinvested", + "ab2026__ukraine_winter_air_defence", + "ab2026__uk_export_finance_defence_capacity", + "ab2026__hmrc_tax_gap_package", + "ab2026__online_marketplace_liability_uk_businesses", + "ab2026__dwp_fraud_and_error_prevention", + "ab2026__benefits_removed_hospitalised_serious_offenders", + "ab2026__distributions_framework_modernised", + "ab2026__advance_corporation_tax_abolished", + "ab2026__vat_reverse_charge_overseas_services_restricted", + "ab2026__pension_tax_allowance", + "ab2026__pension_death_benefits_two_year_rule_removed", + "ab2026__foreign_sovereign_investments_taxation", + "ab2026__bank_surcharge_6pc_temporary", + "ab2026__machine_games_duty_higher_stake_25pc", + "ab2026__business_rates_vape_shops_and_agcs_reliefs_removed", + "ab2026__writing_down_allowance_12pc_and_fya_50pc", + "ab2026__private_hire_operators_vat_full_fare", + "ab2026__badr_lifetime_limit_500000", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp", + "ab2026__civil_service_admin_budgets_cut_20pc", + "ab2026__civil_service_ai_fund", + "ab2026__hgv_ved_1_for_12_months", + "ab2026__vat_5pc_family_days_out_summer_2026", + "ab2026__free_bus_travel_children_august_2026", + "ab2026__foreign_permanent_establishment_exemption_mandatory", + "ab2026__electricity_generator_levy_55pc", + "ab2026__british_industrial_competitiveness_scheme", + "ab2026__carbon_price_support_removed", + "ab2026__youth_guarantee_and_apprenticeships_spring_2026", + "ab2026__union_learning_fund", + "ab2026__investment_for_growth", + "ab2026__growth_guarantee_scheme_expansion", + "ab2026__leeds_city_fund", + "ab2026__uk_india_ceta_and_double_contributions_convention", + "ab2026__steel_tariff_and_quotas", + "ab2026__securities_transfer_tax", + "ab2026__business_rates_ev_charging_relief", + "ab2026__misogyny_prevention_programmes", + "ab2026__infected_blood_compensation_additional_report", + "ab2026__student_loan_interest_cap_6pc_plan_2_and_3", + "ab2026__waste_crime_landfill_tax_clearances", + "ab2026__further_priorities_nhs_and_vawg", + "ab2026__company_car_tax_rates_2030_31", + "ab2026__supported_housing_licensing", + "ab2026__vat_zero_rate_donated_medicines", + "ab2026__vat_medical_deputies_staffing", + "ab2026__landfill_communities_fund_credit_cap", + "ab2026__franchised_higher_education_registration", + "ab2026__high_needs_local_authority_spending", + "ab2026__hvcts_deferrals_discounts_exemptions", + "ab2026__benefits_in_kind_payrolling_delay", + "ab2026__low_value_imports_customs_relief_removed", + "ab2026__ets_energy_from_waste_delay", + "ab2026__gas_distribution_revenue_recognition_spread", + "ab2026__us_llc_double_taxation_relief" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "88 of 98 legs are not expressible and 1 is partial (line 4) (see each leg's verdict); a PolicyEngine number covers only the 9 expressible legs: ['ab2026__household_energy_payment_100_bands_a_to_d', 'ab2026__electricity_vat_zero_rate_to_july_2027', 'ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred', 'ab2026__carers_allowance_earnings_taper', 'ab2026__trading_allowance_3000', 'ab2026__pension_tax_allowance', 'ab2026__badr_lifetime_limit_500000', 'ab2026__property_income_rates_plus_2pp', 'ab2026__savings_income_rates_plus_2pp']", + "expressible_legs": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "ab2026__carers_allowance_earnings_taper", + "ab2026__trading_allowance_3000", + "ab2026__pension_tax_allowance", + "ab2026__badr_lifetime_limit_500000", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ] + }, + { + "measure_key": "ab2026__package_total_tax_policy_decisions", + "title": "Table 6.1 total tax policy decisions", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 row 'Total tax policy decisions'; GBP m by FY: {'2026-27': '-1645', '2027-28': '695', '2028-29': '2865', '2029-30': '5550', '2030-31': '6495', '2031-32': '6970'}", + "program": "package", + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "ab2026__mileage_allowance_payments_55p", + "ab2026__food_and_heating_oil_tariff_suspensions", + "ab2026__cash_isa_limit_held_at_20000", + "ab2026__business_rates_pubs_relief_35pc", + "ab2026__business_rates_sbrr_rhl_thresholds_raised", + "ab2026__business_rates_rhl_transitional_support", + "ab2026__trading_allowance_3000", + "ab2026__business_tariff_suspensions", + "ab2026__climate_change_levy_rates_2028", + "ab2026__red_diesel_duty_cut", + "ab2026__alcohol_duty_small_producer_relief", + "ab2026__founders_relief_cgt", + "ab2026__emi2_option_limit_120000", + "ab2026__vat_zero_rate_land_for_social_housing", + "ab2026__uk_export_finance_defence_capacity", + "ab2026__hmrc_tax_gap_package", + "ab2026__online_marketplace_liability_uk_businesses", + "ab2026__distributions_framework_modernised", + "ab2026__advance_corporation_tax_abolished", + "ab2026__vat_reverse_charge_overseas_services_restricted", + "ab2026__pension_tax_allowance", + "ab2026__pension_death_benefits_two_year_rule_removed", + "ab2026__foreign_sovereign_investments_taxation", + "ab2026__bank_surcharge_6pc_temporary", + "ab2026__machine_games_duty_higher_stake_25pc", + "ab2026__business_rates_vape_shops_and_agcs_reliefs_removed", + "ab2026__writing_down_allowance_12pc_and_fya_50pc", + "ab2026__private_hire_operators_vat_full_fare", + "ab2026__badr_lifetime_limit_500000", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp", + "ab2026__hgv_ved_1_for_12_months", + "ab2026__vat_5pc_family_days_out_summer_2026", + "ab2026__foreign_permanent_establishment_exemption_mandatory", + "ab2026__electricity_generator_levy_55pc", + "ab2026__carbon_price_support_removed", + "ab2026__leeds_city_fund", + "ab2026__uk_india_ceta_and_double_contributions_convention", + "ab2026__steel_tariff_and_quotas", + "ab2026__securities_transfer_tax", + "ab2026__business_rates_ev_charging_relief", + "ab2026__company_car_tax_rates_2030_31", + "ab2026__vat_zero_rate_donated_medicines", + "ab2026__vat_medical_deputies_staffing", + "ab2026__landfill_communities_fund_credit_cap", + "ab2026__hvcts_deferrals_discounts_exemptions", + "ab2026__benefits_in_kind_payrolling_delay", + "ab2026__low_value_imports_customs_relief_removed", + "ab2026__ets_energy_from_waste_delay", + "ab2026__gas_distribution_revenue_recognition_spread", + "ab2026__us_llc_double_taxation_relief" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "46 of 53 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 7 expressible legs: ['ab2026__electricity_vat_zero_rate_to_july_2027', 'ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred', 'ab2026__trading_allowance_3000', 'ab2026__pension_tax_allowance', 'ab2026__badr_lifetime_limit_500000', 'ab2026__property_income_rates_plus_2pp', 'ab2026__savings_income_rates_plus_2pp']", + "expressible_legs": [ + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "ab2026__trading_allowance_3000", + "ab2026__pension_tax_allowance", + "ab2026__badr_lifetime_limit_500000", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ] + }, + { + "measure_key": "ab2026__package_total_spending_policy_decisions", + "title": "Table 6.1 total spending policy decisions", + "reported_status": "announced", + "source_note": "HM Treasury, Budget 2026 Table 6.1 row 'Total spending policy decisions'; GBP m by FY: {'2026-27': '-5950', '2027-28': '-3170', '2028-29': '-2135', '2029-30': '-355', '2030-31': '-360', '2031-32': '380'}", + "program": "package", + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__bus_fare_cap_2_england_outside_london_2027", + "ab2026__parental_allowance_fathers_partners_adopters", + "ab2026__carers_allowance_earnings_taper", + "ab2026__uc_surplus_earnings_threshold_2500_extended", + "ab2026__early_years_books_access", + "ab2026__good_growth_funds", + "ab2026__business_rates_retention_mayoral_authorities", + "ab2026__local_apprenticeship_services", + "ab2026__regional_growth_investments", + "ab2026__cambridge_development_corporation", + "ab2026__strategic_authorities_capacity_funding", + "ab2026__rd_relief_claim_notification_form_removed", + "ab2026__british_business_bank_backing_innovation", + "ab2026__national_wealth_fund_capital", + "ab2026__artificial_intelligence_package", + "ab2026__ev_charging_public_chargers", + "ab2026__rough_sleeping_investment", + "ab2026__rough_sleeping_reprioritised_mhclg_budgets", + "ab2026__social_and_affordable_homes_programme", + "ab2026__your_first_home_equity_loan", + "ab2026__first_time_buyer_isa", + "ab2026__lifetime_isa_withdrawal_charge_20pc_above_cap", + "ab2026__defence_investment_plan_further_savings", + "ab2026__defence_investment_plan_capital_reallocation", + "ab2026__defence_admin_savings_reinvested", + "ab2026__ukraine_winter_air_defence", + "ab2026__dwp_fraud_and_error_prevention", + "ab2026__benefits_removed_hospitalised_serious_offenders", + "ab2026__civil_service_admin_budgets_cut_20pc", + "ab2026__civil_service_ai_fund", + "ab2026__free_bus_travel_children_august_2026", + "ab2026__british_industrial_competitiveness_scheme", + "ab2026__youth_guarantee_and_apprenticeships_spring_2026", + "ab2026__union_learning_fund", + "ab2026__investment_for_growth", + "ab2026__growth_guarantee_scheme_expansion", + "ab2026__misogyny_prevention_programmes", + "ab2026__infected_blood_compensation_additional_report", + "ab2026__student_loan_interest_cap_6pc_plan_2_and_3", + "ab2026__waste_crime_landfill_tax_clearances", + "ab2026__further_priorities_nhs_and_vawg", + "ab2026__supported_housing_licensing", + "ab2026__franchised_higher_education_registration", + "ab2026__high_needs_local_authority_spending" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "42 of 45 legs are not expressible and 1 is partial (line 4) (see each leg's verdict); a PolicyEngine number covers only the 2 expressible legs: ['ab2026__household_energy_payment_100_bands_a_to_d', 'ab2026__carers_allowance_earnings_taper']", + "expressible_legs": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__carers_allowance_earnings_taper" + ] + }, + { + "measure_key": "ab2026__package_household_energy_vat_and_fuel_duty", + "title": "The Household Energy Payment, zero VAT on domestic electricity and the fuel duty cut, together", + "reported_status": "announced", + "source_note": "A composition of Table 6.1 lines that producers score together; see `package_of`.", + "program": "package", + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred" + ], + "pe_reform_delta": null, + "computability": "expressible", + "engine_baseline_2026": {}, + "note": "Every leg is expressible; a counterpart is the legs' runs combined, stated as constructed." + }, + { + "measure_key": "ab2026__package_policyengine_seven", + "title": "The seven household measures PolicyEngine modelled on Budget day, together", + "reported_status": "announced", + "source_note": "PolicyEngine's combined Budget-day run of Table 6.1 lines 1, 2, 3, 7, 15, 52 and 61 (receipt in pe_modifier); no producer row uses it", + "program": "package", + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "ab2026__carers_allowance_earnings_taper", + "ab2026__trading_allowance_3000", + "ab2026__pension_tax_allowance", + "ab2026__property_income_rates_plus_2pp" + ], + "pe_reform_delta": null, + "computability": "expressible", + "engine_baseline_2026": {}, + "pe_modifier": { + "module": "src/uk_budget_data/reforms.py", + "function": "AUTUMN_BUDGET_2026_COMBINED_COMPONENTS", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [], + "parameter_legs": [], + "receipt": { + "repo": "PolicyEngine/uk-autumn-budget-dashboard-2026", + "commit": "1eca3182d6983b6375f401a3565ac56c25fa401e", + "path": "public/data/artifacts/combined--f91fe847275730cb/4faed20984703c7d/receipt.json", + "receipt_file_sha256": "a00d0614eeed1c5cfaa63353d08a604a433bf881329bfd2d7b60c1681c243e67", + "reform_sha256": "09498c7b550716444725ef211725c894bc0efa13bd6c855efb8bdadc93b0e834", + "reform_binding": "code_revision", + "generated_at": "2026-10-28T17:54:34.931664+00:00", + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)" + } + }, + "note": "Run as one simulation of all seven measures (the combined run), not as a sum of the seven runs." + } + ] +} diff --git a/pipeline/ab2026_harvest_contract.py b/pipeline/ab2026_harvest_contract.py new file mode 100644 index 000000000..10c8b77e7 --- /dev/null +++ b/pipeline/ab2026_harvest_contract.py @@ -0,0 +1,1062 @@ +"""The AB2026 harvest row contract (#230), as one checkable function. + +sources/harvest-uk-ab2026-2026-10-29/README.md states the contract: the AB2025 +row contract with the AB2026 exceptions. tests/test_uk_ab2026_harvest.py +holds every pinned family to it, and a family being staged can be checked on +its own before COUNTS.json pins it: + + python pipeline/ab2026_harvest_contract.py sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026 +""" + +import gzip +import json +import math +import re +import sys +import zlib +from collections import defaultdict +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +UK = ROOT / "data" / "uk" +FISCAL_EVENT = "autumn_budget_2026" + +REQUIRED = { + "source", + "source_model", + "value", + "value_raw", + "normalization", + "value_kind", + "period", + "time_basis", + "conditions", + "reform_hint", + "measure_key", + "attribution", + "benchmark_class", + "baseline_policy", + "publication", + "source_table", + "source_column", + "quote", + "parse_confidence", + "status", +} +OPTIONAL = { + "metric", + "proposed_metric", + "unit_concept", + "proposed_unit", + "proposed_baseline", + "note", + "local_artifact", +} +ATTRIBUTION = {"own", "restated", "same_assumptions"} +BENCHMARK_CLASS = {"different_model", "administrative_fact", "same_assumptions"} +VALUE_KIND = { + "point", + "central", + "range_low", + "range_high", + "approx_chart_reading", + "cumulative", + "categorical", +} +TIME_BASIS = {"fiscal_year", "annual", "point_in_time"} +CONFIDENCE = {"high", "medium", "low"} +# What a malformed row could still raise when the checks reach it, after +# type_problems has turned away each field of the wrong type: an integer with +# too many digits to print, or nesting too deep to print or encode. The +# checker reports these as problems (review A H-6(h); delta review D1-3; +# final review F3). _number turns away an integer too large for a float +# before any arithmetic, so no check overflows. +MALFORMED = ( + TypeError, + AttributeError, + KeyError, + ValueError, + RecursionError, +) +# README rule 6: HM Treasury and OBR material is under the Open Government +# Licence and quoted whole; every other producer's quote stays under 15 words. +OGL = {"hm_treasury", "obr_efo"} +# A slug of lower-case words joined by single underscores (review A H-6(f)). +PROPOSED_KEY = re.compile(r"ab2026(_option)?__[a-z0-9]+(_[a-z0-9]+)*") +BARE_PACKAGE = re.compile(r"ab2026__package") +SHA256 = re.compile(r"[0-9a-f]{64}") +# Rule 9: a component names its part on a part row; OBR workbook totals mark +# themselves `measure_total` (review A H-1). +COMPONENT_ROW_TYPES = {"measure_component", "measure_total"} +# conditions.geography is a closed code (review A H-6(d)); prose goes in +# conditions.geography_note. +GEOGRAPHY = { + "UK", + "GB", + "England", + "Wales", + "Scotland", + "Northern Ireland", + "England and Wales", + "UK_excl_scotland", + "Scotland, Wales and Northern Ireland", + "not stated", + # countries a producer compares the UK with + "France", + "Germany", + "Ireland", + "Italy", + "Netherlands", + "Singapore", + "Spain", + "US", +} +# A `normalization` that documents a sign taken from the wording, not from a +# printed minus (review A H-2(3)). +WORDED_SIGN = re.compile(r"sign from the wording|carried negative|-> -\d|→ negative") +# A percentage is stored as a share or in percent units. +PERCENT = (0.01, 1.0) + +# README, "Row contract additions": the checker reads value_raw only when the +# whole string, in lower case with its spaces collapsed, matches a form below. +# It reports anything else, and we narrow value_raw to the number, which the +# quote still contains. So no part of a number, and no number among other words, +# passes as the row's value. +ONES = { + "one": 1, + "two": 2, + "three": 3, + "four": 4, + "five": 5, + "six": 6, + "seven": 7, + "eight": 8, + "nine": 9, + "ten": 10, + "eleven": 11, + "twelve": 12, + "thirteen": 13, + "fourteen": 14, + "fifteen": 15, + "sixteen": 16, + "seventeen": 17, + "eighteen": 18, + "nineteen": 19, +} +TENS = { + "twenty": 20, + "thirty": 30, + "forty": 40, + "fifty": 50, + "sixty": 60, + "seventy": 70, + "eighty": 80, + "ninety": 90, +} +COUNTS = ONES | TENS | {"a": 1, "an": 1, "zero": 0} +# A multiplier after a number: a word, or after digits a short form +LARGE = {"thousand": 1e3, "million": 1e6, "billion": 1e9, "trillion": 1e12} +SHORT = {"bn": 1e9, "mn": 1e6, "m": 1e6, "k": 1e3, "tn": 1e12} +MULTIPLIERS = LARGE | SHORT | {"hundred": 100} +NUMERATORS = {"a": 1, "an": 1, "another": 1} | { + w: v for w, v in ONES.items() if v <= 10 +} +DENOMINATORS = { + "half": 2, + "halves": 2, + "third": 3, + "thirds": 3, + "quarter": 4, + "quarters": 4, + "fourth": 4, + "fourths": 4, + "fifth": 5, + "fifths": 5, + "sixth": 6, + "sixths": 6, + "seventh": 7, + "sevenths": 7, + "eighth": 8, + "eighths": 8, + "ninth": 9, + "ninths": 9, + "tenth": 10, + "tenths": 10, +} +QUALIFIERS = { + "about", + "almost", + "approx.", + "approximately", + "around", + "at least", + "at most", + "fewer than", + "just over", + "just under", + "less than", + "more than", + "nearly", + "over", + "roughly", + "some", + "under", + "up to", +} +# Words after the number that leave it as it is +TAILS = {"a year", "of gdp"} +# Words that print a zero +ZERO = {"nil", "no change", "no impact", "no overall impact", "none", "nothing"} +# A dash prints a zero only if one whole clause of the normalization says the +# producer prints it for nil ("dash for nil", "the table prints nil as a dash"), +# since a table may also print one for "not available". +_DASHES = "-−–—‐‑‒―" +DASHES = set(_DASHES) +NIL = re.compile( + r"(?:(?:(?:the )?(?:table|producer|source|workbook) )?prints? )?" + r"(?:nil (?:as|=) (?:a )?dash|(?:a |the )?dash(?:es)? (?:for|means?|=) nil)" +) +# After a bare "in", a year gives no denominator: "5 in 2027" +YEAR = re.compile(r"20[1-9][0-9]") + + +def _either(words): + """A regex alternation of words, the longest first.""" + return "|".join(re.escape(w) for w in sorted(words, key=len, reverse=True)) + + +_SIGN = "[-+−–]" +_DIGITS = ( + r"(?:(?:[0-9]{1,3}(?:,[0-9]{3})+|[0-9]+)(?:\.[0-9]+)?|\.[0-9]+)(?:e[-+]?[0-9]+)?" +) +_LARGE = _either(LARGE) +_UNITS = _either(w for w, n in ONES.items() if n < 10) +_TEENS = _either(w for w, n in ONES.items() if n >= 10) +_BELOW_100 = rf"(?:(?:{_either(TENS)})(?:[ -](?:{_UNITS}))?|{_TEENS}|{_UNITS})" +_BELOW_1000 = ( + rf"(?:(?:{_UNITS}|an?)[ -]hundred(?:(?:[ -]and)?[ -]{_BELOW_100})?|{_BELOW_100})" +) +# Number words with one multiplier or none: "twenty-five", "a hundred and +# five", "two hundred thousand", "a million" +_WORDS = rf"(?:zero|{_BELOW_1000}(?:[ -](?:{_LARGE}))?|an?[ -](?:{_LARGE}))" +# After digits, one multiplier: "2.5bn", "2 m", "2 million", "2-million" +_TIMES = rf"(?: ?(?:{_either(SHORT)})|[ -]?(?:hundred|{_LARGE}))" +_PERCENT = r"(?: ?%| per ?cent| percentage points?| ?ppts?| ?pp)" +# Digits with an optional sign and currency sign: "-£1.7bn", "£-1.7bn", "+434m" +_FIGURE = ( + rf"(?P(?:{_SIGN}[£$€]?|[£$€]{_SIGN}?)?)(?P{_DIGITS})" + rf"(?:(?P{_TIMES})|(?P{_PERCENT}))?" +) +FIGURE = re.compile(_FIGURE) +WORDED = re.compile( + rf"(?P{_SIGN})?(?P{_WORDS})(?P{_PERCENT})?", +) +_PART = rf"(?:{_either(NUMERATORS)})[ -](?:{_either(DENOMINATORS)})" +# A worded fraction, perhaps of a multiplier or a percentage: "half", +# "three-fifths", "half a million", "half million", "a quarter of a percentage +# point", "half of one per cent", "half per cent" +FRACTION = re.compile( + rf"(?P{_SIGN})?(?Phalf|{_PART})" + r"(?:(?:(?: of)? (?:an?|one))?" + rf"(?: (?Phundred|{_LARGE})|(?P{_PERCENT})))?" +) +# A whole number and a fraction: "two and a half million", "2 and a third", "one +# hundred and a half" +MIXED = re.compile( + rf"(?P{_SIGN})?(?P{_DIGITS}|{_BELOW_1000}) and (?P{_PART})" + rf"(?:[ -](?P{_either(SHORT)}|{_LARGE})|(?P{_PERCENT}))?" +) +_COUNT = rf"(?:{_DIGITS}{_TIMES}?|{_WORDS})" +# Two numbers joined all by spaces or all by hyphens. A sign comes before N or, +# with spaces, before M. +RATIO = re.compile( + rf"(?P{_SIGN})?(?P{_COUNT})" + r"(?: (?:in(?: every)?|out of(?: every)?) " + rf"(?P{_SIGN})?|-(?:in(?:-every)?|out-of(?:-every)?)-)" + rf"(?P{_COUNT})" +) +_FIGURE_END = _FIGURE.replace("?P", "?:").replace("?P", "?:") +_FIGURE_END = _FIGURE_END.replace("?P", "?:").replace("?P", "?:") +DASHED = re.compile(rf"(?P{_FIGURE_END})(?:[-–—]| [-–—] )(?P{_FIGURE_END})") +WHOLE = re.compile( + rf"(?:(?:{_either(QUALIFIERS)}) )?(?:an? (?=[-+−–£$€.0-9]))?" + rf"(?P.*?)(?: (?:{_either(TAILS)}))?" +) + + +def _signed(lead, number): + """The number, negative if its lead holds a minus.""" + return -number if lead and set(lead) & set("-−–") else number + + +def _own(times, percent): + """The scales a number's own word gives it, or None.""" + if percent: + return PERCENT + return (MULTIPLIERS[times.strip(" -")],) if times else None + + +def _in_words(words): + """The number and the multiplier that WORDED's words print.""" + number, large = 0, 1 + for w in re.split("[ -]", words): + if w in LARGE: + large = LARGE[w] + elif w == "hundred": + number *= 100 + elif w != "and": + number += COUNTS[w] + return number, large + + +def _part(text): + """The share that a worded fraction prints.""" + if text == "half": + return 1 / 2 + top, bottom = re.split("[ -]", text) + return NUMERATORS[top] / DENOMINATORS[bottom] + + +def _one_number(text): + """One number, as (number, its own scales or None, its kind), or None. Its + kind says how value_problems compares it: "digits" and "words" exactly, + "rounded" and "share" within 0.1%, and "share" in percent units on a percent + row.""" + m = FIGURE.fullmatch(text) + if m: + number = float(m["digits"].replace(",", "")) + if not math.isfinite(number): + return None + own = _own(m["times"], m["percent"]) + return _signed(m["lead"], number), own, "digits" + m = WORDED.fullmatch(text) + if m: + number, large = _in_words(m["words"]) + if m["percent"] and large != 1: + return None + own = _own(None, m["percent"]) or ((large,) if large != 1 else None) + return _signed(m["sign"], float(number)), own, "words" + m = FRACTION.fullmatch(text) + if m: + number = _signed(m["sign"], _part(m["fraction"])) + own = _own(m["times"], m["percent"]) + return number, own, "rounded" if own else "share" + m = MIXED.fullmatch(text) + if m: + whole = m["whole"] + digits = whole[0] in "0123456789." + count = float(whole.replace(",", "")) if digits else _in_words(whole)[0] + if not math.isfinite(count): + return None + number = _signed(m["sign"], count + _part(m["fraction"])) + return number, _own(m["times"], m["percent"]), "rounded" + return None + + +def _count(text): + """A ratio's N or M at its multiplier, or None if it isn't finite.""" + one = _one_number(text) + if one is None: + return None + number, own, _ = one + count = number * (own[0] if own else 1) + return count if math.isfinite(count) else None + + +def _printed(text): + """What one number, ratio or range prints, as a list of _one_number's tuples, + or None.""" + one = _one_number(text) + if one: + return [one] + m = RATIO.fullmatch(text) + if m: + joint = text[m.end("n") : m.start("m")].strip(" -+−–") + if joint == "in" and YEAR.fullmatch(m["m"]): + return None + top, bottom = _count(m["n"]), _count(m["m"]) + if top is None or not bottom: + return None + share = _signed(m["sign_n"], _signed(m["sign_m"], top / bottom)) + return [(share, None, "share")] + m = DASHED.fullmatch(text) or re.fullmatch(r"(?P.+) to (?P.+)", text) + if m: + low, high = _one_number(m["a"]), _one_number(m["b"]) + if not (low and high) or (low[1] and not high[1]): + return None + # A fraction before a percentage could read as a share or as part of a + # percentage point: "a third to 40%" + if low[2] == "share" and high[1] == PERCENT: + return None + # The first number takes the second's word: "£4-5 million" + if high[1] and not low[1]: + kind = "rounded" if low[2] == "share" else low[2] + low = (low[0], high[1], kind) + # A range joins like with like, and only a range of no positive number + # may run downward, so "4% to 2 million", "2025-26" and "2 to -3" aren't + # ranges, and "-4 to -5" is + if (low[1] == PERCENT) != (high[1] == PERCENT): + return None + a, b = (number * (own[0] if own else 1) for number, own, _ in (low, high)) + if a > 0 and a > b: + return None + return [low, high] + return None + + +def _restates(first, second): + """Whether a ratio or worded fraction and a percentage, in either order, agree + to the nearest percentage point: "one third (33%)", "25% (1 in 4)".""" + if len(first) != 1 or len(second) != 1: + return False + if first[0][2] == "share": + share, percent = first[0], second[0] + else: + share, percent = second[0], first[0] + return ( + share[2] == "share" + and percent[1] == PERCENT + and abs(100 * share[0] - percent[0]) <= 0.5 + 1e-9 + ) + + +def _says_nil(normalization): + """Whether one whole clause of a normalization declares a dash for nil.""" + clauses = re.split(r"[;,.()]", normalization.lower()) + return any(NIL.fullmatch(" ".join(c.split())) for c in clauses) + + +def _read(raw, normalization=""): + """What value_raw prints, as a list of _one_number's tuples, or None if + it matches no form the checker reads.""" + text = " ".join(raw.lower().split()) + if text in DASHES and _says_nil(normalization): + return [(0.0, (1,), "words")] + body = WHOLE.fullmatch(text)["body"] + if body in ZERO: + return [(0.0, (1,), "words")] + both = re.fullmatch(r"(.+) \((.+)\)", body) + if not both: + return _printed(body) + first, second = _printed(both[1]), _printed(both[2]) + return first + second if first and second and _restates(first, second) else None + + +_STEP = r"[x×*/÷]\s*\.?[0-9][^\s;]*" +_CHAIN = re.compile(rf"(?:^|(?<=[\s(\[]))({_STEP}(?:\s+{_STEP})*)") +_OPERAND = re.compile(rf"10(?:\^|\*\*)(?P[0-9]+)|{_DIGITS}") +# What would carry on a number the chain seems to end: "x 1 000 000", "x 1 million", +# "x 1 hundred" +_CONTINUES = re.compile(rf"\s+(?:[0-9]|(?:{_either(MULTIPLIERS)})\b)") +# An operation on what the checker can't read as a number: a sign, bracket, quote +# or currency sign first ("x (1e6)", "x +1e6", "x '1e6'", "x £100"), or number words +# ("x one million", "x (a million)", "x half", "/ a quarter"). Also an operation in words ("times 1,000", +# "times by 1,000", "multiply by 1e6", "divided by 100", "scaled by 1e6", "x by 1e6", +# "× by 1e6"), and an operator with no space before it ("£m×1e6", "£m;x 1e6", +# "£m→x 1e6", "%/100", "£m/100"). +_OPENERS = rf"[{_DASHES}+(\[£$€'\"‘“]\s*" +_NUMBER_WORDS = rf"(?:{_WORDS}|hundred|{_LARGE}|half|{_PART})\b" +_ANY_OPERAND = rf"(?:{_OPENERS})*(?:\.?[0-9]|{_NUMBER_WORDS})" +_UNREAD = re.compile( + r"(?:^|(?<=[\s(\[]))(?:" + rf"[x×*/÷]\s*(?:(?:{_OPENERS})+\.?[0-9]|(?:{_OPENERS})*{_NUMBER_WORDS})" + rf"|(?:times(?:\s+by)?|(?:multipl|divid|scal)\w*\s+by|[x×*/÷]\s+by)\s+{_ANY_OPERAND}" + r")" + rf"|(?<=[^\s(\[*])[×*÷]\s*{_ANY_OPERAND}" + rf"|(?<=[;:,=>%)\]→])[x/]\s*{_ANY_OPERAND}" + rf"|(?<=[a-z])/\s*(?:{_OPENERS})*\.?[0-9]" +) + + +def _factors(normalization): + """The multipliers a normalization states ("x 1,000,000", "/ 100", "(x 10^6)"), + or None if it states one the checker can't read whole. Operations in a row + make one multiplier: "x 1,000,000 / 100" is 10,000.""" + text = re.sub(r"\s*(\^|\*\*)\s*", r"\1", (normalization or "").lower()) + if _UNREAD.search(text): + return None + out = [] + for chain in _CHAIN.finditer(text): + if _CONTINUES.match(text, chain.end()): + return None + factor = 1.0 + for step in re.findall(_STEP, chain[0]): + operand = _OPERAND.fullmatch(step[1:].strip().rstrip(",:.)]")) + if not operand: + return None + power = operand["power"] + f = float(f"1e{power}" if power else operand[0].replace(",", "")) + if not f or not math.isfinite(f): + return None + factor = factor / f if step[0] in "/÷" else factor * f + out.append(factor) + return out + + +def _number(v): + """A finite number. A bool isn't one, and neither is an integer too large + for a float (final review F3).""" + if isinstance(v, bool) or not isinstance(v, (int, float)): + return False + try: + return math.isfinite(v) + except OverflowError: + return False + + +def _text(v): + """A string with more than whitespace in it.""" + return isinstance(v, str) and bool(v.strip()) + + +# Floating-point error: a printed number at its scale and the stored value +# differ by at most four units in the last place (final review F2). Each +# staged value that matches a printed number, rather than a ratio or worded +# fraction, differs from it by at most one. +ULPS = 4 + + +def _same(a, b): + """A printed number at its scale, equal up to floating-point error.""" + if not (math.isfinite(a) and math.isfinite(b)): + return False + return abs(a - b) <= ULPS * math.ulp(max(abs(a), abs(b))) + + +def _rounded(a, b): + """A stored share of a printed fraction, rounded ("a third" -> 0.3333).""" + return math.isfinite(b) and math.isclose(a, b, rel_tol=1e-3) + + +def value_problems(r): + """review A H-2: `value` is finite and is value_raw's number at its scale, + with value_raw's sign unless the normalization documents a worded sign. A + number's own word sets its scale. Failing that, the normalization's factor + does, failing that 1. Delta review D1-1: a printed number matches exactly, + and only a fraction or a ratio's share may round. A `unit_concept: percent` + row stores a share in percent units, 100 times the fraction. A categorical + row prints a label with no digits. Any other row matches a form the checker + reads.""" + v = r["value"] + if isinstance(v, bool) or not isinstance(v, (int, float)): + return ["value is not a number"] + if not _number(v): + return ["value is not finite"] + raw = r["value_raw"] if isinstance(r["value_raw"], str) else "" + if r["value_kind"] == "categorical": + if re.search(r"\d", raw): + return [f"categorical value_raw {raw!r} prints a number"] + return [] + numbers = _read(raw, r.get("normalization") or "") + if numbers is None: + return [ + f"the checker can't read value_raw {raw!r} as one number; " + "narrow it to the number the row stores" + ] + factors = _factors(r.get("normalization") or "") + if factors is None: + return [ + "the checker can't read a factor in normalization; state one number " + "or power of 10" + ] + per = 100 if r.get("unit_concept") == "percent" else 1 + exact, near = [], [] + for number, own, kind in numbers: + if kind == "share": + near.append(per * number) + elif kind == "rounded": + near += [number * s for s in own or factors or (1,)] + else: + exact += [number * s for s in own or factors or (1,)] + if not ( + any(_same(abs(v), abs(p)) for p in exact) + or any(_rounded(abs(v), abs(f)) for f in near) + ): + return [f"value {v!r} is not value_raw {raw!r} at a stated scale"] + if ( + WORDED_SIGN.search(r.get("normalization") or "") + or any(_same(v, p) for p in exact) + or any(_rounded(v, f) for f in near) + ): + return [] + return [f"value {v!r} has the opposite sign to value_raw {raw!r}"] + + +# README rule 4. A locator that names Figure 1.A or 1.B ("Figure 1.A", "Fig. +# 1A", "Figure 1(a)", "Figures 1.A and 1.B") says where HM Treasury prints the +# number only if its first reference, up to its first comma or semicolon, takes +# one of the forms PRINTED reads and nothing more: a paragraph, table or box by +# its number, or a data label. The checker reads any other first reference as a +# bar reading, "Figure 1.A data label unavailable" included. Anywhere in a +# locator, a bar, chart, graph, plot, diagram or visual marks a bar reading, and +# so does a number taken from a figure or read by eye. A single negation just +# before the phrase cancels it ("not a bar reading", "didn't read it off the +# chart"), and a double negation in the same clause doesn't ("not without a bar +# reading"). The checker looks for these phrases with hyphens and dashes as +# spaces and with runs of spaces collapsed, and reads the first reference with +# each dash as a hyphen. +_DASH = f"[{_DASHES}]" +FIGURE_1 = re.compile(r"\bfig(?:ure)?s?\.?\s*1\.?\s*\(?[ab]\b", re.I) +_FIG = r"fig(?:ure)?s?\.?\s*1[.-]?\s*\(?[ab]\)?(?:\s+and\s+1[.-]?\s*\(?[ab]\)?)?" +_ID = r"\d+(?:\.[0-9a-z]+)*" +PRINTED = re.compile( + rf"(?:paragraph|para|table|box)(?:s|es)?\.?\s+{_ID}" + rf"(?:(?:\s+(?:and|to)\s+|\s*-\s*){_ID})?(?:\s+and\s+{_FIG})?" + rf"|(?:{_FIG}\s*:?\s+)?data[\s-]+labels?" + rf"(?:\s+(?:(?:for|on)\s+)?(?:decile|quintile)\s+\d+|\s+(?:for|on)\s+{_FIG})?", + re.I, +) +_PICTURE = r"(?:bars?|charts?|graphs?|plots?|diagrams?|visuals?)" +_FIGS = r"fig(?:ure)?s?(?![a-z])" +_OFF = r"(?:off|from)" +_OPEN = r"""[\[("'“‘]""" +_UP_TO = rf"(?:(?:{_OPEN} *)*[\w.][\w.'’]*[)\]\"”]* ){{0,4}}?(?:{_OPEN} *)*" +_AFTER = rf"(?::? |:|(?={_OPEN}))" +# A verb's whole phrase comes first, so that a negation before the verb cancels +# it: "read it off the decile 3 bar", "reading of the chart", "visual estimate of +# Figure 1.A". Then any picture, with a reading if it names one ("bar reading from +# Figure 1.A"), any number from a figure or a figure's column, and any reading by +# eye. A column of a table prints its number, so a column counts only in a figure. +# A colon, brackets or quotes may come before the figure: "read off: Fig. 1.A", "read +# from ("Figure 1.A")". A word there may hold an apostrophe or end a bracket or double +# quote: "taken from HMT's Figure 1.A", "read from (HMT) Figure 1.A", "read off the +# "Impact on households" Figure 1.A". +BAR_READING = re.compile( + r"\b(?:visual )?(?:(?:read|estimat|tak|measur)\w*|took)(?: [\w.]+){0,3}?" + rf" (?:off|from|on|in|using|of){_AFTER}{_UP_TO}(?:{_PICTURE}\b|{_FIGS})" + rf"|\b{_PICTURE}(?: read\w*(?: {_OFF}{_AFTER}{_UP_TO}{_FIGS})?)?\b" + rf"|\b{_OFF}{_AFTER}{_UP_TO}{_FIGS}" + rf"|\bcolumns?(?: [\w.]+){{0,2}}? (?:of|in|on){_AFTER}{_UP_TO}{_FIGS}" + r"|\b(?:read\w* )?by eye\b", + re.I, +) +DENIED = re.compile( + r"(?:\b(?:no|not|never|without|cannot)|n['’]t)\s+(?:(?:a|an|the|been)\s+)?\Z", re.I +) +NEGATION = re.compile(r"\b(?:no|not|never|without|cannot)\b|n['’]t\b", re.I) + + +def _keys(path): + return {m["measure_key"] for m in json.loads(path.read_text())["measures"]} + + +def registry_keys(): + """The AB2026 keys, and each earlier event's keys for Table 6.4 + recostings (README rule 2). AB2025 has two key spaces: the #136 port + registry and the events inventory.""" + earlier = { + p.name.removesuffix("_measures.json"): _keys(p) + for p in (UK / "events").glob("*_measures.json") + } + earlier["autumn_budget_2025"] |= _keys(UK / "ab2025_measures.json") + return _keys(UK / "ab2026_measures.json"), earlier + + +def enums(): + from scorecard_db.models import Metric, UnitConcept + + return {m.value for m in Metric}, {u.value for u in UnitConcept} + + +def read_rows(family_dir): + with gzip.open(Path(family_dir) / "claims_staged.jsonl.gz", "rt") as fh: + return [json.loads(line) for line in fh if line.strip()] + + +def read_manifest(family_dir): + text = (Path(family_dir) / "manifest.jsonl").read_text() + return [json.loads(line) for line in text.splitlines() if line.strip()] + + +# A line of a JSON-lines file that isn't JSON keeps its place as UNREADABLE. +UNREADABLE = object() + + +def _json_lines(path, label): + """A JSON-lines file's values, one per non-blank line, and a problem for + each line that isn't JSON or for a file that can't be read, never an + exception (final review F3). read_rows and read_manifest raise instead, + for the generators and tests that read checked families.""" + try: + if path.suffix == ".gz": + with gzip.open(path, "rt", encoding="utf-8") as fh: + text = fh.read() + else: + text = path.read_text(encoding="utf-8") + except (OSError, EOFError, ValueError, zlib.error) as e: + return [], [f"{path.name} cannot be read ({type(e).__name__})"] + values, out = [], [] + for line in text.split("\n"): # as read_rows splits a file's lines + if not line.strip(): + continue + try: + values.append(json.loads(line)) + except (ValueError, RecursionError): + out.append(f"{label} {len(values)}: is not JSON") + values.append(UNREADABLE) + return values, out + + +def proposed_keys(rows): + """The proposed measure keys a family's rows name (README rule 2). A + malformed row names none; row_problems reports it (delta review D1-3).""" + return { + r["conditions"]["proposed_measure_key"] + for r in rows + if isinstance(r, dict) + and isinstance(r.get("conditions"), dict) + and isinstance(r["conditions"].get("proposed_measure_key"), str) + and r["conditions"]["proposed_measure_key"] + } + + +# The AB2025 row contract's types (delta review R4): a string in each TEXT +# field, a string or null in each TEXT_OR_NULL field and PUBLICATION field, +# an integer in `period`, and an object of strings in `conditions`. +# value_problems checks `value`. +TEXT = { + "source", + "source_model", + "value_raw", + "normalization", + "value_kind", + "time_basis", + "attribution", + "benchmark_class", + "quote", + "parse_confidence", + "status", +} +TEXT_OR_NULL = { + "reform_hint", + "measure_key", + "baseline_policy", + "source_table", + "source_column", + "metric", + "proposed_metric", + "unit_concept", + "proposed_unit", + "proposed_baseline", + "note", + "local_artifact", +} +PUBLICATION = ( + "title", + "url", + "date", + "publisher", + "primary_sha256", + "locator", + "access", +) + + +def type_problems(r): + """Delta review R4: each field of r whose type the AB2025 row contract + doesn't allow, as strings.""" + out = [ + f"{f} is not a string" + for f in sorted(TEXT & set(r)) + if not isinstance(r[f], str) + ] + out += [ + f"{f} is not a string or null" + for f in sorted(TEXT_OR_NULL & set(r)) + if not (r[f] is None or isinstance(r[f], str)) + ] + period = r.get("period") + if "period" in r and (isinstance(period, bool) or not isinstance(period, int)): + out.append("period is not an integer") + for f in ("conditions", "publication"): + if f in r and not isinstance(r[f], dict): + out.append(f"{f} is not an object") + if isinstance(r.get("conditions"), dict): + for k, v in r["conditions"].items(): + if not (isinstance(k, str) and isinstance(v, str)): + out.append(f"condition {k!r} is not a string") + if isinstance(r.get("publication"), dict): + pub = r["publication"] + out += [ + f"publication.{f} is not a string" + for f in PUBLICATION + if not (pub.get(f) is None or isinstance(pub[f], str)) + ] + return out + + +def row_problems(r, keys, earlier, metrics, units): + """Every way one staged row breaks the contract, as strings. A malformed + row is reported, never raised (review A H-6(h)).""" + if not isinstance(r, dict): + return ["row is not an object"] + try: + return _row_problems(r, keys, earlier, metrics, units) + except MALFORMED as e: + return [f"row is malformed ({type(e).__name__}: {e})"] + + +def _row_problems(r, keys, earlier, metrics, units): + out = [] + fields = set(r) + if not REQUIRED <= fields: + return [f"missing fields {sorted(REQUIRED - fields)}"] + if not fields <= REQUIRED | OPTIONAL: + out.append(f"unknown fields {sorted(fields - REQUIRED - OPTIONAL)}") + wrong = type_problems(r) + if wrong: + return out + wrong + for field, allowed in ( + ("attribution", ATTRIBUTION), + ("benchmark_class", BENCHMARK_CLASS), + ("value_kind", VALUE_KIND), + ("time_basis", TIME_BASIS), + ("parse_confidence", CONFIDENCE), + ): + if r[field] not in allowed: + out.append(f"{field} {r[field]!r} not in {sorted(allowed)}") + if r["status"] != "ok": + out.append("status is not ok") + for field in ("value_raw", "quote"): + if not r[field].strip(): + out.append(f"{field} is empty") + out += value_problems(r) + if bool(r.get("metric")) == bool(r.get("proposed_metric")): + out.append("exactly one of metric and proposed_metric") + if r.get("proposed_metric") in metrics: + out.append( + f"proposed_metric {r['proposed_metric']!r} is a registered Metric; use metric" + ) + if bool(r.get("unit_concept")) == bool(r.get("proposed_unit")): + out.append("exactly one of unit_concept and proposed_unit") + if r.get("metric") and r["metric"] not in metrics: + out.append(f"metric {r['metric']!r} is not a Metric; use proposed_metric") + if r.get("unit_concept") and r["unit_concept"] not in units: + out.append(f"unit_concept {r['unit_concept']!r} is not a UnitConcept") + + c = r["conditions"] + if not c: + return out + ["conditions is not a non-empty object"] + if c.get("fiscal_event") != FISCAL_EVENT: + out.append(f"conditions.fiscal_event is not {FISCAL_EVENT}") + if "fy" in c: + m = re.fullmatch(r"(\d{4})-(\d{2})", str(c["fy"])) + if not m or (int(m.group(1)) + 1) % 100 != int(m.group(2)): + out.append(f"conditions.fy {c['fy']!r} is not one fiscal year YYYY-YY") + else: + if r["period"] != int(m.group(1)) + 1: + out.append(f"period {r['period']} is not the end year of {c['fy']}") + if r["time_basis"] != "fiscal_year": + out.append("an fy row has time_basis fiscal_year") + elif r["time_basis"] == "fiscal_year" and not c.get("horizon"): + out.append("a fiscal_year row has conditions.fy or conditions.horizon") + if "geography" in c and c["geography"] not in GEOGRAPHY: + out.append( + f"conditions.geography {c['geography']!r} is not a code; put prose in geography_note" + ) + if not (isinstance(r["period"], int) and 1945 <= r["period"] <= 2075): + out.append(f"period {r['period']!r} is not a year") + + k = r["measure_key"] + if "recosting_of" in c: + if c.get("row_type") != "recosting": + out.append("a recosting_of row has row_type recosting (review A H-6(b))") + if k not in earlier.get(c["recosting_of"], ()): + out.append(f"{k} is not a {c['recosting_of']} key") + elif k is not None: + if k not in keys: + out.append(f"measure_key {k} is not in data/uk/ab2026_measures.json") + if "proposed_measure_key" in c: + out.append("a row with a measure_key carries no proposed_measure_key") + elif c.get("proposed_measure_key"): + pk = c["proposed_measure_key"] + if not PROPOSED_KEY.fullmatch(pk) or BARE_PACKAGE.fullmatch(pk): + out.append(f"proposed_measure_key {pk!r} is not ab2026[_option]__slug") + if pk in keys: + out.append(f"{pk} is registered; put it in measure_key") + if c.get("row_type") == "measure_component" and not ( + c.get("component", "").strip() and (k or c.get("proposed_measure_key")) + ): + out.append("a measure_component row names its component and measure (rule 9)") + if "component" in c and ( + not c["component"].strip() or c.get("row_type") not in COMPONENT_ROW_TYPES + ): + out.append("a component row has row_type measure_component (rule 9)") + if r["attribution"] == "restated" and not (r.get("note") or "").strip(): + out.append("a restated row's note names whose figure it restates") + + pub = r["publication"] + for field in ("title", "url", "date", "publisher", "primary_sha256"): + if not pub.get(field): + out.append(f"publication.{field} is empty") + if pub.get("primary_sha256") and not SHA256.fullmatch(pub["primary_sha256"]): + out.append("publication.primary_sha256 is not a sha256") + if pub.get("date") and not re.fullmatch(r"\d{4}-\d{2}-\d{2}", pub["date"]): + out.append("publication.date is not YYYY-MM-DD") + + if r["value_raw"] not in r["quote"]: + out.append("quote does not contain value_raw") + if r["source"] not in OGL and len(r["quote"].split()) >= 15: + out.append("quote has 15 or more words (README rule 6)") + if r["attribution"] == "same_assumptions" and ( + r["benchmark_class"] != "same_assumptions" + or r["source_model"] != "policyengine_uk" + ): + out.append("same_assumptions rows are PolicyEngine-computed") + if ( + r["source"] == "hm_treasury" + and "impact on households" in (pub.get("title") or "").lower() + and ( + r["value_kind"] == "approx_chart_reading" + or reads_a_bar(pub.get("locator") or "") + ) + ): + out.append( + "no HMT Impact on households bar readings: start the locator with " + "the paragraph, table, box or data label where HM Treasury prints " + "the number, and call nothing there a bar, chart, graph, plot, diagram " + "or visual (README rule 4)" + ) + return out + + +def _denied(before): + """Whether a negation comes right before a phrase, with no other earlier in + its clause.""" + m = DENIED.search(before) + if not m: + return False + clause = re.split(r"[,;:().]", before[: m.start()])[-1] + return not NEGATION.search(clause) + + +def reads_a_bar(locator): + """README rule 4: whether a locator places the number on a bar of Figure + 1.A or 1.B, rather than naming where HM Treasury prints it.""" + plain = " ".join(re.sub(_DASH, " ", locator).split()) + if any(not _denied(plain[: m.start()]) for m in BAR_READING.finditer(plain)): + return True + if not FIGURE_1.search(plain): + return False + first = re.split(r"[,;]", re.sub(_DASH, "-", locator), maxsplit=1)[0] + return not PRINTED.fullmatch(" ".join(first.split())) + + +def family_problems(family_dir): + """Every contract breach in one family directory, as strings.""" + family_dir = Path(family_dir) + missing = [ + n + for n in ("NOTES.md", "manifest.jsonl", "claims_staged.jsonl.gz") + if not (family_dir / n).exists() + ] + if missing: + return [f"{family_dir.name}: missing {missing}"] + manifest, out = _json_lines(family_dir / "manifest.jsonl", "manifest line") + rows, unread = _json_lines(family_dir / "claims_staged.jsonl.gz", "row") + out += unread + try: + notes = (family_dir / "NOTES.md").read_text(encoding="utf-8") + except (OSError, ValueError) as e: + notes = "" + out.append(f"NOTES.md cannot be read ({type(e).__name__})") + entries = [m for m in manifest if isinstance(m, dict)] + if len(entries) < len([m for m in manifest if m is not UNREADABLE]): + out.append("manifest has a line that is not an object") + shas = [m["sha256"] for m in entries if isinstance(m.get("sha256"), str)] + for j, m in enumerate(manifest): + if not isinstance(m, dict): + continue # reported above, or by _json_lines + # a problem names the line by its url, or by its place when the url + # isn't text + name = m["url"] if _text(m.get("url")) else f"line {j}" + if not (isinstance(m.get("sha256"), str) and SHA256.fullmatch(m["sha256"])): + out.append(f"manifest {name}: sha256 is not a sha256") + if not all(_text(m.get(f)) for f in ("url", "title", "retrieved")): + out.append(f"manifest {name}: needs url, title and retrieved as text") + if len(set(shas)) != len(shas): + out.append("manifest lists a primary twice") + keys, earlier = registry_keys() + metrics, units = enums() + for i, r in enumerate(rows): + if r is UNREADABLE: + continue # reported by _json_lines + for p in row_problems(r, keys, earlier, metrics, units): + out.append(f"row {i}: {p}") + pub = r.get("publication") if isinstance(r, dict) else None + sha = pub.get("primary_sha256") if isinstance(pub, dict) else None + if not (isinstance(sha, str) and sha in shas): + out.append(f"row {i}: primary_sha256 is not in manifest.jsonl") + out += duplicate_problems(rows) + for pk in sorted(proposed_keys(rows)): + if not re.search(rf"(? 2: + out.append(f"rows {idx} share one claim identity (more than 2)") + elif len(idx) == 2: + a, b = (rows[i].get("value") for i in idx) + if not (_number(a) and _number(b)): + continue # row_problems reports the value (D1-3, final review F3) + if not math.isclose(a, b, rel_tol=0.005, abs_tol=1e-9): + out.append( + f"rows {idx} share one claim identity but differ by over 0.5%" + ) + return out + + +def main(argv): + bad = 0 + for d in argv: + problems = family_problems(d) + gz = Path(d) / "claims_staged.jsonl.gz" + rows = len(_json_lines(gz, "row")[0]) if gz.exists() else 0 + print(f"{d}: {rows} rows, {len(problems)} problems") + for p in problems[:200]: + print(" " + p) + bad += bool(problems) + return 1 if bad else 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/pipeline/ab2026_measure_keys.py b/pipeline/ab2026_measure_keys.py new file mode 100644 index 000000000..06bb93655 --- /dev/null +++ b/pipeline/ab2026_measure_keys.py @@ -0,0 +1,206 @@ +"""Autumn Budget 2026 measure keys, one per HM Treasury Table 6.1 line. + +The key space of the AB2026 harvest (#230): every staged claim's measure_key is +a key from data/uk/ab2026_measures.json, null with +conditions.proposed_measure_key (README rule 2), or for Table 6.4 recostings +the earlier event's key named in conditions.recosting_of. +Keys are written out here rather than derived from titles, so a reworded +title in a later edition of the table cannot move a key. Both the Table 6.1 +stager (pipeline/stage_ab2026_hmt_tables.py) and the registry builder +(pipeline/build_ab2026_registry.py) import this module, so a staged row and +its registry entry cannot disagree about a key. +""" + +PREFIX = "ab2026__" + +# Table 6.1 "Budget 2026 policy decisions (£ million)", lines 1-98. +TABLE_61 = { + 1: "household_energy_payment_100_bands_a_to_d", + 2: "electricity_vat_zero_rate_to_july_2027", + 3: "fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + 4: "bus_fare_cap_2_england_outside_london_2027", + 5: "mileage_allowance_payments_55p", + 6: "parental_allowance_fathers_partners_adopters", + 7: "carers_allowance_earnings_taper", + 8: "uc_surplus_earnings_threshold_2500_extended", + 9: "early_years_books_access", + 10: "food_and_heating_oil_tariff_suspensions", + 11: "cash_isa_limit_held_at_20000", + 12: "business_rates_pubs_relief_35pc", + 13: "business_rates_sbrr_rhl_thresholds_raised", + 14: "business_rates_rhl_transitional_support", + 15: "trading_allowance_3000", + 16: "business_tariff_suspensions", + 17: "climate_change_levy_rates_2028", + 18: "red_diesel_duty_cut", + 19: "alcohol_duty_small_producer_relief", + 20: "good_growth_funds", + 21: "business_rates_retention_mayoral_authorities", + 22: "local_apprenticeship_services", + 23: "regional_growth_investments", + 24: "cambridge_development_corporation", + 25: "strategic_authorities_capacity_funding", + 26: "founders_relief_cgt", + 27: "rd_relief_claim_notification_form_removed", + 28: "emi2_option_limit_120000", + 29: "british_business_bank_backing_innovation", + 30: "national_wealth_fund_capital", + 31: "artificial_intelligence_package", + 32: "ev_charging_public_chargers", + 33: "rough_sleeping_investment", + 34: "rough_sleeping_reprioritised_mhclg_budgets", + 35: "social_and_affordable_homes_programme", + 36: "vat_zero_rate_land_for_social_housing", + 37: "your_first_home_equity_loan", + 38: "first_time_buyer_isa", + 39: "lifetime_isa_withdrawal_charge_20pc_above_cap", + 40: "defence_investment_plan_further_savings", + 41: "defence_investment_plan_capital_reallocation", + 42: "defence_admin_savings_reinvested", + 43: "ukraine_winter_air_defence", + 44: "uk_export_finance_defence_capacity", + 45: "hmrc_tax_gap_package", + 46: "online_marketplace_liability_uk_businesses", + 47: "dwp_fraud_and_error_prevention", + 48: "benefits_removed_hospitalised_serious_offenders", + 49: "distributions_framework_modernised", + 50: "advance_corporation_tax_abolished", + 51: "vat_reverse_charge_overseas_services_restricted", + 52: "pension_tax_allowance", + 53: "pension_death_benefits_two_year_rule_removed", + 54: "foreign_sovereign_investments_taxation", + 55: "bank_surcharge_6pc_temporary", + 56: "machine_games_duty_higher_stake_25pc", + 57: "business_rates_vape_shops_and_agcs_reliefs_removed", + 58: "writing_down_allowance_12pc_and_fya_50pc", + 59: "private_hire_operators_vat_full_fare", + 60: "badr_lifetime_limit_500000", + 61: "property_income_rates_plus_2pp", + 62: "savings_income_rates_plus_2pp", + 63: "civil_service_admin_budgets_cut_20pc", + 64: "civil_service_ai_fund", + 65: "hgv_ved_1_for_12_months", + 66: "vat_5pc_family_days_out_summer_2026", + 67: "free_bus_travel_children_august_2026", + 68: "foreign_permanent_establishment_exemption_mandatory", + 69: "electricity_generator_levy_55pc", + 70: "british_industrial_competitiveness_scheme", + 71: "carbon_price_support_removed", + 72: "youth_guarantee_and_apprenticeships_spring_2026", + 73: "union_learning_fund", + 74: "investment_for_growth", + 75: "growth_guarantee_scheme_expansion", + 76: "leeds_city_fund", + 77: "uk_india_ceta_and_double_contributions_convention", + 78: "steel_tariff_and_quotas", + 79: "securities_transfer_tax", + 80: "business_rates_ev_charging_relief", + 81: "misogyny_prevention_programmes", + 82: "infected_blood_compensation_additional_report", + 83: "student_loan_interest_cap_6pc_plan_2_and_3", + 84: "waste_crime_landfill_tax_clearances", + 85: "further_priorities_nhs_and_vawg", + 86: "company_car_tax_rates_2030_31", + 87: "supported_housing_licensing", + 88: "vat_zero_rate_donated_medicines", + 89: "vat_medical_deputies_staffing", + 90: "landfill_communities_fund_credit_cap", + 91: "franchised_higher_education_registration", + 92: "high_needs_local_authority_spending", + 93: "hvcts_deferrals_discounts_exemptions", + 94: "benefits_in_kind_payrolling_delay", + 95: "low_value_imports_customs_relief_removed", + 96: "ets_energy_from_waste_delay", + 97: "gas_distribution_revenue_recognition_spread", + 98: "us_llc_double_taxation_relief", +} + +# Table 6.2 "Budget 2026 Financial Transactions (cash impact, £ million)". +# Each line is the financial-transactions leg of a Table 6.1 measure, except +# line 4 (Sovereign AI), which has no Table 6.1 line and so its own key. +TABLE_62 = { + 1: TABLE_61[20], + 2: TABLE_61[30], + 3: TABLE_61[29], + 4: "sovereign_ai_financial_transactions", + 5: TABLE_61[37], + 6: TABLE_61[37], + 7: TABLE_61[74], + 8: TABLE_61[24], + 9: TABLE_61[47], +} + +# Table 6.4 "Measures announced at Spring Statement 2026 or earlier that will +# take effect from 29 October 2026 or later": recostings of earlier events' +# measures, keyed to those events' registries (full keys, not slugs). +TABLE_64 = { + 1: ("autumn_budget_2025", "ab2025__cbam_indirect_emissions_removed"), + 2: ("autumn_budget_2025", "ab2025__student_finance_lle_launch_and_loan_outlay"), + 3: ("autumn_budget_2025", "ab2025__ppf_and_fas_pre_1997_inflation_protection"), + 4: ( + "autumn_budget_2025", + "ab2025__fya_zero_emission_cars_and_charge_points_extended", + ), + 5: ("autumn_budget_2025", "ab2025__student_loans_plan2_threshold_freeze"), + 6: ("autumn_budget_2025", "ab2025__property_income_separate_rates"), + 7: ("autumn_budget_2025", "ab2025__apd_higher_rate_extended_to_private_jets"), + 8: ("autumn_budget_2025", "ab2025__db_pension_scheme_surplus_extraction"), + 9: ("autumn_budget_2025", "ab2025__ets_expansion_to_international_maritime"), + 10: ("autumn_budget_2025", "ab2025__sdil_threshold_cut_and_milk_based_drinks"), + 11: ("autumn_budget_2025", "ab2025__high_value_council_tax_surcharge"), + 12: ("autumn_budget_2025", "ab2025__eved_mileage_supplement_electric_and_phev"), + 13: ("autumn_budget_2025", "ab2025__low_value_imports_customs_reform"), + 14: ("autumn_budget_2025", "ab2025__salary_sacrifice_pension_nics_cap_2000"), + 15: ( + "autumn_budget_2024", + "autumn_budget_2024__company_car_tax_set_appropriate_percentages_for_electric_vehicles_hybrids_and_internal_combustion_engine_vehic_f0345c3d", + ), + 16: ( + "autumn_budget_2024", + "autumn_budget_2024__inheritance_tax_include_unused_pension_funds_and_death_benefits_payable_from_a_pension_in_the_value_of_estates_215d16bf", + ), + 17: ( + "spring_budget_2024", + "spring_budget_2024__carbon_border_adjustment_mechanism_cbam_introduce_from_1_january_2027_46125f17", + ), +} + +# Packages: compositions of Table 6.1 lines that HM Treasury totals or that +# outside producers score as one thing. A producer's package row joins here +# when its scope is exactly these lines; any other scope is a proposal. +PACKAGES = { + "package_total_policy_decisions": { + "title": "Table 6.1 total policy decisions", + "lines": sorted(TABLE_61), + "table_61_row": "Total policy decisions", + }, + "package_total_tax_policy_decisions": { + "title": "Table 6.1 total tax policy decisions", + "lines": None, # the table's own Tax/Spend head split + "table_61_row": "Total tax policy decisions", + }, + "package_total_spending_policy_decisions": { + "title": "Table 6.1 total spending policy decisions", + "lines": None, + "table_61_row": "Total spending policy decisions", + }, + "package_household_energy_vat_and_fuel_duty": { + "title": "The Household Energy Payment, zero VAT on domestic electricity and the fuel duty cut, together", + "lines": [1, 2, 3], + "table_61_row": None, + }, + "package_policyengine_seven": { + "title": "The seven household measures PolicyEngine modelled on Budget day, together", + "lines": [1, 2, 3, 7, 15, 52, 61], + "table_61_row": None, + }, +} + + +def key(line): + """The full measure key of a Table 6.1 line.""" + return PREFIX + TABLE_61[line] + + +def package_key(slug): + return PREFIX + slug diff --git a/pipeline/ab2026_proposed_keys.py b/pipeline/ab2026_proposed_keys.py new file mode 100644 index 000000000..f5deb0d07 --- /dev/null +++ b/pipeline/ab2026_proposed_keys.py @@ -0,0 +1,98 @@ +"""Write or check the AB2026 harvest's PROPOSED_KEYS.md. + +A row whose scope matches no registered measure has `measure_key: null` and +names a proposed key in `conditions.proposed_measure_key` (README rule 2). +Tranche 2 of #230 registers each proposed key, or folds it into a registered +one, before the ingest runs. This lists every proposed key once, with the +families and producers that use it and its row count, so that work starts +from a complete list. Each family's NOTES.md gives the scope of every key its +rows use; the contract checks that. + + python pipeline/ab2026_proposed_keys.py sources/harvest-uk-ab2026-2026-10-29 + python pipeline/ab2026_proposed_keys.py sources/harvest-uk-ab2026-2026-10-29 --check +""" + +import argparse +import sys +from collections import defaultdict +from pathlib import Path + +from pipeline.ab2026_harvest_contract import read_rows + +HEADER = """\ +# Proposed measure keys in the AB2026 harvest + +Generated by `pipeline/ab2026_proposed_keys.py` from the staged families; don't edit by hand. + +A row whose scope matches no registered measure has `measure_key: null` and names one of these keys in `conditions.proposed_measure_key` (README rule 2). A key is a measure with no Table 6.1 line (`ab2026__`), a package (`ab2026__package_`) or an option (`ab2026_option__`). Each family's NOTES.md gives the key's scope as Table 6.1 lines or the producer's own words. Tranche 2 registers each key in `data/uk/ab2026_measures.json`, or folds it into a registered key, before the ingest. +""" + + +def kind(key): + """README rule 2's three kinds of proposed key.""" + if key.startswith("ab2026_option__"): + return "option" + if key.startswith("ab2026__package_"): + return "package" + return "measure" + + +def inventory(harvest): + """{proposed key: {"rows": n, "families": set, "sources": set}}.""" + out = defaultdict(lambda: {"rows": 0, "families": set(), "sources": set()}) + for fam in sorted(Path(harvest).iterdir()): + if not (fam / "claims_staged.jsonl.gz").exists(): + continue + for r in read_rows(fam): + pk = r["conditions"].get("proposed_measure_key") + if pk: + out[pk]["rows"] += 1 + out[pk]["families"].add(fam.name) + out[pk]["sources"].add(r["source"]) + return dict(out) + + +def render(harvest): + inv = inventory(harvest) + kinds = [kind(k) for k in inv] + rows = sum(v["rows"] for v in inv.values()) + counted = ", ".join( + f"{kinds.count(c)} {c}s" for c in ("measure", "package", "option") + ) + lines = [HEADER, f"{len(inv)} proposed keys ({counted}) on {rows} rows.", ""] + if inv: + lines += [ + "| proposed key | kind | rows | families | producers |", + "|---|---|--:|---|---|", + ] + for k in sorted(inv): + v = inv[k] + lines.append( + f"| `{k}` | {kind(k)} | {v['rows']} " + f"| {', '.join(sorted(v['families']))} " + f"| {', '.join(sorted(v['sources']))} |" + ) + lines.append("") + return "\n".join(lines) + + +def main(argv=None): + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("harvest") + ap.add_argument("--check", action="store_true") + args = ap.parse_args(argv) + path = Path(args.harvest) / "PROPOSED_KEYS.md" + text = render(args.harvest) + if args.check: + if not path.exists() or path.read_text() != text: + print("PROPOSED_KEYS.md is stale") + return 1 + print("PROPOSED_KEYS.md matches the families") + return 0 + path.write_text(text) + print(f"wrote {path}") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/pipeline/build_ab2026_registry.py b/pipeline/build_ab2026_registry.py new file mode 100644 index 000000000..836ecb7a4 --- /dev/null +++ b/pipeline/build_ab2026_registry.py @@ -0,0 +1,1207 @@ +"""Build data/uk/ab2026_measures.json (#230) from the pinned engine. + +The Autumn Budget 2026 measure registry is generated, not typed, as the +AB2025 one is (pipeline/build_ab2025_registry.py): titles and exchequer +impacts come from the staged Table 6.1 rows, every `name_search` is computed +over the full parameter tree and variable list of the pinned engine, and every +`engine_baseline_2026` value is what that engine returns. + +The pin is policyengine-uk 2.151.0, the engine the UK Autumn Budget dashboard +ran on Budget day (policyengine.py 6.11.1, whose certificate records +certified_for_model_version 2.151.0 on every published receipt). It is not +the certified populace pair the AB2025 registry follows: AB2026's +PolicyEngine counterparts are the dashboard's own published runs, so a +computability verdict has to be true of the engine those runs used. + +Inputs: + - an importable policyengine-uk == 2.151.0 (refuses any other version) + - sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz + - pipeline/ab2026_measure_keys.py + +Usage: + PYTHONPATH=. .venv-pe2151/bin/python pipeline/build_ab2026_registry.py + PYTHONPATH=. .venv-pe2151/bin/python pipeline/build_ab2026_registry.py --check + +Verdicts are authored below. Every mechanism a verdict names was read on +2026-10-29 from the engine at the pin or from the dashboard's source at +PolicyEngine/uk-autumn-budget-dashboard-2026@1eca3182. +""" + +import gzip +import json +import re +import sys +from pathlib import Path + +try: + from pipeline import ab2026_measure_keys as K + from pipeline.uk_engine_registry import engine_dumps +except ModuleNotFoundError: # direct script invocation without PYTHONPATH + import ab2026_measure_keys as K + from uk_engine_registry import engine_dumps + +REPO = Path(__file__).resolve().parent.parent +PIN = "2.151.0" +OUT = REPO / "data/uk/ab2026_measures.json" +KEYS_MD = REPO / "sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md" +STAGED = ( + REPO / "sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz" +) + +ISSUE = "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" +BUS_GAP = "https://github.com/PolicyEngine/policyengine-scorecard/issues/106" +DASHBOARD_REPO = "PolicyEngine/uk-autumn-budget-dashboard-2026" +DASHBOARD_MAIN = "1eca3182d6983b6375f401a3565ac56c25fa401e" +POLICY_YEARS = range(2027, 2032) # the dashboard scores 2026-27 to 2031-32 + +RUN_IDENTITY = { + "policyengine": "6.11.1", + "certified_for_model_version": "2.151.0", + "dataset_revision": "microcosm-uk-2024-25-national-20261025T091414Z-a6299504", + "dataset_sha256": "b96a8cd625b645a409c063b1de5158532708a2f0d3c3897a794a8fb0bbd5064e", + "basis": "static; OBR October 2026 EFO growth rates applied over policyengine-uk's March 2026 rates (receipt dashboard.basis)", +} + + +def _t61(): + lines, totals = {}, {} + with gzip.open(STAGED, "rt") as fh: + for raw in fh: + r = json.loads(raw) + c = r["conditions"] + if c["table"] == "6.1" and c["row_type"] == "measure": + e = lines.setdefault( + int(c["table_line"]), + { + "title": r["reform_hint"], + "head": c["head"], + "heading": c["heading"], + "values": {}, + }, + ) + e["values"][c["fy"]] = r["value_raw"] + elif c["table"] == "6.1" and c["row_type"] == "total": + totals.setdefault(r["reform_hint"], {})[c["fy"]] = r["value_raw"] + elif c["table"] == "6.2" and c.get("table_line") == "4": + e = lines.setdefault("t62_4", {"title": r["reform_hint"], "values": {}}) + e["values"][c["fy"]] = r["value_raw"] + return lines, totals + + +P, V = engine_dumps(pin=PIN) +T61, TOTALS = _t61() + + +def ns(pattern): + rx = re.compile(pattern, re.I) + ph = [p for p in P if rx.search(p) and not p.startswith("baseline.")] + # The parameter tree loads in sorted order, but policyengine-core adds + # variables in glob order, which differs by filesystem: sort them. + vh = sorted(v for v in V if rx.search(v)) + return ( + f"Searched BOTH the parameter tree and the VARIABLE list for /{pattern}/. " + f"Parameters: {len(ph)} node(s) {ph[:6]}. Variables: {len(vh)} {vh[:6]}. " + "Both are searched because a parameter-only search misses a variable " + f"(#106). Re-run at policyengine-uk {PIN}." + ) + + +UPSTREAM = { + "mileage": "policyengine-uk: business mileage and approved mileage allowance payments for employees' own cars and vans", + "parental_allowance": "policyengine-uk: a Parental Allowance for fathers, partners and adopters (statutory_paternity_pay is the nearest variable)", + "uc_surplus": "policyengine-uk: Universal Credit surplus earnings carried between assessment periods", + "isa": "policyengine-uk: ISA subscriptions, a subscription limit, and Lifetime and first-time-buyer ISA withdrawals", + "cgt_reliefs": "policyengine-uk: capital gains by relief (founders' and other business reliefs beyond BADR)", + "estates": "policyengine-uk: estates, death benefits and their income tax treatment", + "vat_categories": "policyengine-uk: consumption detailed enough to separate admissions to attractions and days out", + "bus_age_fares": "policyengine-uk: a free-fare rule for children by age and month within the bus fare model", + "student_loan_interest_cap": "policyengine-uk: a cap on Plan 2 and postgraduate (Plan 3) student loan interest", + "bik": "policyengine-uk: company cars and their benefit-in-kind appropriate percentages", + "hvcts_reliefs": "policyengine-uk: deferrals, discounts and exemptions within the high value council tax surcharge", +} + +# The engine's exogenous incidence levers (descriptions read at the pin from +# parameters/gov/contrib/policyengine/budget/*.yaml). They spread a £ amount +# supplied as an input; none computes a measure's yield. +LEVERS = { + "consumer": "gov.contrib.policyengine.budget.consumer_incident_tax_change ('Tax increase incident on consumers')", + "corporate": "gov.contrib.policyengine.budget.corporate_incident_tax_change ('Tax increase incident on owners of capital')", + "spending": "gov.contrib.policyengine.budget.other_public_spending ('Increase in non-NHS, non-education public spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset')", + "nhs": "gov.contrib.policyengine.budget.nhs ('Increase in NHS spending, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset')", + "education": "gov.contrib.policyengine.budget.education ('Increase in education, distributed by income decile as estimated by the ONS Effects of Taxes and Benefits dataset')", + "high_income": "gov.contrib.policyengine.budget.high_income_incident_tax_change ('Tax rise for high income earners (functioning proportional to income over £100,000)')", +} + +measures = [] + + +def entry(line, program, computability, **kw): + t = T61[line] + m = { + "measure_key": K.key(line), + "title": t["title"], + "reported_status": "announced", + "source_note": ( + f"HM Treasury, Budget 2026 Table 6.1 line {line} ({t['head']}); " + f"exchequer impact GBP m by FY: {t['values']}" + ), + "table_61_line": line, + "table_61_head": t["head"], + "table_61_heading": t["heading"], + "program": program, + "computability": computability, + } + m.update(kw) + measures.append(m) + return m + + +def gap(why, pattern, *, upstream, nearest=None): + d = { + "pe_reform_delta": None, + "why": why, + "name_search": ns(pattern), + "policyengine_uk_development_item": True, + "upstream_item": UPSTREAM[upstream], + "action_link": ISSUE, + } + if nearest: + d["nearest_variable_and_why_it_does_not_work"] = nearest + return d + + +def scope(why, pattern, link=None): + return { + "pe_reform_delta": None, + "why": why, + "name_search": ns(pattern), + "out_of_model_scope": True, + "action_link": link or ISSUE, + } + + +def baseline(*paths): + return {p: P[p] for p in paths} + + +def receipt(dash_id, artifact, sha, reform_sha, binding, generated_at): + return { + "repo": DASHBOARD_REPO, + "commit": DASHBOARD_MAIN, + "path": f"public/data/artifacts/{dash_id}/{artifact}/receipt.json", + "receipt_file_sha256": sha, + "reform_sha256": reform_sha, + "reform_binding": binding, + "generated_at": generated_at, + **RUN_IDENTITY, + } + + +def rates_up(paths): + from policyengine_uk import CountryTaxBenefitSystem + + params = CountryTaxBenefitSystem().parameters + out = {} + for path in paths: + node = params + for part in path.split("."): + node = getattr(node, part) + out[path] = { + str(y): round(float(node(f"{y}-04-06")) + 0.02, 6) for y in POLICY_YEARS + } + return out + + +# --------------------------------------------------------------------------- +# Executed on Budget day by the dashboard (seven published runs, one more run +# outside the release) +# --------------------------------------------------------------------------- + +entry( + 1, + "household_energy_payment", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="household_energy_payment_2026", + pe_reform_delta=None, + pe_modifier={ + "module": "src/uk_budget_data/budget_measures/household_energy_payment_2026.py", + "function": "household_energy_payment_2026", + "arguments": { + "amount": 100, + "year": 2026, + "country": "ENGLAND", + "bands": ["A", "B", "C", "D"], + }, + "replaced_variables": ["ebr_council_tax_rebate"], + "reads_variables": ["council_tax_band", "country"], + "parameter_legs": [], + "receipt": receipt( + "household_energy_payment_2026", + "101a07dc7238a10e", + "0fb0414b45435799fb50afa9d79c2c7af8998de2ee406d8da6c1561bd46298d4", + "ceede8365a9462ac389dc5210882ea23850babfed6e5bff8cf264e774cd616ad", + "code_revision", + "2026-10-28T17:07:18.666809+00:00", + ), + }, + engine_baseline_2026=baseline( + "gov.treasury.energy_bills_rebate.council_tax_rebate.amount" + ), + note="The modifier adds £100 in 2026-27 to the native ebr_council_tax_rebate formula for bands A to D in England; the native rebate's own parameter is 0 at the pin, so the payment is the whole effect. Scotland, Wales and Northern Ireland get a Barnett share instead, not modelled.", +) +entry( + 2, + "vat", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="domestic_electricity_zero_vat", + pe_reform_delta=None, + pe_modifier={ + "module": "src/uk_budget_data/budget_measures/zero_vat_on_domestic_electricity.py", + "function": "zero_vat_on_domestic_electricity", + "arguments": { + "rate_change_2026": -0.028342979605206865, + "rate_change_2027": -0.011149919361563782, + "geography": "GB", + "geography_2027": "UK", + }, + "replaced_variables": [], + "reads_variables": ["electricity_consumption"], + "parameter_legs": [], + "receipt": receipt( + "domestic_electricity_zero_vat", + "2d9c65726915303e", + "e464b000c2af360654462efd05180d0fed272728911dc7292d932b99117246ca", + "5ee4d8844432367d5557df38ee89e23b206e2c1236bce2451b0336ada02b58b6", + "code_revision", + "2026-10-28T17:08:09.754595+00:00", + ), + }, + engine_baseline_2026=baseline("gov.hmrc.vat.reduced_rate"), + note="The modifier lowers the VAT rate on electricity_consumption by 5 points times the share of each fiscal year's use that falls in the zero-rated period (about 57% of 2026-27 in Great Britain; about 22% of 2027-28 across the UK). Electricity only, not gas.", +) +entry( + 3, + "fuel_duty", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="fuel_duty_rise_deferral", + pe_reform_delta=None, + pe_modifier={ + "module": "src/uk_budget_data/reforms.py (_create_fuel_duty_rise_deferral) + src/uk_budget_data/budget_measures/pump_vat_on_fuel_duty_deferral.py", + "function": "fuel_duty_deferral_rates + pump_vat_on_fuel_duty_deferral", + "arguments": {}, + "replaced_variables": [], + "reads_variables": ["petrol_spending", "diesel_spending"], + "parameter_legs": ["gov.hmrc.fuel_duty.petrol_and_diesel"], + "receipt": receipt( + "fuel_duty_rise_deferral", + "e077f8d4b70440c8", + "2f547d91b455b7e84cf8495cbfd0475ca626d7f1b4a95605de869cf61d52a30f", + "1dae41af83e4402f6b3af756d7dcdcc1dd525883dd32c3c8b9050456f52310f1", + "code_revision", + "2026-10-28T17:06:46.194418+00:00", + ), + }, + engine_baseline_2026=baseline("gov.hmrc.fuel_duty.petrol_and_diesel"), + note="Day-weighted annual fuel duty rates (fuel_duty_deferral_rates), plus the VAT on the lower pump price through a modifier on petrol and diesel spending.", +) +entry( + 7, + "carers_allowance", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="carers_allowance_earnings_taper", + pe_reform_delta=None, + pe_modifier={ + "module": "src/uk_budget_data/budget_measures/carers_allowance_earnings_taper.py", + "function": "carers_allowance_earnings_taper", + "arguments": {"start_year": 2030, "first_year_share": 0.5, "taper_rate": 1.0}, + "replaced_variables": ["carers_allowance_pre_overlap"], + "reads_variables": [ + "carers_allowance_earnings", + "care_hours", + "would_claim_carers_allowance", + "carers_allowance_reported", + ], + "parameter_legs": [], + "receipt": receipt( + "carers_allowance_earnings_taper", + "9458905cefca3e88", + "0852c433f5f76cd2e7b27f1bcf6721610d8e36e80b5f416727901e8125d273f6", + "f45943c11aed787c570af3cc82d11af9cf181ce0877b5cb9350a9bc1e2f84dc8", + "code_revision", + "2026-10-28T17:08:00.734195+00:00", + ), + }, + engine_baseline_2026=baseline( + "gov.dwp.carers_allowance.earnings_limit", + "gov.dwp.carers_allowance.min_hours", + "gov.dwp.carers_allowance.min_age", + ), + note="A 100% taper above the Weekly Earnings Limit (16 hours at the National Living Wage) in England and Wales, half of 2030-31 counted because the start date within that year is not set.", +) +entry( + 15, + "income_tax", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="trading_allowance_raise", + pe_reform_delta={ + "gov.hmrc.income_tax.allowances.trading_allowance": { + str(y): 3000 for y in POLICY_YEARS + } + }, + delta_kind="absolute_value_by_year", + pe_modifier={ + "module": "src/uk_budget_data/reforms.py", + "function": "_create_trading_allowance_raise", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [], + "parameter_legs": ["gov.hmrc.income_tax.allowances.trading_allowance"], + "receipt": receipt( + "trading_allowance_raise", + "eddde823a65b7be4", + "59db02ec313c62f8c194580c806e782431f67a0f3b08df34adb91445a1eb9221", + "cdcc8b19d5234afe31ae857db16a8f2d6a18578a1d7da1c890b3c5f21832c268", + "content", + "2026-10-28T17:07:22.701184+00:00", + ), + }, + engine_baseline_2026=baseline("gov.hmrc.income_tax.allowances.trading_allowance"), + note="The data hold profits, not gross trading receipts, so the engine relieves a profit up to £3,000 in full and gives no relief above it (the dashboard's own description).", +) +entry( + 52, + "income_tax", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="state_pension_income_tax_protection", + pe_reform_delta=None, + pe_modifier={ + "module": "src/uk_budget_data/budget_measures/pension_tax_allowance.py", + "function": "pension_tax_allowance", + "arguments": { + "first_year": 2027, + "last_year": 2029, + "basic_rate": 0.2, + "taper_divisor": 3, + "weekly_rounding": 0.05, + }, + "replaced_variables": [ + "income_tax", + "uc_income_tax_on_earnings", + "uc_income_tax_on_trade", + ], + "reads_variables": ["total_income", "is_SP_age"], + "parameter_legs": [], + "receipt": receipt( + "state_pension_income_tax_protection", + "1bfeed3c27a3c9b9", + "4f20f3c69f9ddb3b7894d3281e9416774a1e12d747de1e573629570871b3e960", + "65a95c811e5d6c6dd0b54255dd20ab1439c542994f1918778b93769c14199524", + "code_revision", + "2026-10-28T17:08:11.348926+00:00", + ), + }, + engine_baseline_2026=baseline( + "gov.dwp.state_pension.new_state_pension.amount", + "gov.hmrc.income_tax.allowances.personal_allowance.amount", + ), + note="A non-refundable income tax reduction for people over State Pension age: 20% of the full new State Pension above the personal allowance, withdrawn £1 for every £3 of total income above the full new State Pension, 2027-28 to 2029-30.", +) +entry( + 61, + "income_tax", + "expressible", + construction="executed_by_dashboard", + dashboard_measure_id="property_income_rates_up", + pe_reform_delta=rates_up( + [ + f"gov.hmrc.income_tax.rates.property.{b}" + for b in ("basic", "higher", "additional") + ] + ), + delta_kind="absolute_value_by_year", + pe_modifier={ + "module": "src/uk_budget_data/reforms.py", + "function": "property_income_rates_up", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [], + "parameter_legs": [ + f"gov.hmrc.income_tax.rates.property.{b}" + for b in ("basic", "higher", "additional") + ], + "receipt": receipt( + "property_income_rates_up", + "7bf77b35e33233e0", + "20df7073b4481a5f5b0073c6949e0d0c2894adac88d6e70778946456b2fe899d", + "d46bf10b10b298db4059d7b6a2dccac7997e09afec0a88542c2059ea70646aa0", + "content", + "2026-10-28T17:10:45.376537+00:00", + ), + }, + engine_baseline_2026=baseline( + *[ + f"gov.hmrc.income_tax.rates.property.{b}" + for b in ("basic", "higher", "additional") + ] + ), + note="Current law's property rates plus 2 points from 2027 (pe_reform_delta computed at the pin from each year's 6 April value). Scottish taxpayers' property income follows Scottish rates; finance cost relief follows the property basic rate UK-wide.", +) +entry( + 62, + "income_tax", + "expressible", + construction="delta_on_current_law", + dashboard_registered_id="savings_income_rates_up", + pe_reform_delta=rates_up( + [ + f"gov.hmrc.income_tax.rates.savings.{b}" + for b in ("basic", "higher", "additional") + ] + ), + delta_kind="absolute_value_by_year", + engine_baseline_2026=baseline( + *[ + f"gov.hmrc.income_tax.rates.savings.{b}" + for b in ("basic", "higher", "additional") + ] + ), + note="Registered by the dashboard (dashboard_registered_id) but not in its published release, and not run on Budget day, so there is no published receipt to cite; tranche 3 computes it from this delta.", +) + +# --------------------------------------------------------------------------- +# Expressible at the pin, not run on Budget day +# --------------------------------------------------------------------------- + +entry( + 60, + "capital_gains_tax", + "expressible", + construction="delta_on_current_law", + pe_reform_delta={ + "gov.hmrc.cgt.badr.lifetime_limit": {str(y): 500000 for y in POLICY_YEARS} + }, + delta_kind="absolute_value_by_year", + engine_baseline_2026=baseline("gov.hmrc.cgt.badr.lifetime_limit"), + head_variables=["capital_gains_tax", "capital_gains_badr"], + note=( + "capital_gains_tax reads gov.hmrc.cgt.badr.lifetime_limit at the pin (variables/gov/hmrc/capital_gains_tax/capital_gains_tax.py). " + "capital_gains_badr is an input, and capital_gains_tax applies the lifetime limit to one year's qualifying gains: " + "the variable's documentation says it does so 'as if none of the limit had been used before', so a lower limit " + "binds only on a year's gains above it, not on gains already relieved in earlier years. Not run on Budget day." + ), +) + + +def _cap_history(): + from policyengine_uk import CountryTaxBenefitSystem + + node = CountryTaxBenefitSystem().parameters.gov.dft.bus.fares.cap + return { + v.instant_str: ("inf" if v.value == float("inf") else v.value) + for v in reversed(node.values_list) + if v.instant_str >= "2023" + } + + +entry( + 4, + "bus_fares", + "partial", + # a reversal once the pre-measure world is known; until then no + # construction is claimed + intended_construction="reversal_on_certified_world", + pe_reform_delta=None, + engine_baseline_2026=baseline("gov.dft.bus.fares.cap"), + engine_parameter_history={"gov.dft.bus.fares.cap": _cap_history()}, + missing=( + "The pre-measure 2027 cap. The engine already carries the measure: " + "gov.dft.bus.fares.cap is £2 from 1 January 2027 to 1 January 2028 " + "(its metadata cites 'DfT two-pound bus fares from January to December 2027', " + "https://www.gov.uk/government/speeches/2-bus-fares-from-january-2027). A " + "counterpart reverses it, which needs the cap 2027 would have had " + "without the measure; the parameter has one upstream revision " + "(policyengine-uk c8d1f89a9d, 5 October 2026) and records no " + "pre-announcement path. Supersedes data/uk/bus_fares_gap.json's " + "not_expressible verdict at 2.89.2, which predates the bus model." + ), + action_link=BUS_GAP, +) + +# --------------------------------------------------------------------------- +# Household-facing, not expressible: policyengine-uk development items +# --------------------------------------------------------------------------- + +entry( + 5, + "income_tax", + "not_expressible", + **gap( + "No business mileage or mileage allowance payments: the approved rates are a tax-free amount per business mile, and the search finds no mileage in the engine.", + r"mileage|business_travel|approved_mileage", + upstream="mileage", + ), +) +entry( + 6, + "parental_pay", + "not_expressible", + **gap( + "A new benefit with no parameter or variable at the pin.", + r"parental_allowance|paternity|parental_leave", + upstream="parental_allowance", + nearest={ + "variable": "statutory_paternity_pay", + "why_not": "an existing statutory payment; the new Parental Allowance is a separate benefit with its own rules, none of which the engine carries", + }, + ), +) +entry( + 8, + "universal_credit", + "not_expressible", + **gap( + "No surplus earnings rule: the search finds no parameter or variable for it.", + r"surplus", + upstream="uc_surplus", + ), +) +entry( + 11, + "savings", + "not_expressible", + **gap( + "No ISA subscription or subscription limit: the engine holds ISA balances and interest, not subscriptions, so a limit has nothing to bind.", + r"(^|[._])isa([._]|$)|individual_savings|subscri", + upstream="isa", + nearest={ + "variable": "cash_isa", + "why_not": "a holding, not an annual subscription", + }, + ), +) +entry( + 26, + "capital_gains_tax", + "not_expressible", + **gap( + "No founders' gains: the engine's relief-specific gains variable is capital_gains_badr (Business Asset Disposal Relief), and nothing identifies qualifying founders of high-growth companies.", + r"founder|capital_gains_badr|investors_relief", + upstream="cgt_reliefs", + ), +) +entry( + 38, + "savings", + "not_expressible", + **gap( + "No first-time-buyer ISA, and no ISA subscriptions to move into one.", + r"first_time|(^|[._])isa([._]|$)", + upstream="isa", + ), +) +entry( + 39, + "savings", + "not_expressible", + **gap( + "The engine's withdrawal charge (gov.hmrc.isa.lifetime.withdrawal_charge, 0.25 at the pin) is read only by lifetime_isa_countable_capital, the means-test value of a Lifetime ISA. The engine has no withdrawal or home purchase, so it cannot apply a lower charge to first-time buyers above the £450,000 cap; lowering the parameter would instead revalue every holder's countable capital.", + r"withdrawal_charge|first_time|home_purchase", + upstream="isa", + nearest={ + "variable": "lifetime_isa_countable_capital", + "why_not": "applies the charge to a holder's balance for means tests; the measure changes the charge on one kind of withdrawal", + }, + ), +) +entry( + 53, + "income_tax", + "not_expressible", + **gap( + "The measure changes when pension and lump sum death benefits are taxed after a member dies (the two-year rule). The engine has no death event; its one death-benefit variable, pension_annual_allowance_taxable_lump_sum_death_benefits, is an input with no formula and no rule about timing after a death.", + r"death|bereave|lump_sum", + upstream="estates", + ), +) +entry( + 66, + "vat", + "not_expressible", + **gap( + "The engine's consumption variables are by spending category (e.g. recreation_consumption); none isolates admissions to family days out, the base of this reduced rate.", + r"recreation|attraction|admission|day_out", + upstream="vat_categories", + nearest={ + "variable": "recreation_consumption", + "why_not": "a whole spending category; the measure covers only part of it", + }, + ), +) +entry( + 67, + "bus_fares", + "not_expressible", + **gap( + "Free travel enters the bus model only as bus_pass_eligible, a dataset input whose documentation says it 'is not a pass-eligibility calculator'; no rule gives free travel to children aged 5 to 15, and the measure runs for one month (August 2026).", + r"bus_fare|fare_allocation|bus_pass|concession", + upstream="bus_age_fares", + ), +) +entry( + 83, + "student_loans", + "not_expressible", + **gap( + "No interest cap: plan_2_interest_rate is RPI plus up to gov.hmrc.student_loans.interest_rates.plan_2.additional_rate (3%), and postgraduate_interest_rate (Plan 3) is RPI plus postgraduate_additional_rate (3%); neither formula has a ceiling.", + r"student_loan.*interest|interest_rates\.plan_2|postgraduate_additional_rate", + upstream="student_loan_interest_cap", + ), +) +entry( + 86, + "income_tax", + "not_expressible", + **gap( + "No company cars or benefit-in-kind appropriate percentages: the search's only hits are council tax discount percentages.", + r"company_car(?!ries)|benefit_in_kind|appropriate_percentage", + upstream="bik", + ), +) +entry( + 93, + "council_tax", + "not_expressible", + **gap( + "The engine carries the surcharge (gov.hmrc.council_tax.high_value_surcharge, variable high_value_council_tax_surcharge) but no deferral, discount or exemption within it.", + r"high_value|surcharge|deferr", + upstream="hvcts_reliefs", + ), +) + +# --------------------------------------------------------------------------- +# Out of the household model's scope +# --------------------------------------------------------------------------- + + +def _spend(lever): + return ( + "Public spending ({what}), out of the household model's scope. The engine's spending channel, " + + LEVERS[lever] + + ", distributes a £ amount supplied as an input, so scoring this line through it would restate HM Treasury's figure, not estimate it." + ) + + +SPEND = _spend("spending") +SPEND_NHS = _spend("nhs") +SPEND_EDUCATION = _spend("education") +BUSINESS = ( + "A tax on businesses ({what}), out of the household model's scope: it changes what companies owe. The engine's corporate channel, " + + LEVERS["corporate"] + + ", spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds." +) +RATES = ( + "A business rates measure ({what}), out of the household model's scope. The engine carries business rates only as a household incidence, " + "business_rates ('Total incidence from exposure to business rates via corporate shareholdings'), and its business rates parameters are " + "revenue statistics (gov.hmrc.business_rates.statistics.revenue.*): it has no properties, reliefs or thresholds for the measure to change, " + "so its £ change would have to be supplied as an input, restating the costing." +) +INDIRECT = ( + "An indirect tax or duty collected from businesses ({what}), out of the household model's scope. The engine's consumer channel, " + + LEVERS["consumer"] + + ", spreads a £ change supplied as an input, so it would restate the costing rather than estimate it. The name search records what the engine holds." +) +FINANCE = "Lending, guarantees, investment or a financial transaction ({what}): no household tax or benefit rule changes." +ENFORCE = "An enforcement, compliance or administrative change ({what}): the rules households face do not change." +REGULATE = "A regulatory change ({what}) with no tax or benefit rule for households." +DETAINED = "A change to the {what}: the search finds no parameter or variable for hospital detention, prison or offending, so the engine cannot identify the people it affects." + +SCOPE = { + 9: ( + SPEND_EDUCATION, + "books for children aged 0 to 5", + r"early_years|childcare|book", + ), + 10: ( + INDIRECT, + "tariffs on food products, heating oil and fertiliser", + r"tariff|customs|import", + ), + 12: ( + RATES, + "business rates relief for pubs and venues", + r"business_rates|non_domestic|nndr", + ), + 13: ( + RATES, + "small business rate relief thresholds", + r"business_rates|small_business|non_domestic", + ), + 14: ( + RATES, + "business rates transitional support", + r"business_rates|transitional|non_domestic", + ), + 16: (INDIRECT, "tariff suspensions on business inputs", r"tariff|customs|import"), + 17: (INDIRECT, "Climate Change Levy rates", r"climate_change_levy|ccl"), + 18: (INDIRECT, "red diesel duty", r"red_diesel|rebated|fuel_duty"), + 19: ( + INDIRECT, + "alcohol duty small producer relief", + r"alcohol_duty|small_producer", + ), + 20: ( + FINANCE, + "Good Growth Funds for mayoral authorities", + r"growth_fund|mayor|combined_authorit", + ), + 21: ( + SPEND, + "business rates retention by mayoral authorities", + r"business_rates|retention|mayor", + ), + 22: (SPEND, "local apprenticeship services", r"apprentice"), + 23: (SPEND, "regional growth projects", r"regional|regeneration"), + 24: ( + FINANCE, + "Cambridge Development Corporation", + r"development_corporation|cambridge", + ), + 25: (SPEND, "strategic authorities' capacity", r"strategic_authorit|mayor"), + 27: ( + BUSINESS, + "R&D relief claim forms", + r"research_and_development|r_and_d|rd_relief", + ), + 28: ( + BUSINESS, + "Enterprise Management Incentives share options", + r"enterprise_management|share_option|emi", + ), + 29: (FINANCE, "British Business Bank", r"business_bank"), + 30: (FINANCE, "National Wealth Fund", r"wealth_fund"), + 31: (SPEND, "artificial intelligence", r"artificial_intelligence|\bai\b"), + 32: (SPEND, "public EV charging costs", r"charg|electric_vehicle"), + 33: (SPEND, "rough sleeping", r"rough_sleep|homeless"), + 34: (SPEND, "reprioritised housing budgets", r"rough_sleep|homeless"), + 35: (SPEND, "social and affordable homes", r"social_housing|affordable"), + 36: ( + INDIRECT, + "VAT on land sold to social housing providers", + r"vat|social_housing", + ), + 37: ( + FINANCE, + "an equity loan scheme for first-time buyers", + r"equity_loan|help_to_buy|first_time", + ), + 40: (SPEND, "defence", r"defen[cs]e"), + 41: (SPEND, "defence", r"defen[cs]e"), + 42: (SPEND, "defence administration", r"defen[cs]e"), + 43: (SPEND, "air defence for Ukraine", r"ukraine|defen[cs]e"), + 44: (FINANCE, "UK Export Finance", r"export_finance"), + 45: (ENFORCE, "HMRC measures to close the tax gap", r"tax_gap|compliance|evasion"), + 46: (ENFORCE, "online marketplace VAT liability", r"marketplace|online_sales"), + 47: (ENFORCE, "DWP fraud and error controls", r"fraud|error"), + 48: ( + DETAINED, + "benefit entitlements of serious offenders detained in hospital in Great Britain", + r"hospital|prison|detain|offender", + ), + 49: (BUSINESS, "the distributions framework", r"distribution|dividend"), + 50: (BUSINESS, "Advance Corporation Tax", r"corporation_tax|advance_corporation"), + 51: ( + INDIRECT, + "the VAT reverse charge on imported services", + r"reverse_charge|vat", + ), + 54: (BUSINESS, "the taxation of foreign sovereign investors", r"sovereign|foreign"), + 55: ( + BUSINESS, + "the Bank Corporation Tax Surcharge", + r"bank_surcharge|corporation_tax|bank_levy", + ), + 56: (INDIRECT, "Machine Games Duty", r"gambling|machine_games|gaming"), + 57: ( + RATES, + "business rates reliefs for vape shops and adult gaming centres", + r"business_rates|vape", + ), + 58: ( + BUSINESS, + "capital allowances", + r"capital_allowance|writing_down|first_year_allowance", + ), + 59: (INDIRECT, "VAT on private hire operators' fares", r"private_hire|taxi|vat"), + 63: ( + SPEND, + "civil service administration budgets", + r"civil_service|administration", + ), + 64: (SPEND, "a civil service AI fund", r"civil_service"), + 65: ( + INDIRECT, + "Vehicle Excise Duty on heavy goods vehicles", + r"heavy_goods|hgv|vehicle_excise", + ), + 68: ( + BUSINESS, + "the foreign permanent establishment exemption", + r"permanent_establishment|corporation_tax", + ), + 69: ( + BUSINESS, + "the Electricity Generator Levy", + r"generator_levy|electricity_generator", + ), + 70: ( + SPEND, + "the British Industrial Competitiveness Scheme", + r"industrial|competitiveness", + ), + 71: (INDIRECT, "Carbon Price Support rates", r"carbon_price|carbon"), + 72: ( + SPEND, + "the Youth Guarantee and apprenticeships", + r"youth_guarantee|apprentice", + ), + 73: (SPEND, "the Union Learning Fund", r"union_learning|skills"), + 74: (FINANCE, "investment for growth", r"investment|growth"), + 75: (FINANCE, "the Growth Guarantee Scheme", r"guarantee"), + 76: (RATES, "business rates retention in Leeds", r"business_rates|retention"), + 77: ( + INDIRECT, + "tariffs and contributions under the UK-India agreement", + r"tariff|customs|double_contribution", + ), + 78: (INDIRECT, "steel tariffs and quotas", r"tariff|steel"), + 79: (BUSINESS, "stamp taxes on shares", r"stamp_duty|stamp_tax|securities"), + 80: (RATES, "business rates relief for EV charge points", r"business_rates|charg"), + 81: (SPEND, "misogyny prevention programmes", r"misogyny|violence"), + 82: (SPEND, "infected blood compensation", r"infected_blood|compensation"), + 84: (SPEND, "Landfill Tax costs of illegal waste clearances", r"landfill|waste"), + 85: ( + SPEND_NHS, + "the NHS and the Violence against Women and Girls Strategy", + r"nhs|violence", + ), + 87: ( + REGULATE, + "licensing of supported housing", + r"supported_housing|exempt_accommodation", + ), + 88: (INDIRECT, "VAT on donated medicines", r"vat|medicine"), + 89: (INDIRECT, "VAT on medical deputies' staffing supplies", r"vat|staffing"), + 90: (INDIRECT, "the Landfill Communities Fund credit cap", r"landfill"), + 91: ( + REGULATE, + "registration of franchised higher education providers", + r"higher_education|franchise|student", + ), + 92: ( + SPEND_EDUCATION, + "local authority high needs budgets", + r"high_needs|special_educational|send", + ), + 94: ( + ENFORCE, + "the timing of mandatory payrolling of benefits in kind", + r"benefit_in_kind|payroll", + ), + 95: ( + INDIRECT, + "customs duty relief on low value imports", + r"customs|low_value|import", + ), + 96: ( + INDIRECT, + "the Emissions Trading Scheme's coverage of energy from waste", + r"emissions_trading|\bets\b|carbon", + ), + 97: ( + BUSINESS, + "corporation tax on gas distribution revenue", + r"corporation_tax|gas_distribution", + ), + 98: ( + BUSINESS, + "double taxation relief for investors in US LLCs", + r"double_taxation|foreign_income|llc", + ), +} + +PROGRAM = { + SPEND: "public_spending", + SPEND_NHS: "public_spending", + SPEND_EDUCATION: "public_spending", + BUSINESS: "business_tax", + INDIRECT: "indirect_tax", + FINANCE: "financial_transactions", + ENFORCE: "compliance_and_administration", + REGULATE: "regulation", + RATES: "business_rates", + DETAINED: "benefits", +} + +for line, (template, what, pattern) in SCOPE.items(): + entry( + line, + PROGRAM[template], + "not_expressible", + **scope(template.format(what=what), pattern), + ) + +# Table 6.2 line 4 has no Table 6.1 line of its own. +t = T61["t62_4"] +measures.append( + { + "measure_key": K.PREFIX + K.TABLE_62[4], + "title": t["title"], + "reported_status": "announced", + "source_note": f"HM Treasury, Budget 2026 Table 6.2 line 4 (financial transactions, no Table 6.1 line); cash impact GBP m by FY: {t['values']}", + "table_62_line": 4, + "program": "financial_transactions", + "computability": "not_expressible", + **scope( + FINANCE.format(what="Sovereign AI"), r"sovereign|artificial_intelligence" + ), + } +) + +# --------------------------------------------------------------------------- +# Packages +# --------------------------------------------------------------------------- + +BY_LINE = {m["table_61_line"]: m for m in measures if "table_61_line" in m} +for slug, spec in K.PACKAGES.items(): + lines = spec["lines"] + if lines is None: # Table 6.1's own Tax/Spend split + head = "Tax" if "tax" in slug else "Spend" + lines = sorted(l for l, m in BY_LINE.items() if m["table_61_head"] == head) + legs = [K.key(l) for l in lines] + comp = [BY_LINE[l]["computability"] for l in lines] + expressible = [K.key(l) for l, c in zip(lines, comp) if c == "expressible"] + m = { + "measure_key": K.package_key(slug), + "title": spec["title"], + "reported_status": "announced", + "source_note": ( + f"HM Treasury, Budget 2026 Table 6.1 row '{spec['table_61_row']}'; GBP m by FY: {TOTALS[spec['table_61_row']]}" + if spec["table_61_row"] + else ( + "PolicyEngine's combined Budget-day run of Table 6.1 lines " + + ", ".join(str(l) for l in lines[:-1]) + + f" and {lines[-1]} (receipt in pe_modifier); no producer row uses it" + if slug == "package_policyengine_seven" + else "A composition of Table 6.1 lines that producers score together; see `package_of`." + ) + ), + "program": "package", + "construction": "package_of_registry_measures", + "package_of": legs, + "pe_reform_delta": None, + } + if all(c == "expressible" for c in comp): + m["computability"] = "expressible" + m["engine_baseline_2026"] = {} + if slug == "package_policyengine_seven": + m["pe_modifier"] = { + "module": "src/uk_budget_data/reforms.py", + "function": "AUTUMN_BUDGET_2026_COMBINED_COMPONENTS", + "arguments": {}, + "replaced_variables": [], + "reads_variables": [], + "parameter_legs": [], + "receipt": receipt( + "combined--f91fe847275730cb", + "4faed20984703c7d", + "a00d0614eeed1c5cfaa63353d08a604a433bf881329bfd2d7b60c1681c243e67", + "09498c7b550716444725ef211725c894bc0efa13bd6c855efb8bdadc93b0e834", + "code_revision", + "2026-10-28T17:54:34.931664+00:00", + ), + } + m["note"] = ( + "Run as one simulation of all seven measures (the combined run), not as a sum of the seven runs." + ) + else: + m["note"] = ( + "Every leg is expressible; a counterpart is the legs' runs combined, stated as constructed." + ) + else: + m["computability"] = "partial" + not_expr = [l for l, c in zip(lines, comp) if c == "not_expressible"] + partial = [l for l, c in zip(lines, comp) if c == "partial"] + m["missing"] = ( + f"{len(not_expr)} of {len(lines)} legs are not expressible" + + ( + f" and {len(partial)} {'is' if len(partial) == 1 else 'are'} partial " + f"(line{'s' if len(partial) > 1 else ''} {', '.join(map(str, partial))})" + if partial + else "" + ) + + " (see each leg's verdict); a PolicyEngine number covers only " + f"the {len(expressible)} expressible legs: {expressible}" + ) + m["expressible_legs"] = expressible + measures.append(m) + + +def registry(): + lines = sorted(m["table_61_line"] for m in measures if "table_61_line" in m) + assert lines == sorted(K.TABLE_61), "every Table 6.1 line exactly once" + counts = {} + for m in measures: + counts[m["computability"]] = counts.get(m["computability"], 0) + 1 + return { + "schema_version": 1, + "fiscal_event": "autumn_budget_2026", + "event_date": "2026-10-28", + "chancellor": "John Healey", + "administration": "Burnham government (from 2026-07-20)", + "registry_rule": ( + "One entry per measure ANNOUNCED at Autumn Budget 2026: every HM Treasury Table 6.1 line " + "(including the lines a household model cannot touch), the one Table 6.2 financial " + "transaction with no Table 6.1 line, and the packages producers score. It is the port's " + "key space (#230): every staged claim's measure_key is a key from this file, null with " + "conditions.proposed_measure_key (rule 2), or for Table 6.4 recostings the earlier event's " + "key named in conditions.recosting_of; and every measure carries a computability verdict against the engine the Budget-day " + "runs used. It stages NO value claims; values live in the harvest under their producers " + "(sources/harvest-uk-ab2026-2026-10-29/)." + ), + "measure_key_rule": ( + "ab2026__, written out per Table 6.1 line in pipeline/ab2026_measure_keys.py so a " + "reworded title cannot move a key; ab2026__package_ for packages; ab2026_option__ " + "for options costed by others. The pre-event registry (data/uk/budget_2026_measures.json, " + "#96) keeps its own keys; pre_event_outcomes records what became of each." + ), + "verification_note": ( + "Every pe_reform_delta and parameter_legs path was RESOLVED against an installed " + f"policyengine-uk {PIN} on 2026-10-29, and engine_baseline_2026 records what that engine " + "returns for 2026-06-01. Every not_expressible verdict carries a name_search COMPUTED over " + f"the pinned engine's parameter tree ({len(P)} leaves) and variable list ({len(V)}), never " + "typed. Mechanisms named in a verdict were read from the engine's source at the pin or from " + f"the dashboard's source at {DASHBOARD_REPO}@{DASHBOARD_MAIN[:8]}." + ), + "engine_pin": { + "policyengine_uk": PIN, + "resolved_on": "2026-10-29", + "pin_meaning": ( + "The pin follows the Budget-day runs: every published receipt of the UK Autumn Budget " + "dashboard records policyengine 6.11.1 with certified_for_model_version 2.151.0, and those " + "runs are AB2026's PolicyEngine counterparts (tranche 3). It is NOT the certified populace " + "pair data/uk/certified_pairs.json holds (policyengine 6.11.0, policyengine-uk 2.132.6); " + "tranche 3 adds a 6.11.1 pair record before any counterpart is ingested." + ), + "budget_day_runs": RUN_IDENTITY, + }, + "computability": { + "expressible": "every leg is a resolvable parameter at the pin, or the measure was executed by a receipt-pinned dashboard modifier (construction executed_by_dashboard)", + "partial": "some legs resolve; the missing ones are named in `missing`", + "not_expressible": "the engine has no representation; `why` names the gap, `name_search` records the computed search, `action_link` says where it goes", + }, + "construction_vocabulary": { + "executed_by_dashboard": "the measure ran on Budget day as a dashboard reform; pe_modifier names the module, function, arguments, the engine variables it replaces or reads, its parameter legs, and the published receipt (path, file sha256, reform sha256, run identity)", + "delta_on_current_law": "pe_reform_delta applied to current law at the pin", + "reversal_on_certified_world": "the measure is already in the engine's current law; a counterpart executes the pre-measure world as baseline (#56 convention)", + "package_of_registry_measures": "a composition of registry measures (`package_of`, a list of keys, as in AB2025); a PolicyEngine number covers the expressible legs, stated as constructed", + }, + "exogenous_levers_note": ( + "The engine carries exogenous incidence levers that spread a £ amount supplied as an input: " + + "; ".join(LEVERS.values()) + + ". Feeding a Table 6.1 figure through one restates HM Treasury's costing rather than " + "estimating it, so no lever makes a line expressible here." + ), + "action_link_rule": "Every not_expressible measure links to #230, which lists the upstream development items; the bus fare cap's partial verdict links to #106, the bus gap record.", + "pre_event_outcomes": PRE_EVENT, + "triage": { + **counts, + "executed_by_dashboard": sum( + 1 for m in measures if m.get("construction") == "executed_by_dashboard" + ), + "policyengine_uk_development_item": sum( + 1 for m in measures if m.get("policyengine_uk_development_item") + ), + "out_of_model_scope": sum( + 1 for m in measures if m.get("out_of_model_scope") + ), + "announced": sum( + 1 for m in measures if m["reported_status"] == "announced" + ), + }, + "measures": measures, + } + + +# What became of each measure the pre-event registry (#96) recorded as under +# consideration. "Not in Table 6.1 or 6.4" is a statement about those two +# tables, read in full, nothing more. +PRE_EVENT = { + "ab2026__property_income_tax_rate_rise": "an AB2025 measure (ab2025__property_income_separate_rates: " + "22%/42%/47% from 6 April 2027); Table 6.4 line 6 recosts it, and Table 6.1 line 61 raises those " + "rates by a further 2ppts to 24%/44%/49% (" + K.key(61) + ")", + "ab2026__bank_profit_surcharge_increase": "announced: Table 6.1 line 55 (" + + K.key(55) + + "), temporary, 3% to 6% for 15 months", + "ab2026__business_rates_warehouse_up_pub_down": "partly: Table 6.1 line 12 raises pubs' relief (" + + K.key(12) + + "); no warehouse surcharge line in Table 6.1 or 6.4", + "ab2026__high_value_council_tax_surcharge": "an AB2025 measure; Table 6.1 line 93 changes its reliefs (" + + K.key(93) + + ") and Table 6.4 line 11 recosts it", + "ab2026__cgt_align_with_income_tax_rates": "not in Table 6.1 or 6.4", + "ab2026__cgt_remove_uplift_on_death": "not in Table 6.1 or 6.4", + "ab2026__pension_tax_free_lump_sum_restriction": "not in Table 6.1 or 6.4", + "ab2026__ni_extended_to_investment_property_pension_income": "not in Table 6.1 or 6.4", + "ab2026__personal_allowance_freeze_extension": "not in Table 6.1 or 6.4", + "ab2026__wealth_tax_2pc_above_10m": "not in Table 6.1 or 6.4", + "ab2026__council_tax_and_sdlt_to_land_value_tax": "not in Table 6.1 or 6.4", + "ab2026__online_sales_levy": "not in Table 6.1 or 6.4 (line 46, online marketplace liability, is a VAT collection measure, not a levy)", + "ab2026__vape_duty_increase": "not in Table 6.1 or 6.4 (line 57 removes business rates reliefs for vape shops)", + "ab2026__ated_increase_and_sdlt_envelope_close": "not in Table 6.1 or 6.4", +} + + +def keys_md(reg): + out = [ + "# Autumn Budget 2026 registry keys", + "", + "Generated by `pipeline/build_ab2026_registry.py` from `data/uk/ab2026_measures.json`; do not edit.", + "Every staged row's `measure_key` is one of these, or (Table 6.4 recostings only) a key from the", + "earlier event's registry named in `conditions.recosting_of`.", + "", + "| key | Table 6.1 line | computability | title |", + "|---|--:|---|---|", + ] + for m in reg["measures"]: + line = m.get("table_61_line") or ( + f"6.2/{m['table_62_line']}" if m.get("table_62_line") else "" + ) + out.append( + f"| `{m['measure_key']}` | {line} | {m['computability']} | {m['title'].replace('|', '/')} |" + ) + return "\n".join(out) + "\n" + + +def main(argv=None): + reg = registry() + text = json.dumps(reg, indent=1, ensure_ascii=False) + "\n" + md = keys_md(reg) + if argv and "--check" in argv: + ok = OUT.read_text() == text and KEYS_MD.read_text() == md + print("byte-identical" if ok else "DIFFERS") + return 0 if ok else 1 + OUT.write_text(text) + KEYS_MD.parent.mkdir(parents=True, exist_ok=True) + KEYS_MD.write_text(md) + print(f"wrote {OUT.relative_to(REPO)}: {len(measures)} measures, {reg['triage']}") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/pipeline/harvest_counts.py b/pipeline/harvest_counts.py new file mode 100644 index 000000000..a65cae7bc --- /dev/null +++ b/pipeline/harvest_counts.py @@ -0,0 +1,75 @@ +"""Write or check a harvest's COUNTS.json from its family directories. + +COUNTS.json pins, per family, the row count the ingest's exact accounting +reads as `read`, the primary count, the family's producer slugs and the +sha256 of its claims_staged.jsonl.gz, plus `_totals`. The AB2025 file was +written by hand; this computes the same shape so a new family cannot be +added without its pin moving in the same commit. + + python pipeline/harvest_counts.py sources/harvest-uk-ab2026-2026-10-29 --pinned-on 2026-10-29 + python pipeline/harvest_counts.py sources/harvest-uk-ab2026-2026-10-29 --check +""" + +import argparse +import gzip +import hashlib +import json +import sys +from pathlib import Path + + +def counts(harvest, pinned_on): + out, rows_total, restated = {}, 0, 0 + families = sorted( + p for p in Path(harvest).iterdir() if (p / "claims_staged.jsonl.gz").exists() + ) + for fam in families: + gz = fam / "claims_staged.jsonl.gz" + with gzip.open(gz, "rt") as fh: + rows = [json.loads(line) for line in fh if line.strip()] + primaries = [ + line + for line in (fam / "manifest.jsonl").read_text().splitlines() + if line.strip() + ] + out[fam.name] = { + "rows": len(rows), + "primaries": len(primaries), + "claims_sha256": hashlib.sha256(gz.read_bytes()).hexdigest(), + "sources": sorted({r["source"] for r in rows}), + } + rows_total += len(rows) + restated += sum(1 for r in rows if r["attribution"] == "restated") + out["_totals"] = { + "rows": rows_total, + "restated": restated, + "families": len(families), + "pinned_on": pinned_on, + } + return out + + +def main(argv=None): + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("harvest") + ap.add_argument("--pinned-on") + ap.add_argument("--check", action="store_true") + args = ap.parse_args(argv) + path = Path(args.harvest) / "COUNTS.json" + if args.check: + pinned = json.loads(path.read_text()) + fresh = counts(args.harvest, pinned["_totals"]["pinned_on"]) + if fresh != pinned: + print("COUNTS.json is stale") + return 1 + print("COUNTS.json matches the families") + return 0 + if not args.pinned_on: + ap.error("--pinned-on is required when writing") + path.write_text(json.dumps(counts(args.harvest, args.pinned_on), indent=1) + "\n") + print(f"wrote {path}") + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/pipeline/stage_ab2026_hmt_tables.py b/pipeline/stage_ab2026_hmt_tables.py new file mode 100644 index 000000000..cedaea600 --- /dev/null +++ b/pipeline/stage_ab2026_hmt_tables.py @@ -0,0 +1,475 @@ +"""Stage HM Treasury's Budget 2026 Tables 6.1, 6.2 and 6.4, cell by cell (#230). + +Every value is read from the published XLSX workbooks as stored (openpyxl, +cached values) and staged verbatim: value_raw is the cell, value is the cell +times 1,000,000. Nothing is derived, re-signed or summed. Each workbook is +hashed and the hash must match the manifest pin before a row is written, so a +re-published file stops the stager instead of silently re-staging. + + uv run --with openpyxl python pipeline/stage_ab2026_hmt_tables.py \ + --t61 PATH/Table_6.1_and_6.2_Budget_2026_Policy_Decisions.xlsx \ + --t64 PATH/Table_6.4_Recostings_Table.xlsx + +The output gzip is written with mtime 0, so a re-run on the same workbooks +is byte-identical and COUNTS.json's claims_sha256 pin holds. +""" + +import argparse +import gzip +import hashlib +import io +import json +import re +import sys +from pathlib import Path + +try: + from pipeline import ab2026_measure_keys as K +except ModuleNotFoundError: # direct script invocation without PYTHONPATH + import ab2026_measure_keys as K + +ROOT = Path(__file__).resolve().parent.parent +FAMILY = ROOT / "sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables" +FISCAL_EVENT = "autumn_budget_2026" + +T61 = { + "url": "https://assets.publishing.service.gov.uk/media/6ae187a2779378370fd80a9a/Table_6.1_and_6.2_Budget_2026_Policy_Decisions.xlsx", + "title": "Table 6.1 and 6.2 Budget 2026 Policy Decisions", + "sha256": "359958df6b1ab9746073725f6f8017ebdbb55040e57cf28612891f1e294a7f15", + "bytes": 67126, +} +T64 = { + "url": "https://assets.publishing.service.gov.uk/media/6ae0f93fe4367e5c8b0467d6/Table_6.4_Recostings_Table.xlsx", + "title": "Table 6.4 Measures announced at Spring Statement 2026 or earlier that will take effect from 29 October 2026 or later", + "sha256": "b0449df1737f128fdc32ffeffbe7ed11876e7ab1c80d14dd9908e68a38386d3e", + "bytes": 76402, +} +PUBLISHED = "2026-10-28" +RETRIEVED = "2026-10-28" +REVERIFIED = "2026-10-29" +COLLECTION = ( + "https://www.gov.uk/government/publications/supporting-documents-for-budget-2026" +) + +SIGN = ( + "positive = yield to the Exchequer (reduces borrowing); negative = cost to " + "the Exchequer (the tables print no legend; convention observed from the " + "rows themselves, e.g. the bank surcharge rise is + and the Household " + "Energy Payment is -, as in the AB2025 Table 4.1 harvest)" +) +FT_SIGN = ( + "positive = improves the public sector's cash position (cash inflow or " + "lower outflow); negative = worsens it (financial transactions: the table " + "prints no legend; convention observed from the rows, e.g. the National " + "Wealth Fund's investment is -, and line 6's reprioritisation of existing " + "budgets is +)" +) +# Table 6.1 footnotes 1 and 2, as the red book prints them (review A T-8). +T61_FOOTNOTES = ( + "Table footnote 1: totals may not sum due to rounding. Footnote 2 sets the " + "totals' scope: 'Measures with no net increase to borrowing are not " + "included, these are debt relief for councils in severe financial distress " + "through the Public Works Loan Board and a landlord registration fee for the " + "Private Rented Sector.' and 'AME and tax costings with an impact of less " + "than +-£10 million in every year are not included'." +) +# Table 6.2 line 6 reprioritises existing financial transactions budgets to +# fund line 5's new equity loan scheme. Its cells are not the scheme's, so it +# takes its own proposed key (README rule 2), as Table 6.1 line 34's +# reprioritisation does (review A T-1). +T62_PROPOSED = {6: "ab2026__your_first_home_ft_reprioritisation"} +# The workbook shades its five top-level section headings (B5, B27, B43, B58, +# B82) with this fill, as the red book shades them (review A T-4). +SECTION_FILL = "FFFFCCCC" +# A footnote marker HM Treasury prints as a superscript run glued to a title +# (lines 45 and 47 end "...4"; review A T-5). openpyxl's cached value joins the +# runs, so the trailing marker is stripped from the title. +FOOTNOTE_MARKER = re.compile(r"(?<=[a-z])\d$") + + +def fy_end(fy): + m = re.fullmatch(r"(\d{4})-(\d{2})", fy) + assert m, fy + return int(m.group(1)) + 1 + + +def raw(v): + """The cell as stored, without Python's float decoration.""" + if isinstance(v, float) and v.is_integer(): + v = int(v) + return str(v) + + +def sha256(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() + + +def publication(src, locator): + return { + "title": src["title"], + "url": src["url"], + "date": PUBLISHED, + "publisher": "HM Treasury", + "primary_sha256": src["sha256"], + "locator": locator, + "access": "direct", + } + + +def base_row(src, *, title, fy, value, locator, table, column, conditions, metric): + r = { + "source": "hm_treasury", + "source_model": "hmt_costing_obr_certified", + "value": int(value) * 1_000_000 if float(value).is_integer() else value * 1e6, + "value_raw": raw(value), + "normalization": "£ million as printed in the cell x 1,000,000; sign as printed", + "value_kind": "point", + "period": fy_end(fy), + "time_basis": "fiscal_year", + "conditions": { + "fiscal_event": FISCAL_EVENT, + "fy": fy, + "geography": "UK", + "basis": "forecast", + **conditions, + }, + "reform_hint": title, + "attribution": "own", + "benchmark_class": "different_model", + "baseline_policy": None, + "publication": publication(src, locator), + "source_table": table, + "source_column": column, + "quote": f"{title} | {column}: {raw(value)}", + "parse_confidence": "high", + "status": "ok", + "note": "", + } + r.update(metric) + return r + + +REVENUE = {"metric": "revenue_change", "unit_concept": "gbp"} +# README rule 10: Table 6.1's three total rows give the Budget's effect on +# PSNB, which models.py keeps apart from revenue_change, a receipts line, so +# they take this metric. +BORROWING = {"metric": "decisions_effect_on_borrowing", "unit_concept": "gbp"} +FT = {"proposed_metric": "financial_transaction_cash_impact", "unit_concept": "gbp"} + + +def header_years(ws, row): + cols = {} + for c in ws[row]: + if isinstance(c.value, str) and re.fullmatch(r"\d{4}-\d{2}", c.value.strip()): + cols[c.column] = c.value.strip() + assert len(cols) == 6, (ws.title, cols) + return cols + + +def title_of(text): + return FOOTNOTE_MARKER.sub("", " ".join(text.split())) + + +def is_section(cell): + fill = cell.fill + return bool( + fill is not None + and fill.fill_type + and getattr(fill.fgColor, "rgb", None) == SECTION_FILL + ) + + +def stage_t61(wb, out): + ws = wb["Table 6.1"] + years = header_years(ws, 4) + # Headings sit in column B with nothing beside them. The five top-level + # sections are shaded (SECTION_FILL); a section's sub-headings follow it, + # so each line's heading is "section > sub-heading", carrying the last + # section down to lines whose sub-heading has none directly above it. + run, heading, section = [], "", None + seen = set() + for row in ws.iter_rows(min_row=5): + b, c = row[1].value, row[2].value + if ( + isinstance(b, str) + and c is None + and not any(isinstance(x.value, (int, float)) for x in row[3:]) + ): + text = " ".join(b.split()) + if text[0].isdigit(): + break # footnotes + if is_section(row[1]): + section, run = text, [] + else: + run.append(text) + heading = " > ".join(([section] if section else []) + run) + continue + run = [] + if isinstance(b, int) and isinstance(c, str): + # Column D ("Fiscal Head check (hide)") is a hidden check column + # the red book doesn't print, so it isn't staged (review A T-3). + line, title = b, title_of(c) + head = row[4].value.strip() + seen.add(line) + for col, fy in years.items(): + v = ws.cell(row=row[0].row, column=col).value + assert isinstance(v, (int, float)), (line, fy, v) + cond = { + "sign_convention": SIGN, + "scoring_method": "final", + "table": "6.1", + "table_line": str(line), + "head": head, + "heading": heading, + "row_type": "measure", + } + out.append( + { + **base_row( + T61, + title=title, + fy=fy, + value=v, + locator=f"Table 6.1 line {line}, {fy} (cell {ws.cell(row=row[0].row, column=col).coordinate})", + table="Table 6.1 Budget 2026 policy decisions (£ million)", + column=fy, + conditions=cond, + metric=REVENUE, + ), + "measure_key": K.key(line), + } + ) + continue + if not b and isinstance(c, str) and c.strip().startswith("Total"): + label = c.strip() + slug = { + "Total policy decisions": "package_total_policy_decisions", + "Total spending policy decisions": "package_total_spending_policy_decisions", + "Total tax policy decisions": "package_total_tax_policy_decisions", + }[label] + for col, fy in years.items(): + v = ws.cell(row=row[0].row, column=col).value + out.append( + { + **base_row( + T61, + title=label, + fy=fy, + value=v, + locator=f"Table 6.1 '{label}', {fy} (cell {ws.cell(row=row[0].row, column=col).coordinate})", + table="Table 6.1 Budget 2026 policy decisions (£ million)", + column=fy, + conditions={ + "sign_convention": SIGN, + "scoring_method": "final", + "table": "6.1", + "row_type": "total", + }, + metric=BORROWING, + ), + "measure_key": K.package_key(slug), + "note": T61_FOOTNOTES, + } + ) + assert seen == set(K.TABLE_61), sorted(set(K.TABLE_61) ^ seen) + + +def stage_t62(wb, out, totals): + """Table 6.2's lines go to `out`; its total row goes to `totals`, which + main() writes after Table 6.4, so the rows staged before the total was + added (review A T-2) keep their positions.""" + ws = wb["Table 6.2"] + years = header_years(ws, 4) + seen = set() + for row in ws.iter_rows(min_row=5): + b, c = row[1].value, row[2].value + if isinstance(b, int) and isinstance(c, str): + line, title = b, title_of(c) + seen.add(line) + for col, fy in years.items(): + v = ws.cell(row=row[0].row, column=col).value + assert isinstance(v, (int, float)), (line, fy, v) + cond = { + "sign_convention": FT_SIGN, + "table": "6.2", + "table_line": str(line), + "row_type": "measure", + } + key = K.PREFIX + K.TABLE_62[line] + if line in T62_PROPOSED: + cond["proposed_measure_key"] = T62_PROPOSED[line] + key = None + r = { + **base_row( + T61, + title=title, + fy=fy, + value=v, + locator=f"Table 6.2 line {line}, {fy} (cell {ws.cell(row=row[0].row, column=col).coordinate})", + table="Table 6.2 Budget 2026 Financial Transactions (cash impact, £ million)", + column=fy, + conditions=cond, + metric=FT, + ), + "measure_key": key, + } + if key is None: + r["note"] = ( + "Table 6.2 line 6 reprioritises existing financial " + "transactions budgets to fund line 5's equity loan scheme; " + "it has no Table 6.1 line, so it takes its own proposed key " + "(README rule 2), never line 5's." + ) + out.append(r) + continue + if not b and isinstance(c, str) and c.strip().startswith("Total"): + label = " ".join(c.split()) + for col, fy in years.items(): + v = ws.cell(row=row[0].row, column=col).value + assert isinstance(v, (int, float)), (label, fy, v) + totals.append( + { + **base_row( + T61, + title=label, + fy=fy, + value=v, + locator=f"Table 6.2 '{label}', {fy} (cell {ws.cell(row=row[0].row, column=col).coordinate})", + table="Table 6.2 Budget 2026 Financial Transactions (cash impact, £ million)", + column=fy, + conditions={ + "sign_convention": FT_SIGN, + "table": "6.2", + "row_type": "total", + "proposed_measure_key": "ab2026__package_total_financial_transactions", + }, + metric=FT, + ), + "measure_key": None, + "note": "Table footnote 1: totals may not sum due to rounding.", + } + ) + assert seen == set(K.TABLE_62), seen + + +def stage_t64(wb, out): + ws = wb["Rounded Table 6.4"] + years = header_years(ws, 3) + group = None + seen = set() + for row in ws.iter_rows(min_row=4): + f, g = row[5].value, row[6].value + if isinstance(f, str) and f.startswith("Measures announced at"): + group = f.strip() + continue + if isinstance(f, int) and isinstance(g, str): + line, title = f, " ".join(g.replace("\xa0", " ").split()) + seen.add(line) + event, mkey = K.TABLE_64[line] + head = row[7].value.strip() + for col, fy in years.items(): + v = ws.cell(row=row[0].row, column=col).value + assert isinstance(v, (int, float)), (line, fy, v) + out.append( + { + **base_row( + T64, + title=title, + fy=fy, + value=v, + locator=f"Table 6.4 line {line}, {fy} (cell {ws.cell(row=row[0].row, column=col).coordinate})", + table="Table 6.4 Measures announced at Spring Statement 2026 or earlier that will take effect from 29 October 2026 or later (£)", + column=fy, + conditions={ + "sign_convention": SIGN, + "scoring_method": "final", + "table": "6.4", + "table_line": str(line), + "head": head, + "row_type": "recosting", + "recosting_of": event, + "announced_at": group, + }, + metric=REVENUE, + ), + "measure_key": mkey, + "note": ( + "A recosting at Budget 2026 of a measure announced at an " + "earlier event; measure_key is that event's registry key. " + "The table's units header prints '(£)', and its footnotes " + "give no unit, but every value cell carries the number " + 'format \\+#,##0"m" (I9 = 7130 displays as "+7,130m"), so ' + "the cells are £ million." + ), + } + ) + assert seen == set(K.TABLE_64), seen + + +def stage_all(wb61, wb64): + rows, totals = [], [] + stage_t61(wb61, rows) + stage_t62(wb61, rows, totals) + stage_t64(wb64, rows) + assert len(totals) == 6, len(totals) + return rows + totals + + +def write_gz(rows, path): + buf = io.BytesIO() + with gzip.GzipFile(fileobj=buf, mode="wb", mtime=0, filename="") as gz: + for r in rows: + gz.write( + (json.dumps(r, sort_keys=True, ensure_ascii=False) + "\n").encode() + ) + path.write_bytes(buf.getvalue()) + + +def main(argv=None): + import openpyxl + + ap = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + ap.add_argument("--t61", required=True) + ap.add_argument("--t64", required=True) + args = ap.parse_args(argv) + for path, src in ((args.t61, T61), (args.t64, T64)): + got = sha256(path) + if got != src["sha256"]: + raise SystemExit(f"{path}: sha256 {got} != pinned {src['sha256']}") + rows = stage_all( + openpyxl.load_workbook(args.t61, data_only=True), + openpyxl.load_workbook(args.t64, data_only=True), + ) + FAMILY.mkdir(parents=True, exist_ok=True) + write_gz(rows, FAMILY / "claims_staged.jsonl.gz") + manifest = [ + { + "url": src["url"], + "title": src["title"], + "date": PUBLISHED, + "publisher": "HM Treasury", + "sha256": src["sha256"], + "bytes": src["bytes"], + "doc_type": "xlsx", + "access": "direct", + "retrieved": RETRIEVED, + "note": ( + f"Attachment of {COLLECTION}. Downloaded {RETRIEVED} and again " + f"{REVERIFIED} with a browser User-Agent; both downloads hash to " + "the pinned sha256." + ), + } + for src in (T61, T64) + ] + (FAMILY / "manifest.jsonl").write_text( + "".join(json.dumps(m, ensure_ascii=False) + "\n" for m in manifest) + ) + by = {} + for r in rows: + t = r["conditions"]["table"] + by[t] = by.get(t, 0) + 1 + print(f"staged {len(rows)} rows: {by}") + + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/pipeline/validate_budget_2026_registry.py b/pipeline/validate_budget_2026_registry.py index 9786ea3fc..a3c561787 100644 --- a/pipeline/validate_budget_2026_registry.py +++ b/pipeline/validate_budget_2026_registry.py @@ -74,11 +74,44 @@ def key_prefix(reg): def _paths_of(m): """Every parameter path a measure asks the engine for.""" - return list((m.get("pe_reform_delta") or {}).keys()) + list( - (m.get("pe_baseline_modifier") or {}).keys() + return ( + list((m.get("pe_reform_delta") or {}).keys()) + + list((m.get("pe_baseline_modifier") or {}).keys()) + + list((m.get("pe_modifier") or {}).get("parameter_legs") or []) ) +def _variables_of(m): + """Every engine variable a dashboard modifier replaces or reads (AB2026).""" + mod = m.get("pe_modifier") or {} + return list(mod.get("replaced_variables") or []) + list( + mod.get("reads_variables") or [] + ) + + +SHA256 = re.compile(r"[0-9a-f]{64}") +RECEIPT_FIELDS = ("repo", "commit", "path", "receipt_file_sha256", "reform_sha256") + + +def _modifier_errors(k, mod): + """An executed_by_dashboard measure names the code and the published + receipt it ran under, so a counterpart can be traced to the exact run.""" + errors = [] + if not mod: + return [f"{k}: executed_by_dashboard without a pe_modifier"] + for field in ("module", "function"): + if not (mod.get(field) or "").strip(): + errors.append(f"{k}: pe_modifier missing {field}") + rec = mod.get("receipt") or {} + for field in RECEIPT_FIELDS: + if not rec.get(field): + errors.append(f"{k}: pe_modifier.receipt missing {field}") + for field in ("receipt_file_sha256", "reform_sha256"): + if rec.get(field) and not SHA256.fullmatch(rec[field]): + errors.append(f"{k}: pe_modifier.receipt.{field} is not a sha256") + return errors + + def load(path=REGISTRY): return json.loads(Path(path).read_text()) @@ -114,10 +147,23 @@ def validate(reg): errors.append(f"{k}: missing title") deltas = m.get("pe_reform_delta") + construction = m.get("construction") + if construction == "executed_by_dashboard": + errors.extend(_modifier_errors(k, m.get("pe_modifier"))) + if construction == "package_of_registry_measures" and not m.get("package_of"): + errors.append(f"{k}: a package names what it is a package of") if m["computability"] == "expressible": - if not deltas: + # A measure the dashboard executed as a modifier, or a package of + # expressible legs, has no single delta to carry; the receipt or + # the legs stand in for it. + if not deltas and construction not in ( + "executed_by_dashboard", + "package_of_registry_measures", + ): errors.append(f"{k}: expressible but carries no reform delta") - if not m.get("engine_baseline_2026"): + if construction != "package_of_registry_measures" and not m.get( + "engine_baseline_2026" + ): errors.append( f"{k}: expressible but records no engine baseline to " "check the registry against" @@ -182,6 +228,24 @@ def validate(reg): "the pre-measure world it executes as pe_baseline_modifier" ) + by_key = {m.get("measure_key"): m for m in reg["measures"]} + for m in reg["measures"]: + if m.get("construction") != "package_of_registry_measures": + continue + # AB2025's totals describe their scope in words; a list names keys. + legs = m.get("package_of") + for leg in legs if isinstance(legs, list) else []: + if leg not in by_key: + errors.append(f"{m['measure_key']}: leg {leg} is not in the registry") + elif ( + m["computability"] == "expressible" + and by_key[leg]["computability"] != "expressible" + ): + errors.append( + f"{m['measure_key']}: expressible package with a " + f"{by_key[leg]['computability']} leg {leg}" + ) + # The whole reported package must be represented, including the parts # this model cannot touch — a registry that silently listed only the # modellable half would overstate coverage. @@ -225,9 +289,14 @@ def resolve_against_engine(reg, year=2026): f"policyengine-uk {installed} installed, registry pinned to {pin}" ) - params = policyengine_uk.CountryTaxBenefitSystem().parameters + system = policyengine_uk.CountryTaxBenefitSystem() + params = system.parameters problems, checked = [], 0 for m in reg["measures"]: + for name in dict.fromkeys(_variables_of(m)): + if name not in system.variables: + problems.append(f"{m['measure_key']}: no engine variable {name}") + checked += 1 for path in dict.fromkeys(_paths_of(m)): try: node = _resolve(params, path) @@ -288,7 +357,9 @@ def main(argv=None): print(" computability:", by) if args.resolve: checked = resolve_against_engine(reg) - print(f" resolved {checked} parameter paths against the certified engine") + print( + f" resolved {checked} parameter paths and variables against the pinned engine" + ) return reg diff --git a/scorecard_db/signs.py b/scorecard_db/signs.py index 142278fcc..d2b1a4a54 100644 --- a/scorecard_db/signs.py +++ b/scorecard_db/signs.py @@ -32,6 +32,8 @@ from __future__ import annotations +import re + SAME = "same" OPPOSITE = "opposite" MAGNITUDE = "magnitude" @@ -95,13 +97,21 @@ "(positive = yield", "(positive = increase in yield)", "reduction in borrowing", + "reduces borrowing", "higher government revenue", "here we present higher taxes as positive numbers", "reduction in public spending", "reduction in welfare spending", "positive = saving to the exchequer", + # a cost saving is a yield, though "positive = cost" also matches + # the same words: the reading conflicts, so it is unknown + "cost saving", "positive = saving against the current budget rule", "positive = fiscal tightening", + # the OBR's Table 1.1 workbook legend + "a negative sign implies a loss to the exchequer", + # IFS's chart of the Budget's tax change at the forecast horizon + "positive = increase in net tax", ), ), "spending": ( @@ -114,9 +124,24 @@ ), ), "borrowing": ( - (), - ("reduction in borrowing",), - ("increase in borrowing",), + # a printed total that adds rows under two conventions, or an + # average of absolute values, which has no direction + ("mixed:", "no directional sign"), + ( + "reduction in borrowing", + "reduces borrowing", + "borrowing reduction", + "positive = yield", + "a negative sign implies a loss to the exchequer", + "positive = increase in net tax", + "positive = additional investment income", + ), + ( + "increase in borrowing", + "borrowing increase", + "positive = increase in psnb", + "positive = cost", + ), ), "household_gain": ( ("reduction in benefit entitlement from the two-child limit",), @@ -186,6 +211,10 @@ } _ORIENTED_TO_CLAIM = ("PE oriented to it", "PE's own orientation") +# A phrase's negative leg ("...; negative = loss to households") states the +# same direction from the other side, so a deciding fragment found only +# there says nothing about what a positive value means (review A H-4). +_NEGATIVE_LEG = re.compile(r"\bnegative\s*(?:=|implies|means)[^;]*") MAGNITUDE_CONVENTION = "magnitude_with_direction_in_label" @@ -213,10 +242,32 @@ def classify(row: dict) -> tuple[str, str]: unanswerable, opposite, same = _PHRASES[family] if any(p in text for p in unanswerable): return UNKNOWN, f"stated:{family}:not_this_quantity" - if any(p in text for p in opposite): + positive = _NEGATIVE_LEG.sub(" ", text) + + def spans(phrases): + # a phrase that names the negative side itself ("a negative sign + # implies a loss ...") is read where it stands + out = [] + for p in phrases: + where = text if "negative" in p else positive + i = where.find(p) + while i >= 0: + out.append((i, i + len(p), where is text)) + i = where.find(p, i + 1) + return out + + opp, sam = spans(opposite), spans(same) + # one stretch of text read both ways ("positive = cost saving ...") + if any( + a0 < b1 and b0 < a1 and wa == wb for a0, a1, wa in opp for b0, b1, wb in sam + ): + return UNKNOWN, f"stated:{family}:conflicting" + if opp: return OPPOSITE, f"stated:{family}:opposite" - if any(p in text for p in same): + if sam: return SAME, f"stated:{family}:same" + if any(p in text for p in opposite + same): + return UNKNOWN, f"stated:{family}:negative_leg" return UNKNOWN, f"stated:{family}:unrecognised" # US producers publish signed changes, after minus before, which is # PolicyEngine's reform-minus-baseline orientation; no US adapter diff --git a/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json b/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json new file mode 100644 index 000000000..313b84e9a --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json @@ -0,0 +1,108 @@ +{ + "uk_centax": { + "rows": 112, + "primaries": 6, + "claims_sha256": "2529e86fc898493e4e045072f6aebff2c757470cd9d578acbce8ca0790ce348c", + "sources": [ + "centax" + ] + }, + "uk_devolved_govts": { + "rows": 19, + "primaries": 2, + "claims_sha256": "8f47eb3c1d0d67c76b19cdb02c09eb7211e2ad26e8957215b755009a64ba5dfa", + "sources": [ + "scottish_government", + "welsh_government" + ] + }, + "uk_hmt_costings": { + "rows": 597, + "primaries": 1, + "claims_sha256": "4769087faa0876ca168f1976ac16ce23129617cd7f1ae35c406f75761fc9ea32", + "sources": [ + "hm_treasury" + ] + }, + "uk_hmt_redbook": { + "rows": 425, + "primaries": 6, + "claims_sha256": "04e5a88f9d20f8761049040460eef001880f471f74018e9d16c23e9b8c4a485d", + "sources": [ + "hm_treasury" + ] + }, + "uk_hmt_tables": { + "rows": 768, + "primaries": 2, + "claims_sha256": "e44ba6ae818aa4f4c759ba135ea5a33a3dbbe0753f81e64759a8b0d25cc02819", + "sources": [ + "hm_treasury" + ] + }, + "uk_ifs_ab2026": { + "rows": 144, + "primaries": 14, + "claims_sha256": "b76375ec9ccba03011181edcb47601e81f281636fda880f09688446bb582363d", + "sources": [ + "ifs" + ] + }, + "uk_ippr": { + "rows": 3, + "primaries": 3, + "claims_sha256": "dcabaf8fb3157e4fa6d18c410add5a430eadbdc02784dd9d7831b2cea1bc2ab9", + "sources": [ + "ippr" + ] + }, + "uk_obr_tables": { + "rows": 2800, + "primaries": 4, + "claims_sha256": "ceae9897d7c680f5c1be6e04a7dba3eb7114e1f542fcb5ae2236cd775d9fa199", + "sources": [ + "obr_efo" + ] + }, + "uk_rf_ab2026": { + "rows": 766, + "primaries": 8, + "claims_sha256": "e8f75767a7f871c0f2030aaf2d47348e35f6caa3418ab773e53b77205a682325", + "sources": [ + "resolution_foundation" + ] + }, + "uk_thinktank_misc": { + "rows": 12, + "primaries": 5, + "claims_sha256": "ba9ecc122125e3eefecc0c1433ef5cd9b24e91f59d3fd2c2e63e18a2b51c2069", + "sources": [ + "citizens_advice", + "cps", + "institute_for_government", + "learning_and_work_institute" + ] + }, + "uk_tpa": { + "rows": 305, + "primaries": 10, + "claims_sha256": "241f625fb725640835bde53dd5a2d1217ddd758f9df260abf778ac4bf96ba7cc", + "sources": [ + "tax_policy_associates" + ] + }, + "uk_trussell_wpi": { + "rows": 1, + "primaries": 1, + "claims_sha256": "e97bfd502e5dcf591f53a95c7acfef169be6a554f267b7e2c11006db9286ec79", + "sources": [ + "trussell_wpi" + ] + }, + "_totals": { + "rows": 5952, + "restated": 450, + "families": 12, + "pinned_on": "2026-10-29" + } +} diff --git a/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md b/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md new file mode 100644 index 000000000..ef940b7c4 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md @@ -0,0 +1,96 @@ +# Proposed measure keys in the AB2026 harvest + +Generated by `pipeline/ab2026_proposed_keys.py` from the staged families; don't edit by hand. + +A row whose scope matches no registered measure has `measure_key: null` and names one of these keys in `conditions.proposed_measure_key` (README rule 2). A key is a measure with no Table 6.1 line (`ab2026__`), a package (`ab2026__package_`) or an option (`ab2026_option__`). Each family's NOTES.md gives the key's scope as Table 6.1 lines or the producer's own words. Tranche 2 registers each key in `data/uk/ab2026_measures.json`, or folds it into a registered key, before the ingest. + +86 proposed keys (15 measures, 58 packages, 13 options) on 973 rows. + +| proposed key | kind | rows | families | producers | +|---|---|--:|---|---| +| `ab2026__british_business_bank_defence_commitments_accelerated` | measure | 9 | uk_hmt_costings | hm_treasury | +| `ab2026__departmental_spending_growth_2031_32` | measure | 13 | uk_obr_tables | obr_efo | +| `ab2026__energy_debt_circuit_breaker` | measure | 3 | uk_hmt_redbook | hm_treasury | +| `ab2026__gas_standing_charge_moved_to_unit_rates` | measure | 34 | uk_ifs_ab2026, uk_rf_ab2026 | ifs, resolution_foundation | +| `ab2026__gas_supplier_levy_funded_from_general_taxation` | measure | 1 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__minimum_wage_uprating_april_2027` | measure | 4 | uk_hmt_redbook, uk_rf_ab2026 | hm_treasury, resolution_foundation | +| `ab2026__mod_counter_fraud_strategy` | measure | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_barnett_consequentials` | package | 16 | uk_devolved_govts, uk_hmt_redbook | hm_treasury, welsh_government | +| `ab2026__package_breathing_space_for_households` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_business_rates_rhl_sbrr_and_transitional_support` | package | 2 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_carbon_price_support_and_cfd_levies` | package | 2 | uk_obr_tables | obr_efo | +| `ab2026__package_civil_service_transformation_programme` | package | 1 | uk_obr_tables | obr_efo | +| `ab2026__package_compliance_measures_announced` | package | 1 | uk_obr_tables | obr_efo | +| `ab2026__package_corporation_and_bank_tax_changes` | package | 7 | uk_obr_tables | obr_efo | +| `ab2026__package_defence_investment_plan` | package | 2 | uk_hmt_redbook, uk_obr_tables | hm_treasury, obr_efo | +| `ab2026__package_dividend_and_capital_gains_tax_changes` | package | 6 | uk_obr_tables | obr_efo | +| `ab2026__package_dwp_fraud_and_error_measures` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_fuel_duty_and_electricity_vat` | package | 11 | uk_obr_tables | obr_efo | +| `ab2026__package_fuel_duty_freezes_since_2010_11` | package | 1 | uk_obr_tables | obr_efo | +| `ab2026__package_government_decisions_since_march_2026` | package | 368 | uk_hmt_redbook, uk_obr_tables, uk_rf_ab2026 | hm_treasury, obr_efo, resolution_foundation | +| `ab2026__package_hmrc_tax_gap_and_online_marketplace` | package | 7 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_hmt_distributional_budget_2026` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_hmt_distributional_since_ab2024` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_household_energy_payment_and_electricity_vat` | package | 5 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty` | package | 3 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_ifs_announced_tax_changes` | package | 1 | uk_ifs_ab2026 | ifs | +| `ab2026__package_ifs_new_giveaways` | package | 2 | uk_ifs_ab2026 | ifs | +| `ab2026__package_national_wealth_fund_and_british_business_bank` | package | 5 | uk_obr_tables | obr_efo | +| `ab2026__package_non_scorecard_decisions` | package | 12 | uk_obr_tables | obr_efo | +| `ab2026__package_obr_other_ame_spending_decisions` | package | 6 | uk_obr_tables | obr_efo | +| `ab2026__package_obr_other_departmental_spending_changes` | package | 7 | uk_obr_tables | obr_efo | +| `ab2026__package_obr_other_hmrc_compliance_and_debt` | package | 1 | uk_obr_tables | obr_efo | +| `ab2026__package_obr_other_tax_measures` | package | 6 | uk_obr_tables | obr_efo | +| `ab2026__package_parliament_fuel_duty_decisions` | package | 3 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_parliament_tax_gap_measures` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_parliament_welfare_fraud_and_error_savings` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_planned_capital_spending_reductions` | package | 1 | uk_obr_tables | obr_efo | +| `ab2026__package_property_and_savings_income_rates` | package | 33 | uk_hmt_redbook, uk_ifs_ab2026, uk_rf_ab2026, uk_tpa | hm_treasury, ifs, resolution_foundation, tax_policy_associates | +| `ab2026__package_property_and_savings_income_rates_receipts` | package | 7 | uk_obr_tables | obr_efo | +| `ab2026__package_pubs_relief_35pc_total` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_rdel_decisions_excluding_household_energy_payment` | package | 3 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_regulation_tariff_and_sandbox_business_savings` | package | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__package_rf_ab26_permanent_personal_measures` | package | 19 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_rf_absolute_policy_changes` | package | 2 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_rf_energy_bill_support_announced_at_budget` | package | 2 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_rf_other_tax_measures` | package | 6 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_rf_parliament_permanent_tax_and_benefit_measures` | package | 42 | uk_rf_ab2026 | resolution_foundation | +| `ab2026__package_spending_decisions_since_march_2026` | package | 13 | uk_obr_tables | obr_efo | +| `ab2026__package_tax_administration_compliance_and_debt_collection_receipts` | package | 13 | uk_obr_tables, uk_rf_ab2026 | obr_efo, resolution_foundation | +| `ab2026__package_tax_decisions_since_march_2026` | package | 20 | uk_obr_tables, uk_rf_ab2026 | obr_efo, resolution_foundation | +| `ab2026__package_temporary_business_rates_reliefs_receipts` | package | 1 | uk_obr_tables | obr_efo | +| `ab2026__package_total_financial_transactions` | package | 6 | uk_hmt_tables | hm_treasury | +| `ab2026__package_tpa_business_rates` | package | 8 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_cgt_founders_relief_and_badr` | package | 1 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_energy_and_environment` | package | 6 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_fuel_duty_red_diesel_and_hgv_ved` | package | 1 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_other_by_measure` | package | 1 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_other_by_tax_2027_28` | package | 1 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_other_by_year` | package | 6 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_other_corporate_tax` | package | 7 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_other_income_tax` | package | 7 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_other_vat` | package | 7 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_savings_property_income_and_cash_isa` | package | 7 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_tariffs` | package | 2 | uk_tpa | tax_policy_associates | +| `ab2026__package_tpa_temporary_vat_and_fuel_cuts` | package | 6 | uk_tpa | tax_policy_associates | +| `ab2026__private_landlord_register_fee_65` | measure | 25 | uk_hmt_costings, uk_obr_tables | hm_treasury, obr_efo | +| `ab2026__public_sector_pensions_2024_valuations` | measure | 27 | uk_obr_tables | obr_efo | +| `ab2026__pwlb_debt_relief_councils_severe_distress` | measure | 18 | uk_hmt_costings, uk_obr_tables | hm_treasury, obr_efo | +| `ab2026__regulatory_administrative_savings` | measure | 5 | uk_hmt_redbook | hm_treasury | +| `ab2026__rolls_royce_gas_turbine_programme` | measure | 1 | uk_hmt_redbook | hm_treasury | +| `ab2026__scottish_air_passenger_duty_devolution` | measure | 18 | uk_obr_tables | obr_efo | +| `ab2026__state_pension_triple_lock_adjustment` | measure | 4 | uk_hmt_redbook, uk_obr_tables | hm_treasury, obr_efo | +| `ab2026__your_first_home_ft_reprioritisation` | measure | 6 | uk_hmt_tables | hm_treasury | +| `ab2026_option__cgt_reform_package` | option | 10 | uk_centax | centax | +| `ab2026_option__childcare_100k_entitlement_taper` | option | 3 | uk_centax | centax | +| `ab2026_option__childcare_100k_threshold_raised` | option | 2 | uk_centax | centax | +| `ab2026_option__childcare_100k_threshold_removed` | option | 3 | uk_centax | centax | +| `ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s` | option | 1 | uk_centax | centax | +| `ab2026_option__fuel_duty_continued_freeze` | option | 7 | uk_obr_tables, uk_rf_ab2026 | obr_efo, resolution_foundation | +| `ab2026_option__fuel_duty_rpi_uprating_since_2011` | option | 2 | uk_rf_ab2026 | resolution_foundation | +| `ab2026_option__health_foundation_social_care_reforms` | option | 2 | uk_obr_tables | obr_efo | +| `ab2026_option__income_tax_5pc_share_devolved_to_mayors` | option | 1 | uk_ippr | ippr | +| `ab2026_option__lha_unfreeze_2027_28` | option | 17 | uk_rf_ab2026 | resolution_foundation | +| `ab2026_option__nics_on_investment_income` | option | 10 | uk_centax | centax | +| `ab2026_option__nics_on_partnership_income` | option | 24 | uk_centax | centax | +| `ab2026_option__tax_decisions_with_continued_fuel_duty_freeze` | option | 11 | uk_rf_ab2026 | resolution_foundation | diff --git a/sources/harvest-uk-ab2026-2026-10-29/README.md b/sources/harvest-uk-ab2026-2026-10-29/README.md new file mode 100644 index 000000000..d3868bce5 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/README.md @@ -0,0 +1,139 @@ +# Harvest: Autumn Budget 2026 scores from every producer (#230) + +We began staging this harvest from the primary documents on 29 October 2026, the day after the Budget. We lay it out as in the AB2025 harvest (`sources/harvest-uk-ab2025-2026-09-24/`): + +- One family directory per producer group. +- Each family's directory contains: + - `NOTES.md`: how we fetched each primary, a tally of what we staged, and what we left out and why; + - `manifest.jsonl`: one line per primary document, with its sha256; + - `claims_staged.jsonl.gz`: one line per claim. +- In `COUNTS.json`, we pin each family's rows, primaries, producer slugs and the sha256 of its claims file. `pipeline/harvest_counts.py` writes and checks it. +- `pipeline/build_ab2026_registry.py` writes `REGISTRY_KEYS.md`, a list of every measure key. +- `pipeline/ab2026_proposed_keys.py` writes `PROPOSED_KEYS.md`, a list of every proposed key on a row (rule 2). We register those keys in tranche 2. +- In `SEED_INVENTORY/`, we list the publications we started from, which we gathered while we monitored reactions on 28 and 29 October. + +No code reads this harvest yet; we add the ingest in tranche 2 of #230. In its accounting, the ingest will require `read = ingested + dropped` exactly, against the rows we pin in `COUNTS.json`. `tests/test_uk_ab2026_harvest.py` checks every row against the contract below. + +## Rules + +We follow the AB2025 harvest README's rules 1–10 and its row contract, with the AB2026 exceptions and additions below: + +1. **We set `fiscal_event` to the slug `autumn_budget_2026`** on every row, whatever each producer calls the Budget. +2. **We take measure keys from `data/uk/ab2026_measures.json`.** + - We give `ab2026__…` keys to announced measures: every HM Treasury Table 6.1 line, Table 6.2 line 4, and the `ab2026__package_…` packages. + - We give `ab2026_option__…` keys to options a producer costed, and we haven't registered any yet. On a row for an unregistered option, or for a package whose scope matches no registered package, we set `measure_key: null`. We put its proposed key in `conditions.proposed_measure_key`, state the key's scope in the family's NOTES, and add the key to the registry before the ingest. + - We make one exception, for Table 6.4's recostings: we give each the earlier event's key, and name that event in `conditions.recosting_of`. + - **We name proposed keys this way:** + - We key an announced measure with no Table 6.1 line `ab2026__`, and name the measure in the slug. We use this form for a measure below Table 6.1's £10m threshold, a fiscally neutral measure and one whose only costing appears elsewhere. + - We key a package `ab2026__package_` and name its scope in the slug, not its producer, so that producers with the same scope share one key. For example, we key lines 61 and 62 together as `ab2026__package_property_and_savings_income_rates`. We put a producer's or the OBR's name in the slug only for a grouping of its own, such as `ab2026__package_tpa_other_vat`. + - We key an option a producer costed `ab2026_option__`. + - Before we merge, we give each scope one key across families, and `pipeline/ab2026_proposed_keys.py` lists the result in `PROPOSED_KEYS.md`. +3. **We use the producer's scope for a measure, not ours.** We key a producer's figure for "the cost-of-living package" to `ab2026__package_household_energy_vat_and_fuel_duty` only when its scope matches Table 6.1 lines 1, 2 and 3. Otherwise, we give it a proposed key (rule 2). + - In line 2, HM Treasury costs the whole electricity VAT cut, from 1 October 2026 to 1 July 2027 (£755m in 2026-27 and £305m in 2027-28), including the weeks before the Budget. So a package of the energy payment, the VAT cut and the fuel duty cut matches lines 1, 2 and 3. If a producer's package also counts the gas standing-charge change, which has no Table 6.1 line, we give it a proposed key. +4. **We don't read bars off HM Treasury's Impact on households Figures 1.A and 1.B** (AB2025 rule 9, #61). We stage the numbers HM Treasury prints in text, tables or data labels, at the values it prints. +5. **We don't harvest PolicyEngine's own published figures here.** In tranche 3, we compute them from the dashboard's receipts and add them as counterparts. When a producer restates a PolicyEngine figure, we stage its row with `attribution: same_assumptions`, as we did for the Fabian Society's row in AB2025. +6. **We keep quotes from producers outside the Open Government Licence short.** In `quote`, we cut the sentence or cell with the number down to the phrase around it: under 15 words for think tanks, firms and the press. HM Treasury and the OBR publish under the OGL, so we quote their cells and sentences whole. +7. **We treat a changed primary as a second primary.** If a producer replaces a document, we hash both versions in `manifest.jsonl` and cite, on each row, the version we read it from. IFS replaced its cost-of-living deck on 29 October, and HM Treasury replaced the Budget 2026 document PDF after 28 October. We record what changed in the family's NOTES. +8. **Stage estimates, not design.** We stage as a row each number someone estimated, forecast or counted about the effect of a measure or of the Budget, including: + - a cost or yield; + - people or households a measure affects; + - a gain, loss or bill change; + - a distributional or poverty effect; + - a behavioural adjustment or tax base; + - a fiscal aggregate; + - a consequential for a devolved government. + + We treat as design a measure's own parameters (rates, thresholds, payment amounts, dates and durations), spending allocations to programmes, financing remits and contingent liabilities. We put design in `reform_hint` or `conditions`, never in rows, as we kept "£9.90" in `reform_hint` in the AB2025 red book family. We treat a worked example's inputs as design too, and stage the outcome its producer computes as a row. + + We apply one rule to lending and financing across families. We stage HM Treasury's Tables 6.1, 6.2 and 6.4 and the OBR's policy workbook whole, as the decisions' costings. Elsewhere, we treat an amount a scheme will lend or spend as design, and an effect on borrowing, debt or the financing requirement as an estimate. So we leave out the OBR's paragraph 3.22 loan volumes for Your First Home but stage its effect on debt, and we stage paragraph 3.20's rise in the Government's financing requirement on `cash_requirement_change`. +9. **We give a component of one measure that measure's key.** On a row with a printed part of one Table 6.1 measure, we set that measure's key, name the part in `conditions.component` and set `conditions.row_type: measure_component`. We count a fiscal head, a sub-measure within a line (the tax-gap package's items, for example) or a nation as a part. We never sum components with the measure's total. We propose package keys for scopes that cross Table 6.1 lines, or have none. +10. **We give a producer's stated effect of the Budget's decisions on PSNB `decisions_effect_on_borrowing`.** We give it to the total effect of Government decisions, its direct and indirect effects and any part of them the producer identifies, and its splits into tax and spending and into scorecard and non-scorecard decisions. We also give it to any figure a producer derives, without ambiguity, by restating or recombining those effects. `models.py` defines the metric as PSNB and keeps it apart from `revenue_change`, a receipts line. `ingest_obr_policy_effects.py` maps March 2026 Table B.1's totals, its direct effects and their tax and spending split to it. HM Treasury sets out in Table 6.1 the cost or yield of the decisions "which have a direct effect on Public Sector Net Borrowing". So we give the metric to Table 6.1's three totals and to any producer's restatement of them. + + We keep `revenue_change` on a receipts total or a tax-change estimate unless its evidence establishes PSNB scope, and we don't take a total key or a package label alone as that evidence. The OBR sums its receipts heads, from air passenger duty to visa fees, into its policy workbook's total of receipts measures, so we keep `revenue_change` on that total. IFS doesn't tie its own estimate of the Budget's tax change at the forecast horizon to PSNB, so we keep `revenue_change` on that estimate too. `ingest_uk_ab2025.py` maps AB2025's `package_tax_rise_size` rows to `revenue_change` as well. + + We keep `revenue_change` on single measures, groups of measures and a total's lines by tax or spending head, unless their producer states the effect on borrowing. The OBR states it for four policies in paragraphs 3.20, 3.21 and 3.43, and IFS for the Budget's new giveaways. When a producer restates a Table 3.1 group or a single measure as an effect on borrowing, we give the restatement the metric of the row it restates. For example, in paragraph 3.11 the OBR restates Table 3.1's other departmental spending changes with "increase borrowing by £5 billion in 2026-27", and we keep `revenue_change` on both. We read Table 3.1's "A positive sign implies an increase in borrowing" as a sign convention, not a statement of PSNB scope. + + When a producer adds to a total the receipts effect of an option the Government didn't adopt, we don't count the result as a restatement or recombination of the decisions' effects. We keep `revenue_change` on it unless its evidence establishes PSNB scope. For example, in Figure 10's "Net effect if Fuel Duty frozen", Resolution Foundation adds a continued freeze's receipts effect, which it derives in a note from the OBR's constant-duty-rate fuel duty forecast. The OBR states the freeze's effect on borrowing for 2029-30 only (paragraph 3.43). + + On a row with the effect on the current budget deficit (or, for an outturn, the primary deficit), we propose `fiscal_balance_change` and name that deficit in the sign convention. We keep the sign each producer prints, and state in `conditions.sign_convention` which way it runs. + +## Row contract additions + +`pipeline/ab2026_harvest_contract.py` checks the AB2025 row contract with these additions: + +- The checker accepts `value_kind: categorical` for a rating with no digits, such as the OBR's Table 3.3 uncertainty ratings. +- It requires a finite number in `value`. Unless the row has `value_kind: categorical`, it reads `value_raw` only if the whole string, in any case and spacing, matches one of the forms listed here. It reports any other string as a problem, and we narrow `value_raw` to the number, which `quote` still contains: "£5" from "£5 in 10 years", or "1 in 4" from "2025, 1 in 4". It reads: + - digits, with a sign, a currency sign or both, and one multiplier (k, m, mn, bn, tn, hundred, thousand, million, billion, trillion) or percentage word (%, per cent, percent, percentage point or points, pp, ppt, ppts): "-£1.7bn", ".5", "4%"; + - number words up to nine hundred and ninety-nine, with a sign and one multiplier or percentage word: "four", "-four", "a hundred and five", "two hundred thousand", "a million", "four per cent"; + - a worded fraction: "half" alone, or a numerator ("a", "an", "another", or one to ten) and a denominator from "half" to "tenth" ("a third", "three-fifths"), with a sign if printed ("-three-fifths"); + - a worded fraction of a multiplier or percentage: "half a million", "a quarter of a percentage point", "half per cent"; + - a whole number and a fraction, with the whole number in digits or in words up to nine hundred and ninety-nine. A percentage word may follow, and so may a multiplier other than "hundred" after a space or hyphen: "two and a half", "one and a half million", "2 and a half bn", "one hundred and a half"; + - a ratio of two numbers, in digits or number words, with at most one multiplier each: "1 in 4", "1 in 2 million". The checker takes "in", "in every", "out of" or "out of every" between them, with spaces or hyphens throughout: "3 out of 10", "one-in-every-ten"; + - a range: two figures joined by a dash, with no spaces or a space on each side ("£4-5 million", "4 – 5%"), or two numbers joined by "to" ("four to five", "4bn to 5bn"); + - "nil", "none", "nothing", "no change", "no impact" or "no overall impact", as zero. It also reads a dash as zero where we say, in one whole clause of `normalization`, that the producer prints it for nil. It accepts forms such as "dash for nil" and "the table prints nil as a dash". It ends a clause at a comma, semicolon, full stop or bracket. +- It also reads a qualifier before the number ("about", "up to" and the others in `QUALIFIERS`), "a" before digits ("less than a 0.1 percentage point"), and "a year" or "of GDP" after the number. It reads a ratio or worded fraction with its percentage in brackets, in either order, if the two agree to the nearest percentage point: "one third (33%)", "25% (1 in 4)". It matches `value` to either number there or in a range. It reports a range that joins a percentage to a multiplier ("4% to 2 million") or a fraction to a percentage ("a third to 40%"). It also reports a range whose first number exceeds its second, unless neither is positive: it reports "2025-26" and "2 to -3", and reads "-4 to -5". After a bare "in", it reports a year from 2010 to 2099 ("5 in 2027"). +- It takes each number's scale from its own word (bn, million, %). When only a range's second number has one, it gives that word to the first number too. When digits, number words or a whole number with a fraction have no word of their own, it uses the factor in `normalization`, failing that 1. It reads a factor whole ("x 1,000,000", "/ 100", "(x 10^6)"), multiplies operations in a row ("x 1,000,000 / 100" as 10,000), and takes either factor where a semicolon or a word separates two. It reads x, ×, *, / or ÷ as a factor wherever a number follows, at the note's start or after a space or bracket. It ignores a slash between digits ("2/3", "2026/27") but reads "page 3 / 4" as a factor of 0.25, so we write "page 3 of 4". At any value, it reports "x 1 million", "x (1e6)", "x one million", "x half", "times 1,000", "multiply by 1,000,000" and "£m×1e6". It reads a percentage as a share or in percent units, and requires digits and number words to match `value` within four units in the last place. +- It reads a ratio or a worded fraction on its own as a share, and accepts a `value` within 0.1% of that share. On a `unit_concept: percent` row, it requires 100 times the share instead ("1 in 4" as 25). It won't match `value` to either of a ratio's numbers alone, and it reads "-1 in 4" and "1 in -4" as −0.25. It also allows 0.1% on a whole number with a fraction, and on a fraction of a multiplier or percentage. +- It requires `value` to share `value_raw`'s sign unless we note in `normalization` that we took the sign from the wording. +- It treats an HM Treasury Impact on households row as a bar reading (rule 4) if the row has `value_kind: approx_chart_reading`. It does the same if we mention a bar, chart, graph, plot, diagram or visual in the locator, in any spacing and with or without hyphens. It also counts "off" or "from" up to four words before a figure there. It does the same where we write in the locator that we read, took, estimated or measured the number using, on, in or of a figure, or read it by eye. It reads "Fig.", "Figs." and "figures" as figures, including where "figures" means numbers ("from HMT's figures"), and looks past a colon, brackets or quotes before them. It counts "read off Fig. 1.A", "read off: Fig. 1.A", "read from [Figure 1.A]" and "column 3 of Figure 1.A", and leaves "Table 2.1, column 3" alone. It ignores such a phrase right after one "no", "not", "never", "without", "cannot" or "n't" ("not a bar reading"). It counts the phrase after two negations in the same clause ("not possible without reading off the chart"). +- When we cite Figure 1.A or 1.B on those rows ("Fig. 1A", "Figure 1(a)", "Figures 1.A and 1.B"), it reads the locator up to the first comma or semicolon. Before that point we must name a paragraph, table or box by number, or a data label. It accepts "paragraph 1.7", "paragraphs 1.7–1.8", "Tables 2.B and 2.C", "Table 2.C and Figure 1.A", "Figure 1.A data label" and "data label for decile 3". It treats any other wording as a bar reading, including "Figure 1.A data label unavailable" and "Figure 1.A, decile 3 bar; see paragraph 1.7". +- It reports a malformed row as a problem, never as an exception: a row that isn't an object, lacks a field, or has a field of the wrong type. It requires: + - a string in `source`, `source_model`, `value_raw`, `normalization`, `quote`, `status`, `value_kind`, `time_basis`, `attribution`, `benchmark_class` and `parse_confidence`; + - a string or null in the other text fields, such as `measure_key`, `reform_hint` and `source_table`, and in each `publication` field; + - an integer in `period`, a number in `value`, and an object in `conditions` and `publication`, with a string in each condition. + + It also reports a line it can't parse as JSON, or a file it can't read, as a problem. When it compares rows, it skips any value it can't compare, such as an integer too large for a float. +- It treats a row with `conditions.component` as a part of one measure (rule 9), and requires `row_type: measure_component`, or the OBR workbook's `measure_total` marker, and a non-blank component. +- It allows at most two non-restated, non-categorical rows to share the AB2025 ingest's claim identity, and requires two that do to agree within 0.5%. +- It requires a registered metric in `metric`, never in `proposed_metric`. +- It accepts `conditions.recosting_of` only on `row_type: recosting` rows (Table 6.4). +- It requires `conditions.fy` to name one fiscal year, and `conditions.horizon` on a `fiscal_year` row without `fy`. +- It accepts only a code in `conditions.geography`: UK, GB, England, Wales, Scotland, Northern Ireland, England and Wales, UK_excl_scotland, "Scotland, Wales and Northern Ireland", "not stated", or a country a producer compares the UK with. Put prose in `conditions.geography_note`. +- It requires a `note` on each restated row with the name of the original figure's producer, and rejects a blank one. +- It requires a proposed key of the form `ab2026__…` or `ab2026_option__…`, with lower-case words of letters and digits after the prefix and single underscores between them. It looks for the whole key in the family's NOTES, where we state its scope. + +## Families staged + +We pin 12 families and 5,952 rows (450 `restated`) in `COUNTS.json`. + +| family | rows | primaries | producer slugs | +|---|--:|--:|---| +| `uk_centax` | 112 | 6 | `centax` | +| `uk_devolved_govts` | 19 | 2 | `scottish_government`, `welsh_government` | +| `uk_hmt_costings` | 597 | 1 | `hm_treasury` | +| `uk_hmt_redbook` | 425 | 6 | `hm_treasury` | +| `uk_hmt_tables` | 768 | 2 | `hm_treasury` | +| `uk_ifs_ab2026` | 144 | 14 | `ifs` | +| `uk_ippr` | 3 | 3 | `ippr` | +| `uk_obr_tables` | 2,800 | 4 | `obr_efo` | +| `uk_rf_ab2026` | 766 | 8 | `resolution_foundation` | +| `uk_thinktank_misc` | 12 | 5 | `citizens_advice`, `cps`, `institute_for_government`, `learning_and_work_institute` | +| `uk_tpa` | 305 | 10 | `tax_policy_associates` | +| `uk_trussell_wpi` | 1 | 1 | `trussell_wpi` | + +Each family's `stage.py` writes its claims file, and we keep it on branch `uk/ab2026-harvest-staging` under `harvest-staging/ab2026/lanes///`, with the lane briefs and the review records. We record each family's review changes in its NOTES.md, and keep only its three files here, as in AB2025. + +We leave the **families with no rows** out, since AB2025 has no empty family, and keep their working files on the staging branch: + +- `uk_cpag`: Cloudflare answered every fetch of both CPAG pages (its Budget response and a pre-Budget call) with its challenge (HTTP 403) on 29 October. +- `uk_smf`: the Social Market Foundation's site answered every fetch of its page with a challenge on 29 October. +- `uk_niesr`: we fetched NIESR's Budget-day reaction ("Breathing Space, Not a Strategy"), but in it NIESR gives macro and fiscal-stance commentary for the #55 lane and restates OBR figures, and we staged neither in the AB2025 NIESR family. +- `uk_fai_sfc`: the Fraser of Allander Institute's site refused our fetch of its reaction (HTTP 403), and the Scottish Fiscal Commission published nothing in scope on 28 or 29 October. In the reaction's feed text, FAI only restates OBR figures. On 4 November, we found a second FAI post through FAI's RSS feed, "Rising or falling? Why both claims about Scotland's funding can be true" (29 October), behind the same 403. We leave its table of Scotland's Barnett consequentials for tranche 2. FAI says the split emerged late on 28 October, so in the table FAI probably restates HM Treasury's allocations, which we stage in `uk_hmt_redbook` rows 252–255 (paragraphs 4.150, 4.154, 4.157 and 4.160). We stage the Scottish Government's five rows in `uk_devolved_govts`. + +## Producer slugs and families + +| slug | producer | family dir | +|---|---|---| +| hm_treasury | HM Treasury: Tables 6.1, 6.2 and 6.4 | uk_hmt_tables | +| hm_treasury | HM Treasury: policy costings (static and post-behavioural legs, tax bases, behavioural parameters) | uk_hmt_costings | +| hm_treasury | HM Treasury: Budget 2026 document, Impact on households, Pension Tax Allowance explainer | uk_hmt_redbook | +| obr_efo | OBR: Economic and fiscal outlook, October 2026, and its detailed tables | uk_obr_tables | +| resolution_foundation | Resolution Foundation | uk_rf_ab2026 | +| ifs | Institute for Fiscal Studies | uk_ifs_ab2026 | +| tax_policy_associates, centax, ippr, cps, institute_for_government, learning_and_work_institute, citizens_advice | other producers, each in the AB2025 family of the same name where one exists | uk_tpa, uk_centax, uk_ippr, uk_thinktank_misc | +| cpag, smf, niesr, fraser_of_allander, scottish_fiscal_commission | producers with no rows (see "families with no rows"); we keep their working files on the staging branch, not here | none | +| scottish_government, welsh_government | the devolved governments' responses | uk_devolved_govts | +| trussell_wpi | Trussell, as in AB2025 | uk_trussell_wpi | +| commercial firms and platforms | worked examples (mode 3, #63); we staged none for AB2026 | none (AB2025: uk_cases_commercial) | + +We leave macro calls by banks and City forecasters to the #55 lane and don't stage them here (AB2025 rule 10). diff --git a/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md b/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md new file mode 100644 index 000000000..b94ca9454 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md @@ -0,0 +1,112 @@ +# Autumn Budget 2026 registry keys + +Generated by `pipeline/build_ab2026_registry.py` from `data/uk/ab2026_measures.json`; do not edit. +Every staged row's `measure_key` is one of these, or (Table 6.4 recostings only) a key from the +earlier event's registry named in `conditions.recosting_of`. + +| key | Table 6.1 line | computability | title | +|---|--:|---|---| +| `ab2026__household_energy_payment_100_bands_a_to_d` | 1 | expressible | Household Energy Payment: £100 council tax rebate for bands A-D from January 2027 | +| `ab2026__electricity_vat_zero_rate_to_july_2027` | 2 | expressible | Support for Energy Bills: Cut VAT on domestic electricity from 5% to 0% from 1 October 2026 to 1 July 2027 | +| `ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred` | 3 | expressible | Fuel Duty: Extend the temporary 5p-per-litre duty cut and defer the planned Retail Prices Index (RPI) increase to 1 July 2027 | +| `ab2026__carers_allowance_earnings_taper` | 7 | expressible | Carer’s Allowance: Introduce a taper on earnings above the Weekly Earning Limit within 2030-31 | +| `ab2026__trading_allowance_3000` | 15 | expressible | Trading Allowance: Increase the Income Tax Trading Allowance to £3,000 from £1,000 from 6 April 2027 | +| `ab2026__pension_tax_allowance` | 52 | expressible | Pension Tax Allowance: Remove the income tax liability for pensioners with total income up to the value of the new State Pension from 6 April 2027 until 5 April 2030 | +| `ab2026__property_income_rates_plus_2pp` | 61 | expressible | Property Income: Increase tax rates on property income by 2ppts at the basic, higher and additional rate from 6 April 2027 | +| `ab2026__savings_income_rates_plus_2pp` | 62 | expressible | Savings Income: Increase tax rates on savings income by 2ppts at the basic, higher and additional rate from 6 April 2027 | +| `ab2026__badr_lifetime_limit_500000` | 60 | expressible | Business Asset Disposal Relief (BADR): Reduce the lifetime limit to £500,000 from 6 April 2027 | +| `ab2026__bus_fare_cap_2_england_outside_london_2027` | 4 | partial | Bus Fares: Cap single bus fares at £2 in England outside London for one year from 1 January 2027, funded by reprioritising DESNZ budgets | +| `ab2026__mileage_allowance_payments_55p` | 5 | not_expressible | Mileage Rates: Increase the tax-free and tax-deductible car and van rates to 55p for the first 10,000 business miles from 6 April 2026 and the higher mileage rate to 35p from 6 April 2027 | +| `ab2026__parental_allowance_fathers_partners_adopters` | 6 | not_expressible | Parental Pay: Establish a Parental Allowance for fathers, partners and adopters in Great Britain from April 2029 | +| `ab2026__uc_surplus_earnings_threshold_2500_extended` | 8 | not_expressible | Universal Credit: Extend the £2,500 surplus earnings threshold for one year from 1 April 2027 | +| `ab2026__cash_isa_limit_held_at_20000` | 11 | not_expressible | Cash ISAs: Maintain the cash ISA limit at £20,000 from 6 April 2027 | +| `ab2026__founders_relief_cgt` | 26 | not_expressible | Founders' Relief: Introduce a new CGT relief for qualifying founders of high-growth, innovative companies from 6 April 2027 | +| `ab2026__first_time_buyer_isa` | 38 | not_expressible | First Time Buyer ISA: Introduce a new ISA for first-time buyers, replacing the Lifetime ISA for new savers from 6 April 2029 | +| `ab2026__lifetime_isa_withdrawal_charge_20pc_above_cap` | 39 | not_expressible | Lifetime ISA: Reduce the withdrawal charge from 25% to 20% for first-time buyers purchasing properties above the £450,000 price cap from 29 October 2026 | +| `ab2026__pension_death_benefits_two_year_rule_removed` | 53 | not_expressible | Pensions Tax: Remove the two-year rule for taxation of pension and lump sum death benefits from 28 October 2026 | +| `ab2026__vat_5pc_family_days_out_summer_2026` | 66 | not_expressible | Great British Summer Savings Scheme: Reduce VAT to 5% on family days out from 25 June 2026 to 1 September 2026 | +| `ab2026__free_bus_travel_children_august_2026` | 67 | not_expressible | Bus Travel: Fund free bus travel for children aged 5-15 in England from 1 August 2026 until 31 August 2026 | +| `ab2026__student_loan_interest_cap_6pc_plan_2_and_3` | 83 | not_expressible | Student Loans: Cap interest rates for Plan 2 and Plan 3 student loans at 6% from 1 September 2026 to 31 August 2027 | +| `ab2026__company_car_tax_rates_2030_31` | 86 | not_expressible | Company Car Tax: Set the Benefit-in-Kind rates (appropriate percentages) for electric vehicles, hybrids and internal combustion engine vehicles for 2030-31 | +| `ab2026__hvcts_deferrals_discounts_exemptions` | 93 | not_expressible | High Value Council Tax Surcharge: Confirm eligibility for deferrals, discounts and exemptions from 1 April 2028 | +| `ab2026__early_years_books_access` | 9 | not_expressible | Early Years: Fund increased access to books for children aged 0 to 5 | +| `ab2026__food_and_heating_oil_tariff_suspensions` | 10 | not_expressible | Tariff Suspension Packages: Suspend tariffs on 135 food products from 21 June 2026 until 31 December 2028; 101 food products and kerosene for heating oil from 26 November 2026 until 31 December 2028; and fertiliser from 26 November 2026 until 31 December 2027 | +| `ab2026__business_rates_pubs_relief_35pc` | 12 | not_expressible | Business Rates: Increase business rates relief for pubs, social clubs and live music venues by 20ppts to 35% from 1 April 2027 | +| `ab2026__business_rates_sbrr_rhl_thresholds_raised` | 13 | not_expressible | Business Rates: Increase valuation thresholds for Small Business Rate Relief for retail, hospitality and leisure (RHL) properties from £12,000 to £18,000 for 100% relief and from £15,000 to £21,000 for tapered relief from 1 April 2027 | +| `ab2026__business_rates_rhl_transitional_support` | 14 | not_expressible | Business Rates: Introduce a transitional support package, including a two-year real terms bills freeze for RHL businesses and a one-year extension of the 2023 Supporting Small Business support, part funded by extending the Transitional Relief Supplement for two years from 1 April 2027 | +| `ab2026__business_tariff_suspensions` | 16 | not_expressible | Business Tariff Suspensions: Suspend tariffs on 72 products from 5 August 2026 and extend suspensions for 361 products in 2027-28 | +| `ab2026__climate_change_levy_rates_2028` | 17 | not_expressible | Climate Change Levy: Freeze electricity & liquefied petroleum gas main rates, and uprate gas and solid fuels main rates by RPI from 1 April 2028 | +| `ab2026__red_diesel_duty_cut` | 18 | not_expressible | Red Diesel: Reduce duty rates by 3.7p-per-litre from 15 June 2026 to 1 July 2027 | +| `ab2026__alcohol_duty_small_producer_relief` | 19 | not_expressible | Alcohol Duty: Increase the generosity of Small Producer Relief from 1 February 2027 | +| `ab2026__good_growth_funds` | 20 | not_expressible | Good Growth Funds: Seed funding for Mayors and local leaders in England and £1.5bn finance for Mayoral Strategic Authorities with a mechanism for subsidised lending (resource impacts of subsidy) | +| `ab2026__business_rates_retention_mayoral_authorities` | 21 | not_expressible | Business Rates Retention: Devolve a share of business rates income and growth to Mayoral Strategic Authorities from April 2027 | +| `ab2026__local_apprenticeship_services` | 22 | not_expressible | Youth Employment and Skills: Expand local apprenticeship services to all current mayors | +| `ab2026__regional_growth_investments` | 23 | not_expressible | Regional Growth: Fund priority investments and local growth & regeneration projects across the UK | +| `ab2026__cambridge_development_corporation` | 24 | not_expressible | Cambridge Development Corporation: Pilot a new government financing model for land, housing and infrastructure development from April 2027 (capital grant element) | +| `ab2026__strategic_authorities_capacity_funding` | 25 | not_expressible | Strategic Authorities: Increase funding to build capacity to deliver new powers and investment responsibilities | +| `ab2026__rd_relief_claim_notification_form_removed` | 27 | not_expressible | R&D Tax Reliefs: Remove the Claim Notification Form from 1 April 2027 and simplify the Additional Information Form from Autumn 2027 | +| `ab2026__emi2_option_limit_120000` | 28 | not_expressible | Enterprise Management Incentives 2 (EMI2): Increase the individual option limit to £120,000, extending the exercise period to 15 years and remove interaction with EMI option limit from 6 April 2027 | +| `ab2026__british_business_bank_backing_innovation` | 29 | not_expressible | Backing Innovation: Bring forward £1bn investment and increase financial capacity by £2bn for the British Business Bank to support additional investment in the UK (resource impacts of increased lending) | +| `ab2026__national_wealth_fund_capital` | 30 | not_expressible | National Wealth Fund: Invest additional capital to support growth, including £2bn for the new Energy Wealth Fund (resource impacts of increased lending) | +| `ab2026__artificial_intelligence_package` | 31 | not_expressible | Artificial Intelligence: Strengthen the UK’s AI security, accelerate adoption across the economy, and support strategically important UK AI capabilities | +| `ab2026__ev_charging_public_chargers` | 32 | not_expressible | EV Charging: Reduce the cost of using local, lower-powered public chargers in Great Britain | +| `ab2026__rough_sleeping_investment` | 33 | not_expressible | Rough Sleeping: Invest in a route off the streets across the Parliament, alongside longer-term accommodation and intensive support | +| `ab2026__rough_sleeping_reprioritised_mhclg_budgets` | 34 | not_expressible | Rough Sleeping: Reprioritise existing MHCLG budgets to tackle rough sleeping | +| `ab2026__social_and_affordable_homes_programme` | 35 | not_expressible | Social and Affordable Homes Programme: Fund delivery of around 10,000 social and affordable homes | +| `ab2026__vat_zero_rate_land_for_social_housing` | 36 | not_expressible | Social Housing: Introduce a zero rate of VAT for land sold to registered social housing providers (relevant housing associations) from 1 April 2027 | +| `ab2026__your_first_home_equity_loan` | 37 | not_expressible | Your First Home: Introduce a new equity loan scheme to support around 70,000 first-time buyers from April 2027 (net income from developer fees) | +| `ab2026__defence_investment_plan_further_savings` | 40 | not_expressible | Defence Investment Plan (DIP): Commitment to further savings made at announcement on 30 June 2026 | +| `ab2026__defence_investment_plan_capital_reallocation` | 41 | not_expressible | Defence Investment Plan: Reallocate capital spending to fully fund the Defence Investment Plan | +| `ab2026__defence_admin_savings_reinvested` | 42 | not_expressible | Defence: Reinvest defence and security administration savings into frontline defence and national security | +| `ab2026__ukraine_winter_air_defence` | 43 | not_expressible | Ukraine: Emergency winter support for air defence | +| `ab2026__uk_export_finance_defence_capacity` | 44 | not_expressible | UK Export Finance: Increase capacity to support UK defence exports from June 2026 (increased income from additional activity) | +| `ab2026__hmrc_tax_gap_package` | 45 | not_expressible | HMRC: Measures to close the tax gap | +| `ab2026__online_marketplace_liability_uk_businesses` | 46 | not_expressible | Online Marketplace Liability: Extend to UK businesses with a minimum annual sales threshold per platform of £90,000 from 1 October 2027 | +| `ab2026__dwp_fraud_and_error_prevention` | 47 | not_expressible | DWP Fraud and Error: Expand use of data and targeted controls to prevent fraud from entering the benefits system | +| `ab2026__benefits_removed_hospitalised_serious_offenders` | 48 | not_expressible | Welfare Reform: Remove benefit entitlements from serious offenders hospitalised in Great Britain from 6 April 2027 | +| `ab2026__distributions_framework_modernised` | 49 | not_expressible | Distributions: Modernise the distributions framework from 6 April 2028 | +| `ab2026__advance_corporation_tax_abolished` | 50 | not_expressible | Advance Corporation Tax (ACT): Abolish Advance Corporation Tax from 1 April 2031 | +| `ab2026__vat_reverse_charge_overseas_services_restricted` | 51 | not_expressible | Cross-Border Services: Restrict the reverse charge on supplies of services from overseas to VAT-registered businesses from 1 April 2027 | +| `ab2026__foreign_sovereign_investments_taxation` | 54 | not_expressible | Modernising Taxation of Foreign Sovereign Investments: Introduce a new statutory regime for the direct taxation of foreign sovereigns from 1 January 2029 | +| `ab2026__bank_surcharge_6pc_temporary` | 55 | not_expressible | Bank Surcharge: Temporarily increase the Bank Corporation Tax Surcharge rate from 3% to 6%, to fund breathing space measures for households, for 15 months from 1 January 2027 | +| `ab2026__machine_games_duty_higher_stake_25pc` | 56 | not_expressible | Machine Games Duty: Increase the rate from 20% to 25% for higher stake machines from 1 April 2027 and move duty liability to the machine supplier from 1 April 2028 | +| `ab2026__business_rates_vape_shops_and_agcs_reliefs_removed` | 57 | not_expressible | Business Rates: Remove reliefs for vape shops and Adult Gaming Centres from 1 April 2027 | +| `ab2026__writing_down_allowance_12pc_and_fya_50pc` | 58 | not_expressible | Writing-down Allowances: Reduce the main rate writing-down allowance to 12% from April 2027 and increase the main rate first-year allowance to 50% from 1 January 2027 | +| `ab2026__private_hire_operators_vat_full_fare` | 59 | not_expressible | Private Hire Vehicle Operators: Deem larger operators with annual fare turnover over £50 million liable for VAT on the full value of their fares from 2 January 2028 | +| `ab2026__civil_service_admin_budgets_cut_20pc` | 63 | not_expressible | Future Civil Service: Reduce administration budgets by 20% by 2029-30 compared to 16% reduction in Spending Review 2025 plans | +| `ab2026__civil_service_ai_fund` | 64 | not_expressible | Future Civil Service: Reinvest part of the administration budget savings in a new AI Fund to reduce administration burdens and improve outcomes | +| `ab2026__hgv_ved_1_for_12_months` | 65 | not_expressible | Heavy Goods Vehicles: Reduce Vehicle Excise Duty to £1 for 12 months from 1 July 2026 | +| `ab2026__foreign_permanent_establishment_exemption_mandatory` | 68 | not_expressible | Corporation Tax: Make the foreign permanent establishment exemption mandatory, preventing their losses from reducing UK corporation tax receipts for accounting periods beginning on or after 1 January 2027 | +| `ab2026__electricity_generator_levy_55pc` | 69 | not_expressible | Electricity Generator Levy: Increase the rate from 45% to 55% until 31 March 2028 | +| `ab2026__british_industrial_competitiveness_scheme` | 70 | not_expressible | Industrial Electricity: Fund the British Industrial Competitiveness Scheme starting from 1 April 2027, including a backdated payment for eligible businesses | +| `ab2026__carbon_price_support_removed` | 71 | not_expressible | Carbon Price Support (CPS): Remove the CPS rates to reduce energy bills from 1 April 2028 | +| `ab2026__youth_guarantee_and_apprenticeships_spring_2026` | 72 | not_expressible | Spring 2026 Youth Employment and Skills Package: Expand Youth Guarantee and apprenticeship support | +| `ab2026__union_learning_fund` | 73 | not_expressible | Skills: Re-establish the Union Learning Fund in England | +| `ab2026__investment_for_growth` | 74 | not_expressible | Investment for Growth: Support strategic technologies, local growth and key industries | +| `ab2026__growth_guarantee_scheme_expansion` | 75 | not_expressible | British Business Bank: Expand the Growth Guarantee Scheme to support £6.5 billion of additional SME lending across this Parliament | +| `ab2026__leeds_city_fund` | 76 | not_expressible | Leeds City Fund: Establish the Leeds City Fund with 100% retention of business rates growth | +| `ab2026__uk_india_ceta_and_double_contributions_convention` | 77 | not_expressible | UK-India: Bring into force the Comprehensive Economic and Trade Agreement and Double Contributions Convention from 15 July 2026 | +| `ab2026__steel_tariff_and_quotas` | 78 | not_expressible | Steel Tariff: Change tariff rate and quotas on imported steel from 1 July 2026 | +| `ab2026__securities_transfer_tax` | 79 | not_expressible | Stamp Taxes on Shares: Replace Stamp Duty and Stamp Duty Reserve Tax with the Securities Transfer Tax from late 2027 | +| `ab2026__business_rates_ev_charging_relief` | 80 | not_expressible | Business Rates: Introduce 100% relief for eligible Electric Vehicle Charging Points (EVCPs) and electric vehicle-only forecourts for ten years from 1 April 2026 | +| `ab2026__misogyny_prevention_programmes` | 81 | not_expressible | Tackling Misogyny: Invest in grassroots misogyny prevention programmes | +| `ab2026__infected_blood_compensation_additional_report` | 82 | not_expressible | Infected Blood Compensation Scheme: Implement the Inquiry's Additional Report recommendations from 24 July 2026 | +| `ab2026__waste_crime_landfill_tax_clearances` | 84 | not_expressible | Waste Crime: Fund Landfill Tax costs for six priority illegal waste site clearances until 31 March 2029 and a three-year pilot to fund Local Authorities' Landfill Tax liabilities arising from illegal waste site clearances from 2027 | +| `ab2026__further_priorities_nhs_and_vawg` | 85 | not_expressible | Further Priorities: Fund key priorities, including pressures facing the NHS and delivery of the Violence against Women and Girls Strategy | +| `ab2026__supported_housing_licensing` | 87 | not_expressible | Supported Housing: Introduce a licensing regime to enforce national standards for supported housing from 2027-28 | +| `ab2026__vat_zero_rate_donated_medicines` | 88 | not_expressible | Donated Medicines: Introduce a zero rate of VAT for the donation of medicines under qualifying circumstances from 23 June 2026 | +| `ab2026__vat_medical_deputies_staffing` | 89 | not_expressible | Temporary Staffing: Amend Group 7 of Schedule 9 to the VAT Act 1994 to restore the tax treatment of medical deputies to its previously intended position | +| `ab2026__landfill_communities_fund_credit_cap` | 90 | not_expressible | Landfill Communities Fund: Increase the Landfill Tax credit cap from 1 April 2027 | +| `ab2026__franchised_higher_education_registration` | 91 | not_expressible | Higher Education: Introduce registration requirements for franchise providers with 300 or more students from 1 September 2028, to strengthen quality and oversight of franchised provision | +| `ab2026__high_needs_local_authority_spending` | 92 | not_expressible | Local Authority Spending: Impact of adjustments to high needs budget on local authority spending | +| `ab2026__benefits_in_kind_payrolling_delay` | 94 | not_expressible | Benefits in Kind (BiKs): Delay mandatory payrolling of company cars, vans, fuel and medical benefits from 6 April 2026 to 6 April 2027, with remaining BiKs implemented from 6 April 2028 | +| `ab2026__low_value_imports_customs_relief_removed` | 95 | not_expressible | Low Value Imports: Remove the £135 customs duty relief and introduce new customs arrangements from October 2028 | +| `ab2026__ets_energy_from_waste_delay` | 96 | not_expressible | Emissions Trading Scheme (ETS): Delay the inclusion of energy from waste in the ETS | +| `ab2026__gas_distribution_revenue_recognition_spread` | 97 | not_expressible | Corporation Tax: Spread the one-off impact of revenue recognition changes for qualifying gas distribution activities over five years for accounting periods ending on or after 31 December 2026 | +| `ab2026__us_llc_double_taxation_relief` | 98 | not_expressible | International Investors: Relieve double taxation for UK investors in US Limited Liability Companies and similar entities from early 2028 | +| `ab2026__sovereign_ai_financial_transactions` | 6.2/4 | not_expressible | SovAI: Additional funding for Sovereign AI to invest in and support the UK's promising AI companies | +| `ab2026__package_total_policy_decisions` | | partial | Table 6.1 total policy decisions | +| `ab2026__package_total_tax_policy_decisions` | | partial | Table 6.1 total tax policy decisions | +| `ab2026__package_total_spending_policy_decisions` | | partial | Table 6.1 total spending policy decisions | +| `ab2026__package_household_energy_vat_and_fuel_duty` | | expressible | The Household Energy Payment, zero VAT on domestic electricity and the fuel duty cut, together | +| `ab2026__package_policyengine_seven` | | expressible | The seven household measures PolicyEngine modelled on Budget day, together | diff --git a/sources/harvest-uk-ab2026-2026-10-29/SEED_INVENTORY/publications.md b/sources/harvest-uk-ab2026-2026-10-29/SEED_INVENTORY/publications.md new file mode 100644 index 000000000..5469c1649 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/SEED_INVENTORY/publications.md @@ -0,0 +1,62 @@ +# Autumn Budget 2026: publications to harvest + +Compiled 29 October 2026 from the reaction monitor that ran from 28 October 19:05Z to 29 October 14:05Z. Each entry names a publication the monitor read and the kinds of figure it holds. Figures are paraphrased here; the harvest reads each primary itself and stages only what the primary prints. Times are UTC. + +## HM Treasury (28 October, 13:30Z) + +- Budget 2026 document, PDF and HTML. + - PDF: https://assets.publishing.service.gov.uk/media/6ae20b85460c1346f7be784e/E03668986_HMT_Budget_2026_ELAY__2_.pdf + - The PDF was replaced after 28 October: the 28 October download hashes to bed70546…, the 29 October download to 19b337ac…. + - Holds measure descriptions with numbers, for example the Household Energy Payment's "around 20 million households". +- Supporting documents (https://www.gov.uk/government/publications/supporting-documents-for-budget-2026): + - Table 6.1 and 6.2 (staged in `uk_hmt_tables`); + - Table 6.4 recostings (staged); + - Policy costings (AB26_Policy_Costing.pdf); + - Impact on households; + - Data Sources. +- Pension Tax Allowance explainer (https://www.gov.uk/government/publications/pension-tax-allowance-explainer/pension-tax-allowance-explainer). Holds counts of pensioners who gain and who pay no tax, plus worked cases. + +## OBR (28 October) + +- Economic and fiscal outlook, October 2026, with its charts-and-tables workbooks and the detailed forecast tables (the policy workbook). + - Chapter 3 costs each measure and states the behavioural adjustments, for example paragraph 3.17 on the savings and property income tax rises. + - The fuel duty path is in paragraph 3.19. + +## Resolution Foundation + +- Press release, 28 October: the Budget balancing act and a four-year living standards downturn. +- Press release, 29 October, 06:00Z. +- *Spread thin*, published 29 October at 08:20Z: https://www.resolutionfoundation.org/publications/spread-thin/ (PDF …/app/uploads/2026/10/Spread-thin-1.pdf). + - Holds: + - VAT cut per typical household; + - Energy Payment reach by half of the income distribution; + - fuel duty timing and cost; + - gas standing charge gainers and losers; + - the Carer's Allowance taper count; + - package support by half of the income distribution and by vigintile; + - poverty over the Parliament. +- A decile chart of Energy Payment eligibility, shown in the Guardian live blog, 28 October 15:30Z. The harvest should find RF's own copy. + +## Institute for Fiscal Studies + +- Initial response, 28 October: https://ifs.org.uk/articles/autumn-budget-2026-initial-response +- Post-Budget briefing, 29 October, 10:30Z to 12:00Z. Four decks: + - Tom Wernham, "Cost of living measures". The first version, TW_0, was replaced at 12:57Z by TW_1, with no figure changed. + - Isabel Stockton, fiscal. + - Bee Boileau, public services ("Spending on public services: the Achilles heel"). + - Stuart Adam, "Tax measures". +- Any data items or chart data IFS posted with the briefing. + +## Others + +- **Tax Policy Associates**, "Budget 2026 – what it means" (taxpolicy.org.uk, 28 October). Covers the Pension Tax Allowance design, its taper and marginal rates, and other measures. +- **CenTax**, initial reaction and LinkedIn post, 28 October. +- **CPAG**, Budget response, 28 October; child benefit item. +- **NIESR**, "Breathing space" blog, 28 October. +- **Fraser of Allander Institute**, UK Budget reaction, 28 October. +- **Centre for Policy Studies**, verdict, 28 October. +- **Institute for Government**, "underwhelming Budget", 28 October. +- **Age UK**, Budget response, 28 October (Pension Tax Allowance paragraph). +- **IPPR** (three pieces), **Citizens Advice**, **Trussell**, **Social Market Foundation**. +- **Welsh Government**, written statement on the Budget, 28 October: consequentials for Wales. +- **MoneySavingExpert** restates government figures; stage them as `restated`, if at all. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_centax/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_centax/NOTES.md new file mode 100644 index 000000000..912f00ed7 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_centax/NOTES.md @@ -0,0 +1,153 @@ +# uk_centax: CenTax, Autumn Budget 2026 + +This family stages three CenTax publications: + +- **"Autumn Budget 2026: Initial reaction"** (28 October 2026, centax.org.uk). +- **The two AB2026 briefings it links:** "Taxes at the top: Understanding what high earners pay and options for reform" (23 September 2026), which sets out "reforms available at the 2026 Budget", and "Capital Gains Tax on Entrepreneurs: Should the UK have a 'Unicorn Relief'?" (8 October 2026). + +The source slug is `centax`, as in the AB2025 `uk_centax` family, and `source_model` is `hmrc_administrative_microdata` for CenTax's estimates and descriptive statistics. + +**Working files.** `stage.py`, the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/thinktanks-a/uk_centax/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The lane's local primaries folder (`.ab2026-primaries/uk_centax/`) was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. + +`stage.py` holds the rows as data and rewrites `manifest.jsonl` and `claims_staged.jsonl.gz` byte for byte. `stage.py --verify` checks each primary's sha256 and finds every quote in its primary's text (HTML text, or `pdftotext -layout`, whitespace-normalised). Result: 0 problems. + +- **Rows:** 112 (own 108, restated 4). +- **Primaries:** 6 (the reaction page in two versions, rule 7). + +## Access recipe + +Every primary was fetched directly on 2026-10-29 with `curl -sSL` and the browser User-Agent in the brief (HTTP 200). Nothing came from a local copy, and LinkedIn was not used. + +- **The reaction page** was fetched at 16:17Z. It says "This page is being updated live" and carries no published or modified time, so a later fetch may hash differently. +- **The reaction page's 4 November version** (sha256 `5103e06ae3a5831a…`, 271,039 bytes, retrieved 2026-11-04 by review B and matched by the coordinator's own fetch that day) says "This page has finished updating". It adds seven sections the 29 October copy lacks: Big picture; Tax reliefs for founders and employees (with its CGT, BADR, Founders' Relief, EMI2/CSOP and evaluation parts); Company distributions framework. Their markup accounts for the growth from 248,542 bytes. It is a second primary (README rule 7): the 3 earlier rows keep citing the 29 October copy, whose quotes it still prints, and the 2 rows from the new sections cite it. This session did not re-open either version; the two new rows' quotes are the coordinator's, checked against its local copy. +- **The two briefing landing pages** were fetched at 16:30Z. Each prints no figures (0 rows) and links its PDF; they are manifested as the route to the PDFs. +- **The two PDFs** were fetched at 16:31Z and read with `pdftotext -layout`. Locators are printed page numbers; in "Taxes at the top" the Key findings are p. 1. + +## Rows by primary + +| primary | sha256 | rows | +|---|---|--:| +| Autumn Budget 2026: Initial reaction (HTML, 28 Oct; fetched 29 Oct) | `92c6008835547d41…` | 3 | +| Autumn Budget 2026: Initial reaction (HTML, 4 Nov version, finished updating) | `5103e06ae3a5831a…` | 2 | +| Taxes at the top, landing page (HTML) | `c954e08f2aa6de7a…` | 0 | +| Taxes at the top (PDF, 35 pp., 23 Sep) | `af4cab614220c286…` | 104 | +| Unicorn Relief, landing page (HTML) | `91a6c8dc749273b1…` | 0 | +| Unicorn Relief (PDF, 74 pp., 8 Oct) | `9fd8ce97f3343f7a…` | 3 | + +## Rows by measure key + +| measure_key | rows | +|---|--:| +| `null`: 53 with a proposed key, 56 context (descriptive HMRC statistics, current-policy childcare behaviour, OBR CGT forecasts) | 109 | +| `ab2026__pension_tax_allowance` (CenTax's 53% marginal rate) | 1 | +| `ab2026__hmrc_tax_gap_package` (the timely-payment component, restated from the OBR, `row_type: measure_component`, README rule 9) | 1 | +| `ab2026__distributions_framework_modernised` (the £800m, restated from Table 6.1 line 49) | 1 | + +## Proposed measure keys + +The Budget took none of the options below. Founders' Relief (Table 6.1 line 26) and the BADR cut (line 60) are a different CGT design from CenTax's package. Each option is CenTax's own design, in CenTax's words: + +| proposed key | scope | rows | +|---|---|--:| +| `ab2026_option__cgt_reform_package` | "Structural reform of CGT and equalising rates with Income Tax": equalise CGT rates with Income Tax rates; an investment allowance for the risk-free rate; remove uplift at death; rebasing on arrival with deemed disposal on departure. "We use administrative data from HMRC to cost the first four elements"; the fifth, more generous loss relief, isn't costed. No Table 6.1 line | 10 | +| `ab2026_option__nics_on_partnership_income` | "Applying an equivalent of Employer NICs to partnership profits": a top-up rate ("6.9% on partnership profits taxed at the additional rate, 7.6% … higher rate, and 9.6% … basic rate"), a £10,500 Partnership allowance and a £5,000 annual exempt amount per partner. No Table 6.1 line | 24 | +| `ab2026_option__nics_on_investment_income` | "Applying an equivalent of Class 1 NICs to investment income": rental income, savings income outside ISAs and other non-dividend investment income (`conditions.income_type`). No Table 6.1 line | 10 | +| `ab2026_option__childcare_100k_threshold_removed` | "Removing the £100,000 childcare cliff-edge": make the free childcare entitlement in England available to parents with incomes over £100,000. No Table 6.1 line | 3 | +| `ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s` | "Remove the threshold for the first 15 hours of childcare for under-3s" | 1 | +| `ab2026_option__childcare_100k_threshold_raised` | "Increase the threshold at which entitlement to free childcare is withdrawn", to £125,000 or £150,000 (`conditions.threshold`) | 2 | +| `ab2026_option__childcare_100k_entitlement_taper` | "'Taper' the withdrawal of free childcare", at 8p, 18p or 28p per £1 over £100,000 (`conditions.taper_rate`) | 3 | + +Only the options short of full removal (rows 101–106) are "costed on an actual ANI basis" (`conditions.costing_basis`); the full removal's £640m and £520m (rows 1, 25 and 99) carry no costing basis. CenTax's actual-ANI threshold itself ("could be set higher (£111,000) … at the same overall fiscal cost") is that option's design and has no row (README rule 8). + +The £1.6bn timely-payment figure carries `ab2026__hmrc_tax_gap_package` under README rule 9, not a proposed key. It repeats the OBR's printed average (EFO paras 3.4 and 3.13), so it is `restated` (review B, finding 1). More timely payment for Self Assessment is HM Treasury Table 6.3 line 3, a sub-measure of Table 6.1 line 45. The row has `conditions.row_type: measure_component`, with `conditions.component` naming the part. + +## Conventions + +- **Tax years:** CenTax gives tax years as the later year ("2022 is tax year 2021-22", Taxes at the top footnote 2). So "2030" is staged as `fy` 2029-30, "2028" as 2027-28, and the descriptive 2022 data as 2021-22. Every such row carries a `year_note`. This matches #207's reading of the same CenTax childcare figures. +- **Sign:** + - Revenue-raising options are `positive = yield to the Exchequer`. + - The childcare options are `positive = cost to the Exchequer`, except "raise £20 million" (28p taper), which is staged as +2e7 with `positive = yield to the Exchequer`: values are not re-signed (AB2025 README; changed on 3 November, review finding 4). +- **"Central":** CenTax's central scenario (`conditions.scenario: central`). It uses "elasticities drawn from the best available international evidence" for CGT, its "central revenue estimate, after accounting for behavioural responses" for partnership NICs, and its central bunching scenario for childcare. The investment-income NICs figures are static upper bounds ("naturally at the upper bound", footnote 13), so they are `range_high` with `basis: static`. +- **Units:** + - Shares are fractions (`share`). + - Effective and marginal rates are `percent`; rate gaps are `percentage_points`. No top-up rate is staged: the partnership top-up rates are the option's design (below). + - The CGT package's "increase revenue by 62%" is `revenue_change` in `percent` of baseline CGT revenue. + - Income groups follow the AB2025 names (`top_10pct`, `top_1pct`, `top_0.1pct`, `top_0.01pct`, `decile_10`, `bottom_50pct`); percentile bands are `p50_p60` … `p99.5_p99.9`. Single percentiles are `median`, `p99` and `p99.99`, and p. 11's "by around 2.8 percentage points on average" is `top groups, on average`. +- **Attribution:** + - CenTax's model estimates are `own` / `different_model`. + - Descriptive HMRC statistics are `own` / `administrative_fact`, as in AB2025. + - The OBR's £32bn and £16bn CGT forecasts are `restated`. + - The £1.6bn timely-payment average repeats the OBR's printed figure, so it is `restated` with `source_model: obr_efo_forecast` and `conditions.originator` naming EFO paras 3.4 and 3.13 (review B, finding 1). + - The £800m for the distributions framework (4 November version) restates Table 6.1 line 49: `restated`, `hmt_costing_obr_certified`. + - CenTax's 53% marginal rate is `own` with `source_model: arithmetic`. + - The "over half of CGT payers" claim (4 November version) is CenTax's own, about its own CGT package: `own`, `share_with_tax_cut`, value 0.5, `range_low`, medium confidence (no year printed; staged with the package's 2030 costing). +- **Context rows:** the descriptive 2022 tax statistics and the current-policy childcare behaviour (bunching counts, response shares, partners leaving work) have no measure key and no proposal. The option keys carry only the options' costings and the distribution of their revenue or affected taxpayers. + +## Proposed metrics (registered Metrics used where they fit) + +Registered: `revenue_change`, `revenue_share` (also for "paid 60% of Income Tax and NICs"), `income_share`, `income_statistic`, `average_tax_rate`, `affected_share`, `share_with_tax_cut`, `participation_rate`, `tax_collections`. + +Proposed, with CenTax's own words: + +- **`marginal_tax_rate` (percent):** "a new marginal rate of 53%". +- **`effective_tax_rate_gap` (percentage points):** "the gap between headline rates and the average EATRs". +- **`taxpayer_share` (share):** "one in ten pays close to the headline rate of 47%" and the other dispersion statements on p. 11. +- **`behavioural_response_share` (share):** "fewer than one in ten employees with eligible children responded to the cliff-edge". +- **`workforce_exit_share` and `female_share` (share):** "3% of lower paid partners … leaving the workforce, with 90% of those partners being women". +- **`partner_not_in_work_share` (share):** "the share of parents whose partner is not in work is about 6%". +- **`parents_bunching` (count):** "from 1,100 in 2022 to 11,980 by 2030" (rows 26–27; the label of the repository's childcare adapter, which drops these counts as "a behavioural-model count of parents" with no registered metric; review B, finding 3). + +## Not staged, and why + +- **"Around four times as many parents would be bunching"** (p. 25), the halved-unresponsiveness sensitivity: a scenario ratio, not an estimate of an option's effect (added on 3 November, review finding 6). + +- **Duplicates within one primary,** staged once: + - in "Taxes at the top": 62%, 88%, £19.7bn, £2.1bn, 98%, 1,100, 90% and £640m (Key findings, repeated on pp. 17-27); 37%, 34% and 30% (p. 9); 17%→12%, 33%→36% and 37%→33% (p. 13); 40.5%, 60%, 43.9%, 61.5%, 47%, 20% and 23% (Conclusion); + - in the Unicorn Relief PDF: "almost £20 billion" restates the £19.7bn in the same footnote. +- **Design, not estimates** (README rule 8): + - the reaction page's "marginal tax rate of 33.3%" (the Pension Tax Allowance's £1-for-£3 withdrawal rate, restated as a percentage; kept in the 53% row's conditions) and "a 100% marginal tax rate" (the Carer's Allowance taper of £1 for every £1, restated); + - Taxes at the top's partnership top-up rates of 6.9%, 7.6% and 9.6% (the option's rates, quoted in its scope above) and its £111,000 actual-ANI threshold. +- **Policy parameters** (also design under rule 8): + - in the reaction page: the £12,570 Personal Allowance; the 24%, 44% and 49% rates; the £12,000 cash ISA cap from AB2025; the Direct Recovery of Debts thresholds (£1,000, £5,000, £10,000) and dates; + - in "Taxes at the top": Employer NICs at 15%, its "effective rate of Employer NICs is 13.04%", the £10,500 and £5,000 allowances, footnote 11's rates, and Appendix A's rates. +- **The reaction page's worked mechanics:** the payments-on-account example (a £10,000 liability, two £5,000 payments) explains the existing regime; it is not a figure about the Budget. +- **Charts without printed values:** Taxes at the top Figures 1-7, B1 and B2. +- **Unicorn Relief's illustrations and design parameters:** + - the risk-aversion example (£100,000 v £1 million at 10%); + - footnote 27's net-of-tax returns on a £100m gain (76% → 76.06% → 77.4%); + - the £20m break-even example at a 15% rate; + - the taper example (45% → 44% per £1m above £750m); + - the £750m / US$1bn threshold; + - EMI and SEIS limits. + These illustrate design choices rather than estimate outcomes, the same test AB2025 uk_centax applied ("thresholds/equivalences, not scoreable values"). The report says it does not cost Unicorn Relief ("It is difficult to model how much Unicorn Relief would cost"). +- **The September 2026 childcare report** ("Removing the £100,000 childcare cliff-edge: Impacts and cost of reform", linked from the reaction page) is not re-staged. Its Table 4.2 is already in `data/externals/centax-childcare-100k.json` (#207). That file differs from this family in three ways (thinktanks-a review, finding 3): + - **sign:** #207 stores the full removal's central net fiscal cost as −640m, negative for a cost; this family stores +640m with `positive = cost to the Exchequer`; + - **coverage:** #207 holds only Table 4.2's full removal; the cheaper options (rows 101–106) come only from "Taxes at the top"; + - **bunching counts:** row 27 has "11,980 by 2030", where #207's 2030 central "Number Bunching, Before Removal" is 16,280. This may be a different concept, or CenTax may differ between its two publications; row 27's note says so. The £520m and £640m staged here are CenTax repeating its own central net fiscal cost in AB2026 publications; the ingest should treat them as the same estimate as #207's. +- **LinkedIn:** CenTax's 28 October LinkedIn post (seed inventory) needs a login; not used. +- **The 4 November version's design figures** (README rule 8): the BADR lifetime limit's cut from £1 million to £500,000, Founders' Relief's 10% rate on up to £10 million of gains, and the EMI, EMI2 and CSOP limits. They are the measures' parameters, not estimates. Its "Big picture" section repeats the Budget's headline figures and holds no CenTax estimate. +- **"Taxes at the top", pp. 2–3:** "around two-thirds of total tax revenue" (a description of the tax base, not an estimate about the Budget or an option) and the "over 100%" marginal rates at the childcare cliff edge (the current regime's design, restated). + +## Review fixes, 3 November 2026 + +The thinktanks-a review (`harvest-staging/ab2026/reviews/verify-thinktanks-a.md` on the staging branch) approved this family with fixes. Each sits in an explicit block at the end of `stage.py`'s rows. No primary was re-opened (the session's network policy refused centax.org.uk); no printed value changed. + +- **Finding 1:** rows 84–86 (£3bn, £0.6bn and £0.4bn, p. 22) are the parts of row 24's "up to £4 billion" (3 + 0.6 + 0.4 = 4.0). They carry `conditions.row_type: measure_component` and `conditions.component` naming the income type, so an ingest never adds them to the total. +- **Finding 2:** confirmed. Row 2's derivation cites Table 6.3 row 3 at 1,355, 1,605 and 1,815 (£m, 2029-30 to 2031-32); `uk_hmt_redbook` stages exactly those cells. +- **Finding 3:** the #207 file's three differences are recorded under "Not staged" and in row 27's note. +- **Finding 4 (optional, applied):** row 105 is +2e7 with `positive = yield to the Exchequer` and normalisation "£ million × 1e6". +- **Finding 5 (optional, applied):** row 18 (23%, a 25th-percentile EATR) uses the registered `average_tax_rate`, as rows 7–15 do. Rows 19–20 put `revenue_change` in `percent`; tranche 2 must not read them as £. +- **Finding 6:** p. 25's "around four times as many parents would be bunching" in the halved-unresponsiveness scenario is a scenario ratio and is listed under "Not staged". +- **Finding 7:** rows 20, 58, 108 and 109 are CenTax's 2024-era estimates at fy 2025-26 under the CGT option key; their `scenario` condition says so, for tranche 2. +- **Verification:** the contract checker reports 110 rows, 0 problems, and a re-run of `stage.py` reproduces both files byte for byte. COUNTS.json pins the gzip's sha256. + +## Review fixes, 4 November 2026 + +Review B (PR #231, issue comment 6635498758) approved this family with fixes, and the coordinator's brief settled finding 2. They sit in an explicit block after the 3 November fixes in `stage.py`. This session re-opened no primary. + +- **Finding 1:** row 2 (£1.6bn) is `restated`, `source_model: obr_efo_forecast`, with `conditions.originator` "OBR, Economic and fiscal outlook October 2026, paras 3.4 and 3.13" in place of `derived_from`. +- **Finding 2 (coordinator's call):** the reaction page's 4 November version is a second primary (`5103e06a…`). Two rows are staged from it (rows 110–111): the £800m in 2029-30 for the distributions framework, `restated` on `ab2026__distributions_framework_modernised`; and "over half of CGT payers" would pay less tax under CenTax's package, `own` on `ab2026_option__cgt_reform_package`, 0.5 `range_low`. The new sections' design figures are listed under "Not staged". +- **Finding 3:** rows 26–27 (the bunching counts) drop `affected_count` for `proposed_metric: parents_bunching`. +- **Finding 4:** rows 87–92 are `measure_component`s of the investment-income option, `component` = the row's `income_type`. +- **Finding 5:** Table 1's share-of-affected-population rows (67, 69, …, 83) carry `conditions.denominator: "taxpayers affected by the reform"`. +- **Finding 6:** the costing-basis sentence names rows 101–106 only; no top-up rate is staged; the income-group list adds `median`, `p99`, `p99.99` and `top groups, on average`; row 0 has a `year_note`; pp. 2–3's two-thirds and "over 100%" rates are listed under "Not staged". diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_centax/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_centax/claims_staged.jsonl.gz new file mode 100644 index 000000000..eca254b96 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_centax/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_centax/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_centax/manifest.jsonl new file mode 100644 index 000000000..0da39f47c --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_centax/manifest.jsonl @@ -0,0 +1,6 @@ +{"url": "https://centax.org.uk/autumn-budget-2026-reaction/", "title": "Autumn Budget 2026: Initial reaction", "date": "2026-10-28", "publisher": "CenTax (Centre for the Analysis of Taxation)", "sha256": "92c6008835547d411b67b9f23edecae77a45ba67985d5364d6bebde20f7be457", "bytes": 248542, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Page dated 28 October 2026 and marked 'This page is being updated live'; the copy hashed is the fetch of 2026-10-29T16:17Z (curl, browser User-Agent, HTTP 200). No published or modified time in the page metadata."} +{"url": "https://centax.org.uk/taxes-at-the-top-understanding-what-high-earners-pay/", "title": "Taxes at the top: Understanding what high earners pay and options for reform (landing page)", "date": "2026-09-23", "publisher": "CenTax (Centre for the Analysis of Taxation)", "sha256": "c954e08f2aa6de7aaedb5e12f8df16ea93a44033e72c1bb08d25c5159e6aac33", "bytes": 267599, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Linked from the reaction page's related-publications panel ('reforms available at the 2026 Budget'); 0 rows, the landing page prints no figures; links the PDF. Fetched 2026-10-29T16:30Z."} +{"url": "https://centax.org.uk/wp-content/uploads/2026/09/AdvaniHughsonSummers2026_Taxes-at-the-top.pdf", "title": "Taxes at the top: Understanding what high earners pay and options for reform (Advani, Hughson and Summers, September 2026)", "date": "2026-09-23", "publisher": "CenTax (Centre for the Analysis of Taxation)", "sha256": "af4cab614220c28640c0d875ab24aea263c54ec75957cfe263f6dbac171857f3", "bytes": 963857, "doc_type": "pdf", "access": "direct", "retrieved": "2026-10-29", "note": "35 pp.; PDF CreationDate 2026-09-23. Text read with pdftotext -layout; locators are printed page numbers (Key findings = p. 1). Fetched 2026-10-29T16:31Z."} +{"url": "https://centax.org.uk/capital-gains-tax-should-the-uk-have-a-unicorn-relief/", "title": "Capital Gains Tax on Entrepreneurs: Should the UK have a ‘Unicorn Relief’? (landing page)", "date": "2026-10-08", "publisher": "CenTax (Centre for the Analysis of Taxation)", "sha256": "91a6c8dc749273b1c6b6e330a2acaef4010a379d5e82e1bab22c4a820c5cb65a", "bytes": 267896, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Linked from the reaction page's related-publications panel; 0 rows, the landing page prints no figures; links the PDF. Fetched 2026-10-29T16:30Z."} +{"url": "https://centax.org.uk/wp-content/uploads/2026/10/AdvaniFlewGazmuri-BarkerSummers2026_CGT-on-Entrepreneurs-Unicorn-Relief.pdf", "title": "Capital Gains Tax on Entrepreneurs: Should the UK have a ‘Unicorn Relief’? (Advani, Flew, Gazmuri-Barker and Summers, October 2026)", "date": "2026-10-08", "publisher": "CenTax (Centre for the Analysis of Taxation)", "sha256": "9fd8ce97f3343f7aee1cab11dede3f374ba473b8db4056268a0becc154e7a71b", "bytes": 568966, "doc_type": "pdf", "access": "direct", "retrieved": "2026-10-29", "note": "74 pp.; PDF CreationDate 2026-10-08. Text read with pdftotext -layout; locators are printed page numbers. Fetched 2026-10-29T16:31Z."} +{"url": "https://centax.org.uk/autumn-budget-2026-reaction/", "title": "Autumn Budget 2026: Initial reaction (4 November version, finished updating)", "date": "2026-10-28", "publisher": "CenTax (Centre for the Analysis of Taxation)", "sha256": "5103e06ae3a5831ac866ded44b6aa68187adae2b2fa5dc8b68700938a02b3446", "bytes": 271039, "doc_type": "html", "access": "direct", "retrieved": "2026-11-04", "note": "The reaction page after it finished updating ('This page has finished updating'), hashed by review B on 4 November and matched by the coordinator's own fetch that day. It adds seven sections the 29 October copy lacks: Big picture; Tax reliefs for founders and employees (CGT, BADR, Founders' Relief, EMI2/CSOP and evaluation parts); Company distributions framework. 2 rows cite it; the 3 earlier rows keep citing the 29 October copy, whose quotes this version still prints."} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/NOTES.md new file mode 100644 index 000000000..00288945e --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/NOTES.md @@ -0,0 +1,172 @@ +# uk_devolved_govts — devolved governments, Autumn Budget 2026 + +**Working files.** `stage.py`, which writes `manifest.jsonl` and `claims_staged.jsonl.gz`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/thinktanks-b/uk_devolved_govts/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The lane's local primaries folder (`.ab2026-primaries/`) was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. + +**19 rows from two primaries.** Rows 0–13 (0-based) are the Welsh Government's (source `welsh_government`); rows 14–18 are the Scottish Government's (source `scottish_government`). The Scottish rows were staged in `uk_fai_sfc` on 29 October. On 3 November the thinktanks-b review's finding 7 moved them here, so that both devolved governments sit in one family; `uk_fai_sfc` is left with no rows and is not carried (see the harvest README). Conventions follow the AB2025 `uk_fai_sfc` block-grant rows (`source_model: arithmetic`). + +## Changes on 3 November 2026 (thinktanks-b review) + +- **Finding 2:** the Welsh Table 1 Resource and Capital cells (rows 1–7) carry `conditions.row_type: "measure_component"` with their `component`; the four Total cells and the £448m headline (rows 0 and 8–11) carried `row_type: "total"` and no `component` (superseded on 4 November, above: all twelve are now parts of the three-government package). An ingest can no longer add parts to their total. +- **Finding 3:** the Welsh package key names its scope, not the nation: `ab2026__package_barnett_consequentials`, shared with HM Treasury's figures for the same scope in `uk_hmt_redbook`. Nation is `conditions.geography`. +- **Finding 4:** the seven real-terms settlement rows (Welsh rows 12–13, Scottish rows 14–18) use `proposed_metric: devolved_funding_real_terms_change`. AB2025's `block_grant_effect` means a policy's effect on the grant, positive for an increase; these rows are a year-on-year real-terms change in the whole settlement, positive for a reduction. +- **Finding 7:** the Scottish Government's rows moved here (above). Both slugs are now in the harvest README's slug table. +- **`component` on context rows:** the seven real-terms rows named their budget (Resource, Capital and so on) in `component`, which rule 9 reserves for parts of a measure. They now use `budget`, by the reasoning of the review's finding 6. +- **Attribution (coordinator check under finding 3):** the Welsh rows stay `own`. The page cites no source, and the coordinator's settled calls do not change this; HM Treasury's own consequentials are staged as HM Treasury's in `uk_hmt_redbook`. + +No primary was re-opened on 3 November: the session's network policy refused gov.wales and gov.scot. Every change relabels fields; no printed value changed. + +## Changes on 4 November 2026 (review B) + +Review B (PR #231, issue comment 6635498758) approved this family with fixes; the coordinator's brief (section 3.3) settled the Barnett key with review A's K-7(b). The fixes sit in `review_fixes()` in `stage.py`. No primary was re-opened, and no value changed. + +- **Finding 1 (Barnett):** the shared key takes the red book's scope. HM Treasury's £1.3bn (red book row 252) is the total, and each government is a part (rule 9: "a part can be ... a nation"). So rows 0 and 8–11 are `measure_component` with `component: "Welsh Government"`; rows 1–7 name `"Welsh Government: Resource"` or `"Welsh Government: Capital"`; row 0 has `fy: 2029-30`. The proposed-key scope below is the red book's. +- **Finding 2:** row 13's locator says "third sentence", and its note no longer repeats row 12's "next financial year" sentence. Rows 14–18's `source_column` is null, as on rows 12–13: the labels were ours, not printed. The Scottish manifest note no longer names the old `uk_fai_sfc` folder. The sentence on the Welsh package mapping being "unresolved" is corrected. + +## Coverage + +| Primary | Position | Rows | Coverage | +|---|---|---:|---| +| Welsh written statement | Paragraph before Table 1 | 1 | £448m cumulative headline (component "Welsh Government") | +| | Table 1, Resource row | 3 | 199 / 165 / 146 (£m); 2029-30 is N/A (component "Welsh Government: Resource") | +| | Table 1, Capital row | 4 | -27 / -19 / 2 / -18 (£m) (component "Welsh Government: Capital") | +| | Table 1, Total row | 4 | 172 / 146 / 148 / -18 (£m) (component "Welsh Government") | +| | Paragraphs after Table 1 | 2 | 0.5% resource and almost 10% capital real-terms reductions (context) | +| Scottish Government news release | Opening paragraph and paragraph 2 | 5 | £650 million; 1.3% and £550 million (resource); 1.5% and £100 million (capital), all 2027-28 real-terms reductions (context) | + +By `measure_key`: **null 19**. Twelve rows carry the proposed key `ab2026__package_barnett_consequentials`, all `measure_component` (Wales is a part of the three-government package); the seven real-terms rows are context with no proposed key. By metric: `block_grant_effect` 12, `devolved_funding_real_terms_change` 7. By unit: `gbp` 15, `percent` 4. Attribution: `own` 19; benchmark `different_model` 19. + +## Proposed measure key + +`ab2026__package_barnett_consequentials` (12 rows here): the scope `uk_hmt_redbook` gives it, the Barnett consequentials of "decisions confirmed at Budget" for the Scottish, Welsh and Northern Ireland governments together, 2026-27 to 2029-30, excluding the technical reduction from lower employer pension contributions (red book paragraph 4.150). It crosses Table 6.1's England spending lines and has no line of its own. HM Treasury's £1.3bn three-government figure (`uk_hmt_redbook` row 252) is the key's total, and each government's figure is a component. So every Welsh row here is `row_type: measure_component`: the £448m ("an additional £448m of funding over the current spending review period", `fy` 2029-30, cumulative) and the four Table 1 Totals carry `component: "Welsh Government"`, and the Resource and Capital cells `"Welsh Government: Resource"` and `"Welsh Government: Capital"`. The Welsh rows exclude employer-pension-contribution savings, as HM Treasury's do. Compare the Welsh £448m with HM Treasury's £450m for Wales (red book row 254), component with component; never add either to the £1.3bn. + +## Welsh Government + +### Access + +The [written statement](https://www.gov.wales/written-statement-welsh-government-response-uk-autumn-budget-2026) +was first published and last updated on 28 October 2026. It was fetched fresh +with `curl -sSL` and the exact requested User-Agent: + +```text +Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15 +``` + +HTTP 200; response Date 2026-10-29T15:22:18Z. The lane saved the unaltered +HTML and response headers in its local primaries folder. BeautifulSoup read the page's paragraphs and actual HTML +table cells, not chart geometry. `shasum -a 256` gives: + +```text +87490552c36d8ffd5787db18127704e467d93599e5708627adb6da7dcfe17c7c +``` + +The fetched primary is 26,908 bytes. No local copy was provided, no fallback +was used, and there is no earlier assigned version against which to establish +a change. No requested Welsh page was blocked or unreached. + +### Attribution + +These are the Welsh Government's own published settlement accounting and real-terms comparisons. The statement does not credit another producer for these calculations, so no HM Treasury attribution is inferred. They are prospective funding changes rather than administrative outturns or counts. The source does not name a formal model; `arithmetic` describes the settlement accounting. + +### Welsh numeric and period conventions + +- GBP values are the printed £m cells or headline multiplied by one million. + Signed table values are retained: positive means an increase in Welsh + funding. No totals or differences are derived. +- Table columns are fiscal years; `period` is the end year and `fy` retains + the printed year. The £448m headline is cumulative over the four displayed + years, `period: 2030` and `fy: 2029-30` (the horizon's final year), with + that horizon stated explicitly; it is not an annual 2029-30 amount. +- Resource real-terms reduction “next financial year” is 2027-28 given the + publication date. Capital reduction is explicitly by 2029-30. Percentage + values retain the printed magnitude; conditions say positive means a + reduction. “Almost 10%” is preserved in `value_raw`, the upper endpoint + 10 is marked `range_high`, and the qualifier is retained. +- The monetary table has no real-terms basis stated; no deflation is + applied. The percentage context rows retain real terms with no invented + price year. All rows concern Wales. +- `value_kind: point` means a single published figure, not a separately + identified central-model scenario. No row uses `central`. +- Every quote is an exact page fragment or table cell, contains `value_raw` + and is fewer than 15 words. Tables are read by row and then column. + +### Welsh rows not staged + +- Resource 2029-30 is `N/A`, not a number and not zero. +- OBR GDP growth of 1.2% in 2026 and 1.0% in 2027 is restated macro context, + outside this assignment's devolved-consequentials scope; no own Welsh + estimate of a Budget measure is asserted. +- The £100 council-tax-band A-D payment is a Welsh implementation + announcement and policy parameter, with no implementation date, reach, + aggregate cost or estimated household gain printed. It is not attached + to the England-only Treasury line 1 key and is not fabricated into an + impact row. +- The £14 billion rail commitment and £302m already allocated over the + spending review are existing commitments, not newly estimated effects of + AB2026; the statement supplies no isolation of a Budget measure's effect. +- Dates, council tax band letters, and rounding caveats are not estimates. + There are no charts needing bar readings. No inaccessible Welsh page or + unavailable local copy is being used as evidence. + +## Scottish Government + +The [news release](https://www.gov.scot/news/uk-budget-delivers-real-cut-to-scotlands-funding/) ("UK Budget delivers real cut to Scotland's funding", 28 October 2026) was fetched fresh on 2026-10-29 with the same User-Agent; HTTP 200, 27,662 bytes, sha256 `f3d0183e470f711b6821e4956e108c5d17210a392e6a6e471eccf297c807a6ac`. + +- **Sign:** the primary prints unsigned magnitudes and describes reductions. Values retain those positive magnitudes, with `conditions.sign_convention: "positive = magnitude of reduction in Scottish Government funding"`. No minus sign is invented. The three million-pound amounts are multiplied by 1e6; the percentages remain percentages. +- **Period:** all rows use fiscal-year end year `2028`, `time_basis: fiscal_year`, and `conditions.fy: "2027-28"`. +- **Prices and comparison:** all rows say real terms, with an unspecified price base year. The primary does not explicitly name its comparison baseline. `conditions.price_basis` and `comparison_basis` preserve those limits. No cash-basis conversion is made. +- **Point/central:** the page gives one reported estimate per figure, not a named central model scenario, so `value_kind: point`. The money amounts retain the producer's “around” qualifier in `conditions.precision`. +- **Attribution:** all 5 are Scottish Government `own` estimates because the article reports its funding assessment without naming a separate original source. `arithmetic` follows the AB2025 family's funding convention and does not assert access to an unpublished model. None is an administrative outturn or count. +- **Baselines:** `baseline_policy: null`; no proposed baseline. These are context funding projections, not a comparison of a reform against a specified alternative policy. +- **Keys:** **`measure_key: null` — 5 rows**. No registered key is used, and **no proposed measure key** is introduced. The article does not isolate a set of Table 6.1 decisions or establish that its year-on-year real-terms funding assessment matches a registered package. `reform_hint: null` records that it is context. None of the 98 Table 6.1 lines is asserted to be the exact scope of these figures. + +### Scottish rows not staged + +- Every FAI figure: the primary refused the required fresh fetch, and no local fallback was supplied. The family therefore has no read primary evidence for FAI's quantitative or qualitative claims. +- SFC: no qualifying publication dated 28–29 October was found. Its earlier forecasts and funding commentary are not recast as post-Budget figures. +- The Scottish Government's £100 household energy-support commitment: it is a payment-policy parameter, not a separate quantified aggregate or model estimate. The article does not specify Scottish eligibility, rollout timing or a fully defined Scottish implementation; the registered Table 6.1 line 1 describes England's council-tax rebate. No England measure key is attached to Scotland's unspecified implementation. +- The £300 energy-bill reduction refers to an earlier political promise, not an AB2026 estimate or a newly costed option. +- The repeated £650 million in the minister's quotation and repeated £100 commitment are not staged twice. +- Dates, earlier political reference years and qualitative references to welfare policies do not form numerical claims. No chart-only numbers, macro forecasts or third-party restatements were used. + +### Scottish Government primary issues + +The response labels the figures as a consequence of the UK Budget but does not distinguish changes caused by newly announced decisions from the inherited funding path and inflation. It supplies no derivation, explicit comparison baseline or deflator year. Consequently the five context rows cannot be compared directly with a cash-terms Barnett-consequentials table. The two component cash magnitudes are consistent with the printed total; none was recomputed. + +The HTML's JSON-LD `dateModified` is `2026-10-29T08:22:59Z`, while the visible publication time and `dc.date.modified` show 28 October 2026 15:45. No earlier local copy was provided, and the metadata do not establish that the numerical content changed. The manifest pins the sole fetched version and records both timestamps; there is no invented second version. + +## Verification + +- **4 November:** the contract checker reports 19 rows, 0 problems, and a re-run of `stage.py` reproduces both files byte for byte. +- **3 November:** the contract checker reports 19 rows, 0 problems; a re-run of `stage.py` reproduces `manifest.jsonl` and `claims_staged.jsonl.gz` byte for byte (COUNTS.json pins the gzip's sha256). The fixes relabel fields only, so no spot check was repeated; the lanes' checks below stand. +- **Welsh rows (29 October).** Ten rows selected with `random.Random(2302026).sample(range(14), 10)` +were checked against the saved, hash-verified HTML, reselecting the table +row/column or paragraph. Row numbers below are one-based. Every check +confirmed the number, sign/magnitude convention, unit and end-year period. + +| Row | Reopened locator | Printed value | Normalized value and period | +|---:|---|---|---| +| 4 | Table 1 Resource, 2028-29 | 146 | GBP 146,000,000; 2029 | +| 5 | Table 1 Capital, 2026-27 | -27 | GBP -27,000,000; 2027 | +| 6 | Table 1 Capital, 2027-28 | -19 | GBP -19,000,000; 2028 | +| 7 | Table 1 Capital, 2028-29 | 2 | GBP 2,000,000; 2029 | +| 8 | Table 1 Capital, 2029-30 | -18 | GBP -18,000,000; 2030 | +| 9 | Table 1 Total, 2026-27 | 172 | GBP 172,000,000; 2027 | +| 11 | Table 1 Total, 2028-29 | 148 | GBP 148,000,000; 2029 | +| 12 | Table 1 Total, 2029-30 | -18 | GBP -18,000,000; 2030 | +| 13 | First paragraph after table/rounding footnote, last sentence | 0.5% | 0.5 percent reduction; 2028 | +| 14 | Second paragraph after table, second sentence | almost 10% | Upper endpoint 10 percent reduction; 2030 | + +The headline and all remaining numeric cells were also read directly when +transcribing. Every row's quote contains its raw value. Scope review found +no assigned registry key. Since 3 November the Welsh package rows carry the +shared proposed key `ab2026__package_barnett_consequentials` (scope above), +and the context rows carry no proposal. +- **Scottish rows (29 October, in `uk_fai_sfc`).** Because the family contains fewer than 10 rows, all 5 were checked. A reproducibly shuffled order (`random.Random(20261029)`) gave rows **3, 2, 1, 4, 5** (now rows 17, 16, 15, 18, 19 of this family, one-based). The saved primary was re-opened at every locator; its hash was also checked against each row's publication hash. + +| Row | Primary locator | Verbatim figure | Checked normalization | Sign and period | +| ---: | --- | --- | --- | --- | +| 3 | Paragraph 2, sentence 1; HTML 348 | £550 million | 550,000,000 `gbp` | Positive magnitude of reduction; FY2027-28, period 2028 | +| 2 | Paragraph 2, sentence 1; HTML 348 | 1.3% | 1.3 `percent` | Positive magnitude of reduction; FY2027-28, period 2028 | +| 1 | Opening paragraph; HTML 347 | £650 million | 650,000,000 `gbp` | Positive magnitude of reduction; FY2027-28, period 2028 | +| 4 | Paragraph 2, sentence 2; HTML 348 | 1.5% | 1.5 `percent` | Positive magnitude of reduction; FY2027-28, period 2028 | +| 5 | Paragraph 2, sentence 2; HTML 348 | £100 million | 100,000,000 `gbp` | Positive magnitude of reduction; FY2027-28, period 2028 | diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/claims_staged.jsonl.gz new file mode 100644 index 000000000..5618000aa Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/manifest.jsonl new file mode 100644 index 000000000..f5338cbcc --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/manifest.jsonl @@ -0,0 +1,2 @@ +{"access": "direct", "bytes": 26908, "date": "2026-10-28", "doc_type": "html", "note": "Fresh curl -sSL fetch with the assigned Safari User-Agent; HTTP 200, completed 2026-10-29T15:22:18Z (HTTP Date header). SHA256 is of the unaltered HTML bytes saved as .ab2026-primaries/uk_devolved_govts/welsh-response.html. Publication and last-updated dates both print 28 October 2026. No assignment local copy was supplied.", "publisher": "Welsh Government", "retrieved": "2026-10-29", "sha256": "87490552c36d8ffd5787db18127704e467d93599e5708627adb6da7dcfe17c7c", "title": "Written Statement: Welsh Government response to the UK Autumn Budget 2026", "url": "https://www.gov.wales/written-statement-welsh-government-response-uk-autumn-budget-2026"} +{"access": "direct", "bytes": 27662, "date": "2026-10-28", "doc_type": "html", "note": "Fresh exact prescribed browser-UA curl fetched HTTP 200 at 2026-10-29T15:22:47Z. SHA256 covers the fetched HTML bytes. Visible publication timestamp is 28 October 2026 15:45. JSON-LD dateModified is 2026-10-29T08:22:59Z, while dc.date.modified repeats 2026-10-28 15:45; no earlier copy was supplied, so a numerical change cannot be established. Five rows, read from opening body paragraphs 1–2. First staged in the uk_fai_sfc lane on 29 October; moved to uk_devolved_govts on 3 November 2026.", "publisher": "Scottish Government", "retrieved": "2026-10-29", "sha256": "f3d0183e470f711b6821e4956e108c5d17210a392e6a6e471eccf297c807a6ac", "title": "UK Budget delivers real cut to Scotland’s funding", "url": "https://www.gov.scot/news/uk-budget-delivers-real-cut-to-scotlands-funding/"} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/NOTES.md new file mode 100644 index 000000000..1a7800f55 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/NOTES.md @@ -0,0 +1,419 @@ +# uk_hmt_costings: HM Treasury, Budget 2026: Policy Costings (PU 3699) + +**Working files.** `stage.py`, the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/hmt-costings/uk_hmt_costings/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The repository carries no primary bytes: fetch the costings PDF from its `manifest.jsonl` URL and check its sha256. + +This family dates from 2026-10-29 and follows README rules 1 to 10, including rule 8 ("stage estimates, not design"), rule 9 ("a component of one measure keeps that measure's key") and rule 10 (below, under Conventions). `stage.py` (on the staging branch; see 'Working files') holds the rows as data and rewrites `claims_staged.jsonl.gz` byte for byte. + +Source slug `hm_treasury` and source_model `hmt_costing_obr_certified`, as in the AB2025 family. The exception is the two tax gap rows, which use `administrative_data`. + +- **Rows:** 597. + - 576 Exchequer impact cells: 96 costing notes, each across six fiscal years from 2026-27 to 2031-32. + - 21 rows of estimates printed in the notes' text: + - behavioural parameters (8); + - PSND and PSNFL impacts (7); + - eligible counts (2); + - the tax gap behind one tax base (2); + - one tax base; + - one financial-transaction impact. +- **Primaries:** 1 PDF. +- **Measure keys:** 76 registry keys on 573 rows. + - 416 rows cost a whole Table 6.1 line: `conditions.row_type: measure`, 68 keys. + - 157 rows cost a printed part of one line: `row_type: measure_component`, 8 lines' keys. + - 22 rows carry `measure_key: null` and one of 3 proposed keys, for measures with no Table 6.1 line or none this family can identify. 6 of them (p.108's receipts) are `measure_component`, so 163 rows in all are components. + - 2 rows (p.50's UK tax gap) are context: `measure_key: null` and no proposed key. + +## Access recipe + +- **Fetch:** `curl -sSL` with a browser User-Agent to https://assets.publishing.service.gov.uk/media/6ae1883fe4367e5c8b0467df/AB26_Policy_Costing.pdf on 2026-10-29 at 16:14 UTC. + - HTTP 200, `application/pdf`, 745,488 bytes, sha256 `f716efada8a4d0726ce12b0f97d3f0dac671c31b2d005ecf300a48ff309638bf`. + - The site showed no bot mitigation, so the fetch needed no fallback. + - The bytes equal the harvest's local copy downloaded on 28 October. The primary has not changed since Budget day, so README rule 7 does not apply. +- **Reading:** `pdftotext -layout`. + - 122 pages: the introduction on p.10, costing notes on pp.12-109 and Annex A on pp.110-121. + - Two notes run onto a second page: EMI2 (pp.31-32, table on p.32) and Writing-down Allowances (pp.70-71, table on p.70). + - This file cites each note by its first page. A row's locator cites the page that prints the figure. +- **Where the data in `stage.py` comes from:** a scratch parser, not vendored, split the text into notes at each "Measure description" heading and read each note's sections. + - Every note prints exactly one "Exchequer impact (£m)" table: one row of six signed values for 2026-27 to 2031-32. + - I reviewed the parse against the page text. All 96 titles match the document's contents list. + - Prose joins a line-end hyphen without a space, except a suspended one: p.82's "18- to 24-year-old". +- **Re-check:** + - `python3 stage.py` rewrites the gzip. + - `python3 stage.py --verify ` writes nothing. It checks that the gzip on disk equals a fresh build and that the PDF has the pinned sha256. For every row it then checks the page its locator cites: + - **table rows:** the heading, the six years, the six values in order and the row's value in its year's column. The row label must equal the page's label exactly, and any footnote must appear. + - **text rows:** the quote, verbatim, with `value_raw` inside it. `value` must equal `value_raw`'s number at the scale and sign the `normalization` names. + - **every keyed row:** the measure's title, on the note's first page. + - All 597 rows pass. An in-memory mutation test confirms the check catches each of: a wrong table value; swapped columns; a wrong or shortened label (p.82 without "[AME savings only]"); a text figure off by sign, scale or value; and a wrong title. +- **Table quotes.** A table row's `quote` joins the table's cells in reading order: heading | years | label and six values | footnote. p.96 prints its label broken across two lines as "Exchequ / er impact"; the quote and `table_row` write it "Exchequer impact". + +## What the family stages + +### Exchequer impact tables (576 rows) + +- **One row per note and fiscal year:** + - `metric: revenue_change` and `unit_concept: gbp`. + - `value` is `value_raw` (£m, with the sign and trailing "m" as printed) × 1e6. +- **Every table is `scoring_method: final`.** + - No AB2026 note prints separate static and post-behavioural tables; in AB2025, 8 notes did. + - No note prints a behavioural adjustment in pounds; AB2025's thresholds note printed £180m. + - So the family has no static, post-behavioural or behavioural-effect legs to stage. Several notes mention a static costing, and p.108 a "pre-behavioural costing", but none prints a figure for it. +- **`conditions.behavioural_adjustment`** classifies the words of each note's costing section. The pages listed are each note's first page. + - **"included (see note)" on 56 notes:** pp.12, 13, 14, 16, 18, 19, 23, 24, 25, 26, 27, 29, 30, 31, 36, 38, 39, 40, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 60, 62, 65, 66, 67, 68, 70, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 85, 86, 87, 90, 95, 100, 102, 103, 104, 107 and 108. + - p.90 adds its sentence: the Infected Blood costing keeps the scheme's cost model, whose "behavioural assumptions" the changes "do not materially alter". + - **"none: ''" on 18 notes:** pp.17, 35, 37, 42, 50, 54, 55, 56, 58, 59, 61, 63, 64, 91, 94, 101, 106 and 109. + - **"not stated (the note's costing section does not use the word 'behaviour' or 'behavioural')" on 22 notes:** pp.15, 20, 21, 22, 28, 33, 34, 41, 57, 69, 76, 83, 84, 88, 89, 92, 93, 96, 97, 98, 99 and 105. + - This class is lexical and reads the costing section only; AB2025 used only the first two classes. + - Six of these notes name behaviour in their "Areas of uncertainty" instead: + - pp.20, 21, 22, 69 and 89: "the impact of behavioural responses"; + - p.93: "the behavioural response to the rebate scheme". + - Others describe a response in other words: + - p.15 assumes 89% take-up; + - p.28 puts 25% of income into reserves; + - p.76 "includes an assumed timing effect"; + - p.84 assumes the zone facilitates borrowing; + - p.88 says self-assessment "may affect how taxpayers interact with the tax system"; + - p.99 adjusts "for expected utilisation of the cap". +- **`conditions.static_impact`:** three notes say the measure has no static impact, so the whole costing is behavioural. + - p.19 (Cash ISAs) and p.43 (E-invoicing): "The costing has no static impact on taxpayer liabilities." + - p.44 (Employment expenses): "The measure has no static impact on taxpayer liabilities." +- **`conditions.table_row`:** "Exchequer impact" on 95 notes; "Exchequer impact [AME savings only]" on p.82. +- **`conditions.table_footnote`:** + - p.94: "*Note: This costing also includes delivery costs." + - p.108: "Note: this is offset by increased DEL spending so is fiscally neutral." +- **`conditions.fiscally_neutral`:** pp.108 and 109, each with the note's own sentence. +- **`note`:** the note's base section, then its costing section, then "Areas of uncertainty", verbatim and joined by " || ". Component and off-table notes have a mapping paragraph in front (see "Measure keys"). + +### Estimates from the notes' text (21 rows) + +| page | figure, verbatim | staged as | period | key | +|---|---|---|---|---| +| 15 | "an estimated 166,000 fathers and partners and around 750 self-employed adopters" | `eligible_count`, persons (2 rows) | 2026, point in time | `ab2026__parental_allowance_fathers_partners_adopters` | +| 15 | "an 89% take-up rate" | `behavioural_parameter`, percent | 2029-30 | same | +| 28 | "25% of the additional income above the baseline is placed into MSAs’ reserves" | `behavioural_parameter`, percent | 2027-28 | `ab2026__business_rates_retention_mayoral_authorities` | +| 33 | "public sector net debt (PSND) (approx. £386m) and public sector net financial liabilities (PSNFL) (approx. £375m)" | `psnd_impact` -386m, `psnfl_impact` -375m | to 2031-32, cumulative | line 29, component p.33 | +| 34 | "a cost of approximately £775m" (PSND); "add an additional cost of £68m" (PSNFL fair value) | `psnd_impact` -775m, `psnfl_fair_value_impact` -68m | to 2031-32, cumulative | line 29, component p.34 | +| 41 | "a cost of approximately £32m" (PSND); "the value of the portfolio increases by approximately £86m (total PSNFL benefit of £54m)" | `psnd_impact` -32m, `psnfl_fair_value_impact` +86m, `psnfl_impact` +54m | to 2031-32, cumulative | proposed, p.41 | +| 50 | "6.4% of total theoretical tax liabilities, or £59.2 billion in absolute terms" | `tax_gap`, percent and gbp | 2024-25, outturn | context (`measure_key: null`) | +| 58 | "an impact of +£130m estimated in 2029-30 in cash terms" | `financial_transaction_cash_impact` | 2029-30 | line 47, component p.58 | +| 67 | "An elasticity of -0.95 is used, with 25% of the reduction in stakes then assumed to substitute to Remote Gaming Duty" | `behavioural_parameter`, elasticity and percent | 2027-28 | line 56, component p.67 | +| 84 | "£20 million of additional capital borrowing annually from 2028-29 to 2031-32" | `behavioural_parameter`, gbp, one row per year | 2028-29 to 2031-32 | `ab2026__leeds_city_fund` | +| 108 | "approximately 4.9 million eligible properties are in scope" | `tax_base`, properties | 2026, point in time | proposed, p.108 | + +- **Labels.** Each text row names its quantity in `conditions.statistic`, or `conditions.parameter` for a behavioural parameter. Rule 9 reserves `conditions.component` for the part of the measure. +- **Per-year rows.** p.84's sentence gives one figure for each of four named years, so the family stages one row per year, each quoting the whole sentence. The family sums and splits nothing. +- **Year of a parameter.** The note gives no year for p.15's take-up, p.28's reserves share or p.67's two parameters. As in the AB2025 family, `fy` is the measure's first year, and the row's `note` says so. +- **Present-tense counts** (p.15 "There are an estimated", p.108 "The current estimate") print no year. They carry `period: 2026` and `time_basis: point_in_time`, with `basis: outturn`. +- **Metric choices that could go either way:** + - p.15's population is the people a new benefit would cover, so it takes the registered `eligible_count`. + - p.108's 4.9 million is the base the fee falls on, so it takes `tax_base`, as AB2025's 165,000 HVCTS properties did. + - p.84's £20 million is the council's estimated response to the measure ("Additional business rates income is assumed to facilitate borrowing", and "none is assumed without the zone"). So it is a `behavioural_parameter` in pounds, as the AB2025 uk_obr_tables family staged costing assumptions (its £1,849 row), not a financing remit. +- **PSND and PSNFL figures.** + - They sum over "the period to 2031-32", so they carry `value_kind: cumulative`, `period: 2032`, `conditions.horizon` and no `fy`. + - The document prints them unsigned, with words. The family gives all seven one convention, matching the Exchequer rows: positive = lower PSND or PSNFL (an improvement); negative = higher (a cost). + - `normalization` and `sign_convention` quote the words each sign comes from: "net cost", "a cost of" and "add an additional cost of" are negative; "benefit" and "the value of the portfolio increases by" are positive. + - The £68m (p.34) and the £86m (p.41) are fair-value movements: increments to PSNFL beyond PSND, not PSNFL totals. They take their own proposal, `psnfl_fair_value_impact`. + - p.41's figures agree: -32 + 86 = +54. + - p.34 prints no PSNFL total, so the family stages none. +- **The tax gap.** + - p.50 prints HMRC's tax gap for 2024 to 2025 in its tax base section, as the base's starting point: "The tax base for this costing is the total tax gap less the additional tax revenues accounted for by previously announced Closing the Tax Gap (CTG) initiatives." + - Rule 8 counts a tax base as an estimate, but the total tax gap is a context figure, not a part of the measure, so the two rows carry `measure_key: null` (AB2025 rule 3). + - They are an official HMRC statistic repeated by HM Treasury, so they carry `attribution: restated`, `benchmark_class: administrative_fact`, `source_model: administrative_data` and `basis: outturn`, with the uk_rf_ab2025 proposal spelling `tax_gap`. + - The note does not cite the HMRC publication. + +## Conventions (load-bearing) + +- **Sign.** The document prints no legend. + - `conditions.sign_convention` on every Exchequer row reads "positive = yield to the Exchequer (reduces borrowing); negative = cost to the Exchequer". The full text also gives the evidence: + - p.38 says its figures "represent net income from developer fees" and prints +50m to +95m from 2027-28, after -15m in 2026-27. + - The Bank Surcharge rise prints +, and the VAT cut on domestic electricity prints -. + - Table 6.1 prints the same values with the same signs. + - Values are NOT re-signed. + - Text rows carry their own `sign_convention`: as printed for p.58's "+£130m", and for the PSND and PSNFL rows as described above. +- **Rule 10 (borrowing metric).** pp.34, 35 and 41 say their tables' figures "impact public sector net borrowing (PSNB)". They are single measures' Exchequer impacts, which Table 6.1 frames the same way (red book para 6.1), and README rule 10 keeps single measures on `revenue_change` unless the producer states the Budget's effect on borrowing. So rows 134–145 and 179–184 keep `revenue_change`; p.35 equals line 30. No row in this family takes `decisions_effect_on_borrowing`. +- **period** is the FY end year (2026-27 → 2027), with `conditions.fy` holding the label. +- **geography** is "UK" on every row, because these are Exchequer impacts. `conditions.measure_scope` names the territory where the note or its title says the measure applies: + - England: pp.20, 21, 22, 36, 69, 96, 102 and 108. + - Great Britain: pp.15 and 59. + - England and Northern Ireland: p.99. + - pp.91 and 94 name England only for their cost bases ("English borrowers", "English undergraduate student loan outlay"), so they carry no `measure_scope`. +- **baseline_policy** is null throughout: current law at scoring, including the pre-announced indexation in Annex A. There is no `proposed_baseline`. +- **impact_channel** comes from the Table 6.1 line's Tax or Spend head in the registry: + - `tax_measure` or `spending_measure`; + - `not_on_table_6_1` for pp.108-109; + - `not_identified_on_table_6_1` for p.41. +- **national_accounts_basis**: "All costings are presented on a National Accounts basis (p.10)" on every Exchequer row. +- **parse_confidence** is "high" on every row. The document prints every value as text, and `--verify` finds each on its page. + +## Measure keys + +The document orders its costing notes by Table 6.1 line. Mapping each note to its line gives a non-decreasing sequence from line 2 to line 98, with the two Table 6.1 exclusions (pp.108-109) at the end. That ordering, together with titles and Table 6.1's footnotes, settles each note's line. + +- **Whole lines (68 keys, 416 rows, `row_type: measure`).** These cover every note that is the only costing for its Table 6.1 line and costs all of it. + - For 64 notes the title equals the line's title exactly. + - Four differ only by Table 6.1's parenthetical or the year: p.35 (line 30), p.38 (line 37), p.42 (line 44) and p.77 (line 66). +- **Components (8 lines, 25 notes, 157 rows, `row_type: measure_component`).** Under README rule 9, a note that costs a printed part of one Table 6.1 line carries that line's key. + - `conditions.component` names the part: the note's title, or for p.82 its fiscal head. + - `conditions.table_61_line` gives the line. + - The harvest never sums a component with the line's total. + +| line | key | component notes (first page) | +|---|---|---| +| 29 | `ab2026__british_business_bank_backing_innovation` | p.33 British Business Bank: bring forward activity; p.34 British Business Bank: increase total financial capacity | +| 45 | `ab2026__hmrc_tax_gap_package` | p.43 E-invoicing; p.44 Employment expenses; p.45 More Timely Payment; p.46 VAT and PAYE direct debit; p.47 Real Estate exchange of information; p.48 Debt Management, recovery from bank accounts; p.49 Debt Management, debt collection agencies; p.50 Tax Compliance, 670 officers; p.51 MTD penalty easement; p.52 Image Rights delay | +| 47 | `ab2026__dwp_fraud_and_error_prevention` | p.54 Abroad Fraud; p.55 Pension Credit capital redeclaration; p.56 UC specialist fraud and error checks; p.57 UC capital verification reversed; p.58 UC New Claim Advances | +| 56 | `ab2026__machine_games_duty_higher_stake_25pc` | p.67 rate rise for higher stake machines; p.68 liability moved to the supplier | +| 72 | `ab2026__youth_guarantee_and_apprenticeships_spring_2026` | p.82: AME savings only ("Exchequer impact [AME savings only]"), for the Youth Guarantee expansion to 22- to 24-year-olds | +| 77 | `ab2026__uk_india_ceta_and_double_contributions_convention` | p.85 CETA tariff changes; p.86 Double Contributions Convention | +| 84 | `ab2026__waste_crime_landfill_tax_clearances` | p.92 six priority site clearances; p.93 local authority pilot | +| 85 | `ab2026__further_priorities_nhs_and_vawg` | p.94 Erasmus+ (by position; see below) | + +- **Proposed keys (3 keys, 22 rows; `row_type: measure`, except p.108's six receipts rows, which are `measure_component`).** Rule 9 keeps proposed keys "for scopes that cross Table 6.1 lines, or have none". The registry adds them before ingest; the table gives each key's scope as the producer's own words. + +| proposed key | rows | page | scope | +|---|--:|---|---| +| `ab2026__british_business_bank_defence_commitments_accelerated` | 9 | 41 | No identifiable Table 6.1 line (see below). "British Business Bank: Accelerate £450m of commitments to support defence-related and dual-use businesses" By Table 6.1's footnote 2 and its £10m bar, this costing is very probably inside a Table 6.1 line, most plausibly line 41 (lines 29 and 44 are fully accounted for by their own notes); tranche 2 must never add it to Table 6.1 lines or totals. | +| `ab2026__private_landlord_register_fee_65` | 7 | 108 | Not on Table 6.1 (footnote 2). The six Exchequer rows are the fee's receipts, a component (`component: "Receipts (fee income; offset by increased DEL spending, fiscally neutral)"`): p.108's note says "this is offset by increased DEL spending so is fiscally neutral", and the OBR stages the measure's total as 0 (review A, C-1). The seventh row is the 4.9 million tax base. "Renters' Rights: Roll out a £65 fee for the 'Register your rental property' service for private landlords and private properties in England from 15 December 2026" | +| `ab2026__pwlb_debt_relief_councils_severe_distress` | 6 | 109 | Not on Table 6.1 (footnote 2). "Public Works Loan Board (PWLB) Debt Relief for Councils in Severe Financial Distress" | + +How I settled each line: + +- **Lines 45 and 47.** Table 6.1's footnote 4 on both lines reads "Full costings for the measures in this package are set out in the Budget 2026 Policy Costings document." + - The ten notes on pp.43-52 sit between line 44's note (p.42) and line 46's (p.53). + - The five notes on pp.54-58 sit between line 46's and line 48's (p.59). +- **Lines 29, 56, 77 and 84.** The line's title names both notes' measures. +- **Line 72 (p.82).** The note's title equals the line's, but its figure is one fiscal head of the line: + - its table prints the AME savings only; + - its text costs the Youth Guarantee's expansion to 22- to 24-year-olds and never mentions the apprenticeship support the line also names. + + Table 6.1 prints -290 and -375 where the note prints +25 and +35 (2027-28 and 2028-29). +- **Line 85 (p.94, Erasmus+).** No Table 6.1 title names Erasmus+. + - The note sits where line 85 falls: "Further Priorities: Fund key priorities, including pressures facing the NHS and delivery of the Violence against Women and Girls Strategy". + - Line 85's 2029-30 to 2031-32 figures (-5, 0, -15) equal the note's. + - Table 6.1's footnote 2 leaves out only two measures, neither of them Erasmus+, and the note's figures exceed the footnote's £10m bar in four of the six years. + - `conditions.document_position` records the position. +- **p.41.** Position narrows the note to lines 40-43, the national-security block. + - Table 6.1 prints lines 40-43 under its Spend head and prints no finer fiscal head, so nothing printed singles out one line. (The workbook's hidden column D, "Fiscal Head check (hide)", is not printed, and this family no longer reasons from it; review A, T-3.) + - But line 41's title, "Defence Investment Plan: Reallocate capital spending to fully fund the Defence Investment Plan", does not name the British Business Bank, and no figure ties the two. + - So the row carries a proposed key and `document_position`, not line 41's key. By Table 6.1's footnote 2 and its £10m bar, this costing is very probably inside a Table 6.1 line, most plausibly line 41 (lines 29 and 44 are fully accounted for by their own notes); tranche 2 must never add it to Table 6.1 lines or totals. +- **pp.108-109.** Table 6.1's footnote 2 reads "Measures with no net increase to borrowing are not included, these are debt relief for councils in severe financial distress through the Public Works Loan Board and a landlord registration fee for the Private Rented Sector." + +No `row_type: measure` row carries a registry key whose title covers more or less than the row's figure. + +## Cross-check against Table 6.1 (uk_hmt_tables) + +- **All 68 whole-line keys** equal Table 6.1 in all six years. +- **Component lines** (Table 6.1 against the components' sum, 2026-27 to 2031-32; computed for this check only, never staged; reported, not fixed): + - **Line 29 (pp.33+34):** equal. + - **Line 56 (pp.67+68):** the components sum to 140 in 2031-32 against Table 6.1's 145. The other years are equal. + - **Line 77 (pp.85+86):** the components sum to -170 in 2026-27 against Table 6.1's -175. The other years are equal. + - **Line 84 (pp.92+93):** the components sum to -4, -3, -3 in 2027-28 to 2029-30 against Table 6.1's -5, -5, -5. + - These three gaps are each £5m or less, and every Table 6.1 cell is a multiple of £5m. That fits Table 6.1 rounding each line from unrounded components, but neither document says so. + - **Line 72 (p.82):** the AME component prints +0, +25, +35, +0, +0, +0 against Table 6.1's 0, -290, -375, 0, 0, 0. + - **Line 45 (pp.43-52):** the ten components sum to 110, 290, 240, 2,140, 2,635, 3,360 against Table 6.1's 10, 100, 115, 1,980, 2,485, 3,160. Table 6.1 is lower by 100, 190, 125, 160, 150 and 200. + - **Line 47 (pp.54-58):** the five components sum to -10, 10, 125, 65, 145, 235 against Table 6.1's 195, -125, 60, 75, 155, 240. The differences are +205, -135, -65, +10, +10 and +5. + - **Line 85 (p.94):** equal from 2029-30 to 2031-32. Table 6.1 prints larger costs from 2026-27 to 2028-29: -355, -175, -140 against the note's -15, +70, +45. +- **Table 6.2:** p.58's "+£130m estimated in 2029-30 in cash terms" equals Table 6.2 line 9 (DWP Fraud and Error) for 2029-30. +- **Lines without a costing note:** 22 Table 6.1 lines have none: 1, 4, 9, 20, 22, 23, 24, 25, 31, 32, 34, 35, 40, 41, 42, 43, 63, 64, 67, 73, 74 and 81. + - The introduction limits the document to "tax and annually managed expenditure (AME) policy decisions". + - Table 6.1 prints all 22 under its Spend head. It prints no finer fiscal head, so whether each is departmental spending (outside the document's scope) is not printed; no note costs them. + +## Things in the primary that look wrong or contradictory (reported, not fixed) + +- **The £10m threshold.** The introduction says "Measures that were certified by the OBR as below the negligible threshold of £10 million per annum in every year of the forecast period are not considered in this document." Five notes print costings below £10m in every year: + - p.59 (+0m, then +5m a year); + - p.92 (-2m, -2m, -3m); + - p.93 (-2m, -1m); + - p.33 and p.109 (+0m in all six years; p.33's PSND and PSNFL figures are not zero). + + Table 6.1's footnote 2 sets the same bar for its lines: "AME and tax costings with an impact of less than +-£10 million in every year are not included". Yet two such lines appear: + - line 48 (0, then +5 a year; Spend head); + - line 84 (0, -5, -5, -5, 0, 0; Spend head). + + Lines 9 and 81 are also below £10m every year. The footnote's bar covers AME and tax costings only, and Table 6.1 prints no head finer than Tax or Spend to say whether these two are AME or departmental spending. +- **The lines 45 and 47 differences.** Table 6.1's footnote 4 points to this document for the packages' full costings, but the components do not sum to the lines (above), and no note explains the gap. + - For line 45, the gap has the sign the HMRC spending the notes describe would give: £70 million on debt collection (p.49) and £485 million on compliance staff (p.50), "over the next five years". The document does not say that this spending is the difference. + - For line 47, the gap changes sign: +205 in 2026-27, -135 in 2027-28. +- **Notes with no Table 6.1 title.** BBB defence (p.41) and Erasmus+ (p.94) have costing notes, but no Table 6.1 title names them. +- **Minor title and wording differences:** + - p.77's title says "from 25 June to 1 September", while Table 6.1 says "from 25 June 2026 to 1 September 2026". + - p.16's title says "Weekly Earning Limit", while its text says "Weekly Earnings Limit" (Table 6.1 follows the title). + +## Not staged, and why + +The family stages every Exchequer table and every printed estimate in the notes' text: tax bases, behavioural parameters, eligible counts, PSND, PSNFL and financial-transaction impacts. The appendix lists everything else page by page. + +- **Design (README rule 8):** a measure's own rates, thresholds, payment amounts, dates and durations, and counts of products, sites or bodies. They stay in `reform_hint` and `note`. +- **Contingent liabilities (rule 8):** + - p.42's "£10 billion in new guarantees are issued each year between 2027-28 and 2030-31" (UK Export Finance); + - p.83's guaranteed lending "by £1.0 billion in 2026-27, £1.5 billion in 2027-28 and £2.0 billion in each of 2028-29 and 2029-30" and its £6.5 billion total (Growth Guarantee Scheme). + + Both are the volumes on which the notes cost fees and losses. Each note's `note` keeps the sentence. +- **Spending allocations to programmes and financing remits (rule 8):** + - p.34's split of the British Business Bank recapitalisation (£1,405 million for commercial equity, £165 million of CDFI lending and £450 million of venture debt, within c. £2 billion), kept in `note`; + - p.33's £1 billion reprofiled; p.35's £2bn Energy Wealth Fund; p.41's £450 million; p.42's £50 billion of capacity; + - p.109's £700m of PWLB debt repaid; + - HMRC's £70 million (p.49) and £485 million (p.50) and the staff numbers on pp.50 and 56. +- **Numbers printed only in titles:** AB2025 kept these in `reform_hint`, and Table 6.1 carries the same titles. +- **Baseline parameters:** p.91's RPI outturn and counterfactual maximum rate. +- **p.58's "-£35m in 2029-30 in expenditure terms":** the same figure as that note's Exchequer table cell for 2029-30, so staging it would count it twice. +- **p.94's "£0.6bn was allocated for the cost of Erasmus+ association for 2027-28":** an allocation made at Spring Forecast 2026, an earlier event, with a different scope from this note's student-loan and delivery costs. +- **Annex A (pp.110-121):** indexation assumptions in the forecast baseline, not measure costings. AB2025 did not stage them either. +- **The introduction (p.10):** the £10 million negligible threshold, and the list of five measures whose methodology "the government will publish further information on ... by the end of the year": + - More Timely Payment, Distributions, Foreign Sovereign Investments, Founders' Relief and BADR. + - Those publications will be new primaries when they appear. +- **References, not quantities:** scheme, form and statute numbers such as EMI2, Plan 2 and Plan 3, form P87, Class 1 and 1A, Group 7 of Schedule 9 to the VAT Act 1994, FRS 102 and the Five-Year Strategic Plan. +- **Uncertainty ratings:** the document prints none. Each row's `note` keeps the note's "Areas of uncertainty" text. p.101 says "there is no uncertainty over the figures involved". The OBR's ratings belong to uk_obr_tables. +- **Charts:** the document has none. +- **Unreached pages:** none. + +### Appendix: every unstaged number, by page + +D marks design, C a contingent liability, S a spending allocation, input or measure size, T a number printed only in a title, B a baseline parameter. + +- **p.10:** £10 million negligible threshold; BADR's £500,000 in the further-publications list (T). +- **p.12:** VAT 5% → 0% (D). +- **p.13:** 5p (5 pence) per litre cut extended by 6 months; 57.95 ppl main rate; 5ppl rise (D). +- **p.14:** 55p for the first 10,000 business miles; 35p above 10,000 miles (D). +- **p.15:** + - two weeks paid between £27 and the statutory rate of £194.32; + - 2 weeks at the lower of £194.32 or 90% of average weekly earnings; + - up to 39 weeks for adopters (D). +- **p.16:** Weekly Earnings Limit at 16 times the National Living Wage; taper set at 100% (D). +- **p.17:** £2,500 surplus earnings threshold for one year (D). +- **p.18:** two packages of suspensions (D); 135 and 101 food products (T). +- **p.19:** £20,000 and £12,000 cash ISA limits; individuals under 65 (D). +- **p.20:** relief up 20ppt from 15% to 35%; rateable value of £1 million (D). +- **p.21:** £12,000 → £18,000 for 100% relief; £15,000 → £21,000 for tapered relief (D). +- **p.22:** two-year real-terms bills freeze; one-year Supporting Small Business extension; 1p Transitional Relief Supplement for two years (D). +- **p.23:** £1,000 → £3,000 trading allowance (D). +- **p.24:** 72 products; 269 extended and 23 expiring suspensions; all 92; 361 products (D/T). +- **p.26:** 3.7ppl cut from 10.18 to 6.48 ppl, extended a further 6 months; the 5ppl cut (D). +- **p.27:** ABV bands 1.3%, 3.4%, 3.5% and 8.4%; RPI plus an additional 10% (D). +- **p.28:** 20% share of growth (D). +- **p.29:** 10% CGT rate; £10 million lifetime limit; at least 25% holding; two of three tests (D). +- **p.30:** no claim in the past 3 years (D). +- **p.31:** + - option limit £60,000 → £120,000; + - £250,000 EMI limit; + - exercise and exception periods 10 → 15 years; + - exercise window 90 → 180 days (D). +- **p.33:** £1 billion of commitments reprofiled into 2026-27 (S). +- **p.34:** c. £2 billion of financial capacity; £1,405 million, £165 million and £450 million allocations (S). +- **p.35:** £2bn for the Energy Wealth Fund (S); commitments over the next five years (D). +- **p.38:** around 70,000 first-time buyers (T); 20% equity loans; deposits as low as 2.5% (D). +- **p.39:** 25% bonus; £450,000 home value (D). +- **p.40:** withdrawal charge 25% → 20%; £450,000 price cap (D). +- **p.41:** £450 million of commitments accelerated (S). +- **p.42:** £50 billion of added capacity (S); £10 billion of new guarantees each year, 2027-28 to 2030-31 (C). +- **p.43:** two revenue channels (D). +- **p.44:** £2,500 Self Assessment expenses threshold (D). +- **p.45:** forecast liability above £1,000; less than 80% collected at source (D). +- **p.48:** debts up to £5,000 (individuals) and £10,000 (companies) (D). +- **p.49:** £70 million over the next five years (S); aged debt over 12 months old (D). +- **p.50:** £485 million over the next five years; 670 FTE (also in the title); 5,500 previously announced staff; 6,170 FTE total (S). +- **p.51:** 12 month penalty easement (D). +- **p.52:** delay by one year (D). +- **p.53:** £90,000 platform threshold (D). +- **p.56:** 2,000 specialist fraud staff (S). +- **p.58:** -£35m in 2029-30 in expenditure terms (the table cell). +- **p.64:** members under age 75; benefits paid more than two years after; 45% flat rate (D). +- **p.66:** surcharge 3% → 6%; combined rate 28% → 31%; 15 months (D). +- **p.67:** rate 20% → 25%; stake above £1; prize above £100 (D). +- **p.70:** writing-down allowance 14% → 12%; first-year allowance 40% → 50% (D). +- **p.72:** £50 million turnover threshold (D). +- **p.73:** £500,000 lifetime limit; 24% and 18% CGT rates (D). +- **p.74 and p.75:** 2 percentage points (D). +- **p.76:** VED of £1 for 12 months; vehicles over 3,500 kg (D). +- **p.77:** VAT 20% → 5% (D). +- **p.79:** levy 45% → 55% (D). +- **p.82:** + - 18- to 24-year-olds on Universal Credit for 18 months; + - a six-month job paid at 100% of costs for 25 hours a week; + - eligibility widened from 18- to 21-year-olds; cost base of 22- to 24-year-olds (D). +- **p.83:** + - £6.5 billion of lending; £1.0 billion, £1.5 billion and £2.0 billion a year (C); + - maximum loan term six → ten years; + - turnover £45 million → £54 million (D). +- **p.84:** 100% retention of business rates growth for 25 years (D). +- **p.86:** detached-worker period 52 weeks → 60 months; two countries; contributions in only one country at a time (D). +- **p.87:** 50% out-of-quota tariff (D). +- **p.89:** 100% relief for ten years (D). +- **p.91:** + - 6% interest cap; Plan 2 borrowers starting between academic years 2012/13 and 2022/23 (D); + - RPI outturn of 4.1% for the 12 months to March 2026, and a 7.1% maximum rate without the measure (B). +- **p.92:** six priority sites (T). +- **p.93:** three-year pilot (T). +- **p.94:** £0.6bn allocated at Spring Forecast 2026 (see above). +- **p.95:** rates 1 percentage point above 2029-30; maximum of 40% (D). +- **p.97:** VAT 20% → 0% (D). +- **p.99:** credit cap 5.3% → 8.3% (D). +- **p.100:** providers with 300 or more students (D). +- **p.102:** properties valued at £2 million and above (D). +- **p.104:** £135 relief; £39 private consignments (D). +- **p.106:** spread over five years (D). +- **p.108:** £65 annual fee (D). +- **p.109:** + - £700m of PWLB debt repaid, £500m for Woking and £200m for Thurrock (S); + - two local authorities; a transfer between two central government bodies (D). + +## Proposals used + +- `proposed_metric`: + - Reused from earlier families: `behavioural_parameter` (8 rows), `tax_gap` (2, the uk_rf_ab2025 spelling), `tax_base` (1) and `financial_transaction_cash_impact` (1, the uk_hmt_tables spelling). + - New: + - `psnd_impact` (3): a measure's cumulative impact on public sector net debt; + - `psnfl_impact` (2): its impact on net financial liabilities; + - `psnfl_fair_value_impact` (2): the fair-value part of the PSNFL impact beyond PSND. + + They parallel the existing `psnd_share_of_gdp` and `psnfl_share_of_gdp`. +- `proposed_unit`: `elasticity` (1). +- Registered values used beyond `revenue_change` and `gbp`: + - `eligible_count` with `persons`; + - `percent`; + - `properties`, a unit registered since the AB2025 harvest proposed it. +- `proposed_baseline`: none. + +## Attribution + +- **`own` and `different_model`:** 595 rows. They are HMT and HMRC costings that the OBR certified ("All of these costings were submitted to the independent Office for Budget Responsibility (OBR) for their certification", p.10). +- **`restated` and `administrative_fact`:** the two tax gap rows. + +## Distinct condition values + +- `row_type`: measure | measure_component +- `component` (26 values): each component note's title, p.82's fiscal head, and p.108's receipts +- `basis`: forecast | outturn (the tax gap and the two present-tense counts) +- `scoring_method`: final (every Exchequer and parameter row) +- `table_row`: Exchequer impact | Exchequer impact [AME savings only] +- `impact_channel`: tax_measure | spending_measure | not_on_table_6_1 | not_identified_on_table_6_1 +- `measure_scope`: England | Great Britain | England and Northern Ireland +- `behavioural_adjustment`: + - included (see note), plus p.90's variant; + - not stated (the note's costing section does not use the word 'behaviour' or 'behavioural'); + - 13 distinct "none: ''". +- `horizon`: the period to 2031-32 (cumulative) +- Also used: `table_61_line`, `proposed_measure_key`, `document_position`, `fiscally_neutral`, `static_impact`, `table_footnote`, `statistic` (12 labels) and `parameter` (5 labels). + +## Review fixes, 3 November 2026 + +The costings review (`harvest-staging/ab2026/reviews/verify-costings.md` on the staging branch) approved this family with fixes. They sit in an explicit block before `build()` in `stage.py`. No primary was re-opened (the session's network policy refused gov.uk); no printed value changed. + +- **Finding 1:** p.50's UK tax gap rows (6.4% and £59.2bn) are context: `measure_key` and `reform_hint` null, no `row_type`, `component` or `table_61_line`. They stay `restated`, `administrative_fact`, `administrative_data`, fy 2024-25. Registry keys now cover 573 rows, and components 157. +- **Finding 2:** p.41 keeps its proposed key; the double-counting caveat is in its `mapping_note`, the p.41 bullet and the proposed-key table. +- **Finding 3:** the line 45 and 47 component mapping notes now say their notes do not sum to the line, with Table 6.1's differences. +- **Finding 4:** no action. The coordinator found that the lane's copies of `pipeline/ab2026_harvest_contract.py` and the harvest README match #231's head byte for byte, so only this family directory moved. +- **Finding 5:** no change (p.84's £20m and p.58's +£130m are accepted as staged). +- **Verification:** the contract checker reports 597 rows, 0 problems, and a re-run of `stage.py` reproduces the gzip byte for byte. COUNTS.json pins its sha256. + +## Review fixes, 4 November 2026 + +Review A (PR #231, issue comment 6635870934) approved this family with fixes C-1 to C-7. They sit in an explicit block before `build()` in `stage.py`. No primary was re-opened; no printed value changed. + +- **C-1:** p.108's six Exchequer rows (the landlord fee's receipts, 585–590) are `row_type: measure_component` with `component: "Receipts (fee income; offset by increased DEL spending, fiscally neutral)"`. Value, metric and proposed key stay. Components: 157 → 163. +- **C-2:** p.50's two context rows (233–234) no longer say they are "a tax-base input of the measure"; their note says they are context figures with null key and reform_hint (AB2025 rule 3). +- **C-3:** p.41's three text rows (176–178) carry finding 2's double-counting sentence. +- **C-4:** the family follows rules 1 to 10; the Conventions bullet on rule 10 says why pp.34, 35 and 41's PSNB wording keeps `revenue_change`. +- **C-5:** the key tally names the 2 context rows. +- **C-6:** p.84's precedent is the AB2025 uk_obr_tables family, in NOTES and the row note. +- **C-7:** `stage.py` is on the staging branch. +- **T-3 (uk_hmt_tables):** `uk_hmt_tables` no longer emits `conditions.fiscal_head`, read from the workbook's hidden check column. The sentences here that reasoned from it (the p.41 bullet, lines 9, 48, 81 and 84, and the lines without a costing note) now rely only on Table 6.1's printed Tax and Spend heads. +- **D2-1 (GPT-6.1 Sol's delta review of these fixes):** C-1's step had marked p.108's whole costing record, which also feeds the note's text row, so row 584 (the 4.9 million properties in scope, `tax_base`) had become a receipts component. `stage.py` now marks only the six Exchequer rows, and row 584 matches its 4f424b9 version again. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/claims_staged.jsonl.gz new file mode 100644 index 000000000..2bd03d8b0 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/manifest.jsonl new file mode 100644 index 000000000..bb91f467f --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/manifest.jsonl @@ -0,0 +1 @@ +{"url": "https://assets.publishing.service.gov.uk/media/6ae1883fe4367e5c8b0467df/AB26_Policy_Costing.pdf", "title": "Budget 2026: Policy Costings (PU 3699)", "date": "2026-10-28", "publisher": "HM Treasury", "sha256": "f716efada8a4d0726ce12b0f97d3f0dac671c31b2d005ecf300a48ff309638bf", "bytes": 745488, "doc_type": "pdf", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched 2026-10-29 at 16:14 UTC with curl -sSL and a browser User-Agent (HTTP 200, application/pdf, 745,488 bytes). The bytes equal the local copy downloaded on 28 October (same sha256), so the primary has not changed since Budget day. 122 pages: costing notes pp.12-109, Annex A (indexation in the forecast baseline) pp.110-121. Read with pdftotext -layout."} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/NOTES.md new file mode 100644 index 000000000..d471a0dd4 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/NOTES.md @@ -0,0 +1,357 @@ +# uk_hmt_redbook: Autumn Budget 2026 red book, Impact on households and Pension Tax Allowance explainer + +**Working files.** `stage.py`, which writes this family's two data files and is the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/hmt-redbook/uk_hmt_redbook/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. `.ab2026-primaries/uk_hmt_redbook/` was the lane's local primaries folder and was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. + +Source `hm_treasury`. **425 rows from 3 cited primaries (6 hashed versions), 21 proposed measure keys.** `stage.py` embeds every row and manifest line as data; `python3 stage.py` rewrites `claims_staged.jsonl.gz` and `manifest.jsonl` byte for byte with the standard library alone. No primary bytes are vendored. + +The first staging (29 October, morning) produced 1,699 rows and 250 proposed keys. This rework applies README rules 8 and 9: it keeps estimates of effects, drops design (parameters, allocations, financing, contingent liabilities), and gives each printed part of one Table 6.1 measure that measure's key. Review A at 4f424b9 (4 November) dropped 7 more (see "Review A fixes"). The section "Not staged (rules 8 and 9)" accounts for all 1,274 dropped rows. + +## Primaries + +| Primary version | SHA256 | Bytes | Access | Rows | +|---|---|---:|---|---:| +| Budget 2026 (HC 726), 28 October version | `bed70546c026487e3141799968f6df08210c182b0695fed0e8adf7efd6697e03` | 4,657,025 | local copy | 0 | +| Budget 2026 (HC 726), current version | `19b337aced8fe47de1d6ee462dabf75155110d347c38123b6380d90f09e97b93` | 4,679,545 | direct | 357 | +| Impact on households: distributional analysis to accompany Budget 2026 | `36cd5afb4fceca2cecba0d065974ffe8280888e15ed852c129339439e539469c` | 197,606 | direct | 56 | +| Pension Tax Allowance Explainer (content API, full body) | `cc3ec22eb55f4c827c301bc67b06aa7482e4970ef7e1cec644bc382dac0dbb25` | 24,883 | govuk_api | 12 | +| Pension Tax Allowance Explainer (content API, 29 October abbreviated body) | `791d2573bafc67fcfd89567dab55c0239dd26febc9feec44d10f2be4ae21a9e4` | 9,816 | local copy | 0 | +| Pension Tax Allowance Explainer (content API, republished; `updated_at` 2026-10-29T15:55:28Z) | `83f8c894ce76a8e9ce80854f9b7287442d5f6b521a4eb260e5cfacae1c98909b` | 24,356 | govuk_api (review A, 4 November) | 0 | + +## Access recipe + +Every fresh fetch used: + +```sh +curl -sSL -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" URL -o PATH +shasum -a 256 PATH +``` + +All fresh fetches returned HTTP 200, and the files sit under `.ab2026-primaries/uk_hmt_redbook/`. No page refused access and none went unreached. The manifest labels the two historical copies `local copy`; they are kept for the changed-primary comparison (README rule 7), not as blocked-fetch fallbacks. + +- **Red book:** fresh PDF fetched about 2026-10-29T15:41Z. `19b337ac…` matches the supplied 29 October download. `pdftotext -layout` and `diff -u` against the supplied 28 October version `bed70546…` find one change: paragraph 6.207's heading lost the words "and potential for ULEV SalSac reforms", with resulting line wrapping. **No printed number changed.** Every red-book row cites the current version. Printed page = PDF page minus six. +- **HTML discovery:** the publication content API `https://www.gov.uk/api/content/government/publications/budget-2026-document` (hash `4568690c1ca115ff4a7aa5aa116bcdb39cebee39d8af4490b8dc3ad544b3ec6d`) names the HTML attachment, fetched as a cross-check (hash `33ee5a00b6383104f83790719c0a67e396cfb52e7ea93986b76ab15a19fdaaec`). Neither supplies rows; the PDF is the primary. +- **Impact on households:** fresh PDF fetched 2026-10-29T15:41:44Z, identical to the supplied 29 October copy, read with `pdftotext -layout`. Printed pages equal PDF pages. +- **Pension Tax Allowance explainer:** fresh content API JSON fetched 2026-10-29T15:41:44Z, matching the supplied 28 October response. Rows quote its decoded `details.body`. **The supplied 29 October response differs:** its body is a 353-character introduction without the counts, worked cases or FAQ of the 19,727-character full body. Both carry publication date 28 October. No row cites the abbreviated version. +- **Pension Tax Allowance explainer, republished (README rule 7).** Review A fetched the content API on 4 November and got `83f8c894…` (24,356 bytes, `updated_at` 2026-10-29T15:55:28Z, a 19,206-character body): HM Treasury republished the explainer about 14 minutes after the lane's fetch. All twelve explainer rows' quotes and values are verbatim in it. It fixes "part-time wok" and no longer repeats an FAQ question; "£13.319" remains. The rows keep citing `cc3ec22e…`, the version they were read from. + +## Coverage + +Rows run in document order: red book (printed page, then position), Impact on households, Pension Tax Allowance explainer. + +- **Red book (357 rows):** + - 160 fiscal aggregates restated from the OBR, ONS and IMF, with two shares of HM Treasury's own arithmetic (Box 1.C footnotes 54 and 56): Chapter 1 text, Chart 1.6's six data labels, Tables 1.2 and 1.3; + - 84 cells of Table 6.3, which breaks Table 6.1 line 45 into eleven items, with its subtotal, the line 46 memo and the subtotal including memo; + - 28 costs, yields and savings: Table 6.1 measures where the red book prints the line's own Exchequer impact, printed parts of those lines, and saving estimates with their own scopes; + - 85 effects on people and businesses: counts affected; gains, losses and bill changes; GDP, earnings, price and jobs effects; Barnett consequentials. +- **Impact on households (56 rows):** the distributional and context statements of paragraphs 1.7, 1.9, 1.10 (first bullet), 2.4, 2.5 and 2.10, and the 50 cells of Table 2.C. +- **Pension Tax Allowance explainer (12 rows):** three pensioner counts and nine worked-case outcomes. + +Rows by measure key: + +| measure_key | rows | of which components (rule 9) | +|---|---:|---:| +| `null` with a proposed key | 66 | 18 | +| `null`, context (no proposed key) | 189 | 0 | +| `ab2026__hmrc_tax_gap_package` | 73 | 67 | +| `ab2026__pension_tax_allowance` | 12 | 0 | +| `ab2026__british_industrial_competitiveness_scheme` | 8 | 0 | +| `ab2026__household_energy_payment_100_bands_a_to_d` | 8 | 0 | +| `ab2026__business_rates_rhl_transitional_support` | 6 | 6 | +| `ab2026__business_rates_sbrr_rhl_thresholds_raised` | 6 | 0 | +| `ab2026__online_marketplace_liability_uk_businesses` | 6 | 0 | +| `ab2026__electricity_vat_zero_rate_to_july_2027` | 5 | 0 | +| `ab2026__alcohol_duty_small_producer_relief` | 4 | 0 | +| `ab2026__food_and_heating_oil_tariff_suspensions` | 4 | 4 | +| `ab2026__mileage_allowance_payments_55p` | 4 | 0 | +| `ab2026__uk_india_ceta_and_double_contributions_convention` | 4 | 4 | +| `ab2026__your_first_home_equity_loan` | 4 | 0 | +| `ab2026__defence_investment_plan_capital_reallocation` | 3 | 2 | +| `ab2026__ukraine_winter_air_defence` | 3 | 0 | +| `ab2026__civil_service_admin_budgets_cut_20pc` | 2 | 0 | +| `ab2026__civil_service_ai_fund` | 2 | 0 | +| `ab2026__early_years_books_access` | 2 | 0 | +| `ab2026__ev_charging_public_chargers` | 2 | 0 | +| `ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred` | 2 | 0 | +| `ab2026__misogyny_prevention_programmes` | 2 | 0 | +| `ab2026__badr_lifetime_limit_500000` | 1 | 0 | +| `ab2026__benefits_removed_hospitalised_serious_offenders` | 1 | 0 | +| `ab2026__british_business_bank_backing_innovation` | 1 | 1 | +| `ab2026__carbon_price_support_removed` | 1 | 0 | +| `ab2026__carers_allowance_earnings_taper` | 1 | 0 | +| `ab2026__hgv_ved_1_for_12_months` | 1 | 0 | +| `ab2026__national_wealth_fund_capital` | 1 | 0 | +| `ab2026__parental_allowance_fathers_partners_adopters` | 1 | 0 | + +The 189 context rows carry no proposed key (README rule 2): 135 fiscal aggregates about no measure (133 restated, and HM Treasury's own two Box 1.C shares), and 54 Impact on households rows (Table 2.C and the context statements of paragraphs 1.10, 2.4, 2.5 and 2.10). The other 24 Table 1.3 rows, the OBR's effect of policy decisions, and Chart 1.6's "Effect of policy" carry `ab2026__package_government_decisions_since_march_2026`. + +Rows by metric: + +| metric | rows | +|---|---:| +| `revenue_change` | 112 | +| `income_statistic` | 52 | +| `affected_count` | 32 | +| proposed `government_borrowing` | 28 | +| proposed `government_debt` | 25 | +| proposed `fiscal_balance` | 21 | +| proposed `government_borrowing_change` | 20 | +| `decisions_effect_on_borrowing` | 18 | +| proposed `fiscal_balance_change` | 16 | +| `fiscal_headroom` | 14 | +| proposed `government_net_worth` | 9 | +| `energy_bill_change` | 7 | +| proposed `debt_interest_change` | 7 | +| proposed `household_tax_change` | 7 | +| proposed `business_cost_saving` | 6 | +| proposed `average_cumulative_gain` | 5 | +| `gdp_level_effect` | 4 | +| `tax_liability` | 4 | +| proposed `aggregate_household_saving` | 4 | +| proposed `bill_change_percent` | 4 | +| proposed `block_grant_effect` | 4 | +| proposed `jobs_created_or_supported` | 4 | +| `affected_share` | 3 | +| `average_annual_gain` | 3 | +| `gainer_count` | 2 | +| proposed `fiscal_consolidation_share` | 2 | +| proposed `share_in_non_gaining_deciles` | 2 | +| proposed `unaffected_share` | 2 | +| `cpi_inflation_effect` | 1 | +| `revenue_share` | 1 | +| proposed `gross_earnings_change` | 1 | +| proposed `housing_supply_change` | 1 | +| proposed `income_mobility_share` | 1 | +| proposed `share_in_net_recipient_deciles` | 1 | +| proposed `share_in_top_half_of_expenditure` | 1 | +| proposed `share_with_zero_liability` | 1 | + +Attribution: 257 rows `own`, 168 `restated` (OBR, ONS, IMF, DWP, DBT, the British Business Bank, the National Wealth Fund). + +## Conventions + +- **Values as printed.** `value_raw` is the printed string, and `value` scales it to the unit (£ million × 1e6, £ billion × 1e9; percent stays percent; words such as "three-quarters" become fractions with unit `share`). Bounds keep the printed qualifier: "over" and "more than" are `range_low`, "up to" is `range_high`, "around" is `point`. +- **Sign.** Values are never re-signed. `conditions.sign_convention` states each row's direction in the phrasing `scorecard_db/signs.py` reads: + - Exchequer costs: "positive = cost to the Exchequer (as printed; not re-signed)"; + - savings: "positive = saving to the Exchequer"; + - yields, including Table 6.3: "positive = yield to the Exchequer (reduces borrowing)"; + - Table 1.3: "positive = increase in PSNB" (the opposite of Table 6.1's yield convention), except on its two memo lines, which give the change in the current budget deficit: "positive = increase in current budget deficit" (README rule 10, since 3 November); + - Table 1.2: deficits and debt positive, surpluses negative, as printed; + - Chart 1.6's three bridge steps (rows 21, 22 and 24 at 4f424b9): "positive = reduction in current budget deficit (increase in stability rule headroom)", the reverse of Table 1.3's memo, as printed (Chart 1.6's "Effect of policy" +2.0 is Table 1.3's policy memo −2.0 in 2029-30); + - Box 1.C: each row says what it measures and which way it runs ("positive = fall in borrowing (… as worded: fell by)", "as printed; positive = current budget deficit (% of GDP)" and so on; review A's RB-12); + - Barnett consequentials: "positive = increase in devolved government funding"; + - gains to a person or business: "positive = gain to the (…, as printed)", and row 185's CPI effect "positive = reduction in CPI inflation (as worded: reduce inflation by)" (RB-17). +- **Periods.** Fiscal-year figures carry `conditions.fy`, end-year `period` and `time_basis: fiscal_year`. A multi-year total, or an average over the forecast, keeps its whole horizon in `conditions.horizon`, sits at its final fiscal year and is never annualised; "over the forecast" means 2026-27 to 2031-32, as paragraphs 1.20 and 1.40 date it. A figure printed more than once keeps a row for each printing (AB2025 did the same), and the repeats share one dating, the most specific mention's (review A's RB-15); where more than two printings would share one claim identity, only two are kept (RB-2). An undated figure ("by the late 2030s", "this winter") sits at the publication year 2026 with the printed horizon in conditions and, where the year matters, `parse_confidence: medium`. +- **Geography** comes from the harvest's closed list (`UK`, `GB`, `England`, `Wales`, `Scotland`, `Northern Ireland`, `England and Wales`, `Scotland, Wales and Northern Ireland`); any detail goes in `conditions.geography_note` or `note`. The Ofgem price cap and BICS are `GB`. +- **Prices.** Every money figure is cash, as printed; Table 1.3's rows carry `price_basis: current prices`. No basis is converted. (The first staging tagged the £595 million administration saving `real terms`; paragraph 2.14's "real terms" belongs to the Spending Review's 16% cut, and the £595 million equals Table 6.1 line 63's cash +595.) +- **"Central".** HM Treasury prints single estimates; `point` means the printed figure. No row is an inferred scenario. The one OBR scenario row (borrowing £12 billion lower if energy prices follow a lower path) carries `conditions.scenario`. +- **Rule 9 components.** A printed part of one Table 6.1 measure carries the line's key, `conditions.component` naming the part and `conditions.row_type: measure_component`. Components are never summed with the line's total. This family has 102: the 66 Table 6.3 item cells and the 160,000 employees (line 45); the £3 billion and £1.7 billion parts of line 41's £4.7 billion; the four food-tariff consumer savings (line 10; the June-and-November range contains the November-only one, so never add the two); the India agreement's UK, Scotland, Wales and Northern Ireland GDP effects (line 77; the UK figure is the trade deal alone, without the Double Contributions Convention); paragraph 3.22's six figures for line 14's real-terms freeze and SSB extension; the British Business Bank's 40,000 jobs (line 29's capacity half, as Policy Costings p.34); and, under proposed keys, the Tax and Spending parts of the OBR's policy effect, the three devolved Barnett consequentials and three parts of the regulatory administrative savings. +- **`component` means a part only.** Where the first staging used `component` for a Chapter 6 paragraph title on a whole-measure row, the condition is now `paragraph_heading`; in the pension worked cases it is `quantity`. Chart 1.6's six headroom-bridge data labels name their bar in `chart_bar` (changed on 3 November; the rework had left them under `component`). +- **Attribution.** OBR forecasts are `restated` with source model `obr_efo_forecast`; ONS, IMF, DWP, DBT and British Business Bank figures are `restated` and their notes name the original. HM Treasury's own costings, counts and worked cases are `own`. + +### Which spending figures stay (rule 8 exception) + +A spending figure is a measure's design unless the red book presents it as the measure's Exchequer impact. The test applied: the figure stays when it equals the printed Table 6.1 line (from `uk_hmt_tables`), within the red book's rounding, as a total over the years the red book states or, for a per-year amount, as the line's per-year amount (review A's RB-20(b): the early-years books rows pass only the second form). Tax costs and yields, savings estimates and Table 6.3 stay regardless. + +| Table 6.1 line | Red book | Table 6.1 prints (£ million) | Rows | +|---|---|---|---| +| 1 Household Energy Payment | £2.6 billion | -2,625 in 2026-27 | kept (2): the executive summary and para 2.48 (review A's RB-2 dropped Box 3.A's and para 3.5's repeats) | +| 9 Early years books | £5 million a year | -5 a year (2026-27 to 2028-29) | kept (2): the per-year amount equals the line's; the years differ, see anomalies | +| 19 Small Producer Relief | £10 million per year | -10 a year from 2027-28 | kept (2) | +| 32 EV charging | £100 million over two years | -50, -50 | kept (1) | +| 41 DIP capital reallocation | £4.7 billion, 2027-28 to 2029-30 | +2,135, +1,420, +1,100 = 4,655 | kept (1), with its £3 billion and £1.7 billion parts as components (2) | +| 43 Ukraine air defence | £500 million this winter | -500 in 2026-27 | kept (3) | +| 48 Hospitalised offenders | around £5 million in 2031-32 | +5 | kept (1) | +| 63 Administration budgets | £595 million in 2029-30 | +595 | kept (2) | +| 64 Civil Service AI fund | £50 million across 2027-28 and 2028-29 | -25, -25 | kept (2) | +| 71 Carbon Price Support | £235 million over five years | -165, -45, -15, -10 | kept (1) | +| 81 Misogyny prevention | £15 million | -5 a year for three years | kept (2) | +| 20 Good Growth Funds | £285 million in 2027-28 | -340 in 2027-28 | dropped | +| 22 Local apprenticeship services | £100 million over two years | -50, -70 | dropped | +| 25 Strategic Authorities capacity | £150 million in 2027-28 | -180 | dropped | +| 33 Rough sleeping | £432 million across 2027-28 and 2028-29 | -515, -580 | dropped | +| 35 Social and Affordable Homes | £1.5 billion | -250, -500, -500, -500 = -1,750 | dropped | +| 73 Union Learning Fund | £15 million a year | -20 a year | dropped | +| 23, 31, 74, 85 and others | programme amounts inside a line (AI Security Institute, Cardiff Parkway, UKRI clusters, NHS winter funding…) | line totals only | dropped | +| 37 Your First Home (Table 6.2 line 5) | £4.7 billion | -4,700 of financial transactions | dropped: a financial-transactions allocation | +| 6.2 line 4 Sovereign AI | £60 million from 2027-28 | -45 a year | dropped | + +## Proposed measure keys (21) + +Each key below is the whole scope of its rows, stated as Table 6.1 lines or "no Table 6.1 line", with the red book's words. + +- `ab2026__package_government_decisions_since_march_2026` (25 rows): the OBR's "Total effect of policy decisions" on PSNB in Table 1.3, with its Tax and Spending parts (components) and the memo effect on the current budget deficit, 2026-27 to 2031-32, and Chart 1.6's "Effect of policy" on stability rule headroom in 2029-30 (+2.0: the memo's −2.0 seen as headroom; proposed `fiscal_balance_change`). Crosses Table 6.1 lines 1–98 and adds the OBR's indirect effects; Table 1.3 footnote 1 says the OBR's EFO Table 3.1 explains the "Differences between the direct impacts of the policy measures as set out in Table 6.1 of the Budget, and how the OBR incorporate these into their forecast". Not `ab2026__package_total_policy_decisions`. +- `ab2026__package_hmrc_tax_gap_and_online_marketplace` (7 rows): exactly Table 6.1 lines 45 and 46. Table 6.3's "Subtotal including memo" (six years) and footnote 73's "£2.3 billion from this Budget": Table 6.3 prints +2,250m for lines 45 and 46 in 2029-30, against +1,980m for line 45 alone. +- `ab2026__package_parliament_tax_gap_measures` (1 row): lines 45 and 46 plus the tax-gap measures of Autumn Budget 2024, Spring Statement 2025 and Budget 2025 (footnote 73). Paragraph 2.46: "the total due to be raised from measures to close the tax gap announced during this Parliament to over £12 billion in 2029-30". +- `ab2026__package_property_and_savings_income_rates` (2 rows): exactly Table 6.1 lines 61 and 62. Paragraph 2.50: "84% of income tax payers will be unaffected by these changes"; "Around half of the revenue raised from this change is expected to come from the top 10% of households". +- `ab2026__package_breathing_space_for_households` (1 row): paragraph 3.2's "Government action at this Budget to provide breathing space for households", which the OBR expects to reduce CPI inflation by 0.1 percentage points in 2027. Crosses Table 6.1 lines; the red book lists none for this figure. Three scopes are in play, and the row keeps this key until tranche 2 settles them (the coordinator's call on review A's RB-17): Box 3.A's "breathing space for households" is lines 1 and 2 (the Household Energy Payment and the VAT cut); the OBR family keys its own CPI effect to lines 2 and 3 (`ab2026__package_fuel_duty_and_electricity_vat`); and Table 6.1 groups lines 1–11 under "Breathing space for families". Paragraph 1.38 repeats the 0.1 percentage points and is not staged. +- `ab2026__energy_debt_circuit_breaker` (3 rows): no Table 6.1 line. Paragraph 3.8: "a new debt strategy to address this and act as a circuit breaker on energy debt … via reforms to prevent debt building up and a one-off targeted debt relief scheme for eligible households". +- `ab2026__package_parliament_fuel_duty_decisions` (3 rows): Table 6.1 line 3 plus the fuel duty decisions of earlier events in this Parliament. Paragraph 3.13: "the government's decisions on fuel duty across this Parliament … compared with plans under the previous government"; footnote 98's baseline is the 5p cut reversed in April 2025 and annual RPI uprating. +- `ab2026__minimum_wage_uprating_april_2027` (2 rows): no Table 6.1 line (a regulation). Paragraph 3.18: "raising the National Living Wage and National Minimum Wages" from 1 April 2027. +- `ab2026__package_business_rates_rhl_sbrr_and_transitional_support` (2 rows): Table 6.1 lines 13 and 14, the three bullets of paragraph 3.22 (SBRR thresholds; the real-terms freeze; the SSB extension), to which paragraph 3.23's "As a result of this package" refers. The red book does not say whether paragraph 3.21's pubs relief (line 12) also counts. +- `ab2026__package_pubs_relief_35pc_total` (1 row): the whole 35% business rates relief for pubs, social clubs and live music venues in England: the 15% announced in January 2026 (paragraph 6.189; no AB2026 Table 6.1 line) plus Table 6.1 line 12's further 20ppt. Paragraph 3.21: "Taken together, this relief is a tax cut worth an average of over £3,000 per pub next year." Not line 12's key, since line 12 is only the 20ppt (rule 3; review A's RB-3). +- `ab2026__package_regulation_tariff_and_sandbox_business_savings` (1 row): the executive summary's "almost £800 million per year through further cuts to the administrative burdens of regulation, extending suspensions on tariffs, and introducing new cross-economy powers so firms can safely test new technologies faster". Crosses Table 6.1 line 16 (business tariff suspensions) with measures that have no Table 6.1 line. +- `ab2026__regulatory_administrative_savings` (5 rows): no Table 6.1 line. Chapter 6 decision "Regulatory administrative savings" (paragraph 6.36) and paragraph 4.52's "up to an estimated £640 million per annum of new gross administrative savings for business"; its £290 million, £116 million and £105 million parts are components. +- `ab2026__rolls_royce_gas_turbine_programme` (1 row): no Table 6.1 line named. Paragraph 4.80: "co-investment in a joint, 10-year, £2.5‑billion programme for next-generation gas turbine technologies for civil and defence aerospace"; paragraph 4.83 says it "has not been contracted". +- `ab2026__package_defence_investment_plan` (1 row): the Defence Investment Plan published in June 2026, which no single line covers; lines 40–42 carry its savings and funding. Paragraph 5.34: "The Defence Investment Plan will create approximately 60,000 new jobs by 2029‑30 compared with 2023‑24." The OBR family's row on this key (paragraph 3.3's £1.8 billion a year) is the plan's RDEL funding part, a component (review A's K-2). +- `ab2026__package_dwp_fraud_and_error_measures` (1 row): the "new measures" of paragraph 5.17, "expected to save an additional £1.4 billion over the forecast" (2026-27 to 2031-32). The red book doesn't list them. Paragraphs 6.19–6.22 are line 47's own package (its footnote 4; Policy Costings pp.54–58, which `uk_hmt_costings` keys as line 47 components), but the £1.4 billion reconciles with no printed basis for line 47: the line prints +600m over the forecast, +940m with Table 6.2 line 9's +340m, and the costings sum to +570m. So the figure stays off line 47's key (rule 3; review A's RB-8). +- `ab2026__package_parliament_welfare_fraud_and_error_savings` (1 row): this Budget's new fraud and error measures plus those already in the forecast. Paragraph 5.17: "bringing total savings from fraud and error to over £20 billion over the forecast". It doesn't say which earlier measures count. (Review A suggested dropping "parliament" from the one-row key's name; tranche 2 can rename it when it registers the key.) +- `ab2026__package_barnett_consequentials` (4 rows): the Barnett consequentials of "decisions confirmed at Budget", 2026-27 to 2029-30, excluding the technical reduction from lower employer pension contributions (paragraph 4.150). Crosses Table 6.1's England spending lines; no line of its own. The three-government £1.3 billion is `row_type: total`, and the Scottish, Welsh and Northern Ireland figures are components, one per government; `uk_devolved_govts` types the Welsh Government's own figures as Welsh Government components of this key. All four rows say "positive = increase in devolved government funding" (review A's K-7(b)). +- `ab2026__mod_counter_fraud_strategy` (1 row): no Table 6.1 line. Paragraph 5.32: "a new Counter Fraud Strategy in November, with investment in fraud and error analytics and closer working with the Public Sector Fraud Authority set to deliver £250 million of benefits". +- `ab2026__state_pension_triple_lock_adjustment` (2 rows): no Table 6.1 line (its savings fall after the forecast). Paragraph 5.23: "adjusting the Triple Lock from April 2030 so that the State Pension rises each year by the highest of 2.5%, inflation, or the amount required to maintain its value relative to earnings as reached in April 2029"; DWP's estimate (footnote 61). +- `ab2026__package_hmt_distributional_budget_2026` (1 row): HM Treasury's own grouping, the Budget 2026 policies modelled in Impact on households (paragraph 1.4): Table 6.1 lines 2, 3, 4, 5, 8, 11, 15, 26, 39, 49, 52, 59, 60, 61, 62, 72 and 95, plus the private landlord registration fee, which has no line. "Decisions announced at Budget 2026 (including those pre-announced where funding is allocated at Budget 2026)". It excludes line 1, the Household Energy Payment. +- `ab2026__package_hmt_distributional_since_ab2024` (1 row): HM Treasury's own grouping, the modelled policies and public service settlements "announced from Autumn Budget 2024 onwards up to and including Budget 2026" (paragraph 1.8): the lines above plus earlier events' measures, which are not Table 6.1 lines. + +The coordinator's shared spellings: no kept row has the scope of `ab2026__gas_standing_charge_moved_to_unit_rates`, `ab2026__pwlb_debt_relief_councils_severe_distress`, `ab2026__private_landlord_register_fee_65`, `ab2026__british_business_bank_defence_commitments_accelerated` or `ab2026__package_household_energy_payment_and_electricity_vat`. The dropped rows on those subjects were design: the £108 current gas standing charge and the end-2027 delivery date (parameters), the £500 million and £200 million of PWLB debt relief (allocations to two councils, which Table 6.1's footnote 2 excludes as adding nothing to borrowing), the £65 fee (a parameter), and the "up to £5 billion" NWF and BBB defence commitment (an investment total). No red-book figure covers exactly lines 1 and 2, or exactly lines 1, 2 and 3 (`ab2026__package_household_energy_vat_and_fuel_duty`). + +## Quantity and baseline proposals + +- **Proposed metrics:** + - fiscal aggregates (restated): `government_borrowing`, `government_borrowing_change`, `government_debt`, `government_net_worth`, `fiscal_balance`, `fiscal_balance_change` (also Chart 1.6's three bridge steps, which change the stability rule's headroom, i.e. the 2029-30 current budget), `debt_interest_change`, `fiscal_consolidation_share`; `block_grant_effect` (AB2025 list); + - household and business effects: `household_tax_change` (AB2025 list; worked cases), `average_cumulative_gain` (multi-year savings), `aggregate_household_saving` (AB2025 spelling; consumer savings), `bill_change_percent` (business electricity bills), `gross_earnings_change` (AB2025 spelling), `business_cost_saving` (administrative savings to business; replaces `operating_cost_change`, which the enum defines as an official operating-cost line), `housing_supply_change` (the 20,000 additional homes), `jobs_created_or_supported` (the NWF's 100,000, the BBB's 40,000, Rolls-Royce's 3,300 and the DIP's 60,000; `affected_count` counts individuals affected, so jobs are not it, review A's RB-9); + - shares with exact meanings: `unaffected_share` (the share printed as unaffected), `share_with_zero_liability` (half of RHL properties paying no rates), `share_in_non_gaining_deciles`, `share_in_net_recipient_deciles`, `income_mobility_share`, `share_in_top_half_of_expenditure` (Impact on households context). +- **Proposed units:** `businesses` (15 rows), `dwellings` (1). +- **Proposed baselines:** `hmt_no_budget_2026_modelled_policies` (paragraph 1.6, "a counterfactual in which the modelled policies were not introduced") and `hmt_no_policy_changes_from_ab2024_through_ab2026` (paragraph 1.8, "a counterfactual in which the modelled policies and spending settlements were not introduced"), one row each. Other rows have `baseline_policy: null`. + +## Not staged (rules 8 and 9) + +The rework dropped 1,267 of the first staging's 1,699 rows, and review A's fixes dropped 7 more (4 November), so 1,274 rows are not staged. The first staging's proposed keys that named only dropped rows are gone; their number can't be checked, because the first staging is in neither branch's history, so it is not given. + +| Category | Rows | Examples (locator) | +|---|---:|---| +| A. Measure parameters: rates, thresholds, payment amounts, dates, durations; worked-example inputs | 829 | 817 former `policy_parameter` rows, e.g. "£13.21" per hour (para 3.18), "£2,500" surplus earnings threshold (Impact on households para 1.4), "£13,319" withdrawal threshold (explainer FAQ). Also the £100 Household Energy Payment amount (4 rows, e.g. para 2.48); the £108 current gas standing charge (para 3.9); the £2,000 rise in the full new State Pension over the Parliament (para 5.23); six worked-case inputs, e.g. Tom's "£10,300" income. | +| B. Spending allocations: programme funding, capitalisations, investment totals, spending levels | 221 | 166 programme amounts that are not a Table 6.1 line's printed impact (table above), e.g. "£120 million" for the AI Security Institute (para 4.130), "£30 million" for Cardiff Parkway (para 4.157), "£1.5 billion" for the Social and Affordable Homes Programme (para 5.4); 46 investment totals, e.g. NWF "£15.4 billion" (para 4.44), Your First Home "£4.7 billion" (para 5.5); public sector net investment (Table 1.2, 6); departmental spending levels (2); £200 million of private AI model credits (para 4.132). | +| C. Financing: DMO remit, gilts, Treasury bills, NS&I, cash requirements, financial transactions | 177 | DMO net financing requirement "£258.6 billion" (Annex A.8); Table A.1 gilt sales by maturity; CGNCR "£144.1 billion" (para 1.47); Table 1.4 financial transactions by programme, e.g. Student Loans "15.9" (55 rows); Sovereign AI "£60 million" (para 4.135). | +| D. Contingent liabilities | 14 | Table 1.5, e.g. Department for Energy Security and Net Zero "1.2-1.7"; Total reasonable worst case "4-4.5". | +| E. Programme inputs, scope counts and targets | 25 | "670" HMRC compliance officers to recruit (paras 2.42, 6.151); tariffs on "over 100" food products (para 3.17); "around 10,000" homes the Social and Affordable Homes Programme funds (para 6.114); the 25% administrative-burden target worth "£5.6 billion" (para 4.51); "over 90% of England's population will have a devolution agreement in place" (para 4.68), a coverage count that includes existing agreements (review A's RB-7, dropped 4 November). | +| F. Effects of policies outside this Budget | 3 | "more than 100" businesses using the Global Talent funder pathway since Budget 2025 (para 4.112); "over £5 billion" of services exports from the Switzerland and South Korea deals (para 4.124); "over £2 billion of net progress secured" against the administrative-burden target (para 4.51), progress before this Budget (footnote 137 cites a July 2026 annex; para 4.52 counts this Budget's £640 million separately; RB-7). | +| G. Repeats beyond two of one claim | 4 | The Household Energy Payment's "£2.6 billion" in para 3.5 and Box 3.A, and "up to 20 million households" in para 3.3 and Box 3.A. Kept: the £2.6 billion of the executive summary and para 2.48, and the 20 million of the executive summary and paras 2.48 and 3.5 (review A's RB-2; see Review A fixes). | +| H. The rework brief's drop list | 1 | Impact on households para 1.10's "over four times as much in public spending than they pay in tax" (`spending_to_tax_ratio`, which the brief's item 1 names for removal; RB-13). Row 365's 60% beside it stays as a printed value. | + +Rule 9 moved 74 kept rows from proposed keys to a Table 6.1 line's key: the 66 Table 6.3 item cells and the 160,000 employees (proposed keys such as `ab2026__package_tax_gap_timely_payment`, now line 45 components); four food-tariff savings (now line 10 components); the £3 billion and £1.7 billion DIP parts (now line 41 components); and the Your First Home count (now line 37). One row stays off a line's key: the £1.4 billion of DWP fraud savings, which reconciles with no printed basis for line 47 (rule 3; see its proposed key). + +### Other material not staged + +- **Tables 6.1, 6.2 and 6.4** belong to `uk_hmt_tables`. Table 6.3 is a separate printed breakdown and is staged here. +- **No Impact on households bar readings** (README rule 4). Figures 1.A–1.E print no data labels. Chart 1.6's six data labels are staged. +- **Words without numbers** ("hundreds of pounds a month", "thousands of jobs") are not turned into numbers. +- **Footnote 73's earlier-event yields** (£6.5 billion, over £1 billion, £2.4 billion) are other fiscal events' measures; only this Budget's £2.3 billion and the £12 billion total are staged. +- **Background macro forecasts** that score no measure (GDP growth, inflation, employment, Table 1.1), departmental efficiency histories, Annex B budgets and Annex C charts are not staged. +- **The abbreviated 29 October explainer** has no quantitative content. +- **Other figures not staged (review A's RB-20(c)):** paragraph 5.17's Motability saving "over £1 billion over the next five years" (no Table 6.1 line); paragraph 3.7's £150 from Budget 2025 (an earlier event's measure); paragraph 4.36's reprioritisation savings (spending allocations); paragraph 4.42's National Wealth Fund and British Business Bank outcomes to date (effects before this Budget); and paragraph 6.9's £150 million (an allocation). +- **Paragraph 1.38's** repeat of the OBR's 0.1 percentage point CPI effect (row 185 stages paragraph 3.2's). + +## Judgement calls for the coordinator + +- **`spending_to_tax_ratio` is dropped (review A's RB-13).** The 3 November finish kept paragraph 1.10's "over four times" as a distributional statement. Review A read the rework brief's item 1 as a named removal list whose only exception is a Table 6.1 cost or yield: neither primary prints another spending-to-tax ratio, so the list can only mean this row, and HM Treasury frames paragraph 1.10 as "context beyond the impact of recent government policy decisions". The row is dropped (category H). The 60% row beside it, Table 2.C and the other Impact on households context rows stay as printed values. +- **Mislabelled shares beyond the 84%.** Besides the 84% (`unaffected_share`, never 16%), BADR's "three-quarters … will still receive relief on their entire gain" is the unaffected share too; "half of all RHL properties … will not pay business rates at all" includes properties already paying none (`share_with_zero_liability`); and Impact on households' 20%, 60%, 59% and approximately 20% are not affected shares (proposals above). The registered `share_no_change` is a household-income measure, so the 84% of income tax payers follows the brief's `unaffected_share`. +- **Registered metrics replace AB2025-era proposals.** The four "around £50 off the annual Ofgem price cap" rows and the three energy-debt "£30" rows now use the registered `energy_bill_change` (unit `gbp_per_household`), which the enum mints for HM Treasury bill figures; the India agreement's GDP effects use `gdp_level_effect` in GBP (the AB2025 IPPR precedent). +- **Financial transactions and public sector net investment are dropped as financing and spending levels.** Table 1.4 prints forecast levels of lending by programme, not Budget effects. Public sector net investment is an OBR aggregate, but the brief lists `public_investment_share` for removal. +- **Jobs and induced homes stay; delivery targets go.** Estimated jobs (NWF 100,000; BBB 40,000; Rolls-Royce 3,300; DIP 60,000; proposed `jobs_created_or_supported` since review A) and Your First Home's "estimated 20,000 new homes" are estimated effects. The 10,000 homes the Social and Affordable Homes Programme funds (in line 35's title), robotic procedures rising to 500,000, 2,000 learners and the 650,000 workforce requirement of the infrastructure pipeline are delivery targets of allocations. +- **The BBB's 40,000 jobs is now `restated`.** Footnote 135 cites the British Business Bank's press release. The NWF's 100,000 is `restated` too (footnote 134 cites the National Wealth Fund's own statement). + +## Printed problems and differences + +- **Spending figures that differ from Table 6.1:** + - Social and Affordable Homes Programme: £1.5 billion (paras 5.4, 6.114) against line 35's -1,750 over 2027-28 to 2030-31. + - Early years books: "£5 million a year for three years from 2027-28" (paras 3.20, 6.122) against line 9's -5 in 2026-27, 2027-28 and 2028-29. The amount agrees; the years do not. + - Local apprenticeship services £100 million (line 22: -120); Good Growth Funds £285 million in 2027-28 (line 20: -340); Strategic Authorities £150 million (line 25: -180); Union Learning Fund £15 million a year (line 73: -20 a year); Sovereign AI £60 million (Table 6.2 line 4: -45 a year). + - DWP fraud and error: "an additional £1.4 billion over the forecast" (para 5.17) against line 47's +600m in total (+940m with Table 6.2 line 9; the Policy Costings' +570m). +- **Regulatory savings target:** paragraph 6.36 prints "£5.6 million"; paragraph 4.51 prints "£5.6 billion". The executive summary's "almost £800 million per year" and paragraph 4.52's "up to … £640 million per annum" have different printed scopes; both stay. +- **Repeated amounts that disagree (not staged after rule 8):** local AI partnerships £30 million (para 4.135) and £15 million (para 6.101); Leeds College of Building £28 million (para 4.71) and £15 million (para 6.53); business tariff suspensions on 269 goods (para 3.28), 350 goods (para 4.147) and 361 extensions plus 72 new suspensions (line 16's title). +- **Pubs relief:** the text prints an extra "20%"; Table 6.1 prints "20ppts". +- **Table 1.3** labels the new forecast "November 2026 forecast" in an October Budget. Chart 1.6 prints 14.5 where the text says £15 billion. "Debt is lower at the end of the forecast" fits public sector net financial liabilities (83.2% to 81.7%), while public sector net debt goes from 95.5% to 95.6%. +- **Paragraphs 6.225 and 6.226** repeat the Machine Games Duty measure. Annex A footnote 181 points to A.17 for green gilts, which A.19 covers. +- **Pension Tax Allowance explainer:** the FAQ prints "£13.319" for £13,319; the explainer prints both £13,036.40 and the rounded £13,037, and "up to £94" beside Steph's £93.28. The 28 October version's FAQ repeats a question and prints "part-time wok"; the version HM Treasury republished on 29 October (`83f8c894…`) fixes both and still prints "£13.319". + +## Verification + +- **Checker:** `PYTHONPATH=. uv run -q python pipeline/ab2026_harvest_contract.py sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook` reports 425 rows, 0 problems (4 November, after review A's fixes, with the coordinator's tightened checks). +- **Determinism:** two runs of `stage.py` write the same `claims_staged.jsonl.gz` and an unchanged `manifest.jsonl`. COUNTS.json pins the gzip's sha256. +- **Spot check (the rework's, 29 October; row numbers are the rework's, which held at 4f424b9):** 30 rows drawn with `random.Random(20261029).sample(range(432), 30)` (0-based row numbers), each re-opened at its locator in the hashed primaries: red-book and Impact on households pages extracted with `pdftotext -layout -f N -l N`; table cells read against the printed row and column. All 30 match on value, sign, unit and period. + +| Row | Locator | Printed | Staged value and unit | Period | +|---:|---|---|---|---| +| 44 | Table 1.2, Current budget deficit, 2027-28 | 0.5 | 0.5 percent of GDP | 2028, fy 2027-28 | +| 53 | Table 1.2, Public sector net borrowing, 2030-31 | 1.8 | 1.8 percent of GDP | 2031, fy 2030-31 | +| 68 | Table 1.2, Cyclically adjusted primary deficit, 2027-28 | -0.5 | -0.5 percent of GDP | 2028, fy 2027-28 | +| 75 | Table 1.2, PSNFL, 2028-29 | 83.8 | 83.8 percent of GDP | 2029, fy 2028-29 | +| 92 | Table 1.2, Public sector net worth, 2027-28 | 63.4 | 63.4 percent of GDP (inverted, as printed) | 2028, fy 2027-28 | +| 115 | Table 1.3, November 2026 forecast, 2029-30 | 73.8 | £73.8 billion PSNB | 2030, fy 2029-30 | +| 118 | Table 1.3, Difference, 2026-27 | 17.7 | £17.7 billion (positive = higher PSNB) | 2027, fy 2026-27 | +| 125 | Table 1.3, Underlying forecast differences, 2028-29 | 11.4 | £11.4 billion | 2029, fy 2028-29 | +| 130 | Table 1.3, Debt interest, 2028-29 | 12.0 | £12.0 billion | 2029, fy 2028-29 | +| 133 | Table 1.3, Other forecast changes, 2026-27 | -4.0 | -£4.0 billion | 2027, fy 2026-27 | +| 138 | Table 1.3, Memo: current budget deficit (underlying), 2026-27 | 0.6 | £0.6 billion | 2027, fy 2026-27 | +| 145 | Table 1.3, Total effect of policy decisions, 2028-29 | 2.1 | £2.1 billion (positive = higher PSNB) | 2029, fy 2028-29 | +| 178 | para 2.46 | over £12 billion | £12 billion, range_low, yield | 2030, fy 2029-30 | +| 185 | para 3.2 | 0.1 percentage points | 0.1 pp reduction in CPI | 2027, annual | +| 216 | para 3.16 | around £150 per year | £150 a year per EV driver | 2027, annual | +| 217 | para 3.17 | £120-185 million per annum | £120 million, range_low, consumer saving | 2026, publication year | +| 226 | para 3.21 | over £3,000 per pub | £3,000, range_low | 2028, fy 2027-28 | +| 234 | para 3.22 | 120,000 shops | 120,000 businesses | 2029, two years to 2028-29 | +| 235 | para 3.22 | £3,250 over the two years | £3,250, cumulative | 2029, two years to 2028-29 | +| 256 | para 4.146 | Wales's economy by £80 million | £80 million GDP, Wales component of line 77 | 2026, publication year | +| 273 | para 6.36 | up to £640 million | £640 million, range_high, saving to business | 2026, publication year | +| 299 | Table 6.3 row 4, 2028-29 | +0m | £0, line 45 component | 2029, fy 2028-29 | +| 327 | Table 6.3 row 9, 2026-27 | +0m | £0, line 45 component | 2027, fy 2026-27 | +| 337 | Table 6.3 row 10, 2030-31 | +0m | £0, line 45 component | 2031, fy 2030-31 | +| 350 | Table 6.3 subtotal, 2031-32 | +3,160m | £3,160 million yield, line 45 | 2032, fy 2031-32 | +| 354 | Table 6.3 memo, 2029-30 | +270m | £270 million yield, line 46 | 2030, fy 2029-30 | +| 356 | Table 6.3 memo, 2031-32 | +265m | £265 million yield, line 46 | 2032, fy 2031-32 | +| 369 | Impact on households para 2.10 | £33,500 | £33,500 gross household income, decile 3 | 2029, fy 2028-29 | +| 395 | Table 2.C, fifth decile, 1 adult | 30,400 | £30,400 | 2029, fy 2028-29 | +| 400 | Table 2.C, fourth decile, 1 adult | 26,300 | £26,300 | 2029, fy 2028-29 | + +### Tranche 1 finish (3 November 2026) + +The rework stopped before its report, so on 3 November each instruction of `briefs/rework-hmt-redbook.md` (on the staging branch) was checked against the rows: + +- **Removed metrics.** No `policy_parameter` row remains, and of the nine allocation and financing metrics only `spending_to_tax_ratio` remains, on one row (paragraph 1.10's "over four times"). It stays: it is a distributional statement printed in Impact on households, which item 3 of the brief keeps, not the fiscal aggregate the drop list targets. See the judgement calls above. +- **Rule 9 and the "Also fix" section.** The 84% row is `unaffected_share` as printed. No row carries `ab2026__package_tax_gap_timely_payment`; line 45's items carry line 45's key as components. No measure without a Table 6.1 line is named as a package. No kept row has the scope of the coordinator's shared spellings (see "Proposed measure keys"). +- **`component`.** Six rows still used `component` for a chart bar; they now use `chart_bar`. +- **Stale files.** The family had no REPORT.md or spot-check files left. +- **Keys** were harmonised across families on 3 November; `stage.py`'s `KEY_MAP` lists each rename, and the proposed keys above give the final spellings. +- **Checker:** 0 problems. **Determinism:** a re-run of `stage.py` reproduces the gzip and manifest byte for byte. +- **Spot check: not repeated.** The brief asked for 15 random rows re-opened at their locators. The 3 November session's network policy refused gov.uk and assets.publishing.service.gov.uk (HTTP 403 at the proxy), so no primary could be fetched, and no row was re-opened. The 30-row check above is the rework's own; nobody independent has checked this rework yet. + +## Key harmonisation, 3 November 2026 + +The coordinator gave each scope one key across families (tranche 1, task 3.4). This family's renames: + +- `ab2026__package_obr_forecast_policy_effects` → `ab2026__package_government_decisions_since_march_2026` +- `ab2026__package_budget_barnett_consequentials` → `ab2026__package_barnett_consequentials` +- `ab2026__defence_investment_plan` → `ab2026__package_defence_investment_plan` + +The OBR's Table 3.1 "Total effect of Government decisions" prints the same figures as Table 1.3's "Total effect of policy decisions" (2.1 in 2028-29 in both), so the red book's restatement shares the OBR family's key. The Barnett key names the scope the Welsh Government's figures share (£450 million here, £448m there). The Defence Investment Plan crosses Table 6.1 lines 40–42, so it is a package, shared with the OBR's DIP funding row. Table 1.3's Tax and Spending parts stay components of the total, as staged. + +## README rule 10, 3 November 2026 + +Table 1.3's total effect of policy decisions and its tax and spending parts (18 rows) already took `decisions_effect_on_borrowing`, and its two memo lines on the current budget deficit (11 rows) already proposed `fiscal_balance_change`. The memo rows' sign convention named PSNB, so `stage.py` now states which way the current budget deficit moves on rows 138–142 (underlying forecast differences) and 161–166 (policy decisions). No value or sign changed. The contract checker reports 432 rows, 0 problems, and a re-run of `stage.py` reproduces the gzip byte for byte. + +## Review A fixes, 4 November 2026 + +Review A (issue comment 6635870934 on #231, at 4f424b9) approved this family with fixes. `stage.py` applies each as an explicit, commented step after the rows, indexed by 4f424b9's row numbers, and drops rows only at the end. Row numbers in this section are 4f424b9's too, as in the review; the seven dropped rows move every later row up to seven places earlier in the staged file (row 365 here is row 359 there). No primary was re-opened for this round; every new quote and value comes from the review or the row. The coordinator then finished RB-18 and RB-19 from two pinned primaries (below). 432 rows → 425; `own` 263 → 257, `restated` 169 → 168; 6 hashed primaries. + +- **RB-1:** paragraph 5.17's two totals "over the forecast" (rows 265 and 266) sit at 2031-32 with the forecast's horizon; row 265 is `cumulative`, row 266 keeps `range_low`; row 267 is `point_in_time`. +- **RB-2:** rows 191 and 200 dropped (the £2.6 billion's third and fourth printings); row 179 dated 2026-27. The same rule drops rows 188 and 201, which repeat "up to 20 million" in paragraph 3.3 and Box 3.A: once RB-11 put rows 180 and 201 in England, four rows shared one claim identity (the coordinator's new duplicate-claim check, H-3, rejects more than two). +- **RB-3:** row 226 moved to `ab2026__package_pubs_relief_35pc_total`. +- **RB-4:** Chart 1.6's bridge steps (rows 21, 22, 24) propose `fiscal_balance_change` with the stability rule's sign; row 24 carries the government-decisions key; all six rows name the stability rule, and rows 20, 23 and 25 their forecast vintage and policy scenario. +- **RB-5:** row 246 is a line 29 component (its proposed key is retired); rows 232–237 are line 14 components; row 254 is a line 77 component. +- **RB-6:** rows 219–220's component says it contains rows 217–218. +- **RB-7:** rows 247 and 252 dropped (the coordinator's call), with their one-row keys `ab2026__package_parliament_regulatory_burden_reduction` and `ab2026__english_devolution_agreements`; categories F and E list them. +- **RB-8:** the DWP fraud key's scope and row 265's note rewritten; rows 265–266 `hmt_published_estimate_method_unspecified`. +- **RB-9:** rows 245, 246, 253 and 268 propose `jobs_created_or_supported`; row 245 is `restated`; rows 253 and 268 `hmt_published_estimate_method_unspecified`. +- **RB-10:** rows 11 and 240 dated 2027-28 ("per year from 2027-28"); rows 6 and 11 `hmt_costing_obr_certified`. +- **RB-11:** geography corrected on rows 5, 8, 9, 14, 180, 190, 196–199, 201–205, 258, 269 and 275, and "Great Britain" written `GB` throughout (the harvest's closed list). +- **RB-12:** rows 30–39's sign conventions; rows 30, 31, 34, 35, 36 and 38 are ONS outturns (`administrative_data`, `administrative_fact`). +- **RB-13:** row 366 dropped (category H). +- **RB-14:** the republished explainer is a 0-row primary (manifest line 6). +- **RB-15:** repeats share a dating (rows 9, 10, 14, 196, 205, 248–251, 271, 273), and rows 0, 19, 215 and 244 take the multi-year convention. +- **RB-16:** rows 143–166's `reform_hint` is "Total effect of policy decisions". +- **RB-17:** rows 185, 216, 226 and 237 have conventions `signs.py` reads; row 185 keeps its key, with the three scopes in its bullet; row 182 is 0.84 `share`. +- **RB-18:** rows 33 and 37 are HM Treasury's own arithmetic; rows 6, 7, 8, 10, 11, 12 and 14 take their repeats' source models (row 5's and row 9's repeats are already `arithmetic`; row 13 has no repeat and keeps its label); row 222 is a worked example (`arithmetic`, with its subgroup); row 183 `decile_10`; row 184 dated 2027-28, medium confidence, `hmt_published_estimate_method_unspecified`; row 168 loses `presentation`; row 267 `hmt_published_estimate_method_unspecified`. Row 194's note gives footnote 84's "fuel stressed" definition, which the coordinator read from the red book (19b337ac…). +- **RB-19:** rows 15, 29, 41 and 42 quote only their sentence; rows 103, 104 and 167 lose their leading paragraph numbers; locators of rows 172, 190, 227, 248 and 249 corrected. Rows 365 and 368 quote their whole sentences, which the coordinator read from Impact on households (36cd5afb…); row 365's sentence includes the lead-in that dates para 1.10's bullets to 2028-29 (row 366 is dropped). +- **RB-20:** (a) the unverifiable "234 proposed keys" figure is removed; (b) the spending test reads "the per-year amount equals the line's", which rows 224 and 276 pass, so they stay; (c) five more figures listed under "Other material not staged". +- **RB-21:** this lane folder's gzip and NOTES now match #231's; the 40 proposed-metric rows set `metric: null` explicitly. Table 6.3's duplication of Table 6.1 lines 45 and 46 (`uk_hmt_tables`) is left to tranche 2's cross-family dedupe. +- **K-7(b):** row 258 is the Barnett `total`, and rows 258–261 carry the sign convention. +- **K-7(c):** row 222 already proposes `gross_earnings_change`, the AB2025 spelling; no change. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/claims_staged.jsonl.gz new file mode 100644 index 000000000..6a9d6e262 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/manifest.jsonl new file mode 100644 index 000000000..116114aa6 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/manifest.jsonl @@ -0,0 +1,6 @@ +{"access": "local copy", "bytes": 4657025, "date": "2026-10-28", "doc_type": "pdf", "note": "Historical 28 October download supplied by the coordinator as a local download; hashed from that copy. Retained under changed-primary rule 7, not a blocked-fetch fallback. pdftotext -layout diff finds only wording removed from paragraph 6.207 heading; no numerical changes. No rows cite this version.", "publisher": "HM Treasury", "retrieved": "2026-10-29", "sha256": "bed70546c026487e3141799968f6df08210c182b0695fed0e8adf7efd6697e03", "title": "Budget 2026 (HC 726), 28 October version", "url": "https://assets.publishing.service.gov.uk/media/6ae20b85460c1346f7be784e/E03668986_HMT_Budget_2026_ELAY__2_.pdf"} +{"access": "direct", "bytes": 4679545, "date": "2026-10-28", "doc_type": "pdf", "note": "Fresh HTTP 200 curl -sSL fetch with specified Safari User-Agent at approximately 2026-10-29T15:41Z. Hash matches supplied 29 October download. All red-book rows cite this version. Read with pdftotext -layout; compared against historical 28 October version.", "publisher": "HM Treasury", "retrieved": "2026-10-29", "sha256": "19b337aced8fe47de1d6ee462dabf75155110d347c38123b6380d90f09e97b93", "title": "Budget 2026 (HC 726), current version", "url": "https://assets.publishing.service.gov.uk/media/6ae20b85460c1346f7be784e/E03668986_HMT_Budget_2026_ELAY__2_.pdf"} +{"access": "direct", "bytes": 197606, "date": "2026-10-28", "doc_type": "pdf", "note": "Fresh HTTP 200 curl fetch with assignment browser User-Agent at 2026-10-29T15:41:44Z; identical to the supplied 29 October copy. Read with pdftotext -layout.", "publisher": "HM Treasury", "retrieved": "2026-10-29", "sha256": "36cd5afb4fceca2cecba0d065974ffe8280888e15ed852c129339439e539469c", "title": "Impact on households: distributional analysis to accompany Budget 2026", "url": "https://assets.publishing.service.gov.uk/media/6ae1850f16428df53760627d/Impact_on_households.pdf"} +{"access": "govuk_api", "bytes": 24883, "date": "2026-10-28", "doc_type": "govuk_api_json", "note": "Fresh HTTP 200 curl fetch with assignment browser User-Agent at 2026-10-29T15:41:44Z. Hash is API response bytes. Matches supplied 28 October API response, with full 19,727-character details.body; all explainer rows cite this freshly fetched version.", "publisher": "HM Treasury", "retrieved": "2026-10-29", "sha256": "cc3ec22eb55f4c827c301bc67b06aa7482e4970ef7e1cec644bc382dac0dbb25", "title": "Pension Tax Allowance Explainer", "url": "https://www.gov.uk/api/content/government/publications/pension-tax-allowance-explainer/pension-tax-allowance-explainer"} +{"access": "local copy", "bytes": 9816, "date": "2026-10-28", "doc_type": "govuk_api_json", "note": "Distinct supplied 29 October API response supplied by the coordinator as a local download. details.body is a 353-character introduction, omitting the full explanation, counts, examples and FAQ found in the fresh/28 October response. Not a blocked-fetch fallback; retained under changed-primary rule 7. No rows cite this abbreviated version.", "publisher": "HM Treasury", "retrieved": "2026-10-29", "sha256": "791d2573bafc67fcfd89567dab55c0239dd26febc9feec44d10f2be4ae21a9e4", "title": "Pension Tax Allowance Explainer", "url": "https://www.gov.uk/api/content/government/publications/pension-tax-allowance-explainer/pension-tax-allowance-explainer"} +{"access": "govuk_api", "bytes": 24356, "date": "2026-10-28", "doc_type": "govuk_api_json", "note": "Republished version, fetched by review A on 4 November 2026 (content API updated_at 2026-10-29T15:55:28Z, 19,206-character body). All twelve explainer rows' quotes and values are unchanged in it; it fixes 'part-time wok', drops a repeated FAQ question, and still prints '£13.319'. No rows cite this version; they cite cc3ec22e…, which they were read from.", "publisher": "HM Treasury", "retrieved": "2026-11-04", "sha256": "83f8c894ce76a8e9ce80854f9b7287442d5f6b521a4eb260e5cfacae1c98909b", "title": "Pension Tax Allowance Explainer (republished 29 October)", "url": "https://www.gov.uk/api/content/government/publications/pension-tax-allowance-explainer/pension-tax-allowance-explainer"} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/NOTES.md new file mode 100644 index 000000000..2173ce099 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/NOTES.md @@ -0,0 +1,61 @@ +# uk_hmt_tables: HM Treasury Budget 2026 Tables 6.1, 6.2 and 6.4 + +Staged 2026-10-29 by `pipeline/stage_ab2026_hmt_tables.py`, which is vendored, so the staging re-runs byte for byte. Source slug `hm_treasury`, source_model `hmt_costing_obr_certified`. + +On 4 November 2026 the stager took review A's fixes T-1 to T-9. The workbooks weren't re-fetched in that session, so its output was produced by running the stager on the two workbooks' cells rebuilt in memory from the 29 October rows (every row's locator names its cell), the five section fills and Table 6.2's total row (cells E14:J14, as review A read them). Under the 29 October stager, that rebuild reproduces the 29 October claims file byte for byte. The rebuild script is on the staging branch (`harvest-staging/ab2026/tables-reconstruction/`); a run of the stager on the pinned workbooks should give this file's sha256. + +- **Rows:** 768. + - Table 6.1: 98 measure lines and 3 total rows, each across 6 fiscal years (606 rows). + - Table 6.2: 9 lines and its total row, each across 6 fiscal years (60 rows). The total's 6 rows come last in the file, after Table 6.4's, so the rows staged before it keep their positions. + - Table 6.4: 17 lines across 6 fiscal years (102 rows). +- **Primaries:** 2 workbooks. + +## Access recipe + +The two XLSX attachments of [Supporting documents for Budget 2026](https://www.gov.uk/government/publications/supporting-documents-for-budget-2026), listed through the gov.uk content API (`/api/content/government/publications/supporting-documents-for-budget-2026`). + +- **First download:** 2026-10-28, `curl -sSL` with a browser User-Agent. +- **Second download:** 2026-10-29. Both hash to the pinned sha256, which the stager checks before writing anything. +- **Reading:** openpyxl with cached values (`data_only=True`), so every value is the number HM Treasury stored, not a recomputed formula. + +## What is staged + +- **Table 6.1:** every cell of every measure line, 2026-27 to 2031-32. + - Fields: `metric: revenue_change`, `unit_concept: gbp`, value = cell × 1e6. Since 3 November, the three total rows take `decisions_effect_on_borrowing` (README rule 10), with no value or sign changed. + - Conditions carry the line (`table_line`), the Tax/Spend head (`head`) and the line's headings (`heading`). + - `heading` is "section > sub-heading". The workbook shades its five top-level section headings (cells B5, B27, B43, B58 and B82, fill FFFFCCCC), as the red book shades them, and each sub-heading belongs to the last section above it. So lines 12–19 read "Breathing space for families and businesses > Breathing space for businesses". + - Column D of both sheets, headed "Fiscal Head check (hide)", is a hidden check column the red book doesn't print (15 lines read "SUBTOTAL", line 30 has "Tax" on a Spend line and line 44 "RAME" on a Tax line). It isn't staged (review A, T-3); `head` is the printed Tax/Spend head. + - Titles are staged with whitespace normalised: sixteen titles carry tabs, trailing spaces or no-break spaces in the workbook, collapsed to single spaces. Lines 45 and 47 print footnote marker 4 as a superscript run glued to the title; the stager strips it (review A, T-5). + - The three total rows carry the package keys `ab2026__package_total_policy_decisions`, `…_total_tax_policy_decisions` and `…_total_spending_policy_decisions`. + - The lines don't sum exactly to the totals: by up to £10m a year for the grand total and up to £15m for the Tax and Spend totals (the Spend total in 2029-30). Footnote 1 says totals may not sum due to rounding, and the rows are staged as printed. + - The totals' note quotes footnotes 1 and 2. Footnote 2 sets their scope: it excludes the PWLB debt relief and the landlord registration fee ("no net increase to borrowing"), and "AME and tax costings with an impact of less than +-£10 million in every year". +- **Table 6.2:** financial transactions, `proposed_metric: financial_transaction_cash_impact` (cash impact on the public sector, not borrowing). + - Each line carries the measure key of the Table 6.1 measure it belongs to. + - Line 4 (Sovereign AI) has no Table 6.1 line and so has its own registered key. + - Line 6, "Reprioritise financial transactions budgets to fund the new equity loan scheme", has `measure_key: null` and the proposed key `ab2026__your_first_home_ft_reprioritisation` (scope: Table 6.2 line 6; no Table 6.1 line), as Table 6.1 line 34's reprioritisation has its own line (review A, T-1). Line 5 is the scheme itself (its cells sum to −4,700, the red book's "£4.7 billion", para 5.5) and keeps `ab2026__your_first_home_equity_loan`. Both lines are whole rows, so they mustn't share a key: marking both as parts of the scheme would net it to an inflow. + - The total row, "Total cash impacts of financial transactions" (cells E14:J14: −230, −1,160, −2,290, −2,795, −3,675, −3,850), is staged as 6 `row_type: total` rows with `measure_key: null` and the proposed key `ab2026__package_total_financial_transactions` (scope: exactly Table 6.2 lines 1–9), with footnote 1's rounding note (review A, T-2). +- **Table 6.4:** recostings at Budget 2026 of measures announced earlier. + - Each row carries **that event's** registry key, with `conditions.recosting_of`: + - lines 1–14: `autumn_budget_2025` (`data/uk/ab2025_measures.json`); + - lines 15–16: `autumn_budget_2024`; + - line 17: `spring_budget_2024` (`data/uk/events/*_measures.json`). + - The cells are £ million. The table's units header prints "(£)", and its footnotes give no unit, but every value cell carries the number format `\+#,##0"m"` (I9 = 7130 displays as "+7,130m"), so the rows are `parse_confidence: high` (review A, T-6). The sheet is read by name ("Rounded Table 6.4"), not as the workbook's active sheet. + - Footnote 2 (cell F25) sets the table's scope: "Measures that interact with new measures announced at this Budget, for example on savings income tax changes, as well as measures that extend an existing policy such as personal tax threshold measures have not been included." (review A, T-6). + +## Conventions (load-bearing) + +- **Sign.** The tables print no legend. `conditions.sign_convention` on every Table 6.1 and 6.4 row reads "positive = yield to the Exchequer (reduces borrowing); negative = cost to the Exchequer". The convention is observed from the rows themselves: the bank surcharge rise is positive, the Household Energy Payment negative. The AB2025 Table 4.1 harvest uses the same convention. Values are NOT re-signed. +- **Table 6.2's sign.** Every Table 6.2 row reads "positive = improves the public sector's cash position (cash inflow or lower outflow); negative = worsens it". The National Wealth Fund's investment is negative; line 6's positives are a lower outflow (budgets reprioritised away from other financial transactions), not an inflow (review A, T-9). +- **scoring_method `final`.** Table 6.1 is the certified post-behavioural total. The static and behavioural legs are in the policy costings document (family `uk_hmt_costings`). +- **period** is the FY end year (2026-27 → 2027), with `conditions.fy` holding the label. +- **geography** is "UK" on every row: these are Exchequer impacts. A measure's own scope (for example England only for the Household Energy Payment) is in its title, verbatim in `reform_hint`, and in the registry. +- **quote** is the line's title and the cell, as printed (Open Government Licence). + +## For tranche 2 + +- Table 6.2's proposed `financial_transaction_cash_impact` and the registered `cash_requirement_change`, which `uk_obr_tables` uses for paragraph 3.20's £1.9bn rise in the Government's financing requirement from the National Wealth Fund and British Business Bank transactions, both measure the cash effect of the same transactions: one as a cash impact, one as the financing requirement. The ingest settles the metric. +- Table 6.3 of the red book prints Table 6.1 lines 45 and 46 again (`uk_hmt_redbook` rows staged from it); tranche 2 dedupes identical HM Treasury figures across the two families. + +## Not staged + +- Table 6.1's footnote 2 names two measures with "no net increase to borrowing" that the table excludes: debt relief for councils in severe financial distress through the PWLB, and a landlord registration fee for the private rented sector. They have no figures, so there's nothing to stage. The registry doesn't list them. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz new file mode 100644 index 000000000..5f1f6d709 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/manifest.jsonl new file mode 100644 index 000000000..f9e549154 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/manifest.jsonl @@ -0,0 +1,2 @@ +{"url": "https://assets.publishing.service.gov.uk/media/6ae187a2779378370fd80a9a/Table_6.1_and_6.2_Budget_2026_Policy_Decisions.xlsx", "title": "Table 6.1 and 6.2 Budget 2026 Policy Decisions", "date": "2026-10-28", "publisher": "HM Treasury", "sha256": "359958df6b1ab9746073725f6f8017ebdbb55040e57cf28612891f1e294a7f15", "bytes": 67126, "doc_type": "xlsx", "access": "direct", "retrieved": "2026-10-28", "note": "Attachment of https://www.gov.uk/government/publications/supporting-documents-for-budget-2026. Downloaded 2026-10-28 and again 2026-10-29 with a browser User-Agent; both downloads hash to the pinned sha256."} +{"url": "https://assets.publishing.service.gov.uk/media/6ae0f93fe4367e5c8b0467d6/Table_6.4_Recostings_Table.xlsx", "title": "Table 6.4 Measures announced at Spring Statement 2026 or earlier that will take effect from 29 October 2026 or later", "date": "2026-10-28", "publisher": "HM Treasury", "sha256": "b0449df1737f128fdc32ffeffbe7ed11876e7ab1c80d14dd9908e68a38386d3e", "bytes": 76402, "doc_type": "xlsx", "access": "direct", "retrieved": "2026-10-28", "note": "Attachment of https://www.gov.uk/government/publications/supporting-documents-for-budget-2026. Downloaded 2026-10-28 and again 2026-10-29 with a browser User-Agent; both downloads hash to the pinned sha256."} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/NOTES.md new file mode 100644 index 000000000..82484ecce --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/NOTES.md @@ -0,0 +1,637 @@ +# uk_ifs_ab2026 — Institute for Fiscal Studies, Autumn Budget 2026 + +**Working files.** `stage.py`, which writes `claims_staged.jsonl.gz` and is the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/ifs/uk_ifs_ab2026/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. `stage.py` embeds every row, so it rebuilds the gzip with no network and no primary file. `.ab2026-primaries/uk_ifs_ab2026/` is the harvest's local primaries folder, which no commit carries: the repository holds no primary bytes. Fetch each deck from its `manifest.jsonl` URL, and each Flourish embed from the embed URL in its manifest note, and check its sha256. The two browser-text primaries are each page's `
` text as saved on 29 October; ifs.org.uk refuses curl and its HTML embeds per-request tokens, so only the saved texts match those two hashes. + +**144 rows from 13 primaries.** `source: ifs`. The manifest lists 14 primaries: four current briefing decks, the superseded TW_0 deck (no rows), two IFS pages read as browser text, and the public data of seven Flourish visualisations. The first lane staged 106 rows from the decks on 29 October. On 3 November the harvest applied the IFS addendum (`briefs/ifs-addendum.md` on the staging branch). Its sections 3 and 4 cut the deck rows to 87, through an explicit block that follows the deck rows in `stage.py`. Its sections 1 and 2 then appended 57 rows in a second JSON block: 11 from the two pages and 46 from the seven visualisations. Attribution: 48 `own`, 96 `restated`. No primary mentions PolicyEngine. From "Family conventions" on, the sections keep the first lane's record of 29 October; where they differ from the sections above them, the sections above win. + +## Review A fixes, 4 November 2026 + +Review A (PR #231, issue comment 6635870934) asked for three changes to this family. They sit in a block before `main()` in `stage.py`; its indices are 0-based, as review A cites them. The coordinator read Adam's deck (slide 2) and Wernham's (slide 3) for K-7(a) and K-7(e); this session re-opened no primary. No printed value, sign or year changed. + +- **H-6(a):** rows 39 and 40 (`cpi_inflation_rate`) and 47 and 48 (`affected_share`) carry the registered metric in `metric`, with `proposed_metric` null. +- **K-7(a):** row 78 (£1.1bn, lines 61 and 62) keeps 2031-32 ("Biggest revenue-raisers in 2031–32") and adds `conditions.discrepancy`: "IFS prints £1.1bn for 2031-32, where Table 6.1 gives lines 61 and 62 a combined £1,045m." +- **K-7(e):** row 42 (£5bn): slide 3 gives it as the cost of the three measures "over next nine months", and Table 6.1 line 2 costs the whole VAT cut from 1 October 2026, so the re-key to lines 1–3 stands (£5,040m over 2026-27 and 2027-28). Its note says so, and it is `cumulative` with the time basis of RF's two-year totals: period 2028 (the final fiscal year), `fiscal_year`, no `fy`, and `conditions.horizon` naming both years. + +## Coverage + +| Primary | Access | Rows | own | restated | +|---|---|--:|--:|--:| +| Weathering the fiscal storm? (Isabel Stockton) | direct | 39 | 2 | 37 | +| Cost of living measures, TW_0 (superseded) | local copy | 0 | 0 | 0 | +| Cost of living measures, TW_1 (Tom Wernham) | direct | 15 | 11 | 4 | +| Spending on public services: the Achilles' heel? (Bee Boileau) | direct | 21 | 19 | 2 | +| Tax measures (Stuart Adam) | direct | 12 | 4 | 8 | +| Autumn Budget 2026: initial response | browser text | 5 | 1 | 4 | +| Collection page: opening remarks by Helen Miller | browser text | 6 | 4 | 2 | +| Flourish 30734907: real household disposable income by decade | Flourish public data | 5 | 5 | 0 | +| Flourish 30726471: current budget deficit, March and October 2026 forecasts | Flourish public data | 11 | 0 | 11 | +| Flourish 30726788: headroom as a share of GDP | Flourish public data | 2 | 0 | 2 | +| Flourish 30726917: real GDP over the forecast | Flourish public data | 11 | 0 | 11 | +| Flourish 30726939: real household disposable income growth by parliament | Flourish public data | 1 | 1 | 0 | +| Flourish 30726047: announced tax changes by fiscal event | Flourish public data | 1 | 1 | 0 | +| Flourish 30727239: higher and additional rate taxpayers | Flourish public data | 15 | 0 | 15 | +| **Total** | | **144** | **48** | **96** | + +Rows 0 to 86 come from the decks, by deck, slide and position. Rows 87 to 143 follow in read order: the initial response, the opening remarks, then the seven visualisations in the order above, each by data row and then series. + +| measure_key | Rows | of which components (rule 9) | of which from sections 1 and 2 | +|---|--:|--:|--:| +| `null`, context (no proposed key) | 116 | 0 | 52 | +| `null` with a proposed key | 7 | 0 | 3 | +| `ab2026__household_energy_payment_100_bands_a_to_d` | 5 | 0 | 2 | +| `ab2026__founders_relief_cgt` | 4 | 0 | 0 | +| `ab2026__package_household_energy_vat_and_fuel_duty` | 3 | 0 | 0 | +| `ab2026__hmrc_tax_gap_package` | 2 | 2 | 0 | +| `ab2026__badr_lifetime_limit_500000` | 1 | 0 | 0 | +| `ab2026__business_rates_sbrr_rhl_thresholds_raised` | 1 | 0 | 0 | +| `ab2026__distributions_framework_modernised` | 1 | 0 | 0 | +| `ab2026__electricity_vat_zero_rate_to_july_2027` | 1 | 0 | 0 | +| `ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred` | 1 | 0 | 0 | +| `ab2026__package_total_tax_policy_decisions` | 1 | 0 | 0 | +| `ab2026__writing_down_allowance_12pc_and_fya_50pc` | 1 | 0 | 0 | + +## Proposed measure keys + +Four proposed keys name seven rows. README rule 2 sets their spelling, and each takes the producer's printed scope (rule 3). + +- `ab2026__package_property_and_savings_income_rates` (1 row): exactly Table 6.1 lines 61 and 62, Adam slide 2's "Increased income tax on savings & property income", £1.1bn in 2031–32 (lines 61 and 62 print 455 + 590 = 1,045). Slide 2's list opens "Biggest revenue-raisers in 2031–32", so the year stands, and the row's `conditions.discrepancy` records the £55m gap (review A, K-7(a)). +- `ab2026__gas_standing_charge_moved_to_unit_rates` (3 rows): no Table 6.1 line. Wernham slide 8's "Shifting gas standing charge onto unit price": "This charge will be scrapped, but per-unit price will be increased to absorb this". The spelling is the RF family's. +- `ab2026__package_ifs_new_giveaways` (2 rows, from the initial response): IFS's new giveaways, which push up borrowing by £8 billion this year and £4 billion next. The page names no OBR line and doesn't say the giveaways cover every Government decision since March, so the rows don't take the key the OBR, HM Treasury red book and RF families share for those decisions. To the nearest billion they match the OBR's direct effects of Government decisions in EFO Table 3.1, 7.6 in 2026-27 and 3.5 in 2027-28 (uk_obr_tables). We infer from that match that IFS restates the OBR, so both rows have medium confidence. Neither the total effect including indirect effects (6.3 and 7.0) nor Table 6.1's total of policy decisions (7,595 and 2,475 £m, uk_hmt_tables) matches both years. +- `ab2026__package_ifs_announced_tax_changes` (1 row, from Flourish 30726047): the tax change that Budget 2026 announced, at the forecast horizon, as a share of GDP as forecast at the event. The chart's footer credits IFS calculations from the OBR's October 2026 EFO, policy measures database and historical official forecasts database. The chart lists no Table 6.1 line and names no OBR grouping, and one rounded figure cannot tie it to the scope of `ab2026__package_total_tax_policy_decisions` or of the OBR's tax decisions since March, so the row proposes a key in IFS's own terms. + +## Keys the addendum changed (rules 3 and 9) + +| Rows (first lane, 0-based) | Was | Now | Why | +|---|---|---|---| +| 45, 46, 52 (£5bn, £140, 35%) | proposed `ab2026__package_ifs_cost_of_living_support` | `ab2026__package_household_energy_vat_and_fuel_duty` | IFS's three measures are the energy payment, the whole electricity VAT cut and the fuel duty cut, exactly lines 1, 2 and 3 (README rule 3, corrected). Lines 1+2+3 print 5,040 over 2026-27 and 2027-28, IFS's £5bn. Since 4 November the £5bn row (0-based row 42) is `cumulative`, period 2028, `fiscal_year`, with the two years in `horizon`, as RF dates its two-year totals, and its note no longer says the scope differs from lines 1–3 (review A, K-7(e)). | +| 48 (£36) | proposed `ab2026__package_ifs_electricity_vat_oct_2026_june_2027` | `ab2026__electricity_vat_zero_rate_to_july_2027` | Line 2 costs the whole cut, 1 October 2026 to 1 July 2027, including the weeks before the Budget. | +| 89 (£1.8bn) | proposed `ab2026__package_ifs_self_assessment_payment_timing` | `ab2026__hmrc_tax_gap_package`, component | Table 6.3 row 3, "More timely payment" for Self Assessment, +1,815m in 2031–32: a part of line 45. | +| 92 (£1bn) | proposed `ab2026__package_ifs_hmrc_compliance_staff_and_debt_collection` | `ab2026__hmrc_tax_gap_package`, component | Table 6.3 rows 7 (debt management, +575m) and 8 (compliance officers, +415m), 990 in 2031–32: a part of line 45. | +| 91 (£1.1bn) | proposed `ab2026__package_ifs_savings_and_property_income_tax` | proposed `ab2026__package_property_and_savings_income_rates` | The name README rule 2 gives exactly lines 61 and 62. | +| 55–57 | proposed `ab2026__package_ifs_gas_standing_charge_reallocation` | proposed `ab2026__gas_standing_charge_moved_to_unit_rates` | A measure with no Table 6.1 line is `ab2026__`; the RF family's spelling. | +| 61 (£1.2bn per year) | proposed `ab2026__package_ifs_defence_investment_plan_funding` | dropped | See below. | + +**Defence Investment Plan funding.** The addendum asked whether IFS's "£1.2bn per year gap in Defence Investment Plan funding" is an estimate (keep, as context) or not. The first lane's own note calls it the government's DIP funding announcement, restated: the Budget "filled" the gap. That makes it a spending allocation, which rule 8 excludes, so it is dropped rather than kept as context. It is close to, but not exactly, Table 6.1 line 41 (capital reallocation to fully fund the DIP: +1,100, +1,135, +1,180 in 2029-30 to 2031-32), so it is not keyed there either. + + +## Rows from addendum sections 1 and 2 + +### The two pages (11 rows) + +The rows cite each page's saved `
` text by line. + +The initial response (rows 87 to 91): + +- Line 16: £13 billion and £15 billion, `fiscal_headroom` in 2029–30 before and after the Budget's policy decisions (`policy_scenario` pre-measures and post-measures). They restate the OBR, which the sentence names. The OBR family stages £12.5 billion and £14.5 billion against the target "Current budget to be in surplus by 2029-30" (uk_obr_tables); the rows keep the page's rounded figures. +- Line 18: £8 billion and £4 billion, `decisions_effect_on_borrowing` in 2026-27 and 2027-28 (this year and next at the 28 October Budget), under the proposed key above. We infer the OBR attribution from the rounded match to Table 3.1, so both rows have medium confidence. +- Line 28: 80%, `affected_share` 0.8. IFS's estimate of the share of households in England that receive the £100 payment, keyed to `ab2026__household_energy_payment_100_bands_a_to_d`; `reform_hint` keeps the £100. + +The opening remarks (rows 92 to 97; the saved text holds the whole speech on line 6): + +- 98: proposed metric `measure_count` in proposed unit `measures`, `measure_key` null, no proposed key. A count of the Budget's measures, staged as the AB2025 and AB2026 uk_thinktank_misc families stage such counts (`own`, `different_model`). Table 6.1 numbers its lines 1 to 98 (`data/uk/ab2026_measures.json`). +- £17 billion: proposed metric `spending_pressure`, IFS's estimate of the top-up that avoiding real-terms cuts could need. The page prints its year as "2030-21", a typo, most likely for 2030–31. The row keeps "2030-21" in the quote and `conditions.horizon`, sets no `fy`, takes 2026 as a publication-year marker, and has medium confidence. +- £11 billion: `spending_pressure` for defence plans, on top of the £17 billion. The page prints no year; Boileau slide 4 prints £11 billion more defence spending in 2030–31 (row 55). Medium confidence and a 2026 marker. +- 25% and 40%: proposed metric `reserve_allocated_share`, the shares of the capital and day-to-day reserves already spent, restated `administrative_fact`. Neither the remarks nor Boileau slide 11, which prints the same two shares, names a source, so all four rows infer the restated attribution and have medium confidence. +- 80%: `affected_share` 0.8 of households, for the £100 payment through council tax bands A-D, keyed to `ab2026__household_energy_payment_100_bands_a_to_d`. + +### The seven visualisations (46 rows) + +`.ab2026-primaries/uk_ifs_ab2026/browser/data-items.json` lists the seven data items in the collection's key charts, each with its Flourish id and lead sentence. The rows read each chart's data cells from its public embed (see "Access recipe and primary inventory"). Following the addendum, they stage the October 2026 forecast values, and the March 2026 values where a chart compares the two, as restated OBR figures unless IFS computed them; IFS's own calculations are `own`. Outturns stay unstaged unless a lead states one as its finding. + +| Flourish id | Rows | Metric and unit | What the rows hold | Attribution | +|---|--:|---|---|---| +| 30734907 | 5 | `real_household_disposable_income_index` (proposed), `index` (proposed) | the 2020s forecast path, years 6 to 10 of the decade, read as 2026 to 2030; the lead's finding is the year-10 value | `own`: IFS builds the decade index from OBR and ONS data, and the addendum classes this chart as own | +| 30726471 | 11 | `current_budget_deficit` (proposed), `gbp` | the October 2026 forecast for 2026-27 to 2031-32 and the March 2026 forecast for 2026-27 to 2030-31 | `restated` OBR | +| 30726788 | 2 | `fiscal_headroom`, `share` | headroom at the March 2026 and October 2026 forecasts, as fractions of GDP | `restated` OBR | +| 30726917 | 11 | `real_gdp_index` (proposed), `index` (proposed) | the March 2026 forecast for 2026-27 to 2030-31 and the October 2026 forecast for 2026-27 to 2031-32, with 2025-26 = 100 | `restated` OBR; the addendum classes this chart as restated | +| 30726939 | 1 | `real_income_growth`, `percent` | 0.4% a year over the 2024-2029 parliament | `own`: the footer credits IFS calculations | +| 30726047 | 1 | `revenue_change`, `percent` | Budget 2026's tax change at the forecast horizon, 0.2% of GDP, with the proposed key above | `own`: the footer credits IFS calculations | +| 30727239 | 15 | `taxpayer_count`, `persons` | the three forecast series (the freeze at the March and October 2026 forecasts, and CPI uprating at the October forecast), 2026-27 to 2030-31 | `restated` OBR: the footer cites the OBR EFO, October 2026 | + +Only the tax-change row carries a key. The other 45 hold forecast levels or IFS indicators, not the effect of one measure, so they have `measure_key` null and no proposed key. + +### Conventions for these rows + +- **Quotes and locators.** Each Flourish row quotes "row, series: value", and its locator names the visualisation, the data row and the series. `value_raw` is the cell as the embed serves it, at full precision, whatever the chart displays. +- **Units.** The deficit chart's y-axis title is "£ billion", so its cells scale by 1e9 to GBP. The taxpayer chart's cells are thousands: the lead's 10.8 million is the 2030-31 October freeze cell, 10800, and the chart's number format sets a constant of 1000. They scale by 1,000 to persons. The headroom cells are fractions of GDP, staged as served in unit `share`; the chart's number format sets a constant of 100, one decimal place and a % suffix. Index levels keep proposed unit `index`, not the registered `index_0_1`. The parliament and tax-change cells are percentages: the number format adds a % suffix, and the tax column's name says "% of GDP". +- **Periods.** Fiscal-year rows take the end year and `conditions.fy`. The decade chart labels its rows "Year of decade" 0 to 10; the rows read years 6 to 10 of the 2020s as calendar 2026 to 2030, which the chart does not print, so they have medium confidence. The headroom and tax-change cells are fiscal-event snapshots (`point_in_time`, period 2026). The parliament average takes the parliament's end year, 2029, and keeps 2024-2029 in `conditions.horizon`. Text rows with no printed year take 2026 as a disclosed publication-year marker and import no year from the decks. +- **Vintages.** `conditions.forecast_vintage` follows the series or row label, March 2026 or October 2026. The decade chart's footer names the OBR's October 2026 EFO, and the parliament chart's lead names OBR forecasts, so those rows read October 2026. +- **Signs.** As served. A negative deficit cell is a surplus; the chart shades the area below zero "Current budget surplus". +- **Sources.** Restated OBR rows carry `source_model: obr_efo_forecast` and `benchmark_class: different_model`; IFS's own calculations carry `arithmetic`. The two reserve shares are `administrative_fact`, as in the Boileau rows. + +## Not staged (rules 8 and 9) + +### Deck rows the addendum dropped + +The addendum dropped 19 of the first lane's 106 rows, all under rule 8: + +| Category | Rows | Examples (deck, slide) | +|---|--:|---| +| Measure parameters: rates, payment amounts, thresholds, a fare cap | 10 | £100 Household Energy Payment (Wernham 3); 5p fuel duty cut (Wernham 3); 0% VAT on electricity (Wernham 3, Adam 5); £2 bus fare cap (Wernham 15); Founders' Relief 10% rate, 24% comparator and £10m limit (Adam 3); RHL rateable values £12,000 and £21,000 (Adam 4) | +| Government targets | 3 | defence at 3% of GDP by 2030 (Boileau 4, repeated on 8); the DIP's earlier 2.7% in 2029–30 (Boileau 4) | +| Inputs of IFS's own spending scenarios | 2 | defence held at 2.7% of GDP, or at 3% by 2030–31 (Boileau 7 and 9); the scenarios' computed growth rates stay | +| Financing and allocations | 2 | ~£1bn a year of NWF and BBB financing for defence (Boileau 5); the £1.2bn a year of DIP funding (Boileau 4) | +| The base a measure moves | 2 | the £108 average gas standing charge and its 13% share of a typical gas bill (Wernham 8), as the red book dropped its £108 | + +Each dropped parameter that names a measure stays in the kept rows' `reform_hint`. The 25% capital and 40% day-to-day reserve shares (Boileau 11) stay: the addendum lists them as estimates. The bond spread and debt-ownership context rows (Stockton 7) are not design and stay as context. + +### Figures on the two pages (11) + +| Page | Figure | Times printed | Why the rows leave it out | +|---|---|--:|---| +| Initial response | 3% of GDP on defence by 2030 | 2 | a government target (rule 8) | +| Initial response | the £100 payment | 1 | a measure parameter (rule 8); row 91's `reform_hint` keeps it | +| Opening remarks | 3% of GDP on defence | 3 | a government target | +| Opening remarks | 3.5% by 2035 | 1 | a government target | +| Opening remarks | 2.7% of GDP from next year to 2029–30 | 1 | the government's defence spending plan, a target | +| Opening remarks | the £100 payment | 1 | a measure parameter; row 97's `reform_hint` keeps it | +| Opening remarks | property values 35 years out of date | 1 | it describes council tax valuations and estimates no Budget effect | +| Opening remarks | local areas to retain 100% of business rates | 1 | the design of a devolution plan (rule 8) | + +The pages' other numbers are not figures to stage: publication dates, titles and target dates (2030, 2035); horizons ("next five years", and "next three years", which row 95 keeps in `conditions.horizon`); the fiscal rule's year, 2029–30, which the headroom rows carry as `fy`; "2030-21", which row 93 keeps; the name of the "10 year plan"; the G7; the count of "two big problems"; and "one-off". The remarks' "almost halved" prints no number, and no row turns it into one. + +### Data cells in the seven visualisations (256 of 302) + +| Flourish id | Non-null cells | Staged | Excluded | The excluded cells | +|---|--:|--:|--:|---| +| 30734907 | 89 | 5 | 84 | the 1950s to 2010s paths (77, including seven base-100 cells); the 2020s series, years 0 to 5 (6, including its base-100 cell), which the chart does not mark as forecast; and the forecast series' year-5 cell (1), which repeats the 2020s series' year-5 value where the two lines meet | +| 30726471 | 13 | 11 | 2 | 2025-26 in both series, 47.4 each: a year that had ended before the October forecast, with one value for both series. The March series has no 2031-32 cell | +| 30726788 | 32 | 2 | 30 | headroom at the 30 earlier fiscal events, Jun 10 to Nov 25 | +| 30726917 | 13 | 11 | 2 | the 2025-26 base cells, 100 in both series. The March series has no 2031-32 cell | +| 30726939 | 12 | 1 | 11 | the 11 earlier parliaments, 1979-1983 to 2019-2024 | +| 30726047 | 85 | 1 | 84 | every earlier fiscal event, Budget 1971 to Spring Forecast 2026; one further data row is blank | +| 30727239 | 58 | 15 | 43 | the Current plans series, 1990-91 to 2025-26 (36); the two freeze series' 2025-26 cells (2), each 8510, the Current plans value for that year; and the CPI-uprating series for 2021-22 to 2025-26 (5), a counterfactual path for the years before the forecast years, whose 2021-22 cell equals Current plans' 4950 | +| **Total** | **302** | **46** | **256** | | + +Outside the data cells, the headroom chart draws a reference line labelled with the 2010s average headroom, 0.9% of GDP: a historical average, which no row stages. The lead sentences in `data-items.json` belong to no manifested primary. Each estimate a lead states repeats a staged cell (0.4% a year is row 127, around 0.2% of GDP is row 128, 10.8 million is row 142), and their other numbers are dates. Axis titles define index bases, and apart from the labelled 0.9% line, no tick or guide adds an estimate. No row reads a value off an image, a bar, a line or a tick. + +## Unreached + +We couldn't fetch two of the sources the addendum names, and two others held nothing to stage: + +- **The seven IFS data-item pages.** ifs.org.uk refuses curl, and the addendum rules out any other route, so each manifest line names its data item's URL and hashes the chart's public Flourish embed instead. The rows do not use the "Download data" link that each chart's footer template names. +- **The explainer and the fiscal devolution comment.** The browser read of 29 October found only an embedded video in the first and only design parameters in the second, so neither has a manifest line or rows. +- **The briefing event page** (https://ifs.org.uk/events/autumn-budget-2026-ifs-analysis) refused the first lane's curl with a Cloudflare challenge (see below); no primary holds it. + +## Verification (3 November 2026) + +- **Checker:** `PYTHONPATH=. python pipeline/ab2026_harvest_contract.py sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026` reports 144 rows, 0 problems. +- **Determinism:** two runs of `stage.py` write the same gzip, sha256 `40331bc6beb36fc78d2e10731730c4c8a15942d4419bd840d0cebc95988e6125`. The 87-row file before sections 1 and 2 had `2e8b2dc5a85bb66fb11431f5c20565a40b2cf546e7edaabedd3a6c56ddb68d49`. COUNTS.json pins the new hash. +- **The 87 deck rows:** the new gzip's first 87 serialised lines match the 87-row file byte for byte (3,247 leaf fields, 0 differences), and manifest lines 1 to 5 match theirs. +- **Every new row:** a script re-opened all 57 rows at their locators: the saved text's line, or the embed's data row and series, decoding the embed afresh with every number kept as served text. It checked the primary's sha256 against the row and the manifest, the quote against the line or cell, `value_raw` against the cell, and the value, sign, unit, period and forecast vintage. All 57 pass. Nine planted errors (value, sign, period, `fy`, series, unit, vintage, quote and hash) each made it fail. +- **Cell accounting:** the same decoder lists every non-null cell in the seven embeds: 302, of which the rows stage 46. +- **Flourish bytes:** fetches on 29 October and 3 November returned byte-identical embeds. +- **Tests:** `PYTHONPATH=. python -m pytest -n 4 --noconftest tests/test_ab2026_harvest_contract.py tests/test_uk_ab2026_harvest.py`: 52 passed. `--noconftest` skips the conftest's build of the derived database, which neither file uses. +- **Generated files:** `pipeline/ab2026_proposed_keys.py` and `pipeline/harvest_counts.py --pinned-on 2026-10-29` regenerate PROPOSED_KEYS.md and COUNTS.json, and both `--check` runs pass. +- **After the review:** commit f4c7c94a's fixes and README rule 10's move of row 76 changed no value, sign or year. COUNTS.json pins the gzip's current sha256, and `stage.py` still writes it byte for byte. + +The scripts and their outputs sit in the ignored `.ab2026-primaries/uk_ifs_ab2026/a3/`. + +## Access recipe and primary inventory + +### Decks (first lane, 29 October) + +Fresh fetches began **2026-10-29 15:43:43 UTC**, using exactly: + +```sh +curl -sSL -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" URL +``` + +The fetch also saved response headers and HTTP status and imposed a 50-second +timeout. Bytes are under `.ab2026-primaries/uk_ifs_ab2026/`, outside the vendored +family. SHA256s were checked with `shasum -a 256`. PDFs were read with +`pdftotext -layout` and rendered for visual checks of labels and embedded images. +None of the PDF annotations links to a chart-data download. + +Stockton's fresh file is byte-for-byte identical to assigned `stockton.pdf`, +confirming it is **Weathering-the-fiscal-storm-IS.pdf**. The other three current +decks also match their supplied local copies. TW_0 returned HTTP 403; the +supplied local PDF was copied to `TW_0-local.pdf` and hashed. All rows from the +cost-of-living presentation cite TW_1, not the superseded version. Full TW_0/TW_1 +changes are documented below; no numerical claim changed. + +### Browser text (the initial response and the opening remarks) + +On 29 October, between 16:56Z and 16:58Z, the harvest read the two pages in the Claude desktop app's built-in browser, as an ordinary page visit with no challenge solved. It fetched each page's HTML in-page with `fetch(location.href)` and hashed it. Two fetches of the initial response gave the same length, 257,037 bytes, with different hashes: the HTML embeds per-request tokens. So the primary is the text of each page's `
` element, and each manifest note records the HTML's byte count and one fetch's hash. Both pages print publication on 28 October 2026; the remarks are Helen Miller's opening remarks at the 29 October briefing. + +### Flourish public data (the seven visualisations) + +```sh +UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" +curl -sSL --max-time 50 -A "$UA" https://public.flourish.studio/visualisation/ID/ # names the embed URL +curl -sSL --max-time 50 -A "$UA" https://flo.uri.sh/visualisation/ID/embed # the hashed primary +``` + +Both answered HTTP 200 for all seven ids on 3 November. Each embed is an HTML page whose inline script assigns `_Flourish_data`, `_Flourish_data_column_names` and `_Flourish_settings` as JSON; a JSON decoder reads them from the assignment onward. `_Flourish_data_timestamps` holds a JavaScript `new Date(...)`, which needs its own parse. Each manifest note gives the data item's URL, the public page's bytes and hash, the embed URL, the fetch time, the Flourish version, the data's last update and the lead sentence from `data-items.json`. + +### Inventory + +| Primary | Access | Bytes | Rows | SHA256 | +|---|---|--:|--:|---| +| [Weathering the fiscal storm?](https://ifs.org.uk/system/files/2026-10/Weathering-the-fiscal-storm-IS.pdf) | direct | 318,348 | 39 | `fd09e707a4bc0a8e0a3de4a3fa902c8ccdc1e4c44ccdd0dee92866857aa4690b` | +| [Cost of living measures (TW_0, superseded)](https://ifs.org.uk/system/files/2026-10/Cost-of-living-measures-TW_0.pdf) | local copy | 231,180 | 0 | `abb63d9c4ecd21c3c9173077c5e92d8015c7cc30aebd12be159185d7d157f12a` | +| [Cost of living measures (TW_1, revised)](https://ifs.org.uk/system/files/2026-10/Cost-of-living-measures-TW_1.pdf) | direct | 222,191 | 15 | `6ed174b22b4d22a34c8bbd450194fb2b4181a9d566b137913bee52ca49a0299b` | +| [Spending on public services: the Achilles heel](https://ifs.org.uk/system/files/2026-10/Spending-on-public-services-the-Achilles-heel-BB.pdf) | direct | 157,838 | 21 | `7403ecc0641b23f5ffc0cb28f67435dbd1b8df6b124874ffae7ae7f75e357aa6` | +| [Tax measures](https://ifs.org.uk/system/files/2026-10/Tax-measures-SA.pdf) | direct | 133,005 | 12 | `6792dc448f40d34f174b6a3c839863b5c969a7334263f5d6b539be62a0428bb8` | +| [Autumn Budget 2026: initial response](https://ifs.org.uk/articles/autumn-budget-2026-initial-response) | browser text | 5,401 | 5 | `962f737e4dfb70416f76a7fc3104f9c4d6b04ef6566a58e0e55fd9db709136ff` | +| [Collection page: opening remarks by Helen Miller](https://ifs.org.uk/collections/autumn-budget-2026) | browser text | 12,403 | 6 | `5991ccec0e0ebb90952937f23400039a8386c047a4b44c9cd4391f535504723c` | +| [Flourish 30734907](https://flo.uri.sh/visualisation/30734907/embed) | Flourish public data | 912,453 | 5 | `99d8b19e36132340356adfcd9206cc26beb37484b3213cbfaa416dd39c9a8f9a` | +| [Flourish 30726471](https://flo.uri.sh/visualisation/30726471/embed) | Flourish public data | 909,632 | 11 | `db33c42dce0a78f12eef4c58497dbb9d2b3f0b3b304018fdf26f2052995f3618` | +| [Flourish 30726788](https://flo.uri.sh/visualisation/30726788/embed) | Flourish public data | 911,264 | 2 | `ce839de3a697429a34906b427d87f40ae9a9adccaf7b522a3b7d6d6bfb3bdf82` | +| [Flourish 30726917](https://flo.uri.sh/visualisation/30726917/embed) | Flourish public data | 909,037 | 11 | `a0a5eb60d2b40f76bbd78389bbb8ef3592ebee447e2746e6becc56c31fd60a5c` | +| [Flourish 30726939](https://flo.uri.sh/visualisation/30726939/embed) | Flourish public data | 909,837 | 1 | `96086a29b440505c6b4010e7844320b5d8179572c2f9d7585389b8a298a7d253` | +| [Flourish 30726047](https://flo.uri.sh/visualisation/30726047/embed) | Flourish public data | 920,130 | 1 | `3da8f416456fc61e99144bf23563bc553eefb8fa751251aa9e3cacc73af10c44` | +| [Flourish 30727239](https://flo.uri.sh/visualisation/30727239/embed) | Flourish public data | 912,450 | 15 | `b4303da3a3371585ab0c000a6f6419c07ae67391fd9c37efcdbc495a0f51ea6b` | + +### HTML pages that refused curl + +The first lane's record of the HTML pages that returned a Cloudflare challenge (HTTP 403) to its curl at 15:43:43 UTC; "Browser text" above and "Unreached" give what has become of each: + +- https://ifs.org.uk/articles/autumn-budget-2026-initial-response +- https://ifs.org.uk/articles/autumn-budget-2026-explained +- https://ifs.org.uk/collections/autumn-budget-2026 +- https://ifs.org.uk/events/autumn-budget-2026-ifs-analysis + +No assigned local HTML copies exist. No attempt was made to bypass the blocks. +Challenge pages are retained only as fetch evidence in the ignored primaries +directory; they are not IFS publications and are not manifested. No rows are +staged from them. The explainer's existence/content cannot be confirmed from its +challenge response. The blocked collection and event pages prevent discovering +additional AB2026 items or linked xlsx/csv downloads. No data file was identified +inside the reachable PDFs; this is an access limit, not a finding that IFS posted +no data. No Wayback, alternative domain or other bypass was attempted. + +## Proposed metrics and units + +The table lists every proposed metric in the 144 rows. + +| Proposed metric | Rows | Unit(s) | Where and what | +|---|--:|---|---| +| `average_energy_bill_change` | 1 | gbp | Wernham slide 2: EDF's forecast £470 rise in annual household energy prices | +| `average_household_support` | 4 | gbp | Wernham slide 4: nine-month cost-of-living support per household, £140 and the £24, £36 and £80 labels | +| `business_rates_bill_change` | 1 | gbp | Adam slide 4: the maximum annual bill saving, £7,146 in 2027-28 | +| `current_budget_deficit` | 15 | percent, gbp | Stockton slide 7, % of GDP (4); Flourish 30726471, £ (11) | +| `current_budget_deficit_revision_risk` | 1 | share | Stockton slide 8: roughly 1 in 4 revisions | +| `debt_interest_share_of_revenue` | 4 | percent | Stockton slide 7 | +| `debt_owned_by_non_residents_share` | 1 | percent | Stockton slide 7 | +| `gross_financing_requirement` | 4 | percent | Stockton slide 7 | +| `measure_count` | 1 | measures (proposed) | opening remarks: the Budget's 98 measures | +| `primary_deficit` | 4 | percent | Stockton slide 7 | +| `public_sector_net_borrowing` | 4 | percent | Stockton slide 7 | +| `public_sector_net_debt_ex_boe` | 4 | percent | Stockton slide 7 | +| `public_sector_net_debt_ex_boe_change` | 4 | percent | Stockton slide 7 | +| `public_sector_net_financial_liabilities_change` | 4 | percent | Stockton slide 7 | +| `public_sector_net_worth_inverted_change` | 4 | percent | Stockton slide 7 | +| `real_gdp_index` | 11 | index (proposed) | Flourish 30726917: real GDP, 2025-26 = 100 | +| `real_household_disposable_income_index` | 5 | index (proposed) | Flourish 30734907: real household disposable income, start of decade = 100 | +| `real_spending_growth` | 11 | percent | Boileau slides 7 and 9: average annual real-terms budget growth | +| `real_spending_growth_revision` | 1 | percentage_points | Boileau slide 10: the average revision to annual spending growth | +| `reserve_allocated_share` | 4 | percent | Boileau slide 11 (2) and the opening remarks (2): shares of the reserves already allocated | +| `share_of_energy_price_increase_offset` | 1 | share | Wernham slide 7: around 35% | +| `spending_pressure` | 9 | gbp | Boileau slides 3, 4, 7, 9 and 10 (7) and the opening remarks (2) | +| `taxpayer_gain` | 1 | gbp | Adam slide 3: the maximum Founders' Relief gain, £1.4m | +| `ten_year_bond_spread_other_g7` | 1 | percentage_points | Stockton slide 7: 134bp | + +The proposed units are `index` (16 rows, the two index charts) and `measures` (the measure count); no row proposes a baseline. The first lane's rows proposed `affected_share` and `cpi_inflation_rate`, which the Metric registry carries; since 4 November (review A's H-6(a)) those four rows (Wernham slides 2 and 5) carry them in `metric`, and the new rows use the registered `affected_share` too. The new rows also use the registered metrics `taxpayer_count` (15), `fiscal_headroom` (4), `decisions_effect_on_borrowing` (2), `real_income_growth` (1) and `revenue_change` (1). + +## Family conventions + +- Fiscal years use their end year and `conditions.fy`. Calendar years, + cross-fiscal-year nine-month support, and publication-date snapshots have + no `fy`; full horizons and missing dates are disclosed. Unspecified-year + Founders' Relief annual figures use annual 2026 publication markers and + medium confidence, not an inferred implementation year. +- Monetary magnitudes and signs are verbatim. £bn and £m are normalised to + GBP. Percentage forecasts and rates stay percent; recipient shares divide + by 100. Fiscal cells say percent of GDP or revenues as printed, rather + than inventing a real-GDP unit. 134 basis points is 1.34 percentage points. + The fuel-duty parameter keeps proposed unit `pence_per_litre`. +- Real/cash and price bases stay as published. Nine-month household support + is not annualised. A printed positive magnitude followed by “decrease” + remains positive, with the direction recorded in conditions. +- All figures are `point`: no producer scenario is substituted for a central + OBR estimate and no confidence band is invented. “Central” would mean a + producer-labelled central forecast; the staged figures contain no such label. +- `arithmetic` is used for IFS calculations where the deck does not name + TAXBEN. Official costings/forecasts are `restated`, with original source + named in notes where supplied or inferable; administrative policy parameters + are distinguished from IFS estimates. IFS does not cite PolicyEngine here. +- Current-law/default baseline is null. No new baseline world is inferred. + Every condition value is a string. Quotes are under 15 words, contain the + exact value_raw, and refer to printed text, a data label or a numeric cell. + +## Stockton fiscal deck + +39 rows: 38 printed numeric cells in slide 7's **Fiscal traffic lights** image +table, plus slide 8's “roughly 1 in 4 revisions” risk annotation. Text extraction +misses the entire image table; all cells were transcribed from the rendered +slide and independently audited. The table spans FY2026-27, 2027-28, 2029-30 and +2031-32; missing intermediate years were not invented. Net worth is explicitly +inverted and the signs were not reversed. The debt-interest denominator is +revenues, while debt ownership is a share of total debt. + +The table prints no source citation. OBR attribution for the 36 forecast cells +is inferred from the surrounding OBR forecast slides, not presented as an +explicit citation; these rows have medium confidence and disclose the inference. +Debt-ownership's administrative origin likewise has no named original provider +or observation date. The 134bp spread is an IFS market comparison with other +G7 economies whose source/weighting/date are unspecified. The latter two use a +2026 in-year snapshot. The 1-in-4 risk uses historical forecast revisions since +2010 excluding 2020-21; “Spring” is interpreted as Spring 2027 and disclosed. +All fiscal rows have null measure_key and no proposed measure. + +Not staged: slides 3–6 forecast/borrowing bars, diamonds and lines, and slide 8's +forecast/outturn lines, because they have no numeric data labels. Axis ticks, +chart origins and dates are not outcome rows. Slides 1–6 were visually checked +for hidden printed numbers. No headroom or tax/GDP number is printed there. + +## Wernham cost-of-living deck + +Tom Wernham component: 21 rows from the revised 17-slide Cost of living measures deck, cover dated 29 October 2026. Source slug `ifs`; own household-price calculations use `arithmetic` (the deck does not name TAXBEN), OBR forecasts use `obr_efo_forecast`, EDF's energy-price forecast uses `edf_energy_price_forecast`, and announced statutory parameters use `administrative_data` with restated attribution and administrative_fact benchmark. No chart bars were read for values. + +Access/version evidence: + +- TW_1 freshly fetched directly at 2026-10-29 15:43:43Z using the assigned Safari user agent. SHA256 `6ed174b22b4d22a34c8bbd450194fb2b4181a9d566b137913bee52ca49a0299b`, 222191 bytes. This hash is identical to the coordinator's local copy of the TW_1 PDF. +- TW_0 fresh URL returned HTTP403, so the assigned local file was copied to `.ab2026-primaries/uk_ifs_ab2026/TW_0-local.pdf`, hashed, and extracted using `pdftotext -layout`. SHA256 `abb63d9c4ecd21c3c9173077c5e92d8015c7cc30aebd12be159185d7d157f12a`, 231180 bytes; manifest access must be `local copy`. No bypass was attempted. +- Text diff: TW_0 has18 pages, TW_1 has17. TW_0 p4 already includes the80%/91% eligibility annotations; TW_1 p4 omits these. TW_0 p5 has those eligibility annotations overlapping the VAT/fuel commentary. TW_1 p5 relocates eligibility to the lower chart and VAT/fuel commentary to the upper chart. TW_0 p6 is another copy of the unannotated support chart and was removed. TW_0 p7–18 correspond to TW_1 p6–17. No printed numerical claim changes. All staged rows cite TW_1; TW_0 contributes zero rows but is manifested as the changed primary required by rule7. + +Coverage by measure_key: null14; `ab2026__household_energy_payment_100_bands_a_to_d`4; `ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred`2; `ab2026__bus_fare_cap_2_england_outside_london_2027`1. Within null: 6 unscored context rows; the remaining8 use proposed measure keys below. Rows per primary: TW_1=21, TW_0=0. + +Proposed measure scopes: the first lane's three Wernham proposals were re-keyed on 3 November (see "Keys the addendum changed" above). The cost-of-living package is exactly lines 1, 2 and 3, because line 2 costs the whole VAT cut including the weeks before the Budget; the full-period VAT row is line 2; the gas standing-charge rows use `ab2026__gas_standing_charge_moved_to_unit_rates`. + +Proposed metrics and units: + +- `cpi_inflation_rate`: printed OBR3.8% and1.9% CPI forecast levels for Q12027, not inflation effects from measures. +- `average_energy_bill_change`: existing AB2025 proposal; EDF£470 annual energy-price increase from January2027. +- `benefit_payment_amount`: £100 per eligible household one-off payment, rather than the average gain across all households. +- `fuel_duty_rate_cut`, proposed_unit `pence_per_litre`: printed5p extension; no negative sign is inserted. Per-litre basis follows the named policy, though the slide prints only5p. +- `statutory_tax_rate`:0% electricity VAT during October2026–June2027, not an effective tax rate. +- `average_household_support`: nine-month cash support, including indirect tax reductions; no conversion to annual gains or household income changes. Printed£140 headline and £24/£36/£80 all-household chart labels. +- `affected_share`: existing AB2025 proposal, payment receipt by80% of all England households and91% of the poorest30%; normalized to0.8 and0.91 shares. Household ranking is by spending, not income decile. +- `share_of_energy_price_increase_offset`: the printed "around35%" of forecast price increases covered by the three measures; normalized to0.35 share, no ratio derived from bars. +- `energy_standing_charge`: current annual gas standing charge£108; context. +- `energy_standing_charge_share`: current13% of a typical gas bill; normalized to0.13 share, context. +- `fare_cap`: £2 single bus fare cap, a restated policy parameter. Exact2027 timing and England-outside-London scope follow registered Table6.1 line4; the slide itself gives only "£2 cap on bus fares", and the row explicitly says this. + +Conventions: GBP amounts stay as printed in cash or2026-27 prices as specified; the £5bn aggregate is multiplied by1e9. Shares divide printed percentages by100, while CPI percentages and the printed1% income decrease remain percentages. Positive cost is cost to the Exchequer; positive household support is a gain. The printed1% decrease in real household disposable income is not re-signed; its direction is explicit in sign_convention. October2026–June2027 figures use annual time_basis, end-period marker2027 and horizon strings, with no fiscal-year condition because the nine months cross fiscal years. The1% RHDI decrease spansFY2024-25 toFY2026-27 and usesFY2026-27/end2027. No row is described as central: all figures are printed point estimates/parameters. For gas reform, year2026 is explicitly only a publication marker because no implementation year is printed. Baseline remains null; unsupported counterfactual definitions were not invented. + +Not staged: + +- Spending-decile bars in pp4–6, energy-price bars/percentiles pp7/16/17, carbon implicit-tax bars p9, and real-income decade/forecast lines pp11/14 have no data labels (apart from the separately staged£24/£36/£80 all-household labels and1% annotation). Visual inspection found no further printed values, embedded raster tables, or hidden numeric labels. +- Slide5 repeats p4's £140/£24/£36/£80 chart values; only its new80%/91% annotations are additional rows. Repeated£100 legend descriptions are not extra rows. +- Richest30% "lose a similar amount" is not an exact printed cash number; no negative£13 was inferred. +-30% subgroup labels,5–15 bus-travel age eligibility, dates, axis ticks, years and0% chart origins are conditions/context, not separate scored estimates. +- Other temporary announcements on p15 (food tariffs, family-days-out VAT, free bus travel) have no printed cost/effect values, apart from the£2 bus fare parameter staged. +- Gas-standing-charge reform's average "no give-away" and "does not change overall costs" are qualitative; no numerical zero was invented. Its future electricity counterpart has no printed effect. +- No data download was identified within the PDF; the collection/event fetches were blocked as documented above. + +Potential contradictions/limits: the package's modelled full electricity-VAT period includes already-announced relief, despite being discussed beside Budget measures. This is why the package and full-period electricity rows have proposed scopes. The printed£140 headline is rounded; do not derive a different total from a plotted stack. Gas reform has unspecified implementation year and geography. The positive1% magnitude is explicitly a decrease. No numerical difference was detected between TW_0 and TW_1. + +Component spot check: deterministic random sample seed230,10 of21 rows, reopened directly from TW_1 PDF text; labels and direction were also checked against rendered pp4,5,7,8,14. One-based component rows1,6,7,8,10,11,14,15,18,19: p2 3.8% CPI inQ12027; p3 0% VAT October2026–June2027; p3 £5bn positive Exchequer cost across nine months; p4 £140 nine-month household support; p4 £36 VAT label; p4 £80 payment label (all in2026-27 prices); p7 around35% offset→0.35; p8 current£108 annual gas charge; p8 40% worse off→0.4 losing share; p8 poorest30% gain£13 per year, date unspecified/publication marker2026. All values found verbatim. The21 component rows pass row_problems with0 problems using UV_CACHE_DIR=/tmp/ab2026-ifs-uv-cache (default uv cache is outside the sandbox). + + +## Bee Boileau public services deck + +Primary: *Spending on public services: the Achilles’ heel?*, 29 October 2026, +https://ifs.org.uk/system/files/2026-10/Spending-on-public-services-the-Achilles-heel-BB.pdf. +Fresh direct fetch 2026-10-29 15:43:43Z with the required Safari User-Agent; +157,838 bytes, sha256 `7403ecc0641b23f5ffc0cb28f67435dbd1b8df6b124874ffae7ae7f75e357aa6`. +The coordinator's assigned local copy and fresh copy are byte-identical. Read with +`pdftotext -layout`; visually inspected all 13 slides and the slide 7/9 data labels. +No raster-only numeric table was missed. + +Coverage: 28 rows, all `measure_key: null` (one has the proposed package below). +By slide: 3:1, 4:4, 5:1, 7:6, 8:1, 9:10, 10:3, 11:2. +The figures are 21 own arithmetic calculations/scenario assumptions and 7 restated +announced policy/target/reserve figures. No exact registered AB2026 measure is assigned. + +The first lane's one proposed key here, for the £1.2bn a year of DIP funding, went with that row, which the addendum dropped as an allocation (see "Keys the addendum changed" above). The rule 8 drops also removed slide 4's and 8's targets, slide 5's financing and the two scenario inputs on slides 7 and 9, so the deck now has 21 rows. + +Metric proposals reuse `spending_pressure`, `forecast_spending_change` and +`real_spending_growth` from AB2025. The historical one-percentage-point revision uses `real_spending_growth_revision`. New `reserve_allocated_share` means the +percentage of the specified day-to-day/capital reserve already allocated over +its printed multi-year window. No new unit or baseline proposal. + +`arithmetic` is the IFS's own scenario/growth calculation, or an announced target +restated without a named model; the £1.2bn funding amount is marked restated with +`hmt_costing_obr_certified`. Restated rows name their government/DIP origin in +`note`; two announced reserve allocation shares are `administrative_fact`, with +medium confidence, since the slide names no source for them. +Real growth remains percent, growth revisions are percentage points, cash +amounts are GBP, and signs are as printed. Positive pressure means additional +spending required; negative growth is a real cut. There are no central-value +rows: IFS's scenarios are point estimates, never substituted for OBR forecasts. + +The 2027–28 to 2030–31 chart rates are average annual real growth over the whole +interval: `growth_period` preserves that interval, and the row's fiscal period +is its terminal year, 2031. The reserve shares likewise retain their complete +allocation windows, ending 2028–29 and 2029–30 respectively. The published £1.2bn +and ~£1bn annual flows have no fiscal year: they carry a 2026 publication-date +snapshot, `time_basis: point_in_time`, `reference_date`, and medium confidence; +the rows do not claim these are 2026 annual outlays. The historical average +1-percentage-point growth revision since 2010 uses the same dated-snapshot +convention. Slide 4 states a calendar-2030 defence target, so that row has no fy; +slide 9 explicitly says 2030–31 and is recorded as fiscal. The difference in date +labels is preserved, not resolved by the harvest. + +Not staged: slide 3's unlabelled growth bars and axis ticks; all dates, document +address numbers and slide enumeration; qualitative/unquantified claims; the +second occurrence of the identical 3%-of-GDP scenario annotation within slide 9. +Slide 7 and slide 9 repeated printed labels are retained at their separate +locators, and slide 9's two health bars are separate scenario observations. +The £1bn financing flow is explicitly investment/financing, not military +purchases, matching the slide's caution. The deck identifies no downloadable +data file or distributional chart. No public-services primary was unreached. + +Validation: `row_problems` from the AB2026 checker, with registered keys and enums, +reported **28 rows, 0 row problems**. Full-family validation is recorded below. A full visual pass found no contradictory value. +The calendar/fiscal defence target wording and unspecified flow years above are +material limitations. + +Deterministic random spot-check (seed 230, 1-based indices within the Boileau component): + +| Row | Locator | Printed value | Normalized unit/value | Period check | +|---|---|---|---|---| +| 1 | slide 3 | £8 billion | GBP 8,000,000,000 | FY2030–31 | +| 6 | slide 5 | ~£1bn per year | GBP 1,000,000,000 | no year printed; dated snapshot, medium | +| 10 | slide 7 | 1.7% | percent 1.7 | average 2027–28 to2030–31 | +| 14 | slide 9 | 0.9% | percent 0.9 | average 2027–28 to2030–31 | +| 16 | slide 9 | £9 billion | GBP 9,000,000,000 | interval ends FY2030–31 | +| 18 | slide 9 | 2.7% | percent 2.7 | yellow health bar, average interval | +| 22 | slide 9 | -0.9% | percent -0.9 | green other-departments bar, average interval | +| 23 | slide 9 | -2.1% | percent -2.1 | yellow other-departments bar, average interval | +| 24 | slide 10 | £28 billion | GBP 28,000,000,000 | FY2030–31 | +| 25 | slide 10 | 1 percentage point | percentage_points 1 | historic since2010, dated snapshot | + +For every sampled row the primary PDF was reopened with `pdftotext -f/-l` and the +number/string, sign, unit and context checked; slide 7/9 labels were also viewed +at full-page resolution. All printed value strings matched. No bar reading or +arithmetic derived by the harvest was used. + + +## Stuart Adam: Tax measures + +18 rows from one six-slide PDF. Direct fetch with the required browser User-Agent, +2026-10-29 15:43:43Z; 133,005 bytes; +sha256 `6792dc448f40d34f174b6a3c839863b5c969a7334263f5d6b539be62a0428bb8`. +The fetched bytes match the assignment's local copy. Text read with +`pdftotext -layout`; all six slides rendered and visually read as a safeguard +against raster text. Slides 2–6 have no embedded raster images and all printed +numbers are in the text extraction. No distributional chart or data download +is linked inside this deck. + +Rows by registered key: `ab2026__package_total_tax_policy_decisions` 1; +`ab2026__writing_down_allowance_12pc_and_fya_50pc` 1; +`ab2026__distributions_framework_modernised` 1; +`ab2026__badr_lifetime_limit_500000` 1; +`ab2026__founders_relief_cgt` 6; +`ab2026__business_rates_sbrr_rhl_thresholds_raised` 3; +`ab2026__electricity_vat_zero_rate_to_july_2027` 1; null 4. +Since 3 November, the £7bn net tax rise, Table 6.1's total of tax policy decisions, takes `decisions_effect_on_borrowing` (README rule 10). +### Proposed measure scopes + +Superseded on 3 November (see "Keys the addendum changed" above): the self-assessment timing and the compliance-staff and debt-collection figures are line 45 components, matched to Table 6.3's items by value, and the savings and property income figure uses `ab2026__package_property_and_savings_income_rates`. Rule 8 dropped this deck's six parameter rows (the Founders' Relief rate, comparator and limit, the RHL rateable values and the 0% VAT rate), so it now has 12 rows. + +### Conventions and metric proposals + +All monetary figures preserve printed signs. Revenue-raising amounts are +positive yields; the Founders' Relief £0.3bn is a positive cost, explicitly +labelled as such. Amounts expressed in £bn/£m are multiplied by 1e9/1e6. +Tax rates remain percent. All quoted excerpts have fewer than 15 words and +contain their exact `value_raw`. + +The HMT-certified Budget costings are `restated` with +`source_model: hmt_costing_obr_certified`; rates and eligibility parameters +are `restated` announced-government design with `administrative_data`. +The deck does not cite a source for its beneficiary count or gain calculations; +these are presented as IFS `own`, `arithmetic`. Its maximum business-rate +saving is also IFS arithmetic. `point` is used for printed single estimates; +the £12,000–£21,000 benefiting-property range uses range endpoints. No +uncertainty range is inferred. There are no rows labelled `central` in this deck. + +- Reused `tax_threshold_level` (GBP): the £10m cap on qualifying Founders' + Relief gains and the lower/upper rateable-value bounds identifying RHL + properties benefiting from higher relief thresholds. +- Proposed `statutory_tax_rate` (percent): the statutory 10% Founders' Relief rate, + its current 24% standard-rate comparator, and the temporary 0% electricity + VAT rate. These are statutory parameters, not effective marginal rates. +- Proposed `taxpayer_gain` (GBP): the printed maximum £1.4m gain per + Founders' Relief beneficiary, with the maximum recorded in conditions. +- Proposed `business_rates_bill_change` (GBP): maximum annual bill saving + to an RHL property from the higher relief thresholds, £7,146 in 2027-28; + positive means a gain to the business. + +Fiscal-year impacts use their end year. The BADR £0.3bn bullet omits the +year; 2031–32 is inherited from the preceding slide's final-year comparison +and its adjacent Founders' Relief bullet. That row has medium parse confidence +and explains the inheritance. The annual count of 600 beneficiaries and +average £500,000 gain have no year printed; they use an annual 2026 +publication-year marker, with explicit `period_assignment` and `horizon` +conditions and medium confidence. This marker does not claim the relief operated in 2026. +Unspecified-year parameters and the maximum £1.4m gain use point-in-time +2026 as announcements, with no fiscal-year condition. No baseline proposal. + +### Omissions and source issues + +- No effective marginal rates, distributions or unlabelled charts occur in + this deck. No amounts are inferred from qualitative bullets. +- Dates and durations are descriptive scope rather than numerical impact + rows: the bank surcharge's 15-month period; two years of business-rate + discounts; the 2029 revaluation; April 2028 income-tax revenue devolution. + The devolution slide prints no quantified spending or revenue amount. +- The title slide prints “28 October 2026”, despite the assignment describing + the 29 October briefing and PDF metadata showing creation/modification on + 29 October. Publication date follows the printed cover (2026-10-28); the + contradictory date evidence is preserved here, not silently corrected. +- IFS's £1.1bn combined savings/property yield is retained verbatim. The + corresponding Table 6.1 line-61/62 final-year amounts are £455m and £590m, + totalling £1.045bn. Different rounding/aggregation could explain the + displayed £1.1bn; no correction or derivation is staged. +- The £1bn HMRC compliance/debt-collection figure is narrower than line 45's + full £3.160bn. It is not treated as a contradictory costing of the full package. + +### Verification + +The 18 individual rows pass `row_problems` from the harvest contract with +zero problems. All 18 short quotes were matched against whitespace-normalised +`pdftotext -layout` output and visually checked on the rendered slides. +Random spot-check seed 230 selected the following ten local rows. Each was +reopened at its slide and checked for exact value, sign, unit and period: + +| Local row | Slide | Printed value | Sign/basis | Period | +|--:|--:|---|---|---| +| 1 | 2 | £7bn | positive Exchequer yield, GBP | 2031-32 | +| 6 | 2 | £0.8bn | positive Exchequer yield, GBP | 2031-32 | +| 7 | 3 | £0.3bn | positive Exchequer yield, GBP | inherited 2031-32, disclosed | +| 8 | 3 | £0.3bn | positive Exchequer cost, GBP | explicit 2031-32 | +| 10 | 3 | 24% | standard statutory rate, percent | 2026 context marker | +| 11 | 3 | £10m | qualifying gains cap, GBP | 2026 announcement marker | +| 13 | 3 | £1.4m | maximum positive taxpayer gain, GBP | 2026 announcement marker | +| 14 | 3 | £500,000 | average positive beneficiary gain, GBP | annual, year unspecified; 2026 marker disclosed | +| 15 | 4 | £12,000 | lower rateable-value bound, GBP | 2027-28 | +| 16 | 4 | £21,000 | upper rateable-value bound, GBP | 2027-28 | + + +## First lane's family verification (29 October 2026, 106 rows) + +The required command, with its uv cache confined to the ignored family primaries +directory, completed successfully: + +```sh +UV_CACHE_DIR=.ab2026-primaries/uk_ifs_ab2026/uv-cache PYTHONPATH=. uv run -q python pipeline/ab2026_harvest_contract.py sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026 +``` + +```text +sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026: 106 rows, 0 problems +``` + +Re-running `stage.py` produced the same gzip SHA256 before and after: +`4f0c9cd197d970486608ea093bf3822ae1d92fa56ebc4a2ac1fae3086430b1cb`. +68 text-row value_raw strings were also matched at their exact PDF slide +locators. Sixty-five quotes match the whitespace-normalised extraction directly; +three Boileau chart annotations interleave with other columns in pdftotext and +were confirmed against rendered slides 7 and 9. All 38 embedded fiscal-table +cells were independently checked visually. All quotes have fewer than 15 words +and contain value_raw. + +The final family random sample uses seed 230, ten of 106 rows, one-based gzip +indices. Each primary was reopened at the locator and its number, sign, unit and +period checked. All ten passed; unspecified dates are disclosed markers, not +confirmed implementation dates. + +| Row | Primary / locator | Value and sign | Normalized unit | Period checked | +|--:|---|---|---|---| +| 3 | Stockton, slide 7, current budget deficit | -0.4, surplus direction | percent of GDP | FY2029-30 / 2030 | +| 21 | Stockton, slide 7, PSND ex BoE year-on-year change | 3.4, positive change | percent of GDP as printed | FY2026-27 / 2027 | +| 39 | Stockton, slide 8, forecast risk annotation | roughly 1 in 4 | share 0.25 | Spring 2027 inference disclosed | +| 56 | Wernham, slide 8, gas reform winners | 60%, better off | share 0.60 | implementation unspecified; 2026 publication marker | +| 69 | Boileau, slide 7, Health and Social Care | 2.7%, positive real growth | percent | annual average FY2027-28 to FY2030-31 / 2031 | +| 85 | Boileau, slide 10, historical top-ups | 1 percentage point increase | percentage_points 1 | historical since 2010; 2026 snapshot | +| 87 | Boileau, slide 11, day-to-day reserve | 40%, already allocated | percent | FY2027-28 to FY2028-29 / 2029 | +| 91 | Adam, slide 2, business investment allowances | £1.1bn, positive yield | GBP 1,100,000,000 | FY2031-32 / 2032 | +| 93 | Adam, slide 2, HMRC staffing/debt collection | £1bn, positive yield | GBP 1,000,000,000 | FY2031-32 / 2032 | +| 106 | Adam, slide 5, electricity VAT | 0%, statutory rate | percent 0 | announcement at publication in 2026; no fy | + +Registered-key scope review covered every non-null row: + +| Registered key suffix (all prefixed ab2026__) | Table 6.1 line | Printed scope checked | +|---|--:|---| +| household_energy_payment_100_bands_a_to_d | 1 | one-off payment and all-household mean/receipt estimates | +| fuel_duty_5p_cut_extended_and_rpi_rise_deferred | 3 | 5p cut/freeze extension and its Jan-Jun average support | +| bus_fare_cap_2_england_outside_london_2027 | 4 | £2 fare parameter; registry timing/geography explicitly sourced in note | +| founders_relief_cgt | 26 | relief costing, design, beneficiary count and gains | +| distributions_framework_modernised | 49 | reclassification of capital gains as dividends | +| badr_lifetime_limit_500000 | 60 | further cut to BADR | +| business_rates_sbrr_rhl_thresholds_raised | 13 | benefiting rateable-value range and maximum saving from threshold increase | +| writing_down_allowance_12pc_and_fya_50pc | 58 | business investment allowances | +| electricity_vat_zero_rate_to_july_2027 | 2 | Adam statutory zero-rate parameter, no full-period gain/cost attached | +| package_total_tax_policy_decisions | total | net Budget tax rise in final forecast year | + +Wernham's full-period VAT *impact* uses a proposal because it includes prior +relief; Adam's zero-rate *parameter* is directly stated for the measure and is +not a costing of the full period. All broader or unidentified packages use null +measure_key with proposals. Source issues are preserved: Adam's cover date, +savings/property rounding, Boileau's calendar/fiscal target wording and undated +flows, Wernham's undated gas reform, and Stockton's uncited attribution. None +was silently corrected. + diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/claims_staged.jsonl.gz new file mode 100644 index 000000000..ba5746a19 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/manifest.jsonl new file mode 100644 index 000000000..bb5978c1c --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/manifest.jsonl @@ -0,0 +1,14 @@ +{"access": "direct", "bytes": 318348, "date": "2026-10-29", "doc_type": "pdf", "note": "Fresh curl with required Safari User-Agent at 2026-10-29T15:43:43.348010+00:00; HTTP 200. Fresh bytes equal the supplied assignment local copy. Local stockton.pdf confirmed to be Weathering-the-fiscal-storm-IS.pdf.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "fd09e707a4bc0a8e0a3de4a3fa902c8ccdc1e4c44ccdd0dee92866857aa4690b", "title": "Weathering the fiscal storm?", "url": "https://ifs.org.uk/system/files/2026-10/Weathering-the-fiscal-storm-IS.pdf"} +{"access": "local copy", "bytes": 231180, "date": "2026-10-29", "doc_type": "pdf", "note": "Fresh curl with required Safari User-Agent at 2026-10-29T15:43:43.349040+00:00; HTTP 403. Fetch refused; hashed the coordinator's supplied local copy. Superseded by TW_1, also manifested; no rows cite TW_0.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "abb63d9c4ecd21c3c9173077c5e92d8015c7cc30aebd12be159185d7d157f12a", "title": "Cost of living measures (TW_0, superseded)", "url": "https://ifs.org.uk/system/files/2026-10/Cost-of-living-measures-TW_0.pdf"} +{"access": "direct", "bytes": 222191, "date": "2026-10-29", "doc_type": "pdf", "note": "Fresh curl with required Safari User-Agent at 2026-10-29T15:43:43.349250+00:00; HTTP 200. Fresh bytes equal the supplied assignment local copy. Rows cite TW_1; TW_0 is separately manifested under changed-primary rule.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "6ed174b22b4d22a34c8bbd450194fb2b4181a9d566b137913bee52ca49a0299b", "title": "Cost of living measures (TW_1, revised)", "url": "https://ifs.org.uk/system/files/2026-10/Cost-of-living-measures-TW_1.pdf"} +{"access": "direct", "bytes": 157838, "date": "2026-10-29", "doc_type": "pdf", "note": "Fresh curl with required Safari User-Agent at 2026-10-29T15:43:43.350606+00:00; HTTP 200. Fresh bytes equal the supplied assignment local copy. ", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "7403ecc0641b23f5ffc0cb28f67435dbd1b8df6b124874ffae7ae7f75e357aa6", "title": "Spending on public services: the Achilles heel", "url": "https://ifs.org.uk/system/files/2026-10/Spending-on-public-services-the-Achilles-heel-BB.pdf"} +{"access": "direct", "bytes": 133005, "date": "2026-10-28", "doc_type": "pdf", "note": "Fresh curl with required Safari User-Agent at 2026-10-29T15:43:43.353397+00:00; HTTP 200. Fresh bytes equal the supplied assignment local copy. Cover prints 28 October 2026; briefing event and PDF creation metadata are 29 October. Publication date follows cover.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "6792dc448f40d34f174b6a3c839863b5c969a7334263f5d6b539be62a0428bb8", "title": "Tax measures", "url": "https://ifs.org.uk/system/files/2026-10/Tax-measures-SA.pdf"} +{"access": "browser text", "bytes": 5401, "date": "2026-10-28", "doc_type": "web page text", "note": "The harvest read https://ifs.org.uk/articles/autumn-budget-2026-initial-response in the Claude desktop app's built-in browser on 2026-10-29 between 16:56Z and 16:58Z, as an ordinary page visit with no challenge solved, and saved the text of the page's
element as ifs-initial-response-main.txt. This line hashes that text, and rows cite it. An in-page fetch of the HTML gave 257,037 bytes, sha256 909aadc20622e80e3adf20cb2f8002efec0b7279ebff70b658d55e2ac6ac6455. ifs.org.uk returns Cloudflare 403 to curl, and the HTML embeds per-request tokens: two fetches of the same length gave different hashes. The page prints publication on 28 October 2026.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "962f737e4dfb70416f76a7fc3104f9c4d6b04ef6566a58e0e55fd9db709136ff", "title": "Autumn Budget 2026: initial response", "url": "https://ifs.org.uk/articles/autumn-budget-2026-initial-response"} +{"access": "browser text", "bytes": 12403, "date": "2026-10-28", "doc_type": "web page text", "note": "The harvest read https://ifs.org.uk/collections/autumn-budget-2026 in the Claude desktop app's built-in browser on 2026-10-29 between 16:56Z and 16:58Z, as an ordinary page visit with no challenge solved, and saved the text of the page's
element, which prints Helen Miller's opening remarks at the 29 October briefing, as ifs-collection-opening-remarks-main.txt. This line hashes that text, and rows cite it. An in-page fetch of the HTML gave 237,388 bytes, sha256 0a7a5c7c439d2e46703cea8fc5040e0b9f6a11451bf604439ee42198ce89a291. ifs.org.uk returns Cloudflare 403 to curl, and the HTML embeds per-request tokens, so rows cite the text, not the HTML. The page prints publication on 28 October 2026.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-10-29", "sha256": "5991ccec0e0ebb90952937f23400039a8386c047a4b44c9cd4391f535504723c", "title": "Autumn Budget 2026 (IFS collection page: opening remarks by Helen Miller)", "url": "https://ifs.org.uk/collections/autumn-budget-2026"} +{"access": "flourish public data", "bytes": 912453, "date": "2026-10-29", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/growth-real-household-disposable-income-over-decade-1950s-2020s, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30734907. The public page https://public.flourish.studio/visualisation/30734907/ (HTTP 200, 15,106 bytes, sha256 3bdcec5cc59a3104c668a9a92470cc8bc6fc9e30f4498337ccf730122c7c6809) names the embed https://flo.uri.sh/visualisation/30734907/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:23Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 179; data last updated 2026-10-29T11:55Z. Lead sentence (data-items.json): The 2020s are set to be the worst decade for real income growth since 1950.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "99d8b19e36132340356adfcd9206cc26beb37484b3213cbfaa416dd39c9a8f9a", "title": "Growth in real household disposable income over the decade, 1950s to 2020s", "url": "https://ifs.org.uk/data-items/growth-real-household-disposable-income-over-decade-1950s-2020s"} +{"access": "flourish public data", "bytes": 909632, "date": "2026-10-28", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/current-budget-deficit-march-2026-and-october-2026-forecasts, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30726471. The public page https://public.flourish.studio/visualisation/30726471/ (HTTP 200, 14,818 bytes, sha256 affe39197809c2177e28148b5a04e8c2335f66990462dd4559aa892a54d84aff) names the embed https://flo.uri.sh/visualisation/30726471/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:23Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 105; data last updated 2026-10-28T18:25Z. Lead sentence (data-items.json): The government is still on course to run a current budget surplus by 2029-30, but smaller, and with more of the fall in borrowing in later years.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "db33c42dce0a78f12eef4c58497dbb9d2b3f0b3b304018fdf26f2052995f3618", "title": "Current budget deficit, March 2026 and October 2026 forecasts", "url": "https://ifs.org.uk/data-items/current-budget-deficit-march-2026-and-october-2026-forecasts"} +{"access": "flourish public data", "bytes": 911264, "date": "2026-10-28", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/headroom-share-gdp, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30726788. The public page https://public.flourish.studio/visualisation/30726788/ (HTTP 200, 14,816 bytes, sha256 97b32b756569612128c96cd708cda8da9f6667ac8909229af53e49fec529715e) names the embed https://flo.uri.sh/visualisation/30726788/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:24Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 78; data last updated 2026-10-28T18:40Z. Lead sentence (data-items.json): Faced with a worse forecast, the Chancellor has chosen to allow borrowing to increase, which leaves him less scope to absorb bad news in future.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "ce839de3a697429a34906b427d87f40ae9a9adccaf7b522a3b7d6d6bfb3bdf82", "title": "Headroom as share of GDP", "url": "https://ifs.org.uk/data-items/headroom-share-gdp"} +{"access": "flourish public data", "bytes": 909037, "date": "2026-10-28", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/real-gdp-growth-over-forecast, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30726917. The public page https://public.flourish.studio/visualisation/30726917/ (HTTP 200, 14,860 bytes, sha256 b76d9bd5810ca9c03e95b979681813deb73747c61e7dadae1b3108131fe7ae3b) names the embed https://flo.uri.sh/visualisation/30726917/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:24Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 34; data last updated 2026-10-28T18:45Z. Lead sentence (data-items.json): OBR expects growth to slow significantly in 2027, but by 2030-31 they expect the level of GDP to fully catch up with their expectations from March.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "a0a5eb60d2b40f76bbd78389bbb8ef3592ebee447e2746e6becc56c31fd60a5c", "title": "Real GDP growth over the forecast", "url": "https://ifs.org.uk/data-items/real-gdp-growth-over-forecast"} +{"access": "flourish public data", "bytes": 909837, "date": "2026-10-28", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/average-annual-growth-real-household-disposable-income-parliament, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30726939. The public page https://public.flourish.studio/visualisation/30726939/ (HTTP 200, 15,104 bytes, sha256 33e963b9c5d403b849097d33833667c2681f8317967d4de6ad6e93f7e2708b39) names the embed https://flo.uri.sh/visualisation/30726939/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:25Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 37; data last updated 2026-10-28T18:48Z. Lead sentence (data-items.json): OBR forecasts household disposable incomes to grow by 0.4% per year during this parliament, making it the second worst of any parliament since 1979.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "96086a29b440505c6b4010e7844320b5d8179572c2f9d7585389b8a298a7d253", "title": "Average annual growth in real household disposable income, by parliament", "url": "https://ifs.org.uk/data-items/average-annual-growth-real-household-disposable-income-parliament"} +{"access": "flourish public data", "bytes": 920130, "date": "2026-10-28", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/long-term-impact-announced-tax-changes-fiscal-event, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30726047. The public page https://public.flourish.studio/visualisation/30726047/ (HTTP 200, 15,014 bytes, sha256 7830f65c93c4ce3a1d709188047b119f345b0eb9bcfd0fdfab592df3041b00bb) names the embed https://flo.uri.sh/visualisation/30726047/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:25Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 187; data last updated 2026-10-28T18:22Z. Lead sentence (data-items.json): Today's Budget will increase the overall tax take by around 0.2% of GDP: much smaller increases than the previous two Budgets of this parliament.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "3da8f416456fc61e99144bf23563bc553eefb8fa751251aa9e3cacc73af10c44", "title": "Long-term impact of announced tax changes by fiscal event", "url": "https://ifs.org.uk/data-items/long-term-impact-announced-tax-changes-fiscal-event"} +{"access": "flourish public data", "bytes": 912450, "date": "2026-10-28", "doc_type": "flourish_json", "note": "IFS data item https://ifs.org.uk/data-items/number-individuals-aged-16-paying-higher-or-additional-rate-income-tax-0, which this line does not hash: ifs.org.uk refuses curl. Its chart is Flourish visualisation 30727239. The public page https://public.flourish.studio/visualisation/30727239/ (HTTP 200, 15,106 bytes, sha256 4954c827579c86800908939fda087afb48d1fac758c282917259c938918e1f90) names the embed https://flo.uri.sh/visualisation/30727239/embed. This line hashes the embed, an HTML page whose inline _Flourish_data, _Flourish_data_column_names and _Flourish_settings carry the chart's data and settings; the rows read them with a JSON decoder, never off an image. curl with a Safari User-Agent fetched it at 2026-11-03T21:00:25Z (HTTP 200); the bytes match the fetches of 2026-10-29T18:20Z and of 2026-11-03 between 18:05Z and 18:31Z. Flourish version 69; data last updated 2026-10-28T19:22Z. Lead sentence (data-items.json): The OBR now forecasts 10.8 million people will pay the higher or additional rate of income tax by March 2031.", "publisher": "Institute for Fiscal Studies", "retrieved": "2026-11-03", "sha256": "b4303da3a3371585ab0c000a6f6419c07ae67391fd9c37efcdbc495a0f51ea6b", "title": "Number of individuals aged 16+ paying higher or additional rate income tax", "url": "https://ifs.org.uk/data-items/number-individuals-aged-16-paying-higher-or-additional-rate-income-tax-0"} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/NOTES.md new file mode 100644 index 000000000..7930900a0 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/NOTES.md @@ -0,0 +1,88 @@ +# uk_ippr: IPPR, Autumn Budget 2026 + +This family stages IPPR's three responses to the Budget on 28 October 2026, found on the ippr.org media-office listing: + +- "‘Unfinished business’ on economic reform after sound Budget, says IPPR"; +- "IPPR North reacts to Andy Burnham’s first Budget"; +- "IPPR Scotland reacts to Andy Burnham's first Budget". + +The listing shows nothing on 29 October. The source slug is `ippr`, as in the AB2025 `uk_ippr` family. + +**Working files.** `stage.py`, the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/thinktanks-a/uk_ippr/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The lane's local primaries folder (`.ab2026-primaries/uk_ippr/`) was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. + +`stage.py` holds the rows as data and rewrites `manifest.jsonl` and `claims_staged.jsonl.gz` byte for byte. `stage.py --verify` checks each primary's sha256 and finds every quote in its page's text. Result: 0 problems. + +- **Rows:** 3 (restated 2, own 1). +- **Primaries:** 3. + +## Access recipe + +- **The listing:** the media-office listing (https://www.ippr.org/media-office, pages 1 and 2) was fetched on 2026-10-29 to find the responses. `/news-and-media` returns 404, and `/articles` lists no Budget piece. +- **The releases:** all three were fetched directly (`curl -sSL`, browser User-Agent, HTTP 200), "Unfinished business" at 16:17Z and the North and Scotland releases at 16:35Z. +- **`dateModified` is a render time, not an edit:** each page's JSON-LD showed a `dateModified` on 29 October (16:04Z, 16:21Z, 16:34Z), after its 28 October `datePublished`. Review B's fetches on 4 November show 14:39–14:46Z that day with byte-identical length, and two fetches of the same page 30 minutes apart differ only in that field and Cloudflare's email tokens. So the field records when the page was served, and no edit after publication is shown. The copies hashed are the fetches above. Nothing came from a local copy. + +## Rows by primary and measure key + +| primary | sha256 | rows | +|---|---|--:| +| ‘Unfinished business’ … says IPPR | `f834beaad7802472…` | 2 | +| IPPR North reacts … | `9b1e6ee72f3af251…` | 1 | +| IPPR Scotland reacts … | `9f328d542179e8f8…` | 0 | + +| measure_key | rows | +|---|--:| +| `null` (1 with a proposed key, 2 context) | 3 | + +## The three rows + +1. **"It will lower inflation by at least 0.2 percentage points"** (Carsten Jung, on "the cost of living support announced today"). + - Staged as `cpi_inflation_effect`, 0.2, `range_low`, with `sign_convention: "as worded: positive = reduction in CPI inflation"`: IPPR prints the magnitude unsigned, README rule 10 keeps the producer's sign, and "at least" makes it a lower bound (changed on 4 November, review B finding 1). Context, with no proposed key: IPPR's words do not define the scope (changed on 3 November, thinktanks-a review finding 1). + - IPPR names no source and no period. The OBR's EFO paragraph 3.10 says the fuel duty changes and the temporary VAT cut on domestic electricity (Table 6.1 lines 2 and 3) "reduce CPI inflation by 0.22 percentage points in the second quarter of 2027". So the row is `restated` with `parse_confidence: medium`, at `period` 2027 (`point_in_time`). +2. **"the £18 billion annual taxpayer losses at the Bank of England"** (Carsten Jung). + - Staged as `apf_indemnity_losses`, the AB2025 uk_ippr proposal, which staged IPPR's "£22 billion" the same way. `restated`, source not stated. + - It has no year, so it sits at the scoring year 2026-27 with a `year_note`. This is context with no measure key. +3. **"Five per cent of income tax devolved to mayors would see an additional £4billion"** (IPPR North). + - IPPR North's own estimate of an option beyond the Budget's commitment on income tax devolution. Proposed key `ab2026_option__income_tax_5pc_share_devolved_to_mayors`, proposed metric `devolved_revenue` (gbp). + - It has no year, so it sits at the scoring year with a `year_note`. The release links the paper "Devolution that delivers: Fiscal power for regional growth". + +## Proposed keys and their scope + +- **`ab2026_option__income_tax_5pc_share_devolved_to_mayors`:** "Five per cent of income tax devolved to mayors". No Table 6.1 line. The Budget made commitments "on devolving business rates and a share of income tax to England's mayors" (line 21 covers the business rates share) without setting a 5% share. + +## Not staged, and why + +- **Design, not estimates** (README rule 8: spending allocations, financing remits and payment amounts are a measure's design): + - IPPR North's "£285million of good growth funds" is HM Treasury's allocation ("£285 million in 2027-28, comprising £165 million to support places with a mayor … to establish Good Growth Funds and £120 million of incubator capital funding for areas transitioning towards a devolution deal"), restated. It is a spending allocation, and part of Table 6.1 line 20, whose costing (−£340m in 2027-28) also includes the subsidy on the £1.5bn finance. The reworked uk_hmt_redbook family does not stage HM Treasury's £285m either (rule 8). + - IPPR North's "£1.5billion borrowing facilities for building infrastructure" is the size of HM Treasury's lending facility for Mayoral Strategic Authorities, a financing remit; the reworked uk_hmt_redbook family stages no `policy_parameter` row and does not stage it either. + - IPPR Scotland's "Bill support of £100 for households in lower council tax bands" is the Household Energy Payment's amount. +- **IPPR Scotland** prints no other number, so it gives 0 rows; it is manifested for the tally. +- **Pre-Budget IPPR releases about this Budget,** outside the assigned "responses of 28–29 October". Each was fetched and hashed on 2026-10-29, and each is a candidate for a follow-up if the family is to include pre-Budget options, as AB2025's did: + - 27 October, "Chancellor’s £20bn to invest would cost less than £1 billion in headroom: IPPR analysis" (sha256 `e26f9b14989f14af…`): £20bn of NWF and BBB investment costing under £1bn in debt interest and running costs in 2029-30. + - 15 October, "Get started with tax reform to pay for priorities…" (sha256 `97750268ba93a3b6…`): + - a £16bn package: CGT reform about £10bn, deferring Bank of England losses £5bn, a bank windfall surcharge £1bn; + - headroom down £7-15bn, and a buffer above £20bn; + - an online sales tax raising £1.5bn; + - a £2,000 energy price ceiling; + - the £200 a month LHA shortfall. + The Budget's bank surcharge and the gambling and online-retail measures overlap these options. + - 8 October, "Tax online sales to fund a high street business rate cut" (sha256 `fa570119927dcc54…`): + - at least £1.5bn a year from a 2% online sales tax; + - average savings of £1,400 and £2,500; + - multipliers cut from 38.2p and 43p to 28.2p and 41p; + - property taxes at 10.5% of revenue against an OECD average of 5.1%; + - business rates of £27.6bn. + The papers behind them were not fetched: "Cost of living, economic growth and stability: How to make this autumn budget a success", "Bricks vs clicks", "Devolution that delivers" and "Beyond headroom". + +## Review fixes, 3 November 2026 + +The thinktanks-a review (`harvest-staging/ab2026/reviews/verify-thinktanks-a.md` on the staging branch) approved this family with one fix, applied in an explicit block at the end of `stage.py`'s rows: + +- **Finding 1:** row 0 (−0.2pp CPI) is context. Jung says only "The cost of living support announced today", and Quilter-Pinner "action to support families with the cost of living". The lines 2 and 3 scope came from matching the OBR's paragraph 3.10, which is our inference, and README rule 3 says the scope must be the producer's. So the proposed key `ab2026__package_cost_of_living_support` is withdrawn, the reform hint and note stay, and `value_kind` is `range_high`. +- **Verification:** no primary was re-opened (the session's network policy refused ippr.org); the contract checker reports 3 rows, 0 problems, and a re-run of `stage.py` reproduces both files byte for byte. + +## Review fixes, 4 November 2026 + +Review B (PR #231, issue comment 6635498758) approved this family with fixes; review A's K-7(f) asked for the same NOTES correction as its second item. This session re-opened no primary. + +- **Finding 1 (coordinator's call: take the fix):** row 0 stores 0.2, `range_low`, `sign_convention: "as worded: positive = reduction in CPI inflation"`, as the OBR and red book CPI rows keep the magnitude (`uk_obr_tables` row 2653). +- **Finding 2 and K-7(f):** "Not staged" no longer says the red book stages HM Treasury's £285m or the £1.5bn as `policy_parameter`; the reworked red book stages neither. The access recipe reads JSON-LD `dateModified` as a render time, not an edit. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/claims_staged.jsonl.gz new file mode 100644 index 000000000..0e1df28c1 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/manifest.jsonl new file mode 100644 index 000000000..e3622f43d --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/manifest.jsonl @@ -0,0 +1,3 @@ +{"url": "https://www.ippr.org/media-office/unfinished-business-on-economic-reform-after-sound-budget-says-ippr", "title": "‘Unfinished business’ on economic reform after sound Budget, says IPPR", "date": "2026-10-28", "publisher": "IPPR", "sha256": "f834beaad7802472dc5f2e6f59738e3fb6ee953dd4357f7fc234e53939b1ea14", "bytes": 60580, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Press release. datePublished 2026-10-28T13:54:00Z, dateModified 2026-10-29T16:04:19Z (JSON-LD); fetched 2026-10-29T16:17Z (curl, browser User-Agent, HTTP 200)."} +{"url": "https://www.ippr.org/media-office/ippr-north-reacts-to-andy-burnhams-first-budget", "title": "IPPR North reacts to Andy Burnham’s first Budget", "date": "2026-10-28", "publisher": "IPPR North", "sha256": "9b1e6ee72f3af251748526f7911a27e508d207d2f8909e9e9d0074a42f45cab9", "bytes": 58127, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Press release, found on the ippr.org media-office listing; its £285m of Good Growth Funds and £1.5bn borrowing facilities are HM Treasury allocations and financing (design, README rule 8), not staged. datePublished 2026-10-28T14:12:00Z, dateModified 2026-10-29T16:21:46Z; fetched 2026-10-29T16:35Z."} +{"url": "https://www.ippr.org/media-office/ippr-scotland-reacts-to-andy-burnhams-first-budget", "title": "IPPR Scotland reacts to Andy Burnham's first Budget", "date": "2026-10-28", "publisher": "IPPR Scotland", "sha256": "9f328d542179e8f8f4a5a88d48a8f5a61680b3c2acb98bbc2eec95a25eb5b153", "bytes": 57561, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Press release, found on the ippr.org media-office listing; 0 rows (its only figure is the £100 Household Energy Payment, a policy parameter). datePublished 2026-10-28T14:21:00Z, dateModified 2026-10-29T16:34:34Z; fetched 2026-10-29T16:35Z."} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/NOTES.md new file mode 100644 index 000000000..13381161f --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/NOTES.md @@ -0,0 +1,322 @@ +# uk_obr_tables — October 2026 Economic and fiscal outlook + +**Working files.** `stage.py`, the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/obr-tables/uk_obr_tables/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The repository carries no primary bytes: fetch each primary from its `manifest.jsonl` URL (or, while obr.uk refuses non-browser clients, the coordinator's local copies) and check its sha256. + +Staged 2026-10-29; reworked 3 November 2026 under the OBR review, and on 4 November under reviews A and B (see "Review fixes" at the end). Source `obr_efo`. **2,800 rows (2,891 before the 3 November review, 2,797 at 4f424b9), 4 primaries (rows cite 3 of them), 98 individual registered measures plus the registered total-policy package.** All outputs are confined to this family. `stage.py` embeds all reviewed rows as metadata templates and cell data; rerunning needs only the Python standard library and reproduces the gzip without primary files or network access. + +## Access recipe and primaries + +Each resolved URL in the supplied OBR `PROVENANCE.md` was attempted once using `curl -sSL` and the exact Safari User-Agent requested in the assignment. The EFO landing page returned **403** at 2026-10-29T15:51:17Z; the chapter-2 workbook and detailed-table ZIP resolved URLs returned **403** at 15:51:18Z. No bypass was attempted. We used the supplied local policy and aggregate workbook members and PDF; every row and manifest entry records `access: "local copy"`. + +The coordinator supplied the local copies. The lane kept exact byte copies, failed-response headers and bodies and fetch timestamps in its local primaries folder, never committed. Workbooks were read with openpyxl `data_only=True`; the PDF with `pdftotext -layout`. `shasum -a 256` verified all three primaries. Both workbook member hashes match the browser-download provenance from 28 October, including the ZIP's recorded Last-Modified of Wed, 28 Oct 2026 14:05:59 GMT. + +The resolved ZIP URL is the publication URL for both members, with the member name in each row's note and the manifest. The ZIP container itself was not supplied locally and is not represented as if it had been read. The PDF attachment URL is absent from PROVENANCE; the blocked landing page prevented discovering it. Its manifest and rows therefore use the EFO landing URL and identify the supplied local PDF filename. The cover/imprint say October 2026; publication date 2026-10-28 follows the EFO-page date recorded in PROVENANCE. **The PDF changed after the lane read it (README rule 7).** GOV.UK replaced the attachment on 30 October 2026 (change history 2026-10-30T14:21:10Z) with a corrected version (sha256 `555e0c26…`, 1,771,863 bytes), and the OBR's download link (`obr.uk/download/economic-and-fiscal-outlook-october-2026/`) redirects to it. It adds a correction slip at physical p.4, and paragraph 3.19's first bullet now dates the abolition of carbon price support April 2028, where the 28 October text said April 2027. Review B found every other staged PDF quote unchanged in it. Its physical page is printed page + 4; the 28 October file's is printed + 3. The manifest lists it as a fourth primary; every PDF row cites the 28 October version (`9e0e9c34…`), which the lane read. + +| Primary file | Rows | Bytes | SHA-256 | +|---|---:|---:|---| +| efo-october-2026-detailed-forecast-tables-policy.xlsx | 2,520 | 106,602 | `cdcc2a06b100241bf3010bd159a4e5d43daef2348a3850797b1e88a308fd45fd` | +| economic-and-fiscal-outlook-october-2026-web-accessible.pdf (28 October) | 267 | 1,754,344 | `9e0e9c340e35e603066f3124a614fcd68feadb3d5d10d1f76fb536e150e6225e` | +| efo-october-2026-detailed-forecast-tables-aggregates.xlsx | 13 | 218,000 | `3ffa3f1e63667b2ae9fb9626dc1da881673227d43aeeb52f8c3db168a5c75d6b` | +| economic-and-fiscal-outlook-october-2026-web-accessible.pdf, corrected 30 October 2026 | 0 | 1,771,863 | `555e0c266a5c2a9a5fdeaee9a36425c6bf3b899fde456160945b5323f610c3f4` | + +## Coverage + +- Policy workbook Table 1.1: **2,520** cells, every numeric row series (420) across all six fiscal years, 2026-27 through 2031-32. This includes 2,112 numbered-measure component/total cells, 48 fiscally neutral cells, 30 non-scorecard cells and 330 summary cells. +- EFO chapter 3: **225** rows (316 before the 3 November review): Table 3.1 114 (its "Spending measures" and "Tax measures" rows repeat its "Direct effect" rows and were dropped); Table 3.3 35 costings plus 7 categorical uncertainty ratings; policy/behavioural prose and Box 3.1 69 (paragraph 3.20's financing requirement restored and Box 3.1's two measure counts added on 4 November). Table 3.2's 47 funding cells are design (rule 8) and are not staged. +- Headline fiscal context: **55** rows: 13 workbook cells (PSNB cash six years; ex-BoE PSND/GDP seven years) and 42 PDF cells (Table 7.1 headroom 13; Annex A Table A.9 PSNB, PSNFL and ex-BoE PSND 29). The current-budget and PSNFL rules include current pre-measures, post-measures and the printed memo excluding fuel-duty rises; welfare-cap margin is included. Forecast duplicates between the PDF and aggregate workbook are represented once. + +## Conventions + +- **Values and precision:** policy workbook values use their displayed integer £million formats (`0`, `#,##0`; eight exact General-format zeros), multiplied by 1e6. Unprinted cached decimal precision is not a claim. Decimal rounding is half away from zero; a stored negative fraction that displays zero is `0`. A LibreOffice PDF rendering independently confirmed these display conventions. Aggregate workbook values use displayed one-decimal precision. PDF £billion values multiply by 1e9 and £million by 1e6; no ratios, sums or inferred annual paths are staged. +- **Signs:** policy workbook prints “This table uses the convention that a negative sign implies a loss to the Exchequer (and is therefore an increase in PSNB).” PDF Tables 3.1/3.3 print “A positive sign implies an increase in borrowing.” Both are retained. The indirect-effect workbook row's conflict with that workbook legend is explicitly noted in those rows. Prose uses positive magnitudes for costs, yields or behavioural erosion exactly as worded; per-row conditions state the meaning. Headroom is positive margin, negative breach. +- **Period:** FY end year, with the printed `fy`; quarterly CPI peaks use calendar-year `point_in_time` and quarter detail without `fy`. An annual average or recurring prose amount appears once at the terminal forecast FY, with its interval in `aggregation`, rather than manufacturing six yearly values. Staffing figures are design (rule 8) and sit in `conditions.staffing`, not in rows. Box 3.1's undated share and counts sit at the publication-year anchor, 2026. Debt stocks preserve end-March timing and end-March-centred GDP denominators. +- **Central:** ordinary policy tables/prose are `point` estimates of the single final forecast; aggregate forecasts are `central`, meaning the OBR central forecast, and observed 2025-26 outturns are `point`. No statistical confidence interval is inferred. “High” ratings use categorical `value: 0` as the precedent's schema placeholder, not a numerical score. Health Foundation range endpoints span alternative reform options, not uncertainty for one policy. +- **Attribution:** 2,777 `own`, 23 `restated` (2,821 and 70 before Table 3.2's 47 rows went on 3 November). OBR-certified/HMRC/DWP-scrutinised costings follow the AB2025 `own` convention; OBR fiscal judgments use `obr_efo_forecast`. Twelve workbook fuel cells and two PDF fiscal fuel costings are restated `hmt_costing_uncertified`: EFO p.59 footnote 1 says the final Government costing arrived after certification. Six latest ONS outturn aggregate cells name ONS. Two social-care options name Health Foundation; one FTA effect names the Government/DBT impact assessment. OBR's CPI judgments remain its own estimates. ONS facts use `administrative_fact`; modeled estimates use `different_model`. +- **Scope:** all 98 numbered workbook titles match registry titles after whitespace/footnote normalization. Fiscal-head components retain their full measure's key, with component conditions; totals and components must not be summed as independent estimates. Only workbook row 552 and the PDF's explicit HMT-policy-table memo use the registered total-policy package. All other groupings use null plus a proposed key. Context levels use null without a proposed measure. Paragraph 3.28's salary-sacrifice revision is a context row with a null key (4 November, the coordinator's call on review A's H-6(b)); it is not recast as an AB2026 intervention. The AB2025 OBR family actually contains no headline fiscal aggregates; the live `Metric` enum supplies `fiscal_headroom`, and cross-family proposals supply the closest aggregate names. +- **Quotes/order:** full numeric/rating cells or full OGL prose sentences, preserving the printed number; PDF whitespace/line wraps normalized, footnote superscripts excluded from sentence text. Reading order is policy workbook row/column, PDF page/position, then aggregate workbook table/row/column. PDF printed page + 3 is the physical page of the 28 October file that rows cite (+ 4 in the 30 October correction). + +## Coverage by measure_key, including null + +99 keys on 2,207 rows, 1,577 of them `row_type: measure_component`. Of the 593 null rows, 535 carry a proposed key (374 of them `measure_component`), and 58 are context: 42 fiscal aggregates, 13 headroom rows, Box 3.1's two measure counts and paragraph 3.28's salary-sacrifice revision. Across the family, 1,951 rows are `measure_component`, 649 `measure_total` and 200 carry no row type. The uncertainty ratings are keyed to their measures. + +| measure_key | Rows | +|---|---:| +| `ab2026__advance_corporation_tax_abolished` | 12 | +| `ab2026__alcohol_duty_small_producer_relief` | 12 | +| `ab2026__artificial_intelligence_package` | 18 | +| `ab2026__badr_lifetime_limit_500000` | 43 | +| `ab2026__bank_surcharge_6pc_temporary` | 21 | +| `ab2026__benefits_in_kind_payrolling_delay` | 36 | +| `ab2026__benefits_removed_hospitalised_serious_offenders` | 18 | +| `ab2026__british_business_bank_backing_innovation` | 18 | +| `ab2026__british_industrial_competitiveness_scheme` | 25 | +| `ab2026__bus_fare_cap_2_england_outside_london_2027` | 18 | +| `ab2026__business_rates_ev_charging_relief` | 48 | +| `ab2026__business_rates_pubs_relief_35pc` | 48 | +| `ab2026__business_rates_retention_mayoral_authorities` | 31 | +| `ab2026__business_rates_rhl_transitional_support` | 48 | +| `ab2026__business_rates_sbrr_rhl_thresholds_raised` | 48 | +| `ab2026__business_rates_vape_shops_and_agcs_reliefs_removed` | 48 | +| `ab2026__business_tariff_suspensions` | 12 | +| `ab2026__cambridge_development_corporation` | 12 | +| `ab2026__carbon_price_support_removed` | 18 | +| `ab2026__carers_allowance_earnings_taper` | 18 | +| `ab2026__cash_isa_limit_held_at_20000` | 12 | +| `ab2026__civil_service_admin_budgets_cut_20pc` | 12 | +| `ab2026__civil_service_ai_fund` | 12 | +| `ab2026__climate_change_levy_rates_2028` | 12 | +| `ab2026__company_car_tax_rates_2030_31` | 36 | +| `ab2026__defence_admin_savings_reinvested` | 12 | +| `ab2026__defence_investment_plan_capital_reallocation` | 18 | +| `ab2026__defence_investment_plan_further_savings` | 18 | +| `ab2026__distributions_framework_modernised` | 19 | +| `ab2026__dwp_fraud_and_error_prevention` | 31 | +| `ab2026__early_years_books_access` | 12 | +| `ab2026__electricity_generator_levy_55pc` | 12 | +| `ab2026__electricity_vat_zero_rate_to_july_2027` | 20 | +| `ab2026__emi2_option_limit_120000` | 48 | +| `ab2026__ets_energy_from_waste_delay` | 12 | +| `ab2026__ev_charging_public_chargers` | 12 | +| `ab2026__first_time_buyer_isa` | 12 | +| `ab2026__food_and_heating_oil_tariff_suspensions` | 12 | +| `ab2026__foreign_permanent_establishment_exemption_mandatory` | 12 | +| `ab2026__foreign_sovereign_investments_taxation` | 61 | +| `ab2026__founders_relief_cgt` | 37 | +| `ab2026__franchised_higher_education_registration` | 18 | +| `ab2026__free_bus_travel_children_august_2026` | 12 | +| `ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred` | 15 | +| `ab2026__further_priorities_nhs_and_vawg` | 24 | +| `ab2026__gas_distribution_revenue_recognition_spread` | 12 | +| `ab2026__good_growth_funds` | 18 | +| `ab2026__growth_guarantee_scheme_expansion` | 21 | +| `ab2026__hgv_ved_1_for_12_months` | 12 | +| `ab2026__high_needs_local_authority_spending` | 18 | +| `ab2026__hmrc_tax_gap_package` | 105 | +| `ab2026__household_energy_payment_100_bands_a_to_d` | 18 | +| `ab2026__hvcts_deferrals_discounts_exemptions` | 42 | +| `ab2026__infected_blood_compensation_additional_report` | 12 | +| `ab2026__investment_for_growth` | 24 | +| `ab2026__landfill_communities_fund_credit_cap` | 24 | +| `ab2026__leeds_city_fund` | 24 | +| `ab2026__lifetime_isa_withdrawal_charge_20pc_above_cap` | 12 | +| `ab2026__local_apprenticeship_services` | 12 | +| `ab2026__low_value_imports_customs_relief_removed` | 60 | +| `ab2026__machine_games_duty_higher_stake_25pc` | 18 | +| `ab2026__mileage_allowance_payments_55p` | 36 | +| `ab2026__misogyny_prevention_programmes` | 12 | +| `ab2026__national_wealth_fund_capital` | 18 | +| `ab2026__online_marketplace_liability_uk_businesses` | 18 | +| `ab2026__package_total_policy_decisions` | 12 | +| `ab2026__parental_allowance_fathers_partners_adopters` | 12 | +| `ab2026__pension_death_benefits_two_year_rule_removed` | 30 | +| `ab2026__pension_tax_allowance` | 54 | +| `ab2026__private_hire_operators_vat_full_fare` | 12 | +| `ab2026__property_income_rates_plus_2pp` | 44 | +| `ab2026__rd_relief_claim_notification_form_removed` | 18 | +| `ab2026__red_diesel_duty_cut` | 12 | +| `ab2026__regional_growth_investments` | 18 | +| `ab2026__rough_sleeping_investment` | 24 | +| `ab2026__rough_sleeping_reprioritised_mhclg_budgets` | 18 | +| `ab2026__savings_income_rates_plus_2pp` | 20 | +| `ab2026__securities_transfer_tax` | 12 | +| `ab2026__social_and_affordable_homes_programme` | 12 | +| `ab2026__steel_tariff_and_quotas` | 18 | +| `ab2026__strategic_authorities_capacity_funding` | 12 | +| `ab2026__student_loan_interest_cap_6pc_plan_2_and_3` | 18 | +| `ab2026__supported_housing_licensing` | 12 | +| `ab2026__trading_allowance_3000` | 36 | +| `ab2026__uc_surplus_earnings_threshold_2500_extended` | 12 | +| `ab2026__uk_export_finance_defence_capacity` | 13 | +| `ab2026__uk_india_ceta_and_double_contributions_convention` | 19 | +| `ab2026__ukraine_winter_air_defence` | 18 | +| `ab2026__union_learning_fund` | 12 | +| `ab2026__us_llc_double_taxation_relief` | 12 | +| `ab2026__vat_5pc_family_days_out_summer_2026` | 12 | +| `ab2026__vat_medical_deputies_staffing` | 12 | +| `ab2026__vat_reverse_charge_overseas_services_restricted` | 12 | +| `ab2026__vat_zero_rate_donated_medicines` | 12 | +| `ab2026__vat_zero_rate_land_for_social_housing` | 12 | +| `ab2026__waste_crime_landfill_tax_clearances` | 18 | +| `ab2026__writing_down_allowance_12pc_and_fya_50pc` | 43 | +| `ab2026__your_first_home_equity_loan` | 19 | +| `ab2026__youth_guarantee_and_apprenticeships_spring_2026` | 18 | +| `null` | 593 | + +## Proposed measure keys and exact producer scopes + +All of these rows have `measure_key: null`. Names follow README rule 2 as harmonised on 3 November (review finding 9): a single measure is `ab2026__`, and a scope package's slug names the scope and carries no `obr`, except the OBR's own residual groups, which keep it (4 November, review B finding 15). Where the OBR publishes only a named residual group, its line decomposition stays unresolved; no guessed membership or registry key is attached. + +| Proposed key | Rows | Scope | +|---|---:|---| +| `ab2026__departmental_spending_growth_2031_32` | 13 | No Table 6.1 lines. “Departmental spending: Grow day-to-day spending by 0.7% in real terms in 2031-32, matching 0.7% average annual real terms growth from 2029-30 to 2030-31”. PDF describes the same baseline change as a £5.5bn reduction in the 2031-32 pre-measures RDEL assumption. (Was `ab2026__package_obr_departmental_spending_growth_2031_32`.) | +| `ab2026__package_carbon_price_support_and_cfd_levies` | 2 | Table 6.1 lines 70 and 71: row 2673's £0.4bn is their receipts (`measure_component`, excluding the backdated AME support of footnote 9), and row 2677's £0.5bn their totals. The CfD-levy funding sits in line 70: its "Environmental levies" receipts (−480 / −63 / −130 / −408 / −450) are the only environmental-levies effect of any decision (review B finding 7). Footnote 9's £0.8bn of backdated BICS and Supercharger support is line 70's current AME in 2027-28 and is keyed to line 70 as a component. The 28 October PDF dated CPS abolition April 2027; the OBR's 30 October correction moved it to April 2028, matching line 71. (Was `ab2026__package_obr_carbon_price_support_and_cfd_levies`.) | +| `ab2026__package_civil_service_transformation_programme` | 1 | The OBR's “civil service transformation programme ... reduce resource spending”. Membership of Table 6.1 lines 63 and 64 is probable but not established: the OBR names no lines, and lines 63 and 64's totals average £0.56bn from 2028-29 against its £0.5bn (review B finding 14). (Was `ab2026__package_obr_civil_service_transformation_programme`.) | +| `ab2026__package_compliance_measures_announced` | 1 | No Table 6.1 line list. Box 3.1 (p.66): "Of the compliance measures announced in this Budget". The OBR does not list them; they are probably Table 6.1 line 45's items and line 46, but that is not stated, so the scope is the OBR's words. | +| `ab2026__package_corporation_and_bank_tax_changes` | 7 | OBR “Changes to corporation and bank taxation”; paragraph 3.16 explicitly discusses line 58 WDA/FYA, line 55 bank surcharge, and line 54 overseas sovereign immunity. Complete Table 6.1 line decomposition and fiscal-head allocation are not published; unresolved, no inferred additional membership. (Was `ab2026__package_obr_corporation_and_bank_tax_changes`.) | +| `ab2026__package_defence_investment_plan` | 1 | OBR “funding for the defence investment plan” / “the defence investment plan, which increases departmental resource spending (RDEL)”; related to Table 6.1 Defence Investment Plan entries, but complete line decomposition is not published and is unresolved. No inferred40–43 membership. (Was `ab2026__package_obr_defence_investment_plan`.) Shared with the red book's Defence Investment Plan row. Row 2522's £1.8bn a year is the package's RDEL part (`measure_component`, review A's K-2): it matches gross RDEL (line 40's averages £1,766m), not the lines' net effect. | +| `ab2026__package_dividend_and_capital_gains_tax_changes` | 6 | Table 6.1 lines 26,49 and 60: OBR “Changes to dividend and capital gains taxation”. (Was `ab2026__package_obr_dividend_and_capital_gains_tax_changes`.) | +| `ab2026__package_fuel_duty_and_electricity_vat` | 11 | The receipts of Table 6.1 lines 2 and 3 only (Table 3.1's tax groups are receipts groupings, review B finding 3); OBR “Fuel duty freeze and VAT off domestic energy bills”. Excludes household council-tax rebate line 1. (Was `ab2026__package_obr_fuel_duty_and_electricity_vat`.) | +| `ab2026__package_fuel_duty_freezes_since_2010_11` | 1 | OBR cumulative 2010-11 to 2027-28 fuel duty freezes and 5p cut relative to stated RPI uprating; includes Table 6.1 line 3 and earlier freezes since2010-11. Not the cost of the AB2026 measure alone. (Was `ab2026__package_obr_historical_fuel_duty_freezes_and_5p_cut`.) RF's `ab2026_option__fuel_duty_rpi_uprating_since_2011` is the same pair of paths seen from the other side (RPI uprating since January 2011 against the freezes); the two keys stay separate, and each family's NOTES names the other (review A's K-6). | +| `ab2026__package_government_decisions_since_march_2026` | 340 | Table 6.1 lines 1–98, plus the three fiscally neutral measures (PWLB debt relief, Scottish APD devolution, landlord registration fee) and the two non-scorecard policies listed above. OBR “Total effect of Government decisions”, with direct, indirect, receipt, expenditure and fiscal-head projections distinguished in conditions. Includes indirect effects where stated; not the HMT scorecard-only package. (Was `ab2026__package_obr_government_decisions_since_march_2026`.) Shared with the red book's Table 1.3 "Total effect of policy decisions" and RF's restatement. **Parts and wholes (rule 9, 4 November):** the totals (workbook row 549 and Table 3.1's total) are `measure_total` with no `component`; every part is `measure_component`, with `component` the label its primary prints: the workbook's direct and indirect effects, its total of receipts measures ("Total effects of receipts measures", which keeps `revenue_change`) and its 288 lines by head ("Receipts: " or ": "), Table 3.1's direct and indirect effects, and paragraphs 3.2 and 3.5. Never sum a part with the total. The workbook's total of expenditure measures moved to the spending-decisions key and paragraph 3.4's tax line to the tax-decisions key (review B finding 6). | +| `ab2026__package_national_wealth_fund_and_british_business_bank` | 5 | Table 6.1 lines 29 and 30 together, plus their associated financial transactions in Table 6.2; OBR “funding available for the National Wealth Fund and the British Business Bank ... to invest in financial assets”. Paragraph 3.20's effects: the financing requirement (`cash_requirement_change`, restored 4 November), the net debt effect (£3.4bn) and the borrowing effect (£0.5bn) are wholes; the gross debt (£3.9bn) and the additional income (£0.6bn) are their parts (`measure_component`). (Was `ab2026__package_obr_national_wealth_fund_and_british_business_bank`.) | +| `ab2026__package_non_scorecard_decisions` | 12 | No Table 6.1 lines. “Direct effect of non-scorecard decisions”: exactly the departmental spending assumption and public-pension valuation changes above. (Was `ab2026__package_obr_non_scorecard_decisions`.) | +| `ab2026__package_obr_other_ame_spending_decisions` | 6 | OBR Table 3.1 “Other AME spending decisions”; excludes net unfunded pensions valuation, and is net of the council tax rebate shown on its own line (−£2.6bn in 2026-27): Table 6.2 prints "Other spending decisions" at 0.4 in 2026-27, the rebate's 2.6 plus this group's −2.2 (review B finding 9). (Was `ab2026__package_other_ame_spending_decisions` until 4 November, review B finding 15.) Producer does not supply a full Table 6.1 line-number decomposition in PDF. (Was `ab2026__package_obr_other_ame_spending_decisions`.) | +| `ab2026__package_obr_other_departmental_spending_changes` | 7 | The OBR's Table 3.1 group: departmental spending changes excluding the pensions valuation, including the DEL funding for line 1's council tax rebate (the group, 5.4 / 1.2 / 1.5 / −0.1 / −0.2 / −6.0, equals the workbook's DEL total less the pensions valuation's DEL, which includes line 1's −2,627; review B finding 9). It includes defence, capital spending and the £5.5bn 2031-32 pre-measures RDEL reduction, which has no Table 6.1 line. (Was `ab2026__package_other_departmental_spending_changes` until 4 November, review B finding 15.) Producer does not supply a full line-number decomposition in PDF. (Was `ab2026__package_obr_other_departmental_spending_changes`.) | +| `ab2026__package_obr_other_hmrc_compliance_and_debt` | 1 | OBR paragraph 3.13 residual “Other measures”: direct debt recovery, e-invoicing, debt collection agencies (components of Table 6.1 line 45), and online marketplace liability (line 46). (Was `ab2026__package_obr_other_hmrc_compliance_and_debt` until 3 November, and `ab2026__package_other_hmrc_compliance_and_debt` until 4 November.) | +| `ab2026__package_obr_other_tax_measures` | 6 | OBR Table 3.1 “Other tax measures”; residual of Table 6.1 tax measures after tax administration/compliance/debt, corporation/bank, savings/property, dividend/CGT and fuel/electricity VAT groups. PDF does not enumerate a full line-number decomposition. (Was `ab2026__package_obr_other_tax_measures` until 3 November, and `ab2026__package_other_tax_measures` until 4 November.) | +| `ab2026__package_planned_capital_spending_reductions` | 1 | OBR “Reductions in planned capital spending” / “changes to departmental capital spending”; PDF does not enumerate the exact Table 6.1 lines. (Was `ab2026__package_obr_planned_capital_spending_reductions`.) | +| `ab2026__package_property_and_savings_income_rates_receipts` | 7 | The receipts of Table 6.1 lines 61 and 62: Table 3.1's “Changes to savings and property income tax rates”. (Was `ab2026__package_obr_savings_and_property_income_tax_rates`.) **Receipts only (3 November):** Table 3.1 prints 0.1 in 2027-28 and 0.9 in 2029-30, against lines 61 and 62's totals of 160 and 954 (£m), but in line with their receipts (Table 3.3 gives line 61's as 2, 543 and 400 from 2027-28). So it is not `ab2026__package_property_and_savings_income_rates`, which is exactly lines 61 and 62. | +| `ab2026__package_spending_decisions_since_march_2026` | 13 | OBR “Direct effect of spending measures” / “Spending measures”: expenditure-side effects of decisions since March, including unfunded public service pensions valuation and the £5.5bn 2031-32 RDEL assumption reduction. This is not the HMT total-spending package. Table 6.1 lines 1–98 can affect expenditure fiscal heads; a complete narrower line decomposition is not published and remains unresolved. (Was `ab2026__package_obr_spending_decisions_since_march`.) Since 4 November it also holds the workbook's total of expenditure measures (I520:N520), Table 3.1's direct effect of spending measures reversed (review B finding 6). | +| `ab2026__package_tax_administration_compliance_and_debt_collection_receipts` | 6 | The receipts of Table 6.1 lines 45 and 46: OBR “Tax administration, compliance and debt collection measures”. The group (−0.1 / −0.5 / −0.6 / −2.4 / −2.9 / −3.6) equals lines 45 and 46's receipts (107 / 455 / 567 / 2,411 / 2,881 / 3,630) in all six years; their totals (8 / 262 / 434 / 2,248 / 2,733 / 3,423) round differently in every year (review B finding 3). It must not be attached to line 45 alone. (Was `ab2026__package_obr_tax_administration_compliance_and_debt`, then `ab2026__package_tax_administration_compliance_and_debt_collection` until 4 November.) Shared with RF's restatement. | +| `ab2026__package_tax_decisions_since_march_2026` | 6 | OBR Table 3.1 "Direct effect of tax measures": the direct effect of tax decisions since March 2026, as the OBR classifies them. Shared with RF's restatement of the same row. It equals −1 × the workbook's total of receipts measures, so it is a receipts grouping. Before 3 November these rows sat under the total package with `component: tax measures (OBR classification)`. Since 4 November it also holds paragraph 3.4's "reducing borrowing by an average of £6 billion over the final four years", the mean of this line from 2028-29 (review B finding 6). | +| `ab2026__package_temporary_business_rates_reliefs_receipts` | 1 | The receipts of Table 6.1 lines 12, 13 and 14 (paragraph 3.19's "net cost of around £0.5 billion in 2028-29" is their receipts, 536, against totals of 663; review B finding 3 and review A's K-7(g)): “package of temporary business rates measures” including real-terms freeze for certain sectors, pubs/live-music reliefs, small-business thresholds and extension of transitional support, partly offset by transitional relief supplement. (Was `ab2026__package_obr_temporary_business_rates_reliefs`, then `ab2026__package_temporary_business_rates_reliefs` until 4 November.) | +| `ab2026__private_landlord_register_fee_65` | 18 | No Table 6.1 lines. “Landlord registration fee”; receipts, current DEL and total. (Was `ab2026__package_obr_landlord_registration_fee`.) The costings family's spelling for the same measure. | +| `ab2026__public_sector_pensions_2024_valuations` | 27 | No Table 6.1 lines. “Public Sector Pensions: Net impact of the 2024 valuations”; departmental reductions, net public service pension payments and their net total. PDF calls this “Net impact of unfunded pensions valuation”. (Was `ab2026__package_obr_public_sector_pensions_2024_valuations`.) | +| `ab2026__pwlb_debt_relief_councils_severe_distress` | 12 | No Table 6.1 lines. “Provide Public Works Loan Board (PWLB) debt relief for councils in severe financial distress”; capital AME and total. (Was `ab2026__package_obr_pwlb_distress_debt_relief`.) The costings family's spelling for the same measure. | +| `ab2026__scottish_air_passenger_duty_devolution` | 18 | No Table 6.1 lines. “Devolving Air Passenger Duty to the Scottish Government in April 2027”; Scottish BGA, self-financed expenditure and total. (Was `ab2026__package_obr_scottish_air_passenger_duty_devolution`.) | +| `ab2026__state_pension_triple_lock_adjustment` | 2 | No Table 6.1 line: OBR paragraph 3.49 adjusted state pension triple lock expected April 2030, retaining CPI/2.5percent floor but linking catch-up to2029-30 earnings ratio. Figures 3.51 are historical simulations1990–2025, not the medium-term policy costing. (Was `ab2026__package_obr_adjusted_state_pension_triple_lock`.) The red book's spelling for the same measure. | +| `ab2026_option__fuel_duty_continued_freeze` | 1 | No Table 6.1 line as an announced measure: OBR paragraph 3.43 counterfactual “if fuel duty were to remain frozen until 2029-30”, extending line 3 beyond July2027. (Was `ab2026_option__obr_fuel_duty_frozen_until_2029_30`.) Shared with RF, whose series for the OBR's constant-duty-rate alternative prints the same £4.3bn in 2029-30. | +| `ab2026_option__health_foundation_social_care_reforms` | 2 | No Table 6.1 line: Health Foundation illustrative future social care reforms cited by OBR paragraph 3.41, from limited home-care reform to wider schemes including residential care; costs additional to current spending in 2035-36 per footnote 13. This is not a settled AB2026 policy. (Was `ab2026_option__obr_health_foundation_social_care_reforms`.) | + + +## Metric, unit and baseline proposals + +No unregistered enum literals are used. `fiscal_headroom` is registered in the live models even though the older README calls it a proposal. + +| proposed_metric | Rows | Scope | +|---|---:|---| +| `measure_count` | 2 | Box 3.1: the 15 measures expected to reduce the tax gap, and the four of them that target the small business tax gap (context counts, as the uk_thinktank_misc and uk_ifs_ab2026 families stage measure counts; review B finding 11). | +| `cash_receipts_change` | 1 | Self-assessment overlapping transition payments, £17bn in 2029-30; assumed extraordinary accruals adjustment excludes the temporary cash effect from PSNB. | +| `fiscal_balance_change` | 6 | Table 3.1's memo line, the total effect of Government decisions on the current budget deficit (README rule 10, 3 November). | +| `tax_gap_share_of_compliance_yield` | 1 | Box 3.1: the share of this Budget's compliance measures' yield the OBR expects to reduce the tax gap ("a third"). | +| `costing_uncertainty_rating` | 7 | Table 3.3 High final ratings; categorical placeholder zero. | +| `psnb_share_of_gdp` | 7 | PSNB as percent of nominal GDP. | +| `psnd_share_of_gdp` | 7 | Ex-Bank-of-England PSND as percent of nominal GDP; reuses AB2025 cross-family spelling. | +| `psnfl_share_of_gdp` | 7 | PSNFL as percent of nominal GDP; reuses AB2025 cross-family spelling. | +| `public_sector_net_borrowing` | 7 | Annual PSNB cash level in GBP. | +| `public_sector_net_debt` | 7 | End-March PSND stock explicitly excluding Bank of England, GBP. | +| `public_sector_net_debt_change` | 3 | Marginal stock debt effects of NWF/BBB investment and Your First Home lending, paragraphs 3.20/3.22. | +| `public_sector_net_financial_liabilities` | 7 | End-March PSNFL stock, GBP. | + +Proposed units: `percent_of_gdp` (28 rows, nominal GDP denominator, including one prose package effect and fiscal shares/headroom); `rating_category` (7 High uncertainty ratings); `measures` (Box 3.1's 2 counts). + +Registered metrics beyond `revenue_change`: `decisions_effect_on_borrowing` (91 rows, README rule 10), `fiscal_headroom` (13), `cpi_inflation_effect` (6), `benefit_cost_change` (2, paragraph 3.51's simulations), `cash_requirement_change` (1, paragraph 3.20's financing requirement) and `gdp_level_effect` (1). + +**For tranche 2:** HM Treasury's Table 6.2 (in `uk_hmt_tables`) stages the cash impacts of the same NWF and BBB financial transactions on the proposed `financial_transaction_cash_impact`, while paragraph 3.20's £1.9bn uses the registered `cash_requirement_change`. Both measure the cash effect of the same transactions, one as a cash impact and one as the financing requirement; the ingest settles the metric. + +Every `baseline_policy` is null; effect estimates use the following explicit unregistered baseline proposals. Rating, funding-level and aggregate context rows have no proposed baseline. + +| proposed_baseline, verbatim | Rows | +|---|---:| +| OBR pre-measures Autumn Budget 2026 policy parameters | 2,730 | +| Fuel duty policy reflected in OBR October 2026 economy forecast, confirmed before the final Budget parameters | 1 | +| Current social care spending (Health Foundation 2024 scenarios, additional spending in 2035-36) | 2 | +| Fuel duty rates increase in line with RPI inflation: stated policy since 2010-11 | 1 | +| Current triple lock uprating applied to historical outturn 1990–2025 | 1 | +| Earnings uprating applied to historical outturn 1990–2025 | 1 | + +## Not staged and unreachable material + +- **Design (rule 8), dropped on 3 November (review finding 1), 57 rows (58 until paragraph 3.20's financing requirement was restored on 4 November):** + - Table 3.2's 47 funding cells: HMRC and DWP baseline, Budget 2025, Budget 2026 additional and total compliance, debt and fraud-and-error funding ("the funding provision", Source: HM Treasury). The table prints no yield, and its Budget 2026 lines are not the scored costs (its DWP line prints −16, 188, 178, 188, 210, 214; the workbook's line-47 departmental spending prints 218, −194, −184, −195, −217, −221). + - Six staffing inputs: the 2,000, 200 and 150 DWP staff (para 3.12); the 5,500 and 670 HMRC staff and the "23 per cent increase" (para 3.13). They now sit in `conditions.staffing` on the £0.5bn and £0.4bn yield rows. + - Guarantee capacity, a contingent liability: UK Export Finance's £40bn and the Growth Guarantee Scheme's £7bn (para 3.21). + - A lending allocation: Your First Home's £0.7bn and £1bn of loans (para 3.22). Paragraph 3.22's effect on debt (£0.7bn in the first year) is staged. +- **The rule for lending and financing (4 November, the coordinator's call on review B's finding 5; README rule 8):** the harvest stages HM Treasury's Tables 6.1, 6.2 and 6.4 and the OBR's policy workbook whole, as the decisions' costings. Elsewhere, an amount a scheme will lend or spend is design (rule 8), and an effect on borrowing, debt or the financing requirement is an estimate. So paragraph 3.22's loan volumes stay dropped, its effect on debt stays, and paragraph 3.20's "£1.9 billion a year" increase in the Government's financing requirement, dropped on 3 November as a financing allocation, is restored as a fiscal-aggregate estimate (`cash_requirement_change`). EFO paragraphs 6.19–6.20 say the CGNCR "forms the basis of" the DMO's remit, so the requirement is the aggregate and the remit is the design. +- **Repeats, dropped on 3 November (review finding 5, the coordinator's call), 37 rows.** The table cells are the staged rows, as in the AB2025 OBR family: text that repeats a Table 3.1 cell (paras 3.2, 3.3, 3.4, 3.11, 3.13, 3.16, 3.17 and 3.19: 19 rows) or earlier text (paras 3.11, 3.12, 3.13 and 3.16: 6 rows), and Table 3.1's "Spending measures" and "Tax measures" rows, which repeat its "Direct effect of spending measures" and "Direct effect of tax measures" rows (12 rows). + +- **Chapters 1, 2 and 4–6 and paragraph 7.20 (4 November, review B finding 4; the coordinator's call: not staged).** Most of these chapters repeat Table 3.1 and the workbook's lines by head (Tables 4.5–4.7, 5.4, 5.6 and 6.2 among them). These estimates are new and are not staged; tranche 2 may add any of them as components: + - Tables 4.2 (p.87, indirect effects on receipts), 5.2 (p.108, indirect effects on spending) and 5.8 (p.128, "Effects of Government decisions" on debt interest, −0.9 / 1.2 / 1.0 / 0.7 / 0.4 / 0.3): parts of the decisions' total effect, which rows 2490–2495 and 2534–2539 (4f424b9 order) stage whole. + - Tables 4.3 to 4.7's indirect rows by tax and their PAYE / self-assessment split, including Table 4.4's self-assessment income tax by measure (e.g. "Timely payment for self assessment" 3.5 / 6.5 in 2029-30 / 2030-31): splits of lines the family already stages, by tax or by cash timing. + - Paragraph 4.30: a continued fuel duty freeze "would reduce receipts, on average, by £4 billion a year between 2027-28 and 2031-32", the receipts average of the option whose effect on borrowing row 2737 stages. + - Table 6.3 (p.141, "Effects of policy on financial transactions", −0.1 / 0.8 / 2.1 / −12.4 / 3.9 / 4.0): the OBR's whole-package effect on financial transactions; tranche 2 can stage it beside HM Treasury's Table 6.2 total, which `uk_hmt_tables` stages. + - Paragraph 7.20's decomposition of the changes in the fiscal-target margins. +- AnnexA has no policy-costing narrative beyond introductionA.1; current receipts/spending/economy forecast TablesA.1–A.8/A.11–A.12 are outside the policy-family scope. Headline fiscal aggregates inA.9 are owned by aggregate lane. +- No printed numeric Pension Tax Allowance or Carer’s Allowance taper claim appears in chapter3 or AnnexA. Whole-PDF search finds no PTA phrase; Carer’s Allowance appears only in a generic welfare footnote, not taper costing. These measures are covered by workbook rows. +- Charts3.1–3.4 and Box3.1 ChartsA/B contain no printed data labels for the policy values; no bars or paths read. Tick labels and dates are not claims. Box 3.1's tax-gap context restates HMRC and several-Budget historical compliance yields and is not staged. Its three AB2026 figures are staged: the estimate "a third of the yield" (review finding 10, the sentence completed on 4 November) and the two measure counts, 15 measures expected to reduce the tax gap and four that target the small business tax gap (review B finding 11). +- Policy design parameters (tax rates/thresholds, dates, litres/pence) without costing or behavioural-estimate content were not separately staged. +- Older-policy employment/housing/childcare monitoring examples in 3.29–3.36 do not cost an AB2026 Table 6.1 measure; no new AB2026 measure key invented. Paragraph 3.28’s salary-sacrifice figure is the OBR's +£0.4bn revision to its Autumn Budget 2025 costing: a context row with a null key since 4 November, since a revision is not a level and doesn't share a key with Table 6.4's recosted level (review A's H-6(b), the coordinator's call). +- Paragraph3.48 FRS long-run pension/debt scenarios are current-policy/earlier-publication context, outside requested headline medium-term aggregate scope. Paragraph3.52 adjusted-triple-lock debt effects are explicitly2075-76=>2076; checker caps periods at2075, so neither25pp nor10pp long-run debt effect was staged or misdated. +- No additional primary access attempts owned by text lane; root records direct/local recipe and unreachable EFO landing page in manifest/NOTES. + +- The policy workbook contains no static/post-behavioural split or rating matrix, and no recosting table. Fiscal-head rows are not labeled as static or behavioural. Contents/navigation cells are not additional claims. +- The supplied chapter-2 charts workbook and the other economy, receipts, expenditure and debt-interest workbooks are outside the policy/headline scope. The chapter-2 fresh URL was 403; it was not used. No economy-wide GDP/CPI paths were staged; only explicit policy CPI/GDP effects. +- The EFO landing page, resolved detailed-tables ZIP and chapter-2 workbook URLs were unreached (403). The PDF attachment URL could not be discovered. No missing online content, new attachments or separate latest ratings database was presumed available or silently substituted. The seven printed PDF ratings are included. + + +## Contradictions and limitations retained + +- Workbook row 549 “Total effect of Government decisions” displays **-8,905 / -50 / 1,322 / 5,484 / 6,425 / 14,093 £m**, while PDF Table 3.1 prints **6.3 / 7.0 / 2.1 / -2.6 / -3.5 / -9.3 £bn**. This exceeds a sign flip or rounding difference. Workbook direct row 551 follows its negative-loss legend; indirect row 555 has the same signs as the PDF borrowing effects. The workbook appears to mix conventions in its total. Both sources remain unchanged; row notes call out the inconsistency. +- Workbook/HMT precision differs: Household Energy Payment is -2,627 £m here versus -2,625 £m in HMT Table 6.1. Rounded components need not sum to the separately rounded totals. +- The 28 October text of paragraph 3.19 dated carbon-price-support abolition April 2027, and the OBR's 30 October correction moved it to April 2028, matching line 71. Its combined CPS/CfD scope (lines 70 and 71) uses a proposal, not the CPS key. +- Paragraph3.16 dates first-year-allowance increase April 2027; HMT line 58 dates1January2027. The review found the date difference a description difference, not a scope difference, so the WDA/FYA row takes line 58's key. +- Paragraph3.21 says£7bn Growth Guarantee expansion; HMT line 75 says£6.5bn additional SME lending. The £7bn and £6.5bn are different quantities of the same measure (guarantee capacity against lending supported); the borrowing rows take line 75's key and the £7bn is not staged. +- Table 3.3/paragraph 3.24 call reform Company Share Option Plan (CSOP); HMT line 28 says Enterprise Management Incentives2 (EMI2). The workbook's line 28 total (−26 / −33 / −47 / −144 / −142) matches Table 3.3, so the review re-keyed it to line 28 as its tax head. +- Paragraph 3.11's "increase borrowing by £5 billion in 2026-27" is Table 3.1's "Other departmental spending changes" (5.4), rounded; that group includes the DEL funding for the council tax rebate, and Table 3.1 nets the rebate out of its "Other AME spending decisions" group instead (review B finding 9). So the rebate row (2.6), the departmental group and the AME group are not additive in 2026-27. +- OBR tax aggregates include fiscal-head/classification differences from HMT:2031-32 OBR -£7.5bn against HMT+£6.970bn. No total-tax registry key used. +- Paragraph3.2 prose rounds2031-32 borrowing reduction to£12bn; Table 3.1 prints-11.7bn. Both preserved. +- Paragraph3.41 says social-care options; footnote 13 calls cited amounts “extra costs of healthcare”. Reported as printed, no correction. +- Health Foundation range is across different reform options, not statistical uncertainty about one fixed policy. +- Whole-Scheme UKEF exports in paragraph 3.21 are not proven identical to defence-export capacity in HMT line 44. India-UK FTA GDP claim does not include Double Contributions Convention component in HMT line 77. The UKEF borrowing row matches line 44 and takes its key; the India FTA GDP row is a component of line 77. + +## Validation + +- **4 November:** the contract checker reports 2,800 rows and 0 problems, and a re-run of `stage.py` in a scratch directory reproduces the gzip byte for byte. No primary was re-opened in this session; the new quotes (Box 3.1's sentences) are the coordinator's reading of its local copy of the 28 October PDF, and the corrected PDF's hash and change history are review B's. +- **3 November:** the contract checker reports 2,797 rows, 0 problems, and a re-run of `stage.py` reproduces the gzip byte for byte (COUNTS.json pins its sha256). No primary was re-opened: the session's network policy refused obr.uk, and this lane's primaries are the coordinator's local copies. The fixes relabel, re-key or drop rows; no printed value changed. +- **29 October:** the lane ran the full-family checker, a deterministic gzip digest and 40 seeded random row checks, plus ten aggregate checks. Independent audits verified all 2,520 workbook cells and all 316 chapter-3 rows. Its REPORT.md, the only report file any family carried, was deleted under review finding 7. + +## Review fixes, 3 November 2026 + +The OBR review (`harvest-staging/ab2026/reviews/verify-obr.md` on the staging branch, verdict REWORK) found the numbers sound and the keying, typing and design rows systematic. Every fix is applied in `review_fixes()` in `stage.py`, with the coordinator's calls on findings 5, 6, 9 and 10: + +1. **Design rows (rule 8):** 58 rows dropped (see "Not staged"); the staffing figures moved into the yield rows' conditions. +2. **Components (rule 9):** 37 rows re-keyed to their measure. Direct recovery of debt, e-invoicing mandation, timely payment for self assessment and HMRC's compliance workforce are line 45 components; verification assurance officers are line 47's; the India FTA GDP effect is line 77's; Table 3.3's CSOP reform is line 28's tax head; UKEF's borrowing effect is line 44 (moved to 2030-31, as line 44 is 0 in 2031-32); the Growth Guarantee Scheme's borrowing effects are line 75; the WDA and FYA yield is line 58. Rows 2693 and 2747 were dropped under finding 5, so their re-keys fell away. Nine proposed keys went with these re-keys, and the WDA/FYA one too. +3. **Row types:** Table 3.3's tax-head rows for lines 54, 61 and 46, the three behavioural-erosion rows and paragraph 3.12's welfare saving are `row_type: measure_component`; the bank surcharge's erosion row is `cumulative`. +4. **Sign conventions:** the workbook's indirect-effect rows say they follow PSNB; its total rows say they mix two conventions. +5. **Repeats:** 37 rows dropped (the coordinator's call; see "Not staged"). +6. **Field fixes:** row 2774 uses `decisions_effect_on_borrowing` with `component: gross additional investment income`; row 2828 carries `ab2025__salary_sacrifice_pension_nics_cap_2000` with `recosting_of: autumn_budget_2025`, which the contract accepted. (Overridden on 4 November: row 2734 in the 4f424b9 order is now a context row with a null key; see the end.) +7. **Files and paths:** REPORT.md is deleted; the manifest notes and these notes name no local machine paths; the PDF's manifest note says its origin and hash are recorded only by this lane. +8. **NOTES.md:** tallies, keys and the not-staged list are regenerated from the rows. +9. **Key names:** renamed under rule 2, as the proposed-key table records. The Table 3.1 savings and property grouping is receipts-only, so it has its own key rather than the lines 61 and 62 package. +10. **Box 3.1:** "a third of the yield" is staged from the review's quotation, at medium confidence, under `ab2026__package_compliance_measures_announced`. + +Row indices above are the 29 October order. 2,797 rows: 2,891 − 58 − 37 + 1. + +## README rule 10, 3 and 4 November 2026 + +The IFS review of d5e323dc (finding 3) found this family's totals of the Budget's decisions on `revenue_change`. `rule10()` in `stage.py` applies README rule 10 after `review_fixes()`, and moves 81 rows, the OBR's stated effects of the Budget's decisions on PSNB, to `decisions_effect_on_borrowing`: + +- Table 3.1 (42 rows): the total, direct and indirect effects of Government decisions, the direct effects of tax and of spending measures, and the two memo lines that split the direct effect between decisions on and off HM Treasury's policy decisions table. +- The policy workbook's Table 1.1 (36 rows): the total, direct and indirect effects of Government decisions, the direct effects of scorecard and of non-scorecard decisions, and the total of expenditure measures. +- Chapter 3's text (3 rows): paragraph 3.3's spending policies, paragraph 3.4's tax policy changes and paragraph 3.5's fall in departmental underspends, a part of the indirect effects. + +The OBR sums its receipts heads, from air passenger duty to visa fees, into the workbook's total of receipts measures (6 rows, cells I490:N490, rows 2190–2195 counting from 0), so that total keeps `revenue_change`, the receipts line `models.py` keeps apart from PSNB (delta review of 8b7b23db, finding 1). Table 3.1 gives the same figures, in £ billion with the opposite sign, as the direct effect of tax measures, and those rows take `decisions_effect_on_borrowing`. Table 3.1's memo on the current budget deficit (6 rows) now proposes `fiscal_balance_change`, and its sign convention adds that, on this line, a positive value increases that deficit. The workbook's 288 lines by tax and spending head, Table 3.1's groups of measures, Table 3.3's costings and the prose costings of measures keep `revenue_change`. Paragraphs 3.20, 3.21 and 3.43 give four policies' effects on borrowing, and their seven rows already took `decisions_effect_on_borrowing`. No value or printed sign changed. Counting from 0 in the 3 November order, the moved rows are 2352–2357, 2490–2519, 2521, 2527, 2533–2563 and 2630–2641, and the memo rows 2642–2647. The contract checker reports 2,797 rows, 0 problems, and a re-run of `stage.py` reproduces the gzip byte for byte. + +`scorecard_db/signs.py` now reads the workbook's legend on both metrics: on `revenue_change` it runs the way PolicyEngine's sign does, and on `decisions_effect_on_borrowing` the other way. It reads the six workbook total rows whose sign convention starts "mixed:", and paragraph 3.6's two absolute averages, as having no single sign. + +Review B also noted that rows 2520, 2648 and 2649 (paragraphs 3.2 and 3.6) carry `decisions_effect_on_borrowing` as well, so the family has 91 rows on that metric: the 81 rule 10 moved, the seven of paragraphs 3.20, 3.21 and 3.43, and these three. + +**Text that restates a Table 3.1 group (4 November, review B finding 12, option (a)).** Text restating a Table 3.1 group or measure as an effect on borrowing keeps that row's metric, and Table 3.1's "A positive sign implies an increase in borrowing" is a sign convention, not a statement that a group is the decisions' effect on PSNB. So paragraph 3.11's "increase borrowing by £5 billion in 2026-27" (Table 3.1's "Other departmental spending changes", rounded) keeps `revenue_change`, as that group's rows do. + +## Reviews A and B, 4 November 2026 + +Review B (issue comments 6635496734 to 6635499259 on #231) approved this family with fixes, and review A's key harmonisation (6635870934) touched its rows. `review_fixes_nov4()` in `stage.py` applies them after `rule10()`, with indices in the 4f424b9 order; no printed value changed. Rows: 2,797 + 1 restored + 2 added = 2,800. + +1. **The corrected PDF (finding 1):** a fourth manifest line; row 2673's `reform_hint` and note give the corrected date; the rows stay on the 28 October file. +2. **Parts and wholes on the total-decisions key (finding 2, review A's K-1 and H-1):** the totals are `measure_total` with no `component`; the workbook's direct and indirect effects, its total of receipts measures and its 288 lines by head, Table 3.1's direct and indirect effects, and paragraphs 3.2 and 3.5 are `measure_component`, each labelled as its primary prints it. The workbook's scorecard and non-scorecard rows are `measure_total` on their own keys. Table 3.1's total, indirect and current budget memo rows take `source_model: obr_efo_forecast`. +3. **Receipts-only figures (finding 3, review A's K-5 and K-7(g)):** paragraph 3.17's £0.4bn and paragraph 3.19's electricity VAT figures are receipts components of their lines; the tax administration and temporary business rates groupings take `_receipts` keys; Table 3.3's online marketplace rows are line 46's whole costing. +4. **Chapters 1, 2 and 4–6 and paragraph 7.20 (finding 4):** not staged, each listed with its reason (the coordinator's call). +5. **Paragraph 3.20's financing requirement (finding 5):** restored on `cash_requirement_change`, under the rule for lending and financing above. +6. **Splits on the split keys (finding 6):** the workbook's total of expenditure measures and paragraph 3.4's tax line are whole rows on the spending- and tax-decisions keys. +7. **Lines 70 and 71 (finding 7):** the carbon price package's scope; footnote 9's £0.8bn keyed to line 70 as its current AME. +8. **More parts (finding 8):** paragraph 3.20's gross debt and additional income, paragraph 3.12's two pension heads and paragraph 3.19's AME to local authorities (now `revenue_change`, as worded) are components. Table 3.3's four rating rows that name a part are components too (H-1). +9. **Two spending scopes (finding 9)** are restated. +10. **Box 3.1 (finding 10):** the whole sentence, from the coordinator's reading of the 28 October PDF. +11. **Box 3.1's counts (finding 11):** staged. +12. **Paragraph 3.11 (finding 12):** option (a), above. +13. **Averaging intervals (finding 13):** row 2529 averages from 2027-28; row 2522's interval is not stated. +14. **Civil service programme (finding 14):** membership probable, not established. +15. **The OBR's residual groups (finding 15)** keep `obr` in their keys. +16. **Stale and run-together text (finding 16):** notes and these NOTES corrected; `review_fixes_nov4()` inserts the missing spaces in every field but quotes, values and locators. + +Review A's K-2 makes row 2522 the defence investment plan's RDEL part, with the sign convention "positive = cost to the Exchequer (higher RDEL spending)"; K-6 keeps RF's RPI-uprating option apart from this family's fuel duty freezes key; K-7(d) gives paragraph 3.51's two simulations conventions `signs.py` reads; and H-6(b), the coordinator's call, makes paragraph 3.28's revision a context row with a null key and no `recosting_of`. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/claims_staged.jsonl.gz new file mode 100644 index 000000000..2c09e17b9 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/manifest.jsonl new file mode 100644 index 000000000..2d358edb0 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/manifest.jsonl @@ -0,0 +1,4 @@ +{"access": "local copy", "bytes": 106602, "date": "2026-10-28", "doc_type": "xlsx", "note": "Policy workbook ZIP member. Fresh resolved ZIP GET at 2026-10-29T15:51:18Z returned HTTP 403; local member bytes match PROVENANCE.md. The local ZIP container is not supplied; only the extracted member was read and hashed. Local provenance: the coordinator's OBR PROVENANCE.md (browser download 2026-10-28; server Last-Modified Wed, 28 Oct 2026 14:05:59 GMT for the ZIP). The lane hashed the bytes from its local primaries folder.", "publisher": "Office for Budget Responsibility", "retrieved": "2026-10-29", "sha256": "cdcc2a06b100241bf3010bd159a4e5d43daef2348a3850797b1e88a308fd45fd", "title": "Economic and fiscal outlook – October 2026: detailed forecast tables – policy", "url": "https://obr.uk/docs/sodugn2q20l901oy19v1cz5e/efo-october-2026-detailed-forecast-tables-zipfile.zip"} +{"access": "local copy", "bytes": 1754344, "date": "2026-10-28", "doc_type": "pdf", "note": "Supplied local PDF; its resolved URL is absent from PROVENANCE.md. Fresh EFO landing-page GET at 2026-10-29T15:51:17Z returned HTTP 403, so the PDF link could not be discovered. URL is the publication landing page, not an invented attachment URL. Local filename: economic-and-fiscal-outlook-october-2026-web-accessible.pdf. PDF cover and imprint state October 2026; publication date is the EFO-page date the coordinator's PROVENANCE.md records for the publication. The lane hashed the bytes from its local primaries folder. PROVENANCE.md does not list this PDF: its origin and hash are recorded only by this lane (review finding 7). Replaced on 30 October by the corrected version (the fourth line); rows cite this 28 October version.", "publisher": "Office for Budget Responsibility", "retrieved": "2026-10-29", "sha256": "9e0e9c340e35e603066f3124a614fcd68feadb3d5d10d1f76fb536e150e6225e", "title": "Economic and fiscal outlook – October 2026", "url": "https://obr.uk/efo/economic-and-fiscal-outlook-october-2026/"} +{"access": "local copy", "bytes": 218000, "date": "2026-10-28", "doc_type": "xlsx", "note": "Fiscal aggregates workbook ZIP member. Fresh resolved ZIP GET at 2026-10-29T15:51:18Z returned HTTP 403; local member bytes match PROVENANCE.md. The local ZIP container is not supplied; only the extracted member was read and hashed. Local provenance: the coordinator's OBR PROVENANCE.md (browser download 2026-10-28; server Last-Modified Wed, 28 Oct 2026 14:05:59 GMT for the ZIP). The lane hashed the bytes from its local primaries folder.", "publisher": "Office for Budget Responsibility", "retrieved": "2026-10-29", "sha256": "3ffa3f1e63667b2ae9fb9626dc1da881673227d43aeeb52f8c3db168a5c75d6b", "title": "Economic and fiscal outlook – October 2026: detailed forecast tables – fiscal aggregates", "url": "https://obr.uk/docs/sodugn2q20l901oy19v1cz5e/efo-october-2026-detailed-forecast-tables-zipfile.zip"} +{"access": "direct", "bytes": 1771863, "date": "2026-10-28", "doc_type": "pdf", "note": "Corrected version. GOV.UK replaced the attachment on 30 October 2026 (change history 2026-10-30T14:21:10Z); obr.uk/download/economic-and-fiscal-outlook-october-2026/ redirects here. It adds a correction slip at physical p.4, and paragraph 3.19's first bullet now dates CPS abolition April 2028, not April 2027. Physical page = printed + 4. No rows cite this version.", "publisher": "Office for Budget Responsibility", "retrieved": "2026-11-04", "sha256": "555e0c266a5c2a9a5fdeaee9a36425c6bf3b899fde456160945b5323f610c3f4", "title": "Economic and fiscal outlook – October 2026 (corrected 30 October 2026)", "url": "https://assets.publishing.service.gov.uk/media/6ae4a7a9ec36e258a1998484/economic-and-fiscal-outlook-october-2026-web-accessible.pdf"} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/NOTES.md new file mode 100644 index 000000000..dd0604653 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/NOTES.md @@ -0,0 +1,423 @@ +# uk_rf_ab2026: Resolution Foundation, Autumn Budget 2026 + +**Working files.** `stage.py`, the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/rf/uk_rf_ab2026/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The lane's local primaries folder (`.ab2026-primaries/uk_rf_ab2026/`, which the `--check-primaries` command below reads) was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. + +Staged 2026-10-29 by `stage.py`, which holds every row as data and rewrites `claims_staged.jsonl.gz` byte for byte. Source slug `resolution_foundation`. + +- **Rows:** 766 (767 before the review dropped row 397; see "Review fixes" at the end). + - Text: 212 rows from the two press releases, the Spread thin page, both versions of the Spread thin PDF and one comment. + - Workbook: 554 rows from the chart-data workbook RF links from the Spread thin page. +- **Primaries:** 8 (manifest.jsonl): the seven the lane fetched, plus the Spread thin page's 4 November version, which no row cites (README rule 7; see "The replaced PDF"). +- **source_model:** + - `landman_ttm`: the IPPR tax-benefit model behind RF's distributional and living-standards figures (488 rows). + - `arithmetic`: RF's sums, averages and energy-bill construction on OBR, HMT and Ofgem inputs (148). + - `survey_microdata`: LCF, NEED and HBAI analysis, including HBAI outturn years (42). + - Restated rows carry the original engine: `obr_efo_forecast` (42), `hmt_costing_obr_certified` (38), `hm_government_publication` (5, Government figures that aren't Table 6.1 cells, including HM Treasury's Household Energy Payment count) and `administrative_data` (1, row 38's outturn). Two own rows also carry `administrative_data` (official counts RF computes from). + +`python3 stage.py --check-primaries ../../../.ab2026-primaries/uk_rf_ab2026` re-hashes every primary against the manifest. It also finds every text quote in its document (pdftotext `-layout`, `-raw` and default modes for the PDFs) and compares all 759 embedded workbook cells with the sheet XML. On 2026-10-29 it reported 0 problems. + +## Primaries and access recipe + +Every primary came from `curl -sSL` with the Safari User-Agent, HTTP 200, with no blocks or challenges. A second fetch at 17:02Z returned identical bytes for all seven. The HTML pages embed per-request content (rotating nonces, tokens and related-article lists), so a later fetch's sha256 can't reproduce the manifest's; for those pages the check is that every staged quote still appears on the page (review B did this on 4 November). + +| primary | sha256 | bytes | fetched (UTC) | rows | +|---|---|--:|---|--:| +| Press release, 28 Oct: *Budget balancing act leaves families braced for tough winter…* | `ac5369e6…f98878` | 118,327 | 16:16:35 | 24 | +| Press release, 29 Oct: *Britain braced for painful second half of the Parliament* | `40b10268…c7c22d` | 116,817 | 16:16:36 | 19 | +| Spread thin publication page | `66a999dc…69d792` | 152,177 | 16:16:38 | 18 | +| Spread thin PDF, first version (`Spread-thin-1.pdf`) | `a669f39d…595603` | 1,410,169 | 16:16:41 | 3 | +| Spread thin PDF, replaced version (`Spread-thin.pdf`) | `9536b6cd…5d9ff` | 1,410,388 | 16:17:29 | 147 | +| Chart-data workbook (`Final-clean-charts-all-sections-for-comms.xlsx`) | `a4e1c072…6e0d1` | 14,637,565 | 16:17:32 | 554 | +| Comment, *It's good to be flexible* (Nye Cominetti, 29 Oct) | `3510a245…62fcfc` | 131,349 | 16:20:03 | 1 | +| Spread thin publication page, 4 November version (review B's fetch) | `d81969ef…0b0259` | 154,801 | 4 Nov | 0 | + +- **HTML pages:** the stager quotes each page's own article text. Locators count body paragraphs after the dateline (press releases and comment) or name the bullet list ("measures bullet 2", "Key findings bullet 3"). +- **PDFs:** read with `pdftotext -layout`, and with `-raw` for the two-column boxes. Locators give the PDF page, which matches the printed folio, and the paragraph, bullet, box, footnote or figure label. +- **Workbook:** one sheet per figure (F1 to F23, plus "Extra spending stats"). + - `value_raw` is the cell's stored `` string from the sheet XML, at full precision, not the rounded display: F8's `_-"£"* #,##0_-` shows 145.33 as £145. + - The quote is "series label | category | stored value". + - Locators are `sheet F8, cell J8`. + - Each figure's plotted ranges come from the chart objects in the workbook. Figure 21's chart object is `chart34.xml` (grouped, plotting AD66:AD74); its column AD also carries RF's own marker, "**USED IN CHART" (AD60). Figure 8's column J (the net change) is staged though the chart doesn't plot it. + - Chart rows name their series in `conditions.series`. Only the rule 9 parts (Figure 8's two VAT-cut columns and p.17's extension) also carry `conditions.component`. +- **Local copy:** the assignment's copy of `Spread-thin-1.pdf` (downloaded 08:46Z) hashes to the same `a669f39d…`, so v1 rows cite the fresh fetch. + +## The replaced PDF (README rule 7) + +RF replaced the briefing on the morning of 29 October. + +- **v1, `Spread-thin-1.pdf`:** PDF CreationDate 04:33 EDT; server Last-Modified 08:37:45 GMT. The URL still serves it, but the landing page no longer links it. +- **v2, `Spread-thin.pdf`:** CreationDate 08:13 EDT; Last-Modified 12:14:43 GMT. The landing page links this version. +- **Text changes, from a page-by-page word diff:** + - p.5: "the poorest half gain on average £158 … a paltry £14 more than the £144" became £145 / £15 / £130. + - p.19: "(equivalent to an average £158 for poorer households, compared to £144 for richer households)" became "(equivalent to under £145 on average for poorer households, compared to over £130 for richer households – a gap of less than £15)". + - Figure 8: the Council Tax rebate bars fall from about £100 to about £88 per household (vigintile 2); the other components are unchanged; the axis top moved accordingly, from +£180 / +3.6% to +£160 / +3.2%. + - Figure 4: the x-axis gains 2031. + - p.30: "restated the last Keir Starmer’s commitment" lost "the last". + - Elsewhere the lines only reflow. +- **Which version rows cite:** v2 is the source for every PDF row except the three p.5 v1 rows (£158, £14, £144), which carry `conditions.document_version: "v1 (superseded)"`. +- **Workbook:** uploaded at 12:16:43 GMT, it matches v2. Its Figure 8 net gains average about £145 over vigintiles 2–10. +- **Landing page:** its Key findings still printed v1's "gains £158 on average, against £144 for the richer half" at both 29 October fetches. Those two rows (56–57) cite the 29 October bytes and carry `document_version: "29 October page text (superseded by 4 November)"`. +- **The landing page changed by 4 November.** Review B's 4 November fetch (sha256 `d81969ef…0b0259`, 154,801 bytes, JSON-LD `dateModified` 2026-11-04T09:21:48Z) prints v2's £145 / £130 in Key findings bullet 3. It is manifest line 8 (README rule 7), with no rows: v2 rows 74 and 76 already carry £145 / £130, so they aren't staged again. "By", not "on": `dateModified` bounds the edit only from above. + +## Harvest rules 8 and 9 + +The coordinator added two rules to the AB2026 README during this family's staging, and `pipeline/ab2026_harvest_contract.py` now checks rule 9's rows. This family follows both: + +- **Rule 8: stage estimates, not design.** A row is a number someone estimated, forecast or counted about the effect of a measure or of the Budget. + - A measure's own parameters are design: rates, thresholds, payment amounts, dates and durations. So are spending allocations to programmes, financing remits and contingent liabilities. + - Design goes in `reform_hint` or `conditions`, never as rows. + - A worked example's inputs are design too; its computed outcome is a row. +- **Rule 9: a component of one measure keeps that measure's key.** The row carries `conditions.component` and `conditions.row_type: measure_component`. Proposed package keys are only for scopes that cross Table 6.1 lines, or have none. + +"Not staged" below lists the 36 design rows rule 8 removed and where their facts went. The electricity VAT cut's "original" six months and three-month "extension" are parts of Table 6.1 line 2, so their 39 rows carry line 2's key as measure components. + +## What the family stages + +- **Text:** every number RF prints that estimates, forecasts or counts the effect of the Budget's measures or of the Budget as a whole. That covers costs and yields, households affected, gains and losses, bill changes, distributional and poverty effects, and the public finances after the Budget. + - The text rows also include the living-standards and poverty projections and the energy-bill context the cost-of-living measures address, as `measure_key: null` context. + - Within one document, a number printed twice with the same meaning gets one row, at the occurrence that states its period or scope most completely. For example, p.16 states the £2,192 cap level as Q1 2027, which p.5 calls "next year", so the row cites p.16. + - Different documents' statements of the same figure are each staged (the AB2025 precedent; dedup belongs to the ingest). +- **Workbook:** the chart data behind figures of RF's own estimates. + - F7 (energy bill and support by year). + - F8 (temporary AB26 policies by vigintile). + - F9 (LHA unfreeze and Your First Home by decile). + - F10 (tax decisions and a continued Fuel Duty freeze by year). + - F20 (permanent tax and benefit changes this Parliament by vigintile, including the four AB26 component columns the chart doesn't plot). + - F21 (median non-pensioner income growth since 2023-24). + - F22 (non-pensioner income growth by vigintile and year). + - F23 (change in AHC poverty since 2023-24). +- **Structural zeros, not staged:** + - F7 support components in years when the support didn't exist (for example the Energy Price Guarantee in 2019-20). + - The 2023-24 zero base of F21 and F23. + - F22's vigintile 1, a zero placeholder for the excluded bottom 5 per cent. + - F8 and F20 leave vigintile 1 blank. + +## Coverage tally + +**Rows by workbook sheet:** F20 190, F8 114, F22 114, F10 54, F7 33, F9 26, F23 15, F21 8. + +**Rows by measure_key:** + +| measure_key | rows | +|---|--:| +| null (proposed key, or context) | 532 | +| `ab2026__package_household_energy_vat_and_fuel_duty` | 54 | +| `ab2026__electricity_vat_zero_rate_to_july_2027` | 42 (39 of them measure components) | +| `ab2026__household_energy_payment_100_bands_a_to_d` | 31 | +| `ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred` | 27 | +| `ab2026__pension_tax_allowance` | 21 | +| `ab2026__machine_games_duty_higher_stake_25pc` | 20 | +| `ab2026__your_first_home_equity_loan` | 16 | +| `ab2026__bank_surcharge_6pc_temporary` | 8 | +| `ab2026__writing_down_allowance_12pc_and_fya_50pc` | 6 | +| `ab2026__carers_allowance_earnings_taper` | 4 | +| `ab2026__business_rates_retention_mayoral_authorities` | 2 | +| `ab2026__package_total_policy_decisions` | 1 | +| `ab2026__founders_relief_cgt` | 1 | +| `ab2026__defence_investment_plan_further_savings` | 1 | + +The 532 null rows split into 200 with a `proposed_measure_key` (listed below) and 332 context rows. The context rows cover fiscal aggregates, energy bill levels, living standards and poverty. They also include the three pre-AB26 component columns of F20 (57 rows: "pre-AB26 Direct tax changes", "pre-AB26 Benefit changes" and "pre-AB26 Indirect tax changes"), which score earlier events' measures. + +## Conventions + +- **Sign.** Each change row's `conditions.sign_convention` states it, and no value is re-signed from what the primary prints or stores. Figures 21 and 22 use "positive = growth"; the text growth rows and row 117 use "positive = gain to households"; row 10 uses "positive = saving (a reduction in the household's bills)". + - Household rows use "positive = gain to households". Text printed as a fall ("£2,000 lower", "fall by 3.0 per cent", "worse off by an average of £61") carries a negative value, as in AB2025. + - Exchequer rows say "positive = cost" or "positive = yield", matching how RF writes the figure. + - Figure 10 rows keep RF's plotted sign, positive = raises revenue. RF flipped the OBR's borrowing sign (workbook F10 I15, "Signs flipped from source"). + - F7 support components are negative, meaning a reduction in the typical bill, as stored. +- **Units.** £ values are in pounds (`gbp`), and `normalization` records the scaling, for example "£ billion × 1e9 → £". + - Per cent figures are `percent`; shares and "one-in-five"-style fractions are `share`. + - The stager multiplies workbook cells that store fractions (F8 K, F20 M, F21, F22) by 100 to give `percent`. F23 already stores percentage points. +- **Price basis:** + - F8 and the package's halves figures: cash terms. + - F7, F20 and the energy text: 2026-27 prices (Spread thin fn 13). + - £ living-standards figures: 2026-27 prices, as printed. + - `conditions.price_basis` records the basis on each row. +- **Period:** + - Fiscal-year figures carry `fy` and the end year. + - The temporary package (Figure 8, the 52/48 split, the halves' averages and gap, and the £4.4bn) covers 2026-27 and 2027-28 together. Those rows carry no `fy`, `period` 2028 (the £4.4bn: 2027, as printed or read), `time_basis: fiscal_year` and `conditions.horizon`. Figure 8 shows each measure's "total cash impact" over the two years (v2 p.20; workbook F8 N35), so its rows and the text figures that restate it are `cumulative`, and the F8 £ columns' normalization reads "£ per household as stored: total cash impact over 2026-27 and 2027-28 (Figure 8 note)". + - The gas standing-charge rows (115–125) carry no `fy`: RF prints no year. They sit at period 2028 with `conditions.horizon` "year not printed: the change lands by the end of 2027 or soon after (p.18)", at medium confidence. + - Averages over a span (for example "£11 billion a year on average over the next five years") take the span's end year with `statistic: annual average`. + - Calendar figures (the 2027 average bill, decade and Parliament RHDI growth) are `annual`; Q1-2027 cap levels and "currently" figures are `point_in_time`. +- **Value kinds.** RF prints point estimates throughout. + - "under", "up to" and "less than" give `range_high`; "over" and "just over" give `range_low`. + - Totals over several years and growth since a base year are `cumulative`: 195 rows, including Figure 8's 114 and the 11 text rows that restate Figure 8 or the £4.4bn. +- **Income groups.** `income_group` uses the AB2025 spellings `vigintile_N`, `decile_N`, `quintile_N`, `bottom_half` and `top_half`, the last two for RF's "poorer / richer half". The AB2025 NOTES flagged `bottom_half` / `top_half` for an ingest ruling. +- **Geography.** + - F8 rows are "UK", with `modelling_geography` quoting RF's note (Council Tax and VAT cuts modelled for GB, Fuel Duty for the UK). + - F9 and the Your First Home and LHA rows are England (Figure 9). + - Energy bills are GB. +- **Baselines.** + - F20's net and pre-AB26 columns, and the Parliament-wide text figures (99 rows), use `rf_start_of_parliament_policy` ("relative to the baseline inherited from Chancellor Hunt"). + - Every AB26 measure row is null: pre-Budget policy, current law at the scoring date. That includes F20's AB26 component columns, increments within RF's stack. +- **Attribution.** + - `restated` (86 rows): HM Treasury Table 6.1 costings, OBR forecasts, the Government's count of carers and HM Treasury's count of Household Energy Payment households (rows 55 and 72, which RF repeats uncited). `note` names the original on each. + - `own` (680): everything RF computes, including its sums and averages of official figures. + - `benchmark_class` is `administrative_fact` for outturns and official counts (53 rows), including the 2024-25 HBAI outturn year in F21–F23, and `different_model` otherwise. +- **Worked examples (mode 3):** the computed outcomes only (rule 8). + - The p.25 Pension Tax Allowance comparison: £34 Income Tax and £10 NICs for the worker, "nothing" for the pensioner. The £12,739 earnings input sits in `household_type`. + - The Box 4 Carer's Allowance cliff edge: net income of £280, then £216 a week. + - The NLW worker's £1,040 a year. + +## Measure keys: how RF's scopes map to the registry + +### Registered keys + +- **`ab2026__package_household_energy_vat_and_fuel_duty` (Table 6.1 lines 1, 2 and 3).** This key covers RF's "cost of living package": Figure 8's net change and per cent change, the 52 / 48 per cent split, the halves' averages and gap, and the landing page's £158 / £144. The £4.4bn costing is not on it (review A, K-4; see the proposed keys). + - RF's package is the Household Energy Payment, the electricity VAT cut ("original" six months plus the three-month "extension") and the Fuel Duty delay. + - Table 6.1 line 2's title covers the whole cut ("from 1 October 2026 to 1 July 2027"), and its costs (£755m in 2026-27, £305m in 2027-28) include the original six months. + - The registry's own modifier note gives the same reading: "about 57% of 2026-27 … about 22% of 2027-28". So RF's package equals lines 1, 2 and 3 exactly. + - The £4.4bn rows (34, 54, 127) count Fuel Duty only at the share accruing directly to households (fn 19, `costing_basis`), so their scope is not exactly lines 1–3 (rule 3) and they carry the proposed key `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty`. +- **`ab2026__electricity_vat_zero_rate_to_july_2027` (line 2):** + - **The whole cut:** the £40 "total nine-month benefit of the cut", and Figure 7's "Electricity VAT cut" series split by financial year (£26.77 in 2026-27, £12.80 in 2027-28). + - **Measure components (rule 9, `row_type: measure_component`):** Figure 8's "Energy VAT cut (original)" (the six months to the end of Q1 2027, 19 vigintile rows), "Energy VAT cut extension" (April to 1 July 2027, 19 rows), and p.17's extension "worth £12". `conditions.component` and `measure_part` name the part. Never sum them with a whole-cut row. +- **`ab2026__household_energy_payment_100_bands_a_to_d`:** Figure 8's "Council Tax rebate", the eligibility shares and counts, and the £2.6bn cost. The £100 payment itself is design (rule 8). +- **`ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred`:** Figure 8's "Fuel Duty freeze extension", Figure 10's "Fuel Duty" series (equal to line 3), the "just under £1.4 billion" cost and the "around half" household incidence. +- **`ab2026__pension_tax_allowance`:** F20's "Pensioner Personal Allowance" (the workbook's label; the PDF says "Pension Tax Allowance"), the £150m cost and the pensioner who "will pay nothing". +- **`ab2026__machine_games_duty_higher_stake_25pc`:** F20's "Machine Games Levy" and "around £145 million per year … through Gambling Duties … well-targeted at machine gaming" (Table 6.1 line 56 prints £145m a year from 2029-30). +- **`ab2026__your_first_home_equity_loan`:** Figure 9's "Could access Your First Home", the 76 per cent top-half share, "up to 70,000 families" and the £95m. +- **`ab2026__carers_allowance_earnings_taper`:** the £80m, the 48,000 carers and the Box 4 cliff edge the taper removes. +- **Restated lines.** These are each exactly one Table 6.1 line, restated by RF: + - Bank Surcharge (line 55): Figure 10 and "around £1.5 billion". + - Writing-down allowances (line 58): Figure 10's "Capital allowances". + - Founders' Relief (line 26): £300m. + - Business Rates Retention (line 21): £10m and £140m. + - Table 6.1 total policy decisions: £7.6bn in 2026-27. + - Defence Investment Plan line 40: RF's "addition to pay for the DIP … £6.7 billion between 2026-27 and 2031-32" equals line 40's sum (-£6,670m). The row stays at medium confidence because line 40's title reads "Commitment to further savings made at announcement on 30 June 2026". + +### Proposed keys + +Each row below has `measure_key: null` and this key in `conditions.proposed_measure_key`. Every one crosses Table 6.1 lines or has none (rule 9). + +| proposed key | rows | scope (Table 6.1 lines; RF's words) | +|---|--:|---| +| `ab2026__package_rf_parliament_permanent_tax_and_benefit_measures` | 42 | All permanent personal tax (direct and indirect) and benefit changes announced this Parliament, from the 2024 election to AB26 inclusive, against the policy inherited from Hunt. F20 "Net change in income" and "% change in income"; p.40 £320 / £2,000; p.41 0.9–2.2 per cent. Spans several events; AB26's part is lines 52, 56, 61, 62 and the gas standing charge. | +| `ab2026__gas_standing_charge_moved_to_unit_rates` | 31 | The announced abolition of the gas standing charge, "moving the £108 a year paid by the typical household onto unit rates by the end of 2027 or soon after". It costs the Exchequer nothing and has no Table 6.1 line. Covers p.18–19 (unit rates up around one-tenth; gainers and losers, by half and by children) and F20 "Remove standing charge on gas bills". The £108 sits in `reform_hint`. | +| `ab2026__package_property_and_savings_income_rates` | 25 | Table 6.1 lines 61 and 62 together: F10 "Savings & property" (their sum) and F20 "Property and savings tax rise". | +| `ab2026__package_rf_ab26_permanent_personal_measures` | 19 | F20 "AB26 Changes" = lines 52, 56, 61, 62 plus the gas standing charge (the workbook's column K equals columns F + G + I + J). | +| `ab2026_option__lha_unfreeze_2027_28` | 17 | Unfreezing Local Housing Allowance in 2027-28 instead of prolonging the freeze (no Table 6.1 line). Figure 9 "Would benefit if LHA were unfrozen"; "over a million families lose out, 91 per cent … in the bottom half". | +| `ab2026__package_tax_decisions_since_march_2026` | 13 | The OBR's Table 3.1 "Direct effect of tax measures" since March, sign flipped. F10 "Net direct effects", the p.23 labels, and p.4 "about £5 billion annually from next year". Differs from Table 6.1's tax total (-£1,749m vs -£1,645m in 2026-27). | +| `ab2026_option__tax_decisions_with_continued_fuel_duty_freeze` | 11 | The OBR's direct effect of tax measures plus keeping Fuel Duty at current rates: F10 "Net effect if Fuel Duty frozen" and its p.23 labels. On `revenue_change` (README rule 10; see "README rule 10" below). | +| `ab2026__package_tax_administration_compliance_and_debt_collection_receipts` | 7 | The OBR's Table 3.1 group "Tax administration, compliance and debt collection measures", which is the receipts of Table 6.1 lines 45 and 46 (OBR review B, finding 3; it includes timely payment for Self Assessment; RF doesn't list the lines). F10 row 52; p.4 "over £3 billion annually by 2030-31". | +| `ab2026_option__fuel_duty_continued_freeze` | 6 | Fuel Duty rates held at 52.95p a litre instead of rising to 60.59p in July 2027, relative to the announced policy: the OBR's constant-duty-rate alternative less its central forecast. F10 "… and if Fuel Duty frozen"; p.24 £4.3bn in 2029-30. A receipts cost, on `revenue_change`. For tranche 2: the OBR family holds the same alternative's £4.3bn as an effect on borrowing (paragraph 3.43, `decisions_effect_on_borrowing`), and RF states a receipts cost; the ingest settles whether they compare. | +| `ab2026__package_rf_other_tax_measures` | 6 | RF's residual in F10 "Other tax measures": OBR net direct effects less Fuel Duty, Bank Surcharge, capital allowances, savings and property, and tax administration. | +| `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty` | 3 | Table 6.1 lines 1 and 2 plus the household-incidence share of line 3: RF's "£4.4 billion cost of living package", which counts Fuel Duty "at the share accruing directly to households" (fn 19; about half of line 3's £1.4bn). Lines 1 and 2 are £3,685m over 2026-27 and 2027-28. A two-year total, `cumulative` (review A, K-4). | +| `ab2026__package_household_energy_payment_and_electricity_vat` | 5 | Lines 1 and 2: "A £3.7 billion package of household support"; p.17 "£3.4 billion in 2026-27", "£0.3 billion in 2027-28", 45 per cent. The sums show line 2 is the whole cut; see the discrepancies below. | +| `ab2026__package_government_decisions_since_march_2026` | 3 | The OBR's total effect of the Budget's decisions on borrowing, direct and indirect, including decisions not on Table 6.1: "an average of £2 billion a year" (two documents); fn 47 "no overall impact". | +| `ab2026__package_rdel_decisions_excluding_household_energy_payment` | 3 | All the Budget's RDEL decisions over the Spending Review period except the Household Energy Payment: "£3 billion a year", "£9 billion top up" (two documents). A fiscal aggregate, not a programme allocation. | +| `ab2026__package_rf_absolute_policy_changes` | 2 | Every policy decision counted at absolute value (RF's fiscal-event size measure): "£7 billion". RF lists no lines. | +| `ab2026__package_rf_energy_bill_support_announced_at_budget` | 2 | "Support of up to £116 announced today" and "less than a fifth" of the 2027 bill rise. RF doesn't itemise the £116; it includes the £100 Household Energy Payment. | +| `ab2026_option__fuel_duty_rpi_uprating_since_2011` | 2 | Fuel Duty uprated by RPI since January 2011: "around £20 billion" a year (two documents). It mirrors the OBR family's `ab2026__package_fuel_duty_freezes_since_2010_11` (EFO paragraph 3.43): one pair of paths seen from opposite sides, kept as separate keys (review A, K-6). RF's +£20bn is the revenue the freezes forgo relative to RPI uprating, staged "positive = yield" from the option's side. | +| `ab2026__minimum_wage_uprating_april_2027` | 2 | The April 2027 minimum wage rates the Chancellor confirmed (no Table 6.1 line): "worth £1,040 a year for someone working 40 hours a week" (PDF p.12 and the comment). The rates (3.9 per cent; £13.21; 50p) sit in `reform_hint`. | +| `ab2026__gas_supplier_levy_funded_from_general_taxation` | 1 | Funding the Gas Supplier Levy from general taxation: "save the typical household £7 in 2027-28" (fn 12). No Table 6.1 line found. | + +## Proposed metrics + +None of these is a registered Metric. Each row carries one as `proposed_metric`, reusing the AB2025 spelling where one exists: `forecast_borrowing_change`, `average_energy_bill_change`, `incidence_share`, `tax_to_gdp_ratio`, `real_spending_growth`, `spending_pressure` and `forecast_revenue_change`. The rest are new. Every unit is a registered UnitConcept. + +- **Energy:** + - `typical_energy_bill`: the typical household's annual bill level. + - `average_energy_bill_change`: a change in it from prices or support combined, not from one policy. The registered `energy_bill_change` carries single-policy effects. + - `unit_rate_change`. + - `bill_rise_offset_share`. +- **Public finances:** + - `debt_interest_spending`, `debt_interest_change`, `debt_interest_share_of_gdp`. + - `current_budget_balance` (positive = deficit). + - `primary_balance`, `primary_balance_change`. + - `tax_revenue_change`. + - `psnb_share_of_gdp`, `psnd_share_of_gdp`, `psni_share_of_gdp`. + - `headroom_share_of_previous`, `share_of_headroom_change`. + - `tax_to_gdp_ratio_change`. + - `absolute_policy_change`. + - `share_of_total_policy_cost`. +- **Spending:** + - `rdel_change`. + - `rdel_share_of_gdp`. + - `real_rdel_per_person_change`. + - `real_spending_change` (positive = size of a real cut). + - `defence_spending_share_of_gdp`. +- **Households:** + - `real_income_change` (£ change in a real income statistic). + - `income_change_gap`. + - `net_weekly_income`. + - `gross_earnings_change` (the AB2025 spelling, which the red book family uses for the same minimum wage measure; review A, K-7(c)). + +## Not staged, and why + +- **Design, not estimates (rule 8; 36 rows removed after the rule arrived):** + - **Fuel Duty rates:** PR28's "7.6p rise"; p.24's 52.95p to 60.59p a litre and "over 14 per cent". The rates sit in the continued-freeze option row's `conditions.counterfactual`. + - **Minimum wage rates and counterfactual upratings:** 3.9 per cent, £13.21 and 50p (p.12 and the comment), the "on-course" 5.7 per cent and the youth rate's 10 per cent (Box 1 and the comment). The rates sit in the £1,040 rows' `reform_hint`. + - **Financing remits:** NWF £15.4bn, BBB £5bn, the combined £20.4bn (PR28 and p.6), the 0.27 per cent of GDP of investment commitments, the £5bn defence ringfence and "around a quarter" (p.33). + - **Programme allocations:** + - The AI package's £700m, with £165m biosecurity, £120m AI Security Institute, £140m Sovereign AI Unit, £30m local partnerships and the £15m challenge prize. + - Good Growth Funds' £285m in 2027-28. + - The Social and Affordable Homes Programme's £1.5bn top-up and its 10,000 homes. + - **The £108 gas standing charge:** it sits in the gas rows' `reform_hint`. + - **A worked example's input:** the £12,739 part-time earnings, which sit in the worker rows' `household_type`. + - **Figure 7's flat payments:** the Council Tax rebates (£100 in 2026-27, the 2022 £150) and the 2022-23 £400 Energy Bills Support Scheme, as F7 cells E7, L7 and L11. + - **The 23 per cent rise in private rents since September 2023 (p.21):** an ONS statistic about no measure. +- **Charts without printed values.** The PDF's figures print no bar values except where staged: Figure 7's two 'After rebate' annotations (the two 'Net bill' labels are staged from p.17 bullet 2), Figure 10's eleven line labels and Figure 23's end labels. The exact values come from the workbook instead. Figure 5's decade labels for the 1960s–2010s are historical ONS outturn, not about the Budget; the text rows carry the 2020s values (1.4 per cent, £400). +- **Workbook sheets left out:** + - These sheets chart OBR, ONS, IMF or HMT aggregates and history, or RF's arithmetic on them. This follows AB2025, which staged these charts' headline text values instead. + - F1 (borrowing and debt, pre-measures). + - F2 (borrowing decomposition). + - F3 (gilt yields, debt interest). + - F4 (CPI, earnings). + - F5 (RHDI by decade). + - F6 (GDP decomposition). + - F11 (monthly real Fuel Duty rates, 2008–2032). + - F13 (real RDEL per person decomposition). + - F14 (spending growth by period). + - F15 (departmental RDEL indices). + - F16 (PSNB paths). + - F17 (current balance and PSNFL). + - F18 (current-balance forecast history). + - F19 (international borrowing). + - "Extra spending stats". + - F12 holds marginal tax rates, which are design. + - Within the staged sheets, the family leaves out: + - Working and input blocks: F9's raw winner tables, F10's HMT and OBR input rows 5–40, F21's percentile columns other than AD, and F23's level, raw and scenario blocks. + - F22's second chart (bottom 7 / middle 6 / top 7 vigintiles since 2019-20), which the briefing doesn't print. + - F23's second chart (AP72:AR73, 2029-30 and 2030-31), which the briefing doesn't print. +- **Text numbers left out:** + - **Macro forecasts and statistics:** + - CPI paths (6.5 / 3.9 per cent, 43 / 22 per cent, 2.1 / 3.8 per cent, 16 / 13 per cent). + - Gilt yields (44 basis points). + - GDP growth (1.1 / 1.2 per cent, 1 per cent, 0.6 points, 0.5 per cent, 1.75 per cent). + - Unemployment and earnings (5 per cent; 68 / 26 per cent; 3.8 per cent real earnings; 0.1 per cent real wages). + - Migration levels (171,000; 331,000; 340,000 / 290,000 / 230,000; 70,000). + - Wholesale gas and pump prices (60 per cent, a quarter, £2 a litre, a fifth, 22 / 14 per cent). + - ONS business survey (15 per cent, 10 points). + - Rents forecast to rise 3.6 per cent in 2027-28. + - The OBR's 3.6 per cent Q2 2027 inflation. + - ASHE's 5.9 per cent and the LPC's 3.7 per cent April estimate (Box 1 and comment). + - The comment's 3.7 / 3.3 per cent earnings figures. + - **History and international comparisons:** + - Tax/GDP 37.2 per cent in 1948 and 4.6 points to 2019-20. + - Receipts margins (6.3 / 3.5 per cent, fn 24). + - Spending growth in earlier parliaments (1.8 / 1.4 / 3.6 per cent). + - Unprotected departments' 4.6 per cent low (2018-19) and 7 per cent (2009-10). + - Benefit and NI rates in past years (p.44). + - Fuel Duty's 40 per cent real fall since 2011. + - The EIB's 0.29 per cent of GDP. + - The G7, OECD and IMF borrowing comparison (3 and 0.3 points). + - The £72bn average of Reeves's two Budgets, which has no single period. + - The 19th of 34 fiscal events (a rank). + - PR28's "mid-2029" date for living standards to recover, and its ranking of the Parliament as the "second worst … since the 1950s" (a date and a rank, not an estimate of a measure). + - **Other design:** £100, bands A-D, 5p, 3p / 2p, 2 points, 3 to 6 per cent, the 31 per cent headline bank rate, 20 / 25 per cent, the £1.5bn Good Growth lending facility, the 20 per cent equity loan and 2.5 per cent deposit, the £110,000 / £140,000 income caps, £86.45, £204, 16 hours, £1 for £1, the 55 per cent UC taper, Business Rates retention shares (20 / 50 / 70 / 100 per cent), and the 3 and 3.5 per cent defence targets. + - **Third-party figures:** + - Anthropic's $65bn (£48bn) round and the "1.5 per cent" comparison. + - The Health Foundation's £7.5bn. + - EDF's "top £2,000 in each quarter" (fn 9). + - Arin Dube's 70 per cent bite. + - **Ratios and qualitative multiples:** + - "twice the level of funding given to households". + - "twice the level of support" for a targeted scheme. + - "one-tenth of the growth rate achieved in the 2010s". + - "enough to cut employee National Insurance by 2p". + - "help half as many poorer households twice as much". + - "About half of that buffer was wiped out". + - The "0.3 percentage point gap" (3.0 minus 2.7). + - "35-year old property valuations". + - **Other context:** + - The 16 mayoral areas' £26bn (7 per cent of Income Tax). + - "at least 28 MSAs". + - 1.5 million homes. + - 33GW / 300GW and £750bn of infrastructure. + - "around half a million low-income families" (the AB2025 two-child limit repeal). + - The £24bn year-four headroom (a rounding of £23.6bn). + - p.15's "£7 billion in 2029-30" (a rounding of Box 2's £6.7bn). +- **Publications checked:** + - RF's publications, press-release, comment, Top of the Charts, events and Budgets listings were all fetched at 16:19–16:20Z. + - The only other RF Budget output from 28–29 October is the launch event page, *Pleasing people and satisfying markets*. It is an embedded YouTube video with no printed figures, so the family neither hashes nor stages it. + - The comment's three slide images (`Slide1-1-scaled.png` to `Slide3-1-scaled.png`) are charts, not staged; its numbers are minimum-wage design apart from the £1,040. + - No Budget response briefing, chart pack or Top of the Charts Budget special from 28–29 October appeared. + - The Spread thin page's "Further reading" links two pre-Budget briefings, outside this window and not staged: + - *Counting the cost* (8 Oct; page sha256 `415deda6…`). + - *Hitting the buffers* (13 Oct; `881bbd4d…`). + +## Discrepancies in the primaries (reported, not fixed) + +1. **v1 and v2 disagree on the income halves.** v1 prints £158 / £14 / £144; v2 prints £145 / £15 / £130, and v2 p.19 hedges them as "under £145 … over £130 … less than £15". The landing page still printed £158 / £144 when fetched on 29 October; by 4 November it printed v2's £145 / £130 (manifest line 8). +2. **The £4.4bn package's years.** p.19 calls it "the Government’s £4.4 billion cost of living package for 2025-26 and 2026-27". The measures fall in 2026-27 and 2027-28 (Table 6.1 lines 1–3). The press release and p.47 print no years. The family stages the period as printed, at medium confidence. +3. **The £3.4bn's scope.** p.17 says "Together, these measures cost £3.4 billion in 2026-27" of the Household Energy Payment and "a three-month extension to the VAT cut". The extension falls in 2027-28, and £3.4bn equals lines 1 and 2 in 2026-27 (£2,625m + £755m), so the figure includes the original six months of the VAT cut. +4. **Your First Home's sign.** p.21 calls £95m in 2029-30 "a cost". Table 6.1 line 37 prints +95, a yield ("net income from developer fees"). +5. **SAHP top-up** (not staged, rule 8). p.21's "£1.5 billion top-up" differs from Table 6.1 line 35, which sums to £1,750m over 2027-28 to 2030-31. +6. **Good Growth Funds** (not staged, rule 8). p.33's "£285 million in 2027-28" differs from line 20, which prints -£340m that year (the line includes the lending subsidy). +7. **Tax gap measures.** p.4's "over £3 billion annually by 2030-31" doesn't match the workbook's OBR series (F10 row 52): 2.89 in 2030-31 and 3.64 in 2031-32. Row 67 records it in `conditions.discrepancy` (review A, K-7(h)). +8. **Figure 20's AB26 component.** The note says "‘AB26 Changes’ includes the Pension Tax Allowance, removal of standing charges on gas bills, and the Machine Games Levy". The workbook's AB26 Changes also includes "Property and savings tax rise" (column K = F + G + I + J). The workbook labels the Pension Tax Allowance "Pensioner Personal Allowance". +9. **Figure 10's Fuel Duty series.** Its note says the series shows "Fuel Duty changes announced in May and October", but the values (-0.575, -0.78) equal Table 6.1 line 3 alone. +10. **Primary balance years.** p.39 says the £107bn of higher tax revenues runs to the end of the Parliament (2028-29). Footnote 53 computes it "between 2023-24 and 2029-30, multiplied by forecasted GDP in 2029-30". +11. **Energy bill figures, release vs briefing:** + - The 28 October release's "£2,210 across 2027" (the 2027 average) differs from Spread thin's £2,192 (the Q1 2027 cap), which p.5 calls the bill "next year". + - The 29 October release's 2022-23 net bill of £1,685 differs from Figure 7's "After rebate: £1,686" (workbook 1,686.20). + - p.17's VAT extension "worth £12" differs from the workbook's 12.80 for the cut in 2027-28 (2026-27 prices). +12. **Footnote 50's figure reference.** It reads "From the forecasts shown in Figure 7", but the current-balance forecasts appear in Figure 18; Figure 7 is the energy bill chart. +13. **Capacity vs Table 6.2** (not staged, rule 8). The NWF's £15.4bn and BBB's £5bn "capacity" boosts don't match Table 6.2's financial transactions: NWF line 2 sums to £10.2bn over 2028-29 to 2031-32, BBB line 3 to £0.75bn. +14. *(Withdrawn on 3 November: the README's rule 3 example was corrected, so RF's package equals the registered one; see "Measure keys".)* +15. **The VAT element's description.** PR28 para 5 and p.17's heading and paragraph 1 describe the package's VAT element as the "three-month extension", and p.17 calls the six-month cut "support announced before this Budget". Yet Figure 8, the 52/48 split and the £4.4bn all include "Energy VAT cut (original)". + +## Review fixes, 3 November 2026 + +The RF review (`harvest-staging/ab2026/reviews/verify-rf.md` on the staging branch) approved this family with fixes; all thirteen are applied, finding 1 as the `P_SAV_PROP` constant and the rest in an explicit block before `write()` in `stage.py`. No primary was re-opened (the session's network policy refused resolutionfoundation.org); no printed value changed. + +1. The 25 rows for exactly lines 61 and 62 use `ab2026__package_property_and_savings_income_rates`, README rule 2's name (F10 row 51 equals lines 61 + 62 in every year). +2. The passage that contradicted README rule 3's old example is gone, and discrepancy 14 is withdrawn (kept as a one-line marker); that example has been corrected. +3. Row 168's note names the Government's Defence Investment Plan projection. +4. Row 38's note names the ONS/OBR outturn. +5. The v1→v2 record notes Figure 8's lower Council Tax rebate bars. +6. "Figure 7's four annotations" now reads two, with the two "Net bill" labels staged from p.17. +7. The workbook hash typo is fixed. +8. Row 23 (−0.4 per cent) is a `point`, `statistic: RHDI per person, average annual growth`, `parse_confidence: medium`. +9. Row 167 (0.5 per cent) is `statistic: real RDEL per person, average annual change (Figure 14)`. +10. Rows 28, 29, 56, 57, 61 and 63 carry `price_basis: cash terms (Figure 8)`. +11. (Optional, applied.) Row 397, F10 C48's floating-point zero (−7.46e-7 bn), is dropped: F10 54 rows, `ab2026_option__fuel_duty_continued_freeze` 6, `arithmetic` 148, total 766. +12. (Optional, applied; England, the coordinator's call.) Rows 109 and 110 (£358 and 20 per cent) are `geography: England`, as row 108 is. +13. Discrepancy 15 records the VAT element's description. + +- **Verification:** the contract checker reports 766 rows, 0 problems, and a re-run of `stage.py` reproduces the gzip byte for byte. COUNTS.json pins its sha256. Proposed-key names may change again in the cross-family harmonisation recorded below. + +## Key harmonisation, 3 November 2026 + +The coordinator gave each scope one key across families (tranche 1, task 3.4). This family's renames: + +- `ab2026__minimum_wage_rates_april_2027` → `ab2026__minimum_wage_uprating_april_2027` +- `ab2026__package_obr_total_effect_of_government_decisions` → `ab2026__package_government_decisions_since_march_2026` +- `ab2026__package_obr_direct_effect_of_tax_measures` → `ab2026__package_tax_decisions_since_march_2026` +- `ab2026__package_obr_tax_administration_compliance_and_debt_collection` → `ab2026__package_tax_administration_compliance_and_debt_collection` +- `ab2026_option__obr_tax_measures_with_continued_fuel_duty_freeze` → `ab2026_option__tax_decisions_with_continued_fuel_duty_freeze` + +RF's three OBR groupings are restatements of the OBR's own Table 3.1 rows, so they take the OBR family's scope names, which carry no `obr` (OBR review, finding 9). The minimum wage key takes the red book's spelling for the same measure. `ab2026_option__fuel_duty_continued_freeze` is now shared with the OBR family, whose paragraph 3.43 prints the same alternative's £4.3bn in 2029-30. + +## README rule 10, 3 November 2026 + +Under README rule 10, `stage.py` moves the family's totals of the Budget's decisions from `revenue_change` to `decisions_effect_on_borrowing`: Table 6.1's total of policy decisions (1 row) and the OBR's direct effect of tax measures that Figure 10 plots (13 rows), 14 rows in all. Counting from 0, the rows are 66, 102, 141–146 and 385–390. The OBR's total effect of the Budget's decisions (3 rows) already took the metric, so 17 rows carry it. Single measures and groups of measures keep `revenue_change`. No value or sign changed. + +**Not moved (4 November 2026, review B's RF finding 3, option (b), the coordinator's call):** the 11 rows of Figure 10's "Net effect if Fuel Duty frozen" (`ab2026_option__tax_decisions_with_continued_fuel_duty_freeze`; rows 147–151 and 432–437), which the 3 November pass had moved, are back on `revenue_change`. These totals add the freeze's receipts effect, which row 154's note derives from the OBR's constant-duty-rate Fuel Duty forecast less its central forecast, and RF's title for Figure 10 frames the chart as revenue ("Measures announced raise revenues"). Under rule 10 they are a tax-change estimate whose evidence doesn't establish PSNB scope. The OBR states the freeze's effect on borrowing for 2029-30 only (paragraph 3.43, from Table 7.1), and RF's values for the other years are receipts differences, so they are not recombinations of a stated effect on borrowing. Rows 154 and 397–401 (`ab2026_option__fuel_duty_continued_freeze`) stay on `revenue_change` too. + +## Review fixes, 4 November 2026 + +Two independent reviews of PR #231 at 4f424b9 approved this family with fixes: review B (RF findings 1–8 and nits) and review A (K-4, K-6, K-7(c), K-7(d), K-7(h) and H-1). All are applied in a block before `write()` in `stage.py`, with the coordinator's calls on findings 2 and 3. No printed or stored value changed. Indices are 4f424b9's. + +1. **Two-year totals (finding 1).** All 114 Figure 8 rows (245–358), the text rows that restate them (56, 57, 61, 63, 74, 76), the gap rows 62 and 75 and the £4.4bn rows 34, 54 and 127 are `cumulative`. The 95 F8 £ rows' normalization reads "£ per household as stored: total cash impact over 2026-27 and 2027-28 (Figure 8 note)"; the K rows keep theirs. +2. **The landing page changed by 4 November (finding 2, rule 7).** Manifest line 8 records the 4 November page (no rows cite it). Its £145 / £130 are not staged again (the coordinator's call; v2 rows 74 and 76 carry them). Rows 56–57 carry `document_version: "29 October page text (superseded by 4 November)"` and a "Superseded" sentence. +3. **Rule 10 (finding 3, option (b)).** Rows 147–151 and 432–437 are back on `revenue_change`; the stager's rule 10 count is 14 (see "README rule 10"). +4. **Restated counts (finding 4).** Rows 55 and 72 are `restated`, `hm_government_publication`, medium confidence, with a note naming HM Treasury. +5. **Tallies (finding 5).** The workbook has 554 rows, the restated source models are corrected, and the attribution split recounts from the rows (`own` 680, `restated` 86). +6. **Gas standing charge (finding 6).** Rows 115–125 carry `conditions.horizon` and medium confidence. +7. **Signs (finding 7, and K-7(d)).** The 122 Figure 21–22 rows (629–750) carry "positive = growth"; text rows 21, 23, 89, 117, 198, 200, 203 and 204 carry "positive = gain to households"; row 10 reads "positive = saving (a reduction in the household's bills)". +8. **Nits (finding 8):** + - chart rows name their series in `conditions.series` (310 rows), and `component` stays only on the 39 rule 9 parts of line 2 (review A, H-1). Seven text context rows that used `component` for a driver of a forecast change, or a scenario's spending type, use `driver` (rows 51, 80–82, 91, 92) and `spending_type` (row 170); + - F22's category labels read "2025-26", not "2025- 26"; + - stored F7 C/I/M and F9 cells say "as stored"; + - F7 rows 222, 226, 236 and 241 name their support series in `reform_hint`; + - gap rows 30, 62 and 75 carry `price_basis: cash terms (Figure 8)`; + - the Primaries notes, Figure 21's chart object, F23's second chart, F8 J, discrepancy 15's locator, Review fixes item 2 and the "Not staged" list are corrected. +9. **K-4.** The £4.4bn (34, 54, 127) moves to `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty`. +10. **K-6.** `ab2026_option__fuel_duty_rpi_uprating_since_2011` stays separate from the OBR's `ab2026__package_fuel_duty_freezes_since_2010_11`; each family's NOTES names the other. +11. **K-7(c).** Rows 88 and 211 propose `gross_earnings_change`. +12. **K-7(h).** Row 67 carries `conditions.discrepancy`. +13. **OBR review B, finding 3.** The tax administration group's key is `ab2026__package_tax_administration_compliance_and_debt_collection_receipts`, as the OBR family's is. + +- **For tranche 2:** `ab2026_option__fuel_duty_continued_freeze` holds RF's receipts cost (rows 154, 397–401, `revenue_change`) and the OBR's £4.3bn effect on borrowing (paragraph 3.43). RF rows 385–390 restate the OBR workbook's receipts total exactly, on the tax-decisions key with the borrowing metric. +- **Verification:** the contract checker reports 766 rows, 0 problems, and a re-run of `stage.py` in a scratch directory reproduces the gzip byte for byte. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/claims_staged.jsonl.gz new file mode 100644 index 000000000..fafd85c23 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/manifest.jsonl new file mode 100644 index 000000000..4119c562c --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/manifest.jsonl @@ -0,0 +1,8 @@ +{"url": "https://www.resolutionfoundation.org/press-releases/budget-balancing-act-leaves-families-braced-for-tough-winter-and-four-year-living-standards-downturn/", "title": "Press release: Budget balancing act leaves families braced for tough winter and four-year living standards downturn", "date": "2026-10-28", "publisher": "Resolution Foundation", "sha256": "ac5369e6f73bbfddc53dfd9977a34a89e032be513e1a21f192a02d124ef98878", "bytes": 118327, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). HTML bytes fetched 2026-10-29T16:16:35Z; the page's HTML can change between fetches. Quotes are from the article text. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/press-releases/britain-braced-for-painful-second-half-of-the-parliament/", "title": "Press release: Britain braced for painful second half of the Parliament", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "40b102686bbee5dbaff30ea96bfa6bef3f73fe777142a826c811e7fa88c7c22d", "bytes": 116817, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). HTML bytes fetched 2026-10-29T16:16:36Z; the page's HTML can change between fetches. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/publications/spread-thin/", "title": "Spread thin: Analysing the Autumn 2026 Budget (publication page)", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "66a999dc35476a54c003bb9fda0ebbb3648cb52403d7b78c5b9fe9f5f569d792", "bytes": 152177, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). HTML bytes fetched 2026-10-29T16:16:38Z. At that time the page linked Spread-thin.pdf (v2) and the chart workbook, but its Key findings still printed v1's £158 / £144 for the income halves. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/app/uploads/2026/10/Spread-thin-1.pdf", "title": "Spread thin: Analysing the Autumn 2026 Budget (briefing PDF, first version, Spread-thin-1.pdf)", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "a669f39d30d5648697ce0234692bd9695fadafd85669ee809c02af0c90595603", "bytes": 1410169, "doc_type": "pdf", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). Fetched 2026-10-29T16:16:41Z; byte-identical to the assignment's local copy downloaded 08:46Z. PDF CreationDate 04:33 EDT; server Last-Modified 08:37:45 GMT. Still served at this URL but no longer linked from the landing page. Replaced by Spread-thin.pdf (next line): p.5 and p.19 changed £158 / £14 / £144 to £145 / £15 / £130. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/app/uploads/2026/10/Spread-thin.pdf", "title": "Spread thin: Analysing the Autumn 2026 Budget (briefing PDF, replaced version, Spread-thin.pdf)", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "9536b6cd8478dea91f88a103c9004cc7b4cdde269a521f62048e3c523a15d9ff", "bytes": 1410388, "doc_type": "pdf", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). Fetched 2026-10-29T16:17:29Z from the landing page's PDF link. PDF CreationDate 08:13 EDT; server Last-Modified 12:14:43 GMT. Differences from v1: p.5 and p.19 income-half figures, Figure 8's axis top (+£160 / +3.2% for +£180 / +3.6%), Figure 4's x-axis adds 2031, a p.30 typo fix and reflowed lines. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/app/uploads/2026/10/Final-clean-charts-all-sections-for-comms.xlsx", "title": "Spread thin: chart data workbook (Final-clean-charts-all-sections-for-comms.xlsx)", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "a4e1c072bf8f95f364a470be46ad1d1fad2c4f86fa83d371b45b577df1d6e0d1", "bytes": 14637565, "doc_type": "xlsx", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). Fetched 2026-10-29T16:17:32Z from the landing page's data link. Server Last-Modified 12:16:43 GMT; core properties modified 11:51:06Z. One sheet per figure (F1-F23) plus 'Extra spending stats'. Read from the stored cell values in the sheet XML. Its Figure 8 values match v2. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/comment/its-good-to-be-flexible/", "title": "It's good to be flexible (Nye Cominetti, comment)", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "3510a245ad89667dee8e6dbb42d175970c05667a244c4034197c43000962fcfc", "bytes": 131349, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Fetched with curl -sSL and a browser User-Agent (HTTP 200). HTML bytes fetched 2026-10-29T16:20:03Z; the page's HTML can change between fetches. A Budget-day comment on the April 2027 minimum wage rates, listed on RF's comment page; not linked from the press releases or the Spread thin page. Re-fetched 2026-10-29T17:02Z: identical bytes."} +{"url": "https://www.resolutionfoundation.org/publications/spread-thin/", "title": "Spread thin: Analysing the Autumn 2026 Budget (publication page, 4 November version)", "date": "2026-10-29", "publisher": "Resolution Foundation", "sha256": "d81969ef4b4d280e978ff75d8ac529c4fb73009ebaafb52e2e146124cb5b0259", "bytes": 154801, "doc_type": "html", "access": "direct", "retrieved": "2026-11-04", "note": "Fetched by review B of PR #231 on 4 November 2026 (hash and length from that review). JSON-LD dateModified 2026-11-04T09:21:48Z, so the page changed by that time. Its Key findings bullet 3 now prints v2's figures, 'gains £145 on average, against £130 for the richer half', where the 29 October bytes (line 3) printed v1's £158 / £144. No rows cite this version: v2 rows 74 and 76 already carry £145 / £130, and rows 56-57 cite the 29 October bytes they were read from."} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/NOTES.md new file mode 100644 index 000000000..cb9246af8 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/NOTES.md @@ -0,0 +1,132 @@ +# Smaller producers: Autumn Budget 2026 + +**Working files.** `stage.py`, which writes `manifest.jsonl` and `claims_staged.jsonl.gz`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/thinktanks-b/uk_thinktank_misc/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The lane's local primaries folder (`.ab2026-primaries/`) was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. + +Staged from five primary HTML responses published on 28 October 2026. Sources are `cps`, `institute_for_government`, `learning_and_work_institute` and `citizens_advice`; the manifested Age UK response contributes zero rows. There are **12 rows and 5 primaries**. `stage.py` embeds the readings and recreates the manifest and deterministic gzip using only Python's standard library. + +## Changes on 3 November 2026 (thinktanks-b review) + +- **Finding 1:** CPS's £3.1 billion PuFins row is context. It names no Budget decision, line or year and ties the figure to a CPS paper from before the Budget, so it carries no proposed key; `reform_hint` is null and `conditions.measure_type` names it. `ab2026__package_cps_public_financial_institutions` is withdrawn. +- **Finding 5:** Trussell's row and primary moved to the AB2026 family `uk_trussell_wpi`, with source `trussell_wpi`, as AB2025 staged Trussell's Budget responses. This family now has 12 rows and 5 primaries. +- **Finding 6:** IfG's count of one tax measure names the measure it counted in `conditions.subgroup`, not `component`, which rule 9 reserves for parts of a measure. + +No primary was re-opened on 3 November (the session's network policy refused every producer's site); every change relabels fields, and no printed value changed. The 29 October record below is updated for the new row set. + +## Changes on 4 November 2026 (reviews A and B) + +Review B (PR #231, issue comment 6635498758) approved this family with fixes, and review A's H-6(a) asked for its finding 2. The fixes sit in a block after the rows in `stage.py`, shared word for word with `uk_trussell_wpi`'s (judgement call 10). No primary was re-opened, and no value changed. + +- **Finding 1:** IfG's "around 80%" (row 8) restates HM Treasury's paragraph 3.5, which `uk_hmt_redbook` row 191 stages: `restated`, `source_model: administrative_data`, `conditions.originator: "HM Treasury, Budget 2026 para 3.5"`, geography England, denominator "households in England (HM Treasury)", and a rewritten note. Own 4, restated 8. +- **Finding 2 and H-6(a):** rows 2, 8 and 10 carry the registered `fiscal_headroom`, `affected_share` and `affected_count` in `metric`, with `proposed_metric` null. +- **Finding 3:** row 9's `measure_type` is "real household disposable income per person". +- **H-6(d):** row 11 (Citizens Advice) carries `geography: "not stated"`. + +## Access recipe and primary hashes + +Every primary was fetched afresh on 29 October 2026 using `curl -sSL -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15"`; every response was HTTP 200. The lane kept the HTML bytes, headers and text extracts in its local primaries folder. Hashes were checked using `shasum -a 256`. BeautifulSoup extracts were used to read the page's own body text; hashes refer to HTML, not extracts. There are no PDFs or spreadsheets in this family. + +No assigned local copies or earlier document versions were supplied. There was no blocked fetch, fallback or observed replacement. Fetch-completion timestamps are recorded in each manifest note because HTML can change. + +| Primary | Fetch completion (UTC) | Bytes | Rows | SHA256 | +|---|---|---:|---:|---| +| [CPS verdict](https://cps.org.uk/media/post/2026/a-dangerous-continuation-of-labours-tax-and-spend-fantasy-cps-verdict-on-the-budget/) | 2026-10-29 15:22:34 | 70,197 | 4 | `2c832e011866eb9f63f20597e7bf43bc01d44b6b1b5be43eee866ad6fc5ecd24` | +| [IfG commentary](https://www.instituteforgovernment.org.uk/comment/john-healeys-underwhelming-budget) | 2026-10-29 15:22:31 | 153,352 | 6 | `ecf19f14b4f808846fb8230b28a3244b0b65812484735842f9ab537a50195c69` | +| [Age UK response](https://www.ageuk.org.uk/latest-press/age-uk-response-to-the-budget/) | 2026-10-29 15:22:31 | 105,862 | 0 | `3035a8bbbb0f023dc24e805b430052163aa0dbfce3c975a6e0a0568983db6bf0` | +| [Learning and Work Institute response](https://learningandwork.org.uk/responding-to-autumn-budget-2026/) | 2026-10-29 15:22:31 | 122,809 | 1 | `c7fe077a0d9f4784aa4c91c906bcefa087cc9a4ece8b28026d24347c2a8b5dcf` | +| [Citizens Advice response](https://www.citizensadvice.org.uk/about-us/media-centre/press-releases/citizens-advice-responds-to-chancellors-budget/) | 2026-10-29 15:23:24 | 22,671 | 1 | `6a10336a67fc058512a4ccd9d0e80a27470fee8ba5775690fb1fcba39db67385` | + +Citizens Advice's press index linked its dated response. The other four URLs were assigned. CPS prints “Date Added: Wednesday 28th October 2026”; IfG prints “28 OCT 2026”; LWI prints “28 October 2026”; Age UK prints publication on 28 October 2026 at 04:14 PM and last update that date. + +## Coverage and conventions + +Reading order is CPS, IfG, Age UK, LWI, Citizens Advice, then top to bottom within each page. Only contiguous excerpts under 15 words are quoted. There are no chart readings or derived gaps, totals, ratios or annualisations. + +| Source | Rows | Own | Restated | +|---|---:|---:|---:| +| `cps` | 4 | 1 | 3 | +| `institute_for_government` | 6 | 2 | 4 | +| `learning_and_work_institute` | 1 | 0 | 1 | +| `citizens_advice` | 1 | 1 | 0 | +| `age_uk` (manifest only) | 0 | 0 | 0 | +| Total | 12 | 4 | 8 | + +| Measure key | Rows | Scope | +|---|---:|---| +| `ab2026__household_energy_payment_100_bands_a_to_d` | 1 | IfG's share of households in England receiving the £100 council-tax rebate for bands A–D (restating HM Treasury's paragraph 3.5); Table 6.1 line 1 | +| `null` | 11 | context and document-tally observations; none carries a proposed key | + +The sole registered key is attached to the specific rebate's coverage, not to the entire cost-of-living package. IfG's exact identification of the £100 council-tax rebate for bands A–D identifies line 1; it gives no contrary scope. Its "around 80%" restates HM Treasury's paragraph 3.5 ("around 80% of households in England"), so the row is `restated`, `administrative_data`, geography England, as `uk_hmt_redbook` row 191 stages it (changed on 4 November, review B finding 1). Context forecasts, outturns and document counts, including CPS's PuFins assertion, have null measure keys and null reform hints. + +- GBP values preserve printed signs and cash magnitudes. “Tops £3 trillion” is the printed strict lower bound of debt stock. The six-month £61 billion debt-interest total is not multiplied to a year. Fiscal headroom is positive headroom; PuFins' £3.1 billion is a positive debt increase. No sign is reversed. +- Percentages remain percentages. “Almost 100” retains the printed upper threshold 100; no exact policy count is inferred. “Around 80%” retains the qualifier in conditions. +- `point`, rather than `central`, records each single published observation/forecast: none is labelled a central scenario. Thresholds use `range_low` or `range_high`. The 2% real-income growth is `cumulative` over the printed comparison window, not a 2% annual rate. +- Only IfG's fiscal-rule probabilities name a fiscal year: “2029/30” is normalised to `fy: 2029-30`, period 2030, `fiscal_year`. The income projection prints calendar 2030 and uses `annual` without `fy`. Other observations use the publication-year point-in-time anchor 2026 and preserve “last six months”, “this winter”, “each year”, “last 12 months”, or unspecified horizon explicitly. They do not claim a fiscal/calendar scoring year that the producer did not print. The PuFins annual-rate assertion has medium confidence because no scoring year or fiscal/calendar basis is supplied. +- Real income remains real; all other price bases are left unspecified where the page does not identify one. No baseline proposal is needed for these current observations and explicitly named context comparisons. +- CPS's own PuFins assertion uses `source_model: unstated` because it does not identify its calculation. Official debt/outturn context uses `administrative_data` and `administrative_fact`. CPS headroom and IfG fiscal probabilities/income forecasts are `restated`, `obr_efo_forecast`, `different_model`. The precise original release behind the unsourced CPS figures is not identified, so these originator assignments are explicit in rows. +- IfG's two counts are its own `arithmetic`, `different_model` observations. Its rebate share restates HM Treasury (paragraph 3.5): `restated`, `administrative_data`, `conditions.originator` naming the paragraph (changed on 4 November). LWI's rounded NEET figure is treated as restated official labour-market context, `administrative_data`, `administrative_fact`; its response gives neither a quarter, age range nor a citation. Citizens Advice's unsourced bill forecast is treated as its own assertion with `source_model: unstated`, with missing method/geography acknowledged. Citizens Advice's estimate, CPS's PuFins assertion and IfG's rebate share have medium confidence; the other nine rows have high confidence. + +## Proposed keys, metrics and units + +No measure key is proposed. CPS's PuFins row is context (see the 3 November changes above). + +Registered metrics (since 4 November, review A's H-6(a) and review B's finding 2; `models.py` registers them, so they go in `metric`, not `proposed_metric`): + +- `fiscal_headroom` (1; GBP): CPS's current post-Budget buffer against the fiscal rule; target year unspecified. +- `affected_share` (1; percent): IfG's share of households in England receiving the rebate, restating HM Treasury. +- `affected_count` (1; persons): LWI's rounded current count of young people not in education, employment or training. + +Proposed metrics (counts and exact meaning): + +- `public_debt_level` (1; GBP): CPS's current national-debt stock lower bound; no series definition is supplied. +- `debt_interest_cost` (1; GBP): CPS's total debt interest over the last six months, not the change caused by a measure. +- `public_debt_change` (1; GBP): CPS's asserted annual debt increase through PuFins, a context row; period limitations above. +- `measure_count` (2; proposed unit `measures`; AB2025 family precedent): IfG's approximate full scorecard count and exact count of tax measures costing/saving more than £1bn in the last forecast year. +- `fiscal_rule_probability` (2; percent): current and last-budget OBR probabilities of a current-budget surplus in 2029/30, as reported by IfG. +- `average_energy_bill_change` (1; GBP/month; AB2025 IFS/RF proposal spelling): Citizens Advice's forecast monthly household energy-bill increase, excluding any assertion that this is a Budget measure effect. + +Registered `real_income_growth` accounts for IfG's restated OBR 2% cumulative growth in real household disposable income per person (EFO para 1.2; `conditions.measure_type` says "per person" since 4 November, review B finding 3). Proposed unit `measures` is used only for the two counts. Other units are registered. There are no proposed baselines. + +## Not staged and primary limitations + +- **Age UK: zero rows.** Its own response has no numeric Budget estimate. The exact “On Income Tax threshold.” subsection was read; it welcomes protecting low-income pensioners from cash tax demands but prints no number. Dates, contact numbers, navigation “Nearly 4,000 flu mortalities” and the unrelated £2 donation link are not Budget claims. +- IfG's £100 rebate is a bare policy parameter; its 80% coverage is staged separately. The £1bn cutoff defines its count of one tax measure and is preserved in conditions rather than misrepresented as that measure's costing. Other dates and the 1991 council-tax valuation year are context labels, not model outcomes. +- LWI mentions extra Mayoral apprenticeship funding and OBR employment effects but prints no amount or employment effect. Its “one million” NEET level is retained as context. Navigation cards and unrelated articles are not harvested. +- Citizens Advice gives no source, exact winter dates, geography or method for £60/month (`geography: "not stated"` since 4 November, for the contract's closed geography list). Those are explicit limitations, not supplied from secondary material. +- CPS does not link its “paper released last week”. It is outside the assigned 28–29 October post-Budget window, and no unseen figures from it are staged. The comparison between six-month debt interest and an annual defence budget prints no second amount or exact ratio, so none is derived. +- No restated figure is silently removed: the seven official/OBR context rows and IfG's restatement of HM Treasury's 80% are staged with `restated` and an originator. No PolicyEngine restatement was identified. +- No pages were unreached. No charts contain unstaged numeric labels in these primaries. + +Potentially ambiguous source wording is retained: IfG describes the £100 rebate as reaching “around 80%” of households without naming the denominator's geography; HM Treasury's paragraph 3.5, which it restates, says households in England, so the row carries England (4 November). CPS's PuFins claim lacks components, annual dates and method, so it stays context; its £15 billion headroom lacks a target year. Age UK's Pension Tax Allowance paragraph contains no number despite the assignment's pointer. These gaps have not been repaired using other sources. + +## Verification + +- **4 November:** the contract checker reports 12 rows, 0 problems, and a re-run of `stage.py` reproduces both files byte for byte. +- **3 November:** the contract checker reports 12 rows, 0 problems; a re-run of `stage.py` reproduces `manifest.jsonl` and `claims_staged.jsonl.gz` byte for byte (COUNTS.json pins the gzip's sha256). The fixes relabel fields only, so the lane's checks below stand for the rows that remain. +- **29 October (13 rows, including Trussell's, now in `uk_trussell_wpi`):** + + +Command: + +```text +PYTHONPATH=. uv run -q python pipeline/ab2026_harvest_contract.py sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc +sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc: 13 rows, 0 problems +``` + +Re-ran `python3 sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/stage.py`; claims SHA256 before and after was **`d677dde1f96e629097696f5d17b575c8f1d34baaca42b96297cd46be773669ea`**. The gzip header has mtime zero and no original filename. Manifest byte counts and all six primary hashes were checked against saved HTML. All 13 quotes were verified as contiguous text in their pinned primary and under 15 words; each contains its `value_raw`. + +Random sample was `random.Random(230).sample(range(13), 10)`, using zero-based indexes and reporting one-based row numbers below. For each, the saved primary was reopened, its SHA256 checked, and the paragraph at the locator read to verify the number, sign, unit and period. The three remaining rows (CPS debt interest, IfG count of one, Trussell share) were also checked for quote/value correspondence and basis. + +| Sample row | Primary and locator | Rechecked value, sign, unit and period | +|---:|---|---| +| 12 | Citizens Advice, second Moriarty paragraph | £60/month positive bill increase; winter forecast, no exact dates; publication-time 2026 anchor, no FY | +| 3 | CPS, final Halligan paragraph | £15 billion positive fiscal headroom → 15e9 GBP; target year absent; 2026 statement anchor | +| 5 | IfG, opening body paragraph | “almost 100” policies; upper threshold 100 measures, no exact count invented; 2026 scorecard | +| 9 | IfG, energy-support first paragraph | “around 80%” rebate coverage; percent remains 80; this winter, no FY; geography unspecified | +| 1 | CPS, national-debt paragraph | “tops £3 trillion”; positive stock strict lower bound → 3e12 GBP; current at publication in 2026 | +| 7 | IfG, fiscal-picture second paragraph | 56% current probability; FY 2029/30 → `fy: 2029-30`, period 2030 | +| 8 | IfG, same paragraph, last-budget clause | 59% previous-budget comparator for that fiscal rule; FY 2029/30 → period 2030; no change calculated | +| 10 | IfG, energy-support first paragraph, final sentence | 2% higher real incomes in calendar 2030 versus before pandemic; cumulative, positive; annual time basis, no FY | +| 4 | CPS, Herring's PuFins paragraph | £3.1 billion positive debt increase each year → 3.1e9 GBP; no start/end year; 2026 statement anchor with annual horizon retained | +| 11 | LWI, Evans's main quotation | “one million” young NEET people → 1e6 persons; current context at publication 2026; no quarter invented | + +Scope review found one non-null key: IfG's specifically identified bands A–D £100 rebate, Table 6.1 line 1. No broader support-package figure is attached to that key. (On 3 November the CPS row lost its proposed key; see above.) No git state-changing commands, commits or pushes were run. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/claims_staged.jsonl.gz new file mode 100644 index 000000000..d9f4c6e31 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/manifest.jsonl new file mode 100644 index 000000000..e6cd9b72e --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_thinktank_misc/manifest.jsonl @@ -0,0 +1,5 @@ +{"access": "direct", "bytes": 70197, "date": "2026-10-28", "doc_type": "html", "note": "Fetched HTML fresh with prescribed curl browser User-Agent; HTTP 200; fetch completed 2026-10-29T15:22:34Z. Hash is of fetched HTML bytes. No assignment local copy or earlier version was supplied.", "publisher": "Centre for Policy Studies", "retrieved": "2026-10-29", "sha256": "2c832e011866eb9f63f20597e7bf43bc01d44b6b1b5be43eee866ad6fc5ecd24", "title": "'A dangerous continuation of Labour's tax-and-spend fantasy' - CPS verdict on the Budget", "url": "https://cps.org.uk/media/post/2026/a-dangerous-continuation-of-labours-tax-and-spend-fantasy-cps-verdict-on-the-budget/"} +{"access": "direct", "bytes": 153352, "date": "2026-10-28", "doc_type": "html", "note": "Fetched HTML fresh with prescribed curl browser User-Agent; HTTP 200; fetch completed 2026-10-29T15:22:31Z. Hash is of fetched HTML bytes. No assignment local copy or earlier version was supplied.", "publisher": "Institute for Government", "retrieved": "2026-10-29", "sha256": "ecf19f14b4f808846fb8230b28a3244b0b65812484735842f9ab537a50195c69", "title": "John Healey’s underwhelming budget punts big decisions into 2027", "url": "https://www.instituteforgovernment.org.uk/comment/john-healeys-underwhelming-budget"} +{"access": "direct", "bytes": 105862, "date": "2026-10-28", "doc_type": "html", "note": "Fetched HTML fresh with prescribed curl browser User-Agent; HTTP 200; fetch completed 2026-10-29T15:22:31Z. Hash is of fetched HTML bytes. No assignment local copy or earlier version was supplied.", "publisher": "Age UK", "retrieved": "2026-10-29", "sha256": "3035a8bbbb0f023dc24e805b430052163aa0dbfce3c975a6e0a0568983db6bf0", "title": "Age UK's Response to the Chancellor's Autumn Budget", "url": "https://www.ageuk.org.uk/latest-press/age-uk-response-to-the-budget/"} +{"access": "direct", "bytes": 122809, "date": "2026-10-28", "doc_type": "html", "note": "Fetched HTML fresh with prescribed curl browser User-Agent; HTTP 200; fetch completed 2026-10-29T15:22:31Z. Hash is of fetched HTML bytes. No assignment local copy or earlier version was supplied.", "publisher": "Learning and Work Institute", "retrieved": "2026-10-29", "sha256": "c7fe077a0d9f4784aa4c91c906bcefa087cc9a4ece8b28026d24347c2a8b5dcf", "title": "Responding to Autumn Budget 2026", "url": "https://learningandwork.org.uk/responding-to-autumn-budget-2026/"} +{"access": "direct", "bytes": 22671, "date": "2026-10-28", "doc_type": "html", "note": "Fetched HTML fresh with prescribed curl browser User-Agent; HTTP 200; fetch completed 2026-10-29T15:23:24Z. Hash is of fetched HTML bytes. No assignment local copy or earlier version was supplied.", "publisher": "Citizens Advice", "retrieved": "2026-10-29", "sha256": "6a10336a67fc058512a4ccd9d0e80a27470fee8ba5775690fb1fcba39db67385", "title": "Citizens Advice responds to Chancellor's Budget", "url": "https://www.citizensadvice.org.uk/about-us/media-centre/press-releases/citizens-advice-responds-to-chancellors-budget/"} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/NOTES.md new file mode 100644 index 000000000..8bbbef53d --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/NOTES.md @@ -0,0 +1,216 @@ +# uk_tpa: Tax Policy Associates, Autumn Budget 2026 + +Dan Neidle's "Budget 2026 – what it means" (taxpolicy.org.uk, 28 October 2026), the seven chart data files the article embeds, and the calculator screenshot its footnote 1 links. Source slug `tax_policy_associates`, as in the AB2025 `uk_tpa` family. + +**Working files.** `stage.py`, the file meant wherever these notes say `stage.py`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/thinktanks-a/uk_tpa/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The lane's local primaries folder (`.ab2026-primaries/uk_tpa/`) was never committed: the repository carries no primary bytes, so fetch each primary from its `manifest.jsonl` URL and check its sha256. `stage.py` reads `uk_hmt_tables` from its sibling directory, so run it from a checkout where the family sits beside that one. + +`stage.py` holds the rows as data and rewrites `manifest.jsonl` and `claims_staged.jsonl.gz` byte for byte. `stage.py --verify` checks the primaries' hashes, finds every quote in its primary, reads every chart value back from its JSON path, and re-derives each TPA group's Table 6.1 lines from `../uk_hmt_tables` (result: 0 problems). + +- **Rows:** 305 (own 244, restated 61). +- **Primaries:** 10 (the article, seven chart data files, one PNG, and the calculator page as a 0-row descriptor). + +## Access recipe + +Every primary was fetched directly on 2026-10-29 between 16:17Z and 16:19Z, with `curl -sSL` and the browser User-Agent in the brief (HTTP 200). The bytes are under `.ab2026-primaries/uk_tpa/`; nothing came from a local copy. + +- **The article** carries `article:published_time` 2026-10-28T15:51Z and `article:modified_time` 2026-10-29T09:59Z, so TPA edited it once after publication. The copy hashed here is the 16:17Z fetch. +- **The article changed again on 4 November.** Review B's fetch that day (217,180 bytes, sha256 `d95a0e8f8a0e6465…`) carries `article:modified_time` 2026-11-04T10:10:31Z. Five reader comments account for 15,211 of the 15,247 added bytes; all 49 quotes and footnotes 1–15 are unchanged, and it holds no figure the rows and these notes don't know. The article's own text and figures didn't change, so it is not a second primary under README rule 7 (the coordinator's call), and the rows keep citing the 29 October bytes. Like every HTML page, the article embeds per-request content, so a later fetch's sha256 differs; the check is that the quotes are still there. +- **The charts** are ECharts embeds. Each chart's `data-json` attribute names a JSON file under `/wp-content/assets/`, and those files are the primaries, URLs as named (three carry a `?v=20261028-n` cache-buster). As in AB2025, `doc_type` is `flourish_json`, the nearest enum for a chart-data file. +- **Values come from the data files, not from bar heights.** Where the chart prints a data label (`label.formatter`), the label is kept in `conditions.chart_label`. +- **Quotes** from a JSON file are the element re-serialised with `json.dumps`, with `£` decoded to £ (the AB2025 `uk_tpa` precedent); the file itself may print the same element across several lines. Three of the chart files print £ as the JSON unicode escape `\u00a3`. +- **Chart descriptions:** only four of the seven chart files carry an `aria.label.description`; the net totals are staged from those that do. +- **The PNG** (`child_benefit_budget_2026.png`, linked from footnote 1) is a calculator screenshot. Its values are printed text in the tooltip panel, read off the image (`parse_confidence: medium`). +- **The "Download as PDF" button** builds a PDF in the browser (`tpa-pdf-exporter-loader.js`). It is not a separate document. + +## Rows by primary + +| primary | sha256 | rows | +|---|---|--:| +| Budget 2026 – what it means (HTML) | `9d8031655aa08411…` | 49 | +| budget_tax_rises_by_event.json | `62d64a909445ce61…` | 63 | +| tax_take_by_government.json | `b13087894131a927…` | 31 | +| budget_2026_tax_gdp_impact.json | `a96c8f8f29b1e0e7…` | 12 | +| budget_2026_chart_by_tax_2027_28.json | `dcf10b6e82b0848a…` | 14 | +| budget_2026_chart_by_year_v2.json | `db22d5e01bb59ba7…` | 72 | +| budget_2026_chart_by_measure_total_real.json | `7355f24b6b8a620c…` | 24 | +| bank-tax-compare-uk-budget-2026.json | `7a8454d612b6e46b…` | 34 | +| child_benefit_budget_2026.png | `e69c25ad27fbd19b…` | 6 | +| The UK tax calculator (HTML, descriptor) | `69a72c68640f3b2f…` | 0 | + +## Rows by measure key + +| measure_key | rows | +|---|--:| +| `null` (65 with a proposed key, 139 context) | 204 | +| `ab2026__package_total_tax_policy_decisions` | 40 | +| `ab2026__writing_down_allowance_12pc_and_fya_50pc` | 15 | +| `ab2026__bank_surcharge_6pc_temporary` | 11 | +| `ab2026__hmrc_tax_gap_package` | 8 | +| `ab2026__pension_tax_allowance` | 2 | +| `ab2026__foreign_permanent_establishment_exemption_mandatory` | 5 | +| `ab2026__foreign_sovereign_investments_taxation` | 4 | +| `ab2026__electricity_vat_zero_rate_to_july_2027` | 2 | +| 14 other single measures (Table 6.1 lines 3, 5, 15, 26, 44, 46, 49, 56, 59, 60, 61, 62, 86, 96), one row each | 14 | + +The 139 context rows have no measure key and no proposal: + +- the earlier fiscal events in the two history charts (`conditions.policy_event`). The 2026 Budget series' 0.0 fills for 2024-25 and 2025-26, years Table 6.1 has no column for, carry the series' key (rows 98, 99 and 130; review B, TPA finding 1); +- the other countries, the pre-Budget UK, and the after-Budget UK's bank levy and VAT components (which the surcharge leaves unchanged) in the bank chart; +- the fiscal-context levels in footnote 2; +- capital-allowance present values under pre-Budget regimes; +- the child benefit worked example. + +## Attribution: how TPA's numbers divide + +TPA builds no yield estimates of its own. Every £ yield in the article and its charts is HM Treasury's Table 6.1 costing (or the OBR's), and TPA uses it in one of two ways: + +- **Repeats it,** for example a chart group that is exactly one Table 6.1 line, or "about £0.7bn" for the £695m total. These rows are `restated`, with `source_model: hmt_costing_obr_certified` (or `obr_efo_forecast` for the OBR's paragraph 3.17 averages) and `conditions.originator`. Every restated row's `note` names whose figure it is ("Restates …"), and says "TPA names no source" where TPA cites none. +- **Re-expresses it.** TPA groups lines, sums them over years, deflates them to 2026-27 prices, or divides them by GDP. These rows are `own`, with `source_model: arithmetic` and a `conditions.derived_from` naming the HMT or OBR input, and every note says "arithmetic on HM Treasury's costings, not an independent estimate". This matches the IFS lane's treatment of IFS's own aggregate of HMT costings. The ingest can separate these rows on `derived_from` if it treats them as restatements. + +TPA's own calculations from statutory parameters are `own` with no `derived_from`: + +- capital-allowance present values; +- the Pension Tax Allowance's 53% marginal rate; +- the notional investment bank's tax rates; +- the calculator outputs. + +Under README rule 8, a measure's own parameters are its design, not rows. The allowance's "£282 withdrawal band", "up to £94 a year" maximum and the "£93" it removes therefore sit in the conditions of the 53% row. + +## Conventions + +- **Sign:** `positive = yield to the Exchequer` on every revenue row. The charts draw tax rises red and cuts green, which matches. +- **Units:** + - £ figures are in pounds (`£ billion × 1e9`). + - Charted % of GDP figures are percentages with `proposed_unit: percent_of_gdp`, the OBR lane's spelling. `conditions.denominator` says "nominal GDP". + - Present values are shares of cost. + - Marginal and effective rates are percent. +- **Period and price basis:** fiscal-year rows carry `fy`, with `period` the end year. Price bases are not converted: + - the history chart is in "2026 money"; + - the by-measure chart and footnote 7 are in "2026-27 prices"; + - every other £ figure is cash. +- **Cumulative rows:** the six-year totals sit at `fy` 2031-32 (`value_kind: cumulative`, `horizon` "2026-27 to 2031-32 (cumulative)"). +- **Present values and the bank chart:** the capital-allowance present values are properties of a regime, so they are `point_in_time` 2027, with the regime in `conditions.regime`. The bank chart is under "2027 rules" (`annual` 2027). +- **Rows with no stated year:** "about £1bn a year in the medium term", HM Treasury's 84% (row 9, staged at 2027-28 as uk_hmt_redbook stages para 2.50) and similar figures sit at a stated year, with a `year_note` and `parse_confidence: medium`. The OBR's paragraph 3.17 averages that footnote 8 quotes (rows 29–30, "a year on average from 2028-29") sit at 2031-32, the forecast's final year, as the uk_obr_tables family indexes the same sentences. Footnote 15's "£450m to £495m a year" (a range across 2028-29 to 2031-32) is staged at the years Table 6.1 line 68 shows those values: £450m in 2029-30 and £495m in 2028-29. +- **Value kinds:** TPA states no ranges for its own estimates, so "About two-fifths" is a `point`, like the family's other "about" figures. +- **Geography:** the calculator rows use AB2025's code `UK_excl_scotland`; the bank chart's other countries are named. +- **Parts (README rule 9):** the bank chart's "Corporate income taxes" for the after-Budget UK (row 278) is a printed part of the 33.7% total (row 268), so it is a `measure_component`. The OBR's £0.4bn (row 30) is Table 6.1 line 61's receipts head, so it is a `measure_component` of that line ("Tax head (receipts), annual average 2028-29 to 2031-32 (para 3.17)"). + +## How each TPA group's Table 6.1 lines were found + +TPA's footnote 6 says "Our mapping of each row to a group is available on request", so the mapping isn't published. The lines below were inferred by matching TPA's printed values to Table 6.1 (`../uk_hmt_tables`). `stage.py --verify` repeats the match: + +- **By-year chart:** every group reproduces TPA's value in all six years exactly. Its 11 groups partition the 53 Table 6.1 tax-head lines, which sum to £700m in 2027-28, as footnote 5 says. +- **By-tax chart (2027-28 only):** each group matches its 2027-28 value exactly. Lines that are zero in 2027-28 are assigned by the by-year mapping and, for line 95, by the by-measure "Tariffs" bar. One line stays undetermined: line 66 (the summer 2026 cut to 5% VAT on family days out). It is zero in 2027-28, the by-year chart puts it in "Temporary VAT and fuel cuts", and the by-tax chart splits that group into electricity VAT and fuel, red diesel and HGV VED, neither of which it fits. It may sit in the by-tax "Other VAT" or "Other", and it is left out of both scopes below. The values are unaffected. +- **By-measure chart (real terms):** deflators fitted to its 19 single-measure bars (1.000, 0.9705, 0.9503, 0.9310, 0.9133, 0.8943 for 2026-27 to 2031-32) reproduce every bar to within £1m. That settles the multi-line bars: "Savings and property income tax rates +2ppts" is lines 61 and 62 (3.981; adding line 11 would give 3.816), "Tariffs" includes line 95 (−1.594; without it −1.776), and "Other" is the remainder. + +A chart group that is exactly one Table 6.1 line carries that line's registry key. Other groups carry a proposed key. + +## Proposed measure keys (all `measure_key: null`) + +| proposed key | Table 6.1 lines | TPA's words | rows | +|---|---|---|--:| +| `ab2026__package_property_and_savings_income_rates` | 61, 62 | "The savings and property rise"; "Savings and property income tax rates +2ppts" (by-measure chart). Same spelling and scope as the uk_hmt_redbook family | 5 | +| `ab2026__package_tpa_savings_property_income_and_cash_isa` | 11, 61, 62 | "Savings and property income" (by-year), "Savings and property income tax" (by-tax). The group includes line 11, the cash ISA limit held at £20,000, which TPA doesn't mention | 7 | +| `ab2026__package_tpa_temporary_vat_and_fuel_cuts` | 2, 3, 18, 65, 66 | "Temporary VAT and fuel cuts" (by-year) | 6 | +| `ab2026__package_tpa_fuel_duty_red_diesel_and_hgv_ved` | 3, 18, 65 | "Fuel duty cut, red diesel and HGV VED (temporary)" (by-tax) | 1 | +| `ab2026__package_tpa_business_rates` | 12, 13, 14, 57, 76, 80 | "Business rates" (all three charts). Registry caveat (review B, TPA finding 5): on the by-tax bar, line 76, zero in 2027-28, is placed by assumption; the values do not depend on it. | 8 | +| `ab2026__package_tpa_energy_and_environment` | 17, 69, 71, 90, 96 | "Energy and environment" (by-year) | 6 | +| `ab2026__package_tpa_other_income_tax` | 5, 15, 28, 52, 53, 86, 94 | "Other income tax" (by-year); "Income tax: mileage rates, Pension Tax Allowance and other" (by-tax). Registry caveat (review B, TPA finding 5): on the by-tax bar, lines 15 and 86, zero in 2027-28, are placed by assumption; the values do not depend on them. | 7 | +| `ab2026__package_tpa_other_vat` | 36, 46, 51, 59, 88, 89 (the by-tax bar may also hold line 66, zero in 2027-28) | "Other VAT" (by-year, by-tax). Registry caveat (thinktanks-a review, finding 6): the by-tax lines that are zero in 2027-28 are placed by assumption and line 66 is undetermined; the values do not depend on it. | 7 | +| `ab2026__package_tpa_other_corporate_tax` | 49, 50, 54, 68, 97 | "Other corporate tax" (by-year, by-tax). Registry caveat (review B, TPA finding 5): on the by-tax bar, lines 49 and 50, zero in 2027-28, are placed by assumption; the values do not depend on them. | 7 | +| `ab2026__package_tpa_other_by_year` | 10, 16, 19, 26, 44, 56, 60, 77, 78, 79, 93, 95, 98 | "Other" (by-year) | 6 | +| `ab2026__package_tpa_tariffs` | 10, 16, 77, 78, 95 | "Tariffs (incl. UK-India)" (by-tax, by-measure). Registry caveat (review B, TPA finding 5): on the by-tax bar, line 95, zero in 2027-28, is placed by assumption (the by-measure bar settles it); the values do not depend on it. | 2 | +| `ab2026__package_tpa_cgt_founders_relief_and_badr` | 26, 60 | "CGT (Founders' Relief, BADR)" (by-tax) | 1 | +| `ab2026__package_tpa_other_by_tax_2027_28` | 17, 19, 44, 56, 69, 71, 79, 90, 93, 96, 98 (line 66 undetermined) | "Other" (by-tax). The non-zero 2027-28 lines are 19, 44, 56, 69, 79, 90 and 93; the zero lines come from the by-year mapping. Registry caveat (thinktanks-a review, finding 6): the by-tax lines that are zero in 2027-28 are placed by assumption and line 66 is undetermined; the values do not depend on it. | 1 | +| `ab2026__package_tpa_other_by_measure` | 11, 17, 18, 19, 28, 36, 50, 51, 53, 65, 66, 69, 71, 79, 88, 89, 90, 93, 94, 97, 98 | "Other" (by-measure) | 1 | + +`ab2026__package_total_tax_policy_decisions` is registered. It carries TPA's rows for "today's Budget" and "the tax measures", the net totals, and the 2026 Budget series of the history charts, because their scope is all Table 6.1 tax lines. The series' 0.0 cells for 2024-25 and 2025-26 (rows 98, 99 and 130) carry the key too; Table 6.1 has no column for those years. The totals come in two kinds: + +- **Sums of the 53 tax lines** (`own`, `arithmetic`): footnote 5's £700m, the by-tax chart's "Net £0.7bn", footnote 7's £19.1bn and £21.0bn, and the by-measure chart's net. These differ from HM Treasury's printed totals by rounding only (£700m against £695m in 2027-28). +- **HM Treasury's printed totals** (`restated`): the by-year chart's "Net total" (it prints £-1.65bn for 2026-27, HMT's −£1,645m; the 53 lines sum to −£1,635m), the GDP chart's £ figures, footnote 5's £695m and the article's "about £0.7bn". + +## Proposed metrics and units + +Reused from the AB2025 README list: `effective_tax_rate` (the notional bank's tax as a % of profit). + +New proposals, each with TPA's own words: + +- **`capital_allowance_present_value` (share):** "the present value of the allowances as a percentage of the cost, discounting at 5% a year" (footnote 12). +- **`marginal_tax_rate` (percent):** "a 53% marginal rate for pensioners on about £13,000", and the calculator's marginal rate. +- **`marginal_take_home_pay` (gbp):** "Of the next £1,000, you keep £417" (calculator screenshot; a level at the margin under current rules, not a policy change). +- **`marginal_tax_amount` (gbp):** "Income tax £400", "NI £20" and "Child benefit charge £163" on the next £1,000 of salary (same screenshot). +- **`unaffected_share` (share):** "84% of income tax payers will be unaffected". This is not `affected_share`: the value is the unaffected share. +- **`tax_to_gdp_ratio` (`percent_of_gdp`):** "tax burden … 33% of GDP", "Tax take". +- **Context levels from footnote 2:** `public_sector_net_debt_change` (percentage points), `programme_cost` (gbp) and `debt_interest_cost` (gbp, the uk_thinktank_misc spelling). + +- **`revenue_share_by_fiscal_event` (share):** "About two-fifths of that comes from Conservative Budgets", the share of the £123bn of extra tax in 2030-31 coming from a group of Budgets. The registered `revenue_share` is a group's share of one measure's yield, so it does not fit. + +The family uses the registered Metrics `revenue_change`, `caseload` and, for the totals of the Budget's tax measures, `decisions_effect_on_borrowing` (README rule 10, below). No row proposes a baseline (`baseline_policy` is null throughout). + +## Not staged, and why + +- **Policy parameters** (README rule 8, "stage estimates, not design"): + - the Pension Tax Allowance's "up to £94 a year" maximum and "£282 withdrawal band" (in the conditions of the 53% row); + - "£93", the most tax the allowance removes (20% × (£13,036.40 − £12,570) = £93.28), the same quantity as the £94 maximum: staged on 29 October, dropped on 3 November and kept as `conditions.tax_removed` on the 53% row; + - savings and property rates of 24%, 44% and 49%; + - writing-down allowance rates of 18%, 14%, 12% and 6%, and first-year allowances of 40% and 50%; + - the £1m annual investment allowance; + - the full new State Pension of £13,036.40 (carried in a condition) and the £1-for-£3 taper; + - the 15% REIT rate in footnote 14; + - the £60-80k child benefit band in footnote 1; + - the 2.0% CPI assumption for 2032 (carried in `conditions.deflator`). +- **Duplicate phrasings** in one primary: "a new 53% band, for £94" repeats the paragraph's own 53% and £94. +- **Figures without a year or a measure:** + - "the UK's approximately £3,000bn GDP": an approximate OBR level with no year. + - "over twice its pre-pandemic share of GDP": a ratio with no printed base. +- **Not numeric:** the OBR's "High" uncertainty rating for the property costing (footnote 8) is categorical. It belongs to the OBR family. +- **Out of scope:** the calculator page's 69.5% marginal rate under Reform UK's £15,000 allowance is an opposition proposal, not the Budget's. +- **Not TPA's:** + - image-6.png reproduces Red Book paragraph 2.54, HM Treasury's text, which holds only parameters. + - Reader comments under the article, for example "the cost is £1.2bn" for Founders' Relief, are not TPA's. +- **Further-reading thumbnails** (image-2, investment_bank_tax_as_of_profit-1, taxable_capital_gains_…) illustrate other articles. +- **The calculator page** (25 October, updated for the Budget) is a 0-row descriptor, as in AB2025: + - it calculates take-home pay, marginal and effective rates, and net-v-gross for employment and other income, current rules against Budget 2027/28; + - its worked examples (62% in the £100k taper, 67.3% and 73.3% with three children and student loans, 84.5% and 89.3% in Scotland, 2,000,000% at the childcare cliff) describe the tax system, not the Budget's measures; + - it restates CenTax's £640m childcare costing, which is staged in uk_centax. + - Its on-screen outputs are computed in the browser and are not printed text. +- **Pre-Budget TPA articles linked from this one, outside the assignment:** "Banks say they're overtaxed. The TUC says they're undertaxed" (22 October, linked from the bank-tax paragraph), "Capital gains tax reform was right. Now it's dead." (6 October), the Cebr VAT-free shopping article (28 September) and "37 ways Andy Burnham could raise £4.7bn" (3 July). They are candidates for a follow-up if the family is to include pre-Budget options, as AB2025's did. + +## Things in the primaries that look wrong or contradictory (reported, not fixed) + +- **Pension Tax Allowance maximum:** + - The article says "up to £94 a year" and, a paragraph later, "£93". + - OOTLAR paragraph 1.4, which TPA cites, gives the rule: 20% of the full new State Pension minus the Personal Allowance. On TPA's own £13,036.40, that is £93.28. + - The "£282 withdrawal band" is three times £94; three times £93.28 is £279.84. +- **Start year of the history total:** the £123bn sentence says tax changes "since 2021"; footnote 3 says measures "announced since March 2020". +- **OBR's property figure:** footnote 8 quotes the OBR (EFO paragraph 3.17) correctly, but the OBR's "£0.4 billion a year on average from 2028-29" for the property rise sits below Table 6.1 line 61's average over 2028-29 to 2031-32 (£478m). +- **Rounding:** the bank chart's stacked components sum within 0.1pp of the printed totals, for example the Netherlands at 43.7 against 43.8. + +## Review fixes, 3 November 2026 + +The thinktanks-a review (`harvest-staging/ab2026/reviews/verify-thinktanks-a.md` on the staging branch) approved this family with fixes. Each sits in an explicit block at the end of `stage.py`'s rows. No primary was re-opened (the session's network policy refused taxpolicy.org.uk); no printed value changed. + +- **Finding 1 (the coordinator's call):** row 16, "£93", is the allowance's design under rule 8 and is dropped; row 17 (53%) carries `conditions.tax_removed: "£93 (as printed)"`. 306 rows become 305. +- **Finding 2:** no change. The group, deflated and %-of-GDP rows carry `conditions.derived_from`; tranche 2 separates them from model estimates on it. +- **Finding 3:** no change. The 2027-28 total tax policy decisions appear in several rows (3, 26, 27, 147, 169 and 237, 0-based before the drop) and the six-year total in rows 4, 28 and 265; tranche 2 should deduplicate them. +- **Finding 4:** the quote convention above now says JSON elements are re-serialised. +- **Finding 5 (optional, applied):** row 1 ("About two-fifths") uses `proposed_metric: revenue_share_by_fiscal_event`, not the registered `revenue_share`. +- **Finding 6:** the two by-tax scopes carry the registry caveat in the proposed-key table. +- **Verification:** the contract checker reports 305 rows, 0 problems, and a re-run of `stage.py` reproduces both files byte for byte. COUNTS.json pins the gzip's sha256. + +## README rule 10, 3 November 2026 + +Under README rule 10, `stage.py` moves TPA's figures for all the Budget's tax measures from `revenue_change` to `decisions_effect_on_borrowing`: the 37 rows keyed to `ab2026__package_total_tax_policy_decisions`, in pounds or as a share of GDP, and the three 0.0 cells that TPA's charts print for years before Table 6.1 starts, which now carry the key too (40 rows). Counting from 0, the rows are 2–4, 25–28, 98–104, 130–135, 143–154, 168, 235–240 and 264. Single measures and groups of measures keep `revenue_change`. No value or sign changed. + +## Review fixes, 4 November 2026 + +Two independent reviews of PR #231 at 4f424b9 approved this family with fixes, all low: review B (TPA findings 1–6) and review A (K-5, H-6(d) and H-6(e)). They sit in an explicit block after the rule 10 block in `stage.py`. No printed value changed. Indices are 4f424b9's. + +- **Finding 1 (the first fix, the coordinator's call):** rows 98, 99 and 130, the 2026 Budget series' 0.0 cells for 2024-25 and 2025-26, carry `ab2026__package_total_tax_policy_decisions`, with the note "Table 6.1 has no column for this year; TPA's chart prints 0.0". The key has 40 rows and the context rows go from 142 to 139. +- **Finding 2 (NOTES only, the coordinator's call):** the access recipe records the article's 4 November edit (reader comments only); it is not a second primary. +- **Finding 3 (and review A's H-6(e)):** the 21 restated rows 18–24, 26, 43–48 and 136–142 each name their originator in `note`, and rows 18, 20, 22 and 142 say "TPA names no source". Row 21's originator is the OBR's *Fiscal risks and sustainability*, July 2025, which footnote 2 links. +- **Finding 4:** row 278 (corporate income taxes, 30.5%) is a `measure_component` of row 268's 33.7%. +- **Finding 5:** the by-tax caveat is on the four further scopes (`…tpa_other_corporate_tax`, `…tpa_other_income_tax`, `…tpa_tariffs`, `…tpa_business_rates`), and the two existing caveats moved into the scope column. +- **Finding 6, nits:** rows 299–304 use `UK_excl_scotland` and record the tooltip's "Smoothed tapers" (`conditions.calculator_setting`); row 9 has a `year_note` and medium confidence; row 1 is a `point`; rows 10–12's locator names the third paragraph after the Red Book excerpt; the chart notes, the £ escapes and the Reform UK rate are recorded. Also applied: row 141 carries its printed `chart_label` (38.5%), which review B's sample noted. +- **Review A, K-5:** row 30 (the OBR's £0.4bn, line 61's receipts) is a `measure_component` with `component: "Tax head (receipts), annual average 2028-29 to 2031-32 (para 3.17)"`. The optional alignment is applied: rows 29 and 30 sit at 2031-32, as the OBR family's paragraph 3.17 rows do. +- **Verification:** the contract checker reports 305 rows, 0 problems, and a re-run of `stage.py` in a scratch directory reproduces both files byte for byte. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/claims_staged.jsonl.gz new file mode 100644 index 000000000..064e102ec Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/manifest.jsonl new file mode 100644 index 000000000..b4f462baf --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/manifest.jsonl @@ -0,0 +1,10 @@ +{"url": "https://taxpolicy.org.uk/2026/10/28/budget-2026-what-it-means/", "title": "Budget 2026 – what it means", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "9d8031655aa08411da8350d9dc8680dea53b80aea1e04f2c3a0b5ff009fc350d", "bytes": 201933, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "article:published_time 2026-10-28T15:51:19+00:00, article:modified_time 2026-10-29T09:59:59+00:00; fetched 2026-10-29T16:17Z (curl, browser User-Agent, HTTP 200). The seven charts are ECharts embeds whose data files are the next seven primaries. Reader comments under the article are not TPA's and are not staged."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/charts/budget_tax_rises_by_event.json", "title": "Who's responsible for each year's tax rises? (chart data, budget_tax_rises_by_event.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "62d64a909445ce6122171f676ef8739bd830a3e64e1fdabe6b43028434a686a3", "bytes": 9965, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON named in the article's data-json attribute (first chart, 'The big picture'); £bn in 2026 money; fetched 2026-10-29T16:19Z. doc_type flourish_json is the nearest enum for a chart-data file, as in the AB2025 uk_tpa family."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/charts/tax_take_by_government.json", "title": "Tax as a % of GDP - who added to the tax take? (chart data, tax_take_by_government.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "b13087894131a927a0833abd54494212a4eb48f0fdf1a1a3e2b772e74bac79eb", "bytes": 4916, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON (second chart, method in the article's footnote 3); % of GDP; fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/charts/budget_2026_tax_gdp_impact.json", "title": "Impact of the 2026 Budget on tax as a % of GDP (chart data, budget_2026_tax_gdp_impact.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "a96c8f8f29b1e0e7343483e22929631231556c65e8cdfa05b4e0449e639fac36", "bytes": 2738, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON (third chart, method in footnote 4: Table 6.1 'Total tax policy decisions' over OBR nominal GDP, EFO Table A.3); fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/charts/budget_2026_chart_by_tax_2027_28.json?v=20261028-2", "title": "Budget 2026 tax measures by tax, 2027/28 (chart data, budget_2026_chart_by_tax_2027_28.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "dcf10b6e82b0848a146578bb68328c4bfdcbdf461ae7e334d3c0db0fc233197b", "bytes": 4472, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON (fourth chart, footnote 5); URL as named in the article, cache-buster ?v=20261028-2; fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/charts/budget_2026_chart_by_year_v2.json?v=20261028-2", "title": "Budget tax changes (grouped by year) (chart data, budget_2026_chart_by_year_v2.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "db22d5e01bb59ba7f1b5df304813c485a5f66d9731de1827f56475bdc0abfe1f", "bytes": 5647, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON (fifth chart, footnote 6); cache-buster ?v=20261028-2; fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/charts/budget_2026_chart_by_measure_total_real.json", "title": "Budget 2026 measures: total over 2026/27 to 2031/32 (chart data, budget_2026_chart_by_measure_total_real.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "7355f24b6b8a620ccc624200468dd1da43389d760ebc2bf89d1c486a011cf1cb", "bytes": 6793, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON (sixth chart, footnote 7); £bn at 2026/27 prices; fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/bank_tax/bank-tax-compare-uk-budget-2026.json?v=20261028-3", "title": "Investment bank: tax as % of profit (chart data, bank-tax-compare-uk-budget-2026.json)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "7a8454d612b6e46ba5abd53d6b4d40146dd57e0741452f627183c71941ad2a20", "bytes": 6595, "doc_type": "flourish_json", "access": "direct", "retrieved": "2026-10-29", "note": "ECharts option JSON (seventh chart, 'Bank tax'); cache-buster ?v=20261028-3; fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/wp-content/assets/child_benefit_budget_2026.png", "title": "TPA tax calculator screenshot: marginal rate at £70,000 with child benefit, current rules 2026/27 v Budget 2027/28 (child_benefit_budget_2026.png)", "date": "2026-10-28", "publisher": "Tax Policy Associates", "sha256": "e69c25ad27fbd19b398ab9bd86c5798d3e723969243442a614801b895ab994a1", "bytes": 172693, "doc_type": "png", "access": "direct", "retrieved": "2026-10-29", "note": "Image linked from the article's footnote 1; the values are printed text in the calculator's tooltip panel, read from the image; fetched 2026-10-29T16:19Z."} +{"url": "https://taxpolicy.org.uk/uk-tax-calculator/", "title": "The UK tax calculator that shows you what you’re really paying", "date": "2026-10-25", "publisher": "Tax Policy Associates", "sha256": "69a72c68640f3b2ff74d585aeea28ecda0897308dbc640c8ed34d596c8c09f62", "bytes": 249216, "doc_type": "html", "access": "direct", "retrieved": "2026-10-29", "note": "Descriptor only, no rows (scope in NOTES.md). article:published_time 2026-10-25T08:00:00+00:00, article:modified_time 2026-10-28T15:26:49+00:00 ('Updated for the 28 October 2026 Budget'); fetched 2026-10-29T16:19Z."} diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/NOTES.md b/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/NOTES.md new file mode 100644 index 000000000..0ed3687d2 --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/NOTES.md @@ -0,0 +1,30 @@ +# uk_trussell_wpi — Trussell, Autumn Budget 2026 + +**Working files.** `stage.py`, which writes `manifest.jsonl` and `claims_staged.jsonl.gz`, lives on branch `uk/ab2026-harvest-staging` at `harvest-staging/ab2026/lanes/thinktanks-b/uk_trussell_wpi/stage.py`; this branch carries only NOTES.md, `manifest.jsonl` and `claims_staged.jsonl.gz`. The repository carries no primary bytes: fetch the primary from its `manifest.jsonl` URL and check its sha256. + +Source `trussell_wpi`, as in AB2025's `uk_trussell_wpi`. **1 row from 1 primary.** The thinktanks-b lane staged this row in `uk_thinktank_misc` on 29 October with source `trussell`. On 3 November its review's finding 5 set the slug to AB2025's `trussell_wpi`, and the coordinator moved the row and its manifest line here, as AB2025 keeps Trussell's Budget responses in their own family. The row is otherwise unchanged. `stage.py` is `uk_thinktank_misc`'s script, filtered to Trussell's row and primary. + +## Access + +The thinktanks-b lane found [Our response to the Autumn Budget 2026](https://www.trussell.org.uk/news-and-research/news/our-response-to-the-autumn-budget-2026) by searching Trussell's own news pages; the page prints “28th Oct 2026”. It was fetched fresh on 29 October 2026 with `curl -sSL` and the harvest's Safari User-Agent: HTTP 200, fetch completed 15:23:24Z, 171,343 bytes, sha256 `6cd2162d1382f03e937a382a39bd38c497a83d357bd969d2c85598740d17a95e`. The page's own body text was read; the hash is of the HTML. + +## Coverage and conventions + +| measure_key | Rows | What | +|---|---:|---| +| `null` | 1 | Helen Barnard's “over half of private renters on low incomes” in receipt of Local Housing Allowance ran out of food and could not afford more, in the last 12 months | + +- `metric: affected_share`, the registered metric (`models.py` registers it, so it goes in `metric`, not `proposed_metric`; changed on 4 November, review B finding 1 and review A's H-6(a)), unit `share`: “over half” is the strict lower bound 0.5, `value_kind: range_low`. +- Trussell calls the finding its own research but gives no method, research dates or exact percentage: `source_model: unstated`, `own`, `administrative_fact` for a retrospective reported observation, `parse_confidence: medium`. +- Context, not the modelled effect of the LHA freeze or of any Budget measure: no measure key and no proposed key. The 12-month window is `conditions.horizon`; the period is the publication-year anchor 2026, `point_in_time`. + +## Not staged + +- Trussell prints no measured effect of the frozen LHA or of the Budget. +- Its statement that the government has already lifted the two-child limit is qualitative and has no row. + +## Verification + +- **4 November:** review B (PR #231, issue comment 6635498758) finding 1: the row carries the registered `affected_share` in `metric`, with `proposed_metric` null. The edit sits in the review-fixes block `stage.py` shares word for word with `uk_thinktank_misc`. The contract checker reports 1 row, 0 problems, and a re-run of `stage.py` reproduces both files byte for byte. No primary was re-opened. +- **3 November:** the contract checker reports 1 row, 0 problems; a re-run of `stage.py` reproduces `manifest.jsonl` and `claims_staged.jsonl.gz` byte for byte. No primary was re-opened (the session's network policy refused trussell.org.uk). +- **29 October (in `uk_thinktank_misc`):** the lane re-opened the saved page at the locator and checked the quote and value against it, and checked the quote is contiguous text under 15 words containing `value_raw`. diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/claims_staged.jsonl.gz new file mode 100644 index 000000000..e3242e387 Binary files /dev/null and b/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/claims_staged.jsonl.gz differ diff --git a/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/manifest.jsonl b/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/manifest.jsonl new file mode 100644 index 000000000..d7e31c43b --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/uk_trussell_wpi/manifest.jsonl @@ -0,0 +1 @@ +{"access": "direct", "bytes": 171343, "date": "2026-10-28", "doc_type": "html", "note": "Fetched HTML fresh with prescribed curl browser User-Agent; HTTP 200; fetch completed 2026-10-29T15:23:24Z. Hash is of fetched HTML bytes. No assignment local copy or earlier version was supplied.", "publisher": "Trussell", "retrieved": "2026-10-29", "sha256": "6cd2162d1382f03e937a382a39bd38c497a83d357bd969d2c85598740d17a95e", "title": "Our response to the Autumn Budget 2026", "url": "https://www.trussell.org.uk/news-and-research/news/our-response-to-the-autumn-budget-2026"} diff --git a/tests/fixtures/ab2026_sign_readings.json b/tests/fixtures/ab2026_sign_readings.json new file mode 100644 index 000000000..a0bd6c717 --- /dev/null +++ b/tests/fixtures/ab2026_sign_readings.json @@ -0,0 +1,382 @@ +[ + { + "metric": "average_annual_gain", + "sign_convention": "positive = gain to households", + "relation": "same" + }, + { + "metric": "average_annual_gain", + "sign_convention": "positive = gain to taxpayer", + "relation": "same" + }, + { + "metric": "average_annual_gain", + "sign_convention": "positive = gain to the EV driver (saving, as printed)", + "relation": "same" + }, + { + "metric": "average_annual_gain", + "sign_convention": "positive = gain to the pub (tax cut, as printed)", + "relation": "same" + }, + { + "metric": "average_annual_gain", + "sign_convention": "positive = gain to the ratepayer (protection, as printed)", + "relation": "same" + }, + { + "metric": "average_household_income_change", + "sign_convention": "positive = gain to households", + "relation": "same" + }, + { + "metric": "benefit_cost_change", + "sign_convention": "positive = increase in state pension payments relative to earnings uprating", + "relation": "same" + }, + { + "metric": "benefit_cost_change", + "sign_convention": "positive = saving (state pension payments lower than under the current triple lock)", + "relation": "opposite" + }, + { + "metric": "cash_requirement_change", + "sign_convention": "as worded: positive = increase in the financing requirement", + "relation": "unknown" + }, + { + "metric": "cpi_inflation_effect", + "sign_convention": "absolute magnitude bound, no direction given", + "relation": "unknown" + }, + { + "metric": "cpi_inflation_effect", + "sign_convention": "as worded: positive = increase in CPI inflation", + "relation": "same" + }, + { + "metric": "cpi_inflation_effect", + "sign_convention": "as worded: positive = reduction in CPI inflation", + "relation": "opposite" + }, + { + "metric": "cpi_inflation_effect", + "sign_convention": "positive = reduction in CPI inflation (as worded: reduce inflation by)", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "Note (verbatim): A positive sign implies an increase in borrowing.", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "Note (verbatim): This table uses the convention that a negative sign implies a loss to the Exchequer (and is therefore an increase in PSNB).", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "absolute average, no directional sign", + "relation": "unknown" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "as worded: positive = additional investment income", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "as worded: positive = borrowing increase", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "as worded: positive = borrowing reduction", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "as worded: positive = increase in borrowing", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "as worded: positive = reduction in underspends / borrowing increase", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "as worded: positive = yield / reduction in borrowing", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "mixed: row 551 (negative = loss to Exchequer) plus row 555 (positive = increase in PSNB)", + "relation": "unknown" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = cost to the Exchequer", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = increase in PSNB (matches EFO Table 3.1; contradicts the workbook legend)", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = increase in PSNB; negative = reduction in PSNB", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = increase in borrowing", + "relation": "same" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = raises revenue (reduces borrowing), as RF plots Figure 10 (the OBR's borrowing sign flipped: workbook F10 I15 'Signs flipped from source')", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = yield to the Exchequer", + "relation": "opposite" + }, + { + "metric": "decisions_effect_on_borrowing", + "sign_convention": "positive = yield to the Exchequer (reduces borrowing); negative = cost to the Exchequer (the tables print no legend; convention observed from the rows themselves, e.g. the bank surcharge rise is + and the Household Energy Payment is -, as in the AB2025 Table 4.1 harvest)", + "relation": "opposite" + }, + { + "metric": "energy_bill_change", + "sign_convention": "negative = reduction in the typical household's annual bill", + "relation": "unknown" + }, + { + "metric": "energy_bill_change", + "sign_convention": "positive = reduction in the annual Ofgem price cap (as worded: 'take around £50 off')", + "relation": "opposite" + }, + { + "metric": "energy_bill_change", + "sign_convention": "positive = saving (a reduction in the bill)", + "relation": "opposite" + }, + { + "metric": "energy_bill_change", + "sign_convention": "positive = saving (a reduction in the household's bills)", + "relation": "opposite" + }, + { + "metric": "energy_bill_change", + "sign_convention": "positive = saving to billpayers", + "relation": "opposite" + }, + { + "metric": "gdp_level_effect", + "sign_convention": "as worded: positive = real GDP increase", + "relation": "unknown" + }, + { + "metric": "gdp_level_effect", + "sign_convention": "positive = higher GDP (as worded: 'increasing UK GDP' / 'boost ... economy')", + "relation": "same" + }, + { + "metric": "pct_change_after_tax_income", + "sign_convention": "positive = gain to households", + "relation": "same" + }, + { + "metric": "poverty_rate_change", + "sign_convention": "positive = rise in the poverty rate", + "relation": "same" + }, + { + "metric": "real_income_growth", + "sign_convention": "positive = decrease in real household disposable income per person", + "relation": "unknown" + }, + { + "metric": "real_income_growth", + "sign_convention": "positive = gain to households", + "relation": "same" + }, + { + "metric": "real_income_growth", + "sign_convention": "positive = growth", + "relation": "same" + }, + { + "metric": "real_income_growth", + "sign_convention": "positive = higher real household disposable incomes", + "relation": "unknown" + }, + { + "metric": "real_income_growth", + "sign_convention": "positive = real income growth", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "Note (verbatim): A positive sign implies an increase in borrowing.", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "Note (verbatim): This table uses the convention that a negative sign implies a loss to the Exchequer (and is therefore an increase in PSNB).", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = AME increase", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = additional spending", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = cost", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = increase in borrowing", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = increase in net business rates revenues flowing to local government", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = net cost", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = pension spending increase", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = reduction in receipts", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = reduction in receipts / behavioural erosion of yield", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = reduction in resource spending", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = reduction in spending", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = reduction in yield", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = spending cost", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = spending reduction", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = welfare spending reduction", + "relation": "unknown" + }, + { + "metric": "revenue_change", + "sign_convention": "as worded: positive = yield / reduction in borrowing", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = cost to the Exchequer", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = cost to the Exchequer (RF calls the figure a cost)", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = cost to the Exchequer (as printed; not re-signed)", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = cost to the Exchequer (higher RDEL spending)", + "relation": "opposite" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = increase in net tax as a share of GDP", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = raises revenue (reduces borrowing), as RF plots Figure 10 (the OBR's borrowing sign flipped: workbook F10 I15 'Signs flipped from source')", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = saving to the Exchequer (as printed; not re-signed)", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = saving to the Exchequer (counter-fraud benefits, as worded)", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = saving to the Exchequer (reduction in State Pension spending)", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = yield to the Exchequer", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = yield to the Exchequer (reduces borrowing)", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = yield to the Exchequer (reduces borrowing); negative = cost to the Exchequer", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = yield to the Exchequer (reduces borrowing); negative = cost to the Exchequer (no legend printed in the document; convention observed from the costings themselves: p.38 says its figures 'represent net income from developer fees' and prints +50m to +95m from 2027-28 after -15m in 2026-27, the Bank Surcharge rise prints +, the VAT cut on domestic electricity prints -, and Table 6.1 prints the same values with the same signs)", + "relation": "same" + }, + { + "metric": "revenue_change", + "sign_convention": "positive = yield to the Exchequer (reduces borrowing); negative = cost to the Exchequer (the tables print no legend; convention observed from the rows themselves, e.g. the bank surcharge rise is + and the Household Energy Payment is -, as in the AB2025 Table 4.1 harvest)", + "relation": "same" + } +] diff --git a/tests/test_ab2026_harvest_contract.py b/tests/test_ab2026_harvest_contract.py new file mode 100644 index 000000000..2439f430f --- /dev/null +++ b/tests/test_ab2026_harvest_contract.py @@ -0,0 +1,2821 @@ +"""The AB2026 harvest contract checker (#230), tested on rows built to break it. + +tests/test_uk_ab2026_harvest.py holds every staged family to +pipeline/ab2026_harvest_contract.py. These tests hold the checker itself to +the README: each rule, broken on an otherwise valid row, gives a problem, and +the period and quote-length rules hold for every input. +""" + +import copy +import gzip +import io +import json +import math +import shutil +import tempfile +import time +from itertools import product +from pathlib import Path + +import pytest +from hypothesis import given, settings +from hypothesis import strategies as st + +from pipeline.ab2026_harvest_contract import ( + OGL, + duplicate_problems, + enums, + family_problems, + proposed_keys, + read_rows, + reads_a_bar, + registry_keys, + row_problems, + type_problems, +) + +ROOT = Path(__file__).resolve().parent.parent +FAMILY = ROOT / "sources" / "harvest-uk-ab2026-2026-10-29" / "uk_hmt_tables" +KEYS, EARLIER = registry_keys() +METRICS, UNITS = enums() +BASE = next( + r + for r in read_rows(FAMILY) + if r["measure_key"] and "recosting_of" not in r["conditions"] +) +REGISTERED = BASE["measure_key"] + + +def problems(row): + return row_problems(row, KEYS, EARLIER, METRICS, UNITS) + + +def mutated(**changes): + """BASE with dotted-path changes; a value of ... deletes the field.""" + row = copy.deepcopy(BASE) + for path, value in changes.items(): + *parents, leaf = path.split("__") + target = row + for p in parents: + target = target[p] + if value is ...: + del target[leaf] + else: + target[leaf] = value + return row + + +def test_a_staged_row_has_no_problems(): + assert problems(BASE) == [] + + +@pytest.mark.parametrize( + ("changes", "expected"), + [ + ({"quote": ...}, "missing fields"), + ({"invented": "x"}, "unknown fields"), + ({"attribution": "guess"}, "attribution"), + ({"status": "draft"}, "status is not ok"), + ({"value": "1"}, "value is not a number"), + ({"value": True}, "value is not a number"), + ({"proposed_metric": "x"}, "exactly one of metric"), + ({"metric": "not_a_metric"}, "is not a Metric"), + ({"conditions__fiscal_event": "autumn_budget_2025"}, "fiscal_event"), + ({"conditions__geography": 1}, "is not a string"), + ({"conditions__fy": "2026/27"}, "is not one fiscal year YYYY-YY"), + ({"conditions__fy": "2026-29"}, "is not one fiscal year YYYY-YY"), + ({"period": 2026}, "is not the end year"), + ({"time_basis": "annual"}, "time_basis fiscal_year"), + ({"measure_key": "ab2026__not_a_measure"}, "is not in data/uk"), + ( + {"conditions__proposed_measure_key": "ab2026__package_x"}, + "carries no proposed_measure_key", + ), + ( + {"measure_key": None, "conditions__proposed_measure_key": "package_x"}, + "is not ab2026", + ), + ( + {"measure_key": None, "conditions__proposed_measure_key": REGISTERED}, + "is registered", + ), + ( + {"conditions__recosting_of": "autumn_budget_2025"}, + "is not a autumn_budget_2025 key", + ), + ({"conditions__row_type": "measure_component"}, "rule 9"), + ( + { + "measure_key": None, + "conditions__row_type": "measure_component", + "conditions__component": "Scotland", + }, + "rule 9", + ), + ({"value_raw": "-2,625"}, "quote does not contain value_raw"), + ({"publication__primary_sha256": "abc"}, "is not a sha256"), + ({"publication__date": "28 October 2026"}, "is not YYYY-MM-DD"), + ({"publication__url": ""}, "publication.url is empty"), + ({"attribution": "same_assumptions"}, "PolicyEngine-computed"), + # review A H-1: a component is a part (rule 9) + ({"conditions__component": "Receipts: VAT"}, "a component row has row_type"), + ( + {"conditions__component": " ", "conditions__row_type": "measure_component"}, + "names its component and measure", + ), + # review A H-2: value against value_raw + ({"value": float("nan")}, "value is not finite"), + ({"value": float("inf")}, "value is not finite"), + ({"value": -2625}, "at a stated scale"), + ({"value": 2625000000}, "opposite sign"), + # review A H-6 + ( + {"metric": ..., "proposed_metric": "affected_share"}, + "is a registered Metric", + ), + ({"conditions__recosting_of": "autumn_budget_2025"}, "row_type recosting"), + ({"conditions__fy": ...}, "conditions.fy or conditions.horizon"), + ({"conditions__geography": "England for count; UK funding"}, "is not a code"), + ({"attribution": "restated", "note": ""}, "names whose figure"), + ( + {"measure_key": None, "conditions__proposed_measure_key": "ab2026___x"}, + "is not ab2026", + ), + ( + { + "measure_key": None, + "conditions__proposed_measure_key": "ab2026__package_", + }, + "is not ab2026", + ), + ( + { + "measure_key": None, + "conditions__proposed_measure_key": "ab2026__package", + }, + "is not ab2026", + ), + ({"measure_key": ["ab2026__x"]}, "measure_key is not a string or null"), + ({"publication": None}, "publication is not an object"), + ({"value_raw": None}, "value_raw is not a string"), + # delta review D1-1: a printed £m cell is that many millions exactly + ({"value": -2626312500}, "at a stated scale"), + ({"value": -2625100000}, "at a stated scale"), + # delta review D1: each arm the dedicated tests didn't reach + ( + {"conditions__component": " ", "conditions__row_type": "measure_total"}, + "a component row has row_type", + ), + ({"conditions__component": 1}, "condition 'component' is not a string"), + ( + {"measure_key": None, "conditions__proposed_measure_key": ["ab2026__x"]}, + "condition 'proposed_measure_key' is not a string", + ), + # final review F2: £1 or £2 off a £m cell is no floating-point error + ({"value": -2625000001}, "at a stated scale"), + ({"value": -2625000002}, "at a stated scale"), + ({"value": -2624999999.5}, "at a stated scale"), + # final review F3: an integer too large for a float + ({"value": 10**400}, "value is not finite"), + ({"value": -(10**400)}, "value is not finite"), + # delta review R4: a field of a type the AB2025 row contract doesn't + # allow + ({"source_model": []}, "source_model is not a string"), + ({"reform_hint": []}, "reform_hint is not a string or null"), + ({"baseline_policy": []}, "baseline_policy is not a string or null"), + ({"source_table": []}, "source_table is not a string or null"), + ({"source_column": []}, "source_column is not a string or null"), + ({"attribution": ["own"]}, "attribution is not a string"), + ({"period": "2027"}, "period is not an integer"), + ({"period": True}, "period is not an integer"), + ({"publication__locator": 7}, "publication.locator is not a string"), + ], +) +def test_each_rule_broken_on_a_valid_row_is_a_problem(changes, expected): + found = problems(mutated(**changes)) + assert any(expected in p for p in found), found + + +def test_value_raw_scale_words_set_the_scale(): + """review A H-2: "£15 billion" is 1.5e10, never 1.5e7; "N in M" is N/M.""" + bn = mutated(value_raw="£15 billion", quote="£15 billion", value=1.5e10) + wrong = mutated(value_raw="£15 billion", quote="£15 billion", value=1.5e7) + share = mutated( + value_raw="1 in 4", quote="1 in 4", value=0.25, normalization="N in M -> N/M" + ) + worded = mutated( + value_raw="£2bn", + quote="cut of £2bn", + value=-2e9, + normalization="£bn x 1e9; sign from the wording (cut)", + ) + assert problems(bn) == [] + assert any("at a stated scale" in p for p in problems(wrong)) + assert problems(share) == [] + assert problems(worded) == [] + + +def _share(raw, value, normalization="N in M -> N/M"): + return mutated(value_raw=raw, quote=raw, value=value, normalization=normalization) + + +def _cant_read(raw, normalization="as printed"): + """The checker reports raw as unreadable at every value we try.""" + values = (0, 0.25, 0.5, 1, 4, 5, 19, 25, 2e6, 1e-6, -1, -0.25) + return all( + any("can't read" in p for p in problems(_share(raw, v, normalization))) + for v in values + ) + + +@pytest.mark.parametrize("wrong", [0.01, 0.04, 1, 4, 25]) +def test_a_ratio_is_its_share_not_its_numbers(wrong): + """Delta review D1-1: IFS's "1 in 4" (its row 38) is the share 0.25. + Neither number on its own, at any scale, is.""" + assert problems(_share("1 in 4", 0.25)) == [] + assert any("at a stated scale" in p for p in problems(_share("1 in 4", wrong))) + + +def test_a_worded_fraction_is_its_share(): + """Delta review D1: "a third" is 1/3, which a stored share may round to + 0.3333 (OBR row 2662), and nothing else. A row whose fraction went + unparsed would compare nothing and pass whatever its value.""" + note = "'a third' -> 0.3333 share" + assert problems(_share("a third", 0.3333, note)) == [] + assert any("at a stated scale" in p for p in problems(_share("a third", 0.5, note))) + assert any("opposite sign" in p for p in problems(_share("a third", -0.3333, note))) + + +@pytest.mark.parametrize( + "raw", + [ + "5 in 2027", + "40,000 in 2030", + "two million in 2030", + "1-in-2030", + "5 in -2027", + "5 in −2027", + "5 in +2027", + "5 in 2010", + "5 in 2099", + "5 in 2026-27", + "5 in 2026–27", + "5 in 2026-2027", + ], +) +def test_a_year_after_in_is_a_problem(raw): + """The checker reads no ratio with a year from 2010 to 2099 after a bare + "in", and can't read "5 in 2026-27": we narrow value_raw to the number the + row stores.""" + assert _cant_read(raw) + + +@pytest.mark.parametrize( + ("raw", "quotient"), + [ + ("5 in 2027", 5 / 2027), + ("40,000 in 2030", 40_000 / 2030), + ("two million in 2030", 2e6 / 2030), + ("1-in-2030", 1 / 2030), + ], +) +def test_a_year_gives_no_quotient(raw, quotient): + """A year after "in" counts no denominator, so its quotient is no value.""" + found = problems(_share(raw, quotient, "as printed")) + assert any("can't read" in p for p in found), (raw, found) + + +@pytest.mark.parametrize( + ("raw", "share"), + [ + ("1 in 2000", 1 / 2000), + ("1 in 2009", 1 / 2009), + ("1 in 2100", 1 / 2100), + ("1 in 2,030", 1 / 2030), + ("one in every 2027", 1 / 2027), + ("1 out of 2027", 1 / 2027), + ("1 in 2030 million", 1 / 2.03e9), + ], +) +def test_a_denominator_no_year_could_print_stays_a_ratio(raw, share): + """A number outside 2010 to 2099, a comma, a multiplier, "every" or "out of" + marks a denominator: the share passes, and the numbers alone fail.""" + assert problems(_share(raw, share, "as printed")) == [] + for alone in (1, 1 / share): + found = problems(_share(raw, alone, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, alone, found) + + +@pytest.mark.parametrize( + "normalization", + [ + "as printed", + "N in M -> N/M", + "1 in 2000 -> 0.0005", + "£ million x 1,000,000", + "/ 100", + ], +) +def test_a_ratio_reads_the_same_under_any_normalization(normalization): + """A ratio's share takes no factor from the normalization: "1 in 2000" + passes at 0.0005 and fails at 1, at 2000 and at the share at that factor.""" + assert problems(_share("1 in 2000", 0.0005, normalization)) == [] + for wrong in (1, 2000, 500, 0.05): + found = problems(_share("1 in 2000", wrong, normalization)) + assert any("at a stated scale" in p for p in found), (wrong, found) + + +@pytest.mark.parametrize( + ("raw", "share", "normalization"), + [ + ("1 IN 4", 0.25, "N in M -> N/M"), + ("1 In 4", 0.25, "N in M -> N/M"), + ("1-in-4", 0.25, "N in M -> N/M"), + ("-1 in 4", -0.25, "N in M -> N/M"), + ("−1 in 4", -0.25, "N in M -> N/M"), + ("one in ten", 0.1, "one in ten -> 0.1"), + ("fewer than one in ten", 0.1, "one in ten -> 0.1"), + ("about three in ten", 0.3, "three in ten -> 0.3"), + ("Eight in Ten", 0.8, "eight in ten -> 0.8"), + ("one in four", 0.25, "one in four -> 0.25"), + ("one in a hundred", 0.01, "one in a hundred -> 0.01"), + ("1 in 2000", 0.0005, "1 in 2000 -> 0.0005"), + ], +) +def test_a_ratio_in_any_form_is_its_signed_share(raw, share, normalization): + """Final review F1: "in" in any case or hyphenated, a minus on N, and + number words (CenTax's "one in ten", rows 16, 93 and 95). The share + passes; the share with the other sign, N, M and N/M as a percentage + don't. Before F1, a worded ratio printed no number, so any value passed.""" + assert problems(_share(raw, share, normalization)) == [] + flipped = problems(_share(raw, -share, normalization)) + assert any("opposite sign" in p for p in flipped), flipped + for wrong in (1, 3, 4, 8, 10, 100, 2000, 100 * share, 0.5): + if not math.isclose(abs(wrong), abs(share), rel_tol=1e-3): + found = problems(_share(raw, wrong, normalization)) + assert any( + "at a stated scale" in p or "opposite sign" in p for p in found + ), (raw, wrong, found) + + +@settings(max_examples=200, deadline=None) +@given( + n=st.integers(1, 50), + extra=st.integers(1, 1000), + form=st.sampled_from(["{n} in {m:,}", "{n} IN {m:,}", "{n}-in-{m}", "{n} In {m}"]), + minus=st.sampled_from(["", "-", "−"]), +) +def test_a_ratio_passes_only_at_its_share(n, extra, form, minus): + """Delta review D1-1 and final review F1, for every "N in M" in any case + and with any minus: N/M, signed as N is, passes, and N, M, N% and M% fail + unless they round to N/M.""" + m = n + extra + raw = minus + form.format(n=n, m=m) + share = (-1 if minus else 1) * n / m + assert problems(_share(raw, share)) == [] + assert any("opposite sign" in p for p in problems(_share(raw, -share))) + for wrong in (n, m, n / 100, m / 100, 100 * n / m): + if not math.isclose(wrong, n / m, rel_tol=1e-3): + found = problems(_share(raw, wrong)) + assert any( + "at a stated scale" in p or "opposite sign" in p for p in found + ), (raw, wrong) + + +# Number words as a producer prints them, written out here apart from the +# checker's own lists (delta review R1). +SAY = dict( + enumerate( + "zero one two three four five six seven eight nine ten eleven twelve" + " thirteen fourteen fifteen sixteen seventeen eighteen nineteen".split() + ) +) | { + 20: "twenty", + 30: "thirty", + 40: "forty", + 50: "fifty", + 60: "sixty", + 70: "seventy", + 80: "eighty", + 90: "ninety", +} + + +def _say(n, a=False, hyphen=True, joined=True): + """n, from 1 to 999, in words as a producer might print it: "a" or "one" + hundred, "twenty-five" or "twenty five", "and" after the hundreds or not.""" + if n >= 100: + head, rest = divmod(n, 100) + out = ("a" if a and head == 1 else SAY[head]) + " hundred" + if rest: + out += " and " if joined else " " + out += _say(rest, a, hyphen, joined) + return out + if n in SAY: + return SAY[n] + tens, unit = divmod(n, 10) + return SAY[10 * tens] + ("-" if hyphen else " ") + SAY[unit] + + +STYLES = st.tuples(st.booleans(), st.booleans(), st.booleans()) +JOINTS = [ + "in", + "IN", + "in every", + "In Every", + "out of", + "OUT OF", + "out of every", + "Out Of Every", +] + + +@settings(max_examples=300, deadline=None) +@given( + n=st.integers(1, 999), + m=st.integers(1, 999), + styles=STYLES, + joint=st.sampled_from(JOINTS), + multiplier=st.sampled_from( + [("", 1), (" thousand", 1e3), (" million", 1e6), (" billion", 1e9)] + ), + wrong=st.floats(0.001, 1000), +) +def test_a_worded_ratio_passes_only_at_its_share( + n, m, styles, joint, multiplier, wrong +): + """Final review F1: number words up to the hundreds give a ratio as + numerals do, after "in", "in every", "out of" or "out of every" and with + a multiplier on M. The share passes, and so does nothing else, N and M + included.""" + word, factor = multiplier + raw = f"{_say(n, *styles)} {joint} {_say(m, *styles)}{word}" + share = n / (m * factor) + assert problems(_share(raw, share, "share as printed")) == [], raw + for bad in (wrong, n, m, m * factor, n / m): + if not math.isclose(bad, share, rel_tol=1e-3): + found = problems(_share(raw, bad, "share as printed")) + assert any("at a stated scale" in p for p in found), (raw, bad) + + +@pytest.mark.parametrize( + ("raw", "share", "wrongs"), + [ + ("1 in 2 million", 5e-7, (0.5, 1, 2, 2e6)), + ("1 in 2m", 5e-7, (0.5, 2, 2e6)), + ("1 in 2.5 million", 4e-7, (0.4, 2.5, 2.5e6)), + ("1 in 4bn", 2.5e-10, (0.25, 4, 4e9)), + ("one in a million", 1e-6, (1, 1e6)), + ("one in a thousand", 1e-3, (1, 1e3)), + ("one in ten thousand", 1e-4, (0.1, 10, 1e4)), + ("one in two hundred", 5e-3, (0.5, 2, 200)), + ("1 in 2 hundred", 5e-3, (0.5, 2, 200)), + ("one in a hundred thousand", 1e-5, (0.01, 100, 1e5)), + ("one in twenty-five", 0.04, (0.05, 0.2, 1, 25)), + ("one in a hundred and twenty", 1 / 120, (0.01, 0.05, 120)), + ("3 out of 10", 0.3, (3, 10, 30)), + ("3-out-of-10", 0.3, (3, 10)), + ("three out of ten", 0.3, (3, 10)), + ("1 in every 4", 0.25, (1, 4, 25)), + ("one in every five", 0.2, (1, 5)), + ("1 in every 2000", 0.0005, (1, 2000)), + ("1 out of 2000", 0.0005, (1, 2000)), + ("1 in 2000 million", 5e-10, (0.0005, 2000, 2e9)), + ("one out of every five", 0.2, (1, 5)), + ("1 out of every 4", 0.25, (1, 4, 25)), + ("1-out-of-every-4", 0.25, (1, 4)), + (".5 in 4", 0.125, (0.5, 4)), + ("1e3 in 4", 250, (1000, 4)), + ("1 in .5", 2, (1, 0.5)), + ("1 in +4", 0.25, (1, 4)), + ("+1 in 4", 0.25, (1, 4)), + ], +) +def test_a_ratio_with_a_multiplier_or_another_joint_is_its_share(raw, share, wrongs): + """A multiplier on M scales M, so "1 in 2 million" is 5e-7, never 0.5. + Number words run to the hundreds, and "in every", "out of" and "out of + every" print a ratio as "in" does. The share passes; N, M, and the share + without the multiplier don't.""" + assert problems(_share(raw, share, "share as printed")) == [] + for wrong in wrongs: + found = problems(_share(raw, wrong, "share as printed")) + assert any("at a stated scale" in p for p in found), (raw, wrong, found) + + +@pytest.mark.parametrize( + "raw", + [ + "£5 in 10 years", + "£ 5 in 10 years", + "£5 in 10", + "-£5 in 10", + "£-5 in 10", + "$3 in 4", + "COVID-19 in 10", + "Q1 in 4", + "£5 in 2027", + ], +) +def test_a_ratio_with_a_currency_sign_or_in_a_name_is_a_problem(raw): + """A ratio takes no currency sign, and "COVID-19 in 10" names something, + so the checker reads neither the numbers nor a share at any value.""" + assert _cant_read(raw) + + +@pytest.mark.parametrize( + ("raw", "share", "wrongs"), + [ + ("twenty-one in a hundred", 0.21, (0.01, 1, 21, 100)), + ("twenty one in a hundred", 0.21, (0.01, 21, 100)), + ("one in twenty-five", 0.04, (42, 0.2, 1, 25)), + ], +) +def test_a_compound_number_reads_whole(raw, share, wrongs): + """Delta review R1: the checker reads "twenty-one" as 21, never as its + last word, so "twenty-one in a hundred" passes at 0.21 and at nothing + else.""" + assert problems(_share(raw, share, "share as printed")) == [] + for wrong in wrongs: + found = problems(_share(raw, wrong, "share as printed")) + assert any("at a stated scale" in p for p in found), (raw, wrong, found) + + +@pytest.mark.parametrize( + ("raw", "share"), + [ + ("1 in -4", -0.25), + ("-1 in -4", 0.25), + ("1 in −4", -0.25), + ("one in -four", -0.25), + ("-1-in-4", -0.25), + ], +) +def test_a_minus_on_either_number_signs_the_share(raw, share): + """Delta review R1: a minus after the spaces before M signs the share as + a minus before N does, so "1 in -4" passes at -0.25 and fails at 0.25.""" + assert problems(_share(raw, share)) == [] + flipped = problems(_share(raw, -share)) + assert any("opposite sign" in p for p in flipped), (raw, flipped) + + +# Strings that print no one number the checker can read. Each would give a +# wrong value or none if the checker read part of it. +CANT_READ = [ + # operands (delta review D1) + "one in zero", + "1 in 0", + "1 in 1e999", + "1e999 in 4", + "1 in 1e308bn", + "1e999", + "1e999 and a half", + "four million per cent", + "zero million", + "hundred", + "million", + # ranges on either side of a ratio (delta review D2) + "4 - 5 in 10", + "4—5 in 10", + "1 in 4 - 5", + "1 in 4—5", + "1 in 4 to 5", + "1 to 4 in 5", + # numbers in words we don't list (delta reviews D3 and D4) + "twenty-one fifths", + "four million; five thousand", + "one thousandth", + "a millionth", + "- four", + # a ratio with more after it (cloud review A1, A3) + "2 million in 5 years", + "5bn in 10 years", + "200,000 in five years", + "one in a hundred and one in ten", + "2025, 1 in 4", + "a one-in-a-million chance", + # separators (cloud review A5) + "1 in-every 4", + "1-in every-4", + "1 out-of 4", + "one in four m", + # commas, signs and characters that print no number + "1,2", + "1,23", + "1234,567", + "12,34,567", + "4.", + "--4", + "٣", + "4", + "4\u200b", + "", + " ", + # ranges the checker can't place + "4 -5", + "4- 5", + "four-five", + "4% to 5", + "4bn-5", + "1 to 2 to 3", + # brackets + "(25%)", + "4 (five", + "4 (five) (six)", + "one third (about 33%)", + "a thousand and one in a million", + "a thousand and 21 in 100", + "one in a thousand and one in a million", + "twenty eleven in a hundred", + "1 in 2 thousand million", + "1 in 2 millionths", + "1 in 2 thousands", + "1 in 2 million-strong", + "1 in 4-year-olds", + "1 in 4th", + "1 in 4–5", + "4-5 in 10", + "4–5 in 10", + "1 in - 4", + "1 - in 4", + "1in 4", + "1 in4", + "1 in-4", + "1-in 4", + "1 in 0", + # numerators and denominators past the list + "eleven fifths", + "twelve thirds", + "one eleventh", + # a range that runs downward in value and in size + "2025-26", + "5-4", + "5 to 4", + "4bn-5m", + "1.5bn to 200m", + "a half to a third", + # a range with a word on its first number alone + "4k to 5000", + "1m-2000000", + # a range that runs downward from a positive number (cloud review A-L2) + "2 to -3", + "4--5", + "4 - -5", + # a range from a fraction to a percentage, which could read either way + "a third to 40%", + "half to 40%", + "a third to half a per cent", + # a range that joins a percentage to a multiplier + "4% to 2 million", + "2 million to 4%", + "4%-5bn", + "0.1 percentage points to 2.5bn", + # brackets that don't restate a share as a percentage + "4 (five)", + "4 (2025)", + "£5bn (2027)", + "one third (50%)", + "1 in 4 (26%)", + "25% (1 in 3)", + "-1 in 4 (25%)", + "half a million (50%)", + "a third (33)", + "a third (1 in 3)", + "25% (25%)", + "25% (0.25)", + "0% (0%)", + "1 in 4 (25-26%)", + "25-26% (1 in 4)", + "3 (1 in 2 million)", + "1 in 3 (33.9%)", + # a hyphen-joined ratio takes no minus on M, and a slash joins nothing + "1-in--4", + "4/5", +] + + +@pytest.mark.parametrize("raw", CANT_READ) +def test_a_string_the_checker_cant_read_is_a_problem(raw): + """Delta reviews R1 and D1 to D4, and cloud review A1 to A5: a string that + prints no one number in a form the checker knows gives a problem at any + value, and the problem says so and asks us to narrow value_raw.""" + assert _cant_read(raw), raw + found = problems(_share(raw, 1, "as printed")) + assert any("narrow it to the number" in p for p in found), found + + +MULTIPLIER = st.sampled_from( + [("", 1), (" thousand", 1e3), (" million", 1e6), (" billion", 1e9)] + + [("bn", 1e9), ("m", 1e6), ("k", 1e3)] +) + + +def _operand(x, word, styles, multiplier): + """x in words or digits, with a multiplier; a short multiplier ("bn") + only after digits.""" + text, factor = multiplier + if word and not text.startswith(" "): + text, factor = "", 1 + return (_say(x, *styles) if word else str(x)) + text, factor + + +@settings(max_examples=500, deadline=None) +@given( + n=st.integers(1, 999), + m=st.integers(1, 999), + words=st.tuples(st.booleans(), st.booleans()), + styles=STYLES, + multipliers=st.tuples(MULTIPLIER, MULTIPLIER), + signs=st.tuples(st.sampled_from(["", "-", "−"]), st.sampled_from(["", "-", "−"])), + joint=st.sampled_from(JOINTS), + hyphens=st.booleans(), +) +def test_any_ratio_reads_whole_and_signed( + n, m, words, styles, multipliers, signs, joint, hyphens +): + """Delta review R1, for every ratio of numbers up to 999, in words or + digits, with a multiplier or none on each number, a minus or none on N, + and a minus or none on M when spaces join the ratio, joined all by spaces + or all by hyphens: the signed share passes, and its opposite, N, M and the + share without its multipliers fail.""" + top, f_top = _operand(n, words[0], styles, multipliers[0]) + bottom, f_bottom = _operand(m, words[1], styles, multipliers[1]) + sign_m = "" if hyphens else signs[1] + if hyphens: + raw = f"{signs[0]}{top}-{joint.replace(' ', '-')}-{bottom}" + else: + raw = f"{signs[0]}{top} {joint} {sign_m}{bottom}" + share = (n * f_top) / (m * f_bottom) * (-1 if signs[0] else 1) + share *= -1 if sign_m else 1 + assert problems(_share(raw, share, "share as printed")) == [], raw + flipped = problems(_share(raw, -share, "share as printed")) + assert any("opposite sign" in p for p in flipped), (raw, flipped) + for bad in (n, m, n * f_top, m * f_bottom, n / m): + if not math.isclose(bad, abs(share), rel_tol=1e-3): + found = problems(_share(raw, bad, "share as printed")) + assert any( + "at a stated scale" in p or "opposite sign" in p for p in found + ), (raw, bad, found) + + +@settings(max_examples=400, deadline=None) +@given( + n=st.sampled_from( + ["21", "twenty-one", "twenty one", "five", "105", "one hundred and five"] + ), + m=st.sampled_from( + ["100", "a hundred", "twenty-five", "2 million", "a thousand", "4bn"] + ), + joint=st.sampled_from(["in", "in every", "out of"]), + spoiler=st.sampled_from( + ["one ", "3 ", "two million ", "a thousand and "] + + [" thousand thousand", " millionths", "-year-olds", " 7"] + ), + value=st.floats(-1e12, 1e12, allow_nan=False), +) +def test_a_ratio_whose_number_runs_on_is_a_problem_at_any_value( + n, m, joint, spoiler, value +): + """Delta review R1, for ratios whose N or M runs on into more of a number + ("one 21 in 100", "1 in 4 7") or into a word ("1 in 2 millionths", "1 in + 4-year-olds"): the checker reports each at any value, rather than read + part of it.""" + if spoiler.endswith(" "): + raw = f"{spoiler}{n} {joint} {m}" + else: + raw = f"{n} {joint} {m}{spoiler}" + found = problems(_share(raw, value, "share as printed")) + assert any("can't read" in p for p in found), (raw, found) + + +@pytest.mark.parametrize( + ("raw", "share", "wrongs"), + [ + ("a fifth", 0.2, (5, 0.5, 20)), + ("less than a fifth", 0.2, (5, 20)), + ("about three-fifths", 0.6, (3, 5, 0.35, 60)), + ("three fifths", 0.6, (3, 5)), + ("another quarter", 0.25, (4, 0.75, 25)), + ("around one-tenth", 0.1, (1, 10)), + ("seven eighths", 0.875, (7, 8, 0.78)), + ("an eighth", 0.125, (8, 0.18)), + ("two-thirds", 2 / 3, (2, 3, 0.23)), + ("three quarters", 0.75, (3, 4, 0.34)), + ("half", 0.5, (2, 50)), + ("a half", 0.5, (2,)), + ], +) +def test_a_worded_fraction_in_any_form_is_its_share(raw, share, wrongs): + """A worded fraction is a numerator ("a", "an", "another", or one to + ten) and a denominator from a half to a tenth, with a space or a hyphen + between them, or "half" alone. The share passes; its two numbers, and 100 + times the share on a row not in percent units, don't.""" + assert problems(_share(raw, share, "share as printed")) == [] + for wrong in wrongs: + found = problems(_share(raw, wrong, "share as printed")) + assert any("at a stated scale" in p for p in found), (raw, wrong, found) + + +# Each numerator and denominator the README lists, written out here apart from +# the checker's tables. +NUMERATOR_WORDS = { + "a": 1, + "an": 1, + "another": 1, + "one": 1, + "two": 2, + "three": 3, + "four": 4, + "five": 5, + "six": 6, + "seven": 7, + "eight": 8, + "nine": 9, + "ten": 10, +} +DENOMINATOR_WORDS = { + "half": 2, + "halves": 2, + "third": 3, + "thirds": 3, + "quarter": 4, + "quarters": 4, + "fourth": 4, + "fourths": 4, + "fifth": 5, + "fifths": 5, + "sixth": 6, + "sixths": 6, + "seventh": 7, + "sevenths": 7, + "eighth": 8, + "eighths": 8, + "ninth": 9, + "ninths": 9, + "tenth": 10, + "tenths": 10, +} + + +def test_every_worded_fraction_reads_as_its_share(): + """Every numerator over every denominator, with a space or a hyphen, passes + at its share and fails at twice that.""" + for top, n in NUMERATOR_WORDS.items(): + for bottom, m in DENOMINATOR_WORDS.items(): + for joint in " -": + raw = f"{top}{joint}{bottom}" + assert problems(_share(raw, n / m, "as printed")) == [], raw + found = problems(_share(raw, 2 * n / m, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, found) + + +@pytest.mark.parametrize( + ("raw", "near", "far"), + [ + ("a third", 0.3331, 0.331), + ("two-thirds", 0.667, 0.663), + ("1 in 3", 0.3331, 0.331), + ("a third", 0.3334, 0.3337), + ("half a million", 500_400, 503_000), + ("half a million", 500_400, 500_600), + ("a third of a million", 333_100, 331_000), + ("two and a half", 2.502, 2.51), + ], +) +def test_a_rounded_number_passes_within_a_tenth_of_a_percent(raw, near, far): + """A stored value may differ from a share, a fraction of a multiplier or a + whole number with a fraction by 0.1%, and no further.""" + assert problems(_share(raw, near, "as printed")) == [], (raw, near) + found = problems(_share(raw, far, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, far, found) + + +@pytest.mark.parametrize("minus", ["", "-"]) +@pytest.mark.parametrize( + ("raw", "value"), + [ + ("half", 0.5), + ("a third", 1 / 3), + ("1 in 3", 1 / 3), + ("half a million", 5e5), + ("a third of a million", 1e6 / 3), + ("half a per cent", 0.005), + ("half a per cent", 0.5), + ("two and a half", 2.5), + ("two and a half million", 2.5e6), + ("two and a half per cent", 0.025), + ("two and a half per cent", 2.5), + ], +) +def test_a_rounded_number_stops_at_a_tenth_of_a_percent(raw, value, minus): + """Each kind of number that may round, with either sign, passes 0.09% from + its value and fails 0.105% from it, on either side.""" + sign = -1 if minus else 1 + for off in (0.0009, -0.0009): + stored = sign * value * (1 + off) + assert problems(_share(minus + raw, stored, "as printed")) == [], (raw, off) + for off in (0.00105, -0.00105): + stored = sign * value * (1 + off) + found = problems(_share(minus + raw, stored, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, off, found) + + +@pytest.mark.parametrize( + "raw", + [ + "a third-party", + "the third year", + "per quarter", + "third", + "quarter", + "2 and half", + ], +) +def test_an_ordinal_or_a_compound_is_a_problem(raw): + """ "third" in "a third-party" or "the third year", and "quarter" without + a numerator, print no fraction the checker can read.""" + assert _cant_read(raw) + + +@pytest.mark.parametrize( + ("raw", "share"), [("around one-tenth", 0.1), ("1 in 4", 0.25), ("a third", 1 / 3)] +) +def test_a_percent_row_stores_its_share_in_percent_units(raw, share): + """Resolution Foundation's "around one-tenth" (row 114) is 10 on its + `unit_concept: percent` row. A percent row stores 100 times the share, + and every other row the share itself.""" + + def row(value, unit): + return mutated( + value_raw=raw, + quote=raw, + value=value, + normalization="as printed", + unit_concept=unit, + ) + + assert problems(row(100 * share, "percent")) == [] + assert problems(row(share, "share")) == [] + for value, unit in ((share, "percent"), (100 * share, "share")): + found = problems(row(value, unit)) + assert any("at a stated scale" in p for p in found), (raw, value, unit) + + +def test_a_percent_row_scales_only_a_share(): + """A percent row stores a share in percent units. "Two and a half" prints a + number, so it stays 2.5 there.""" + row = mutated( + value_raw="two and a half", + quote="two and a half", + value=2.5, + normalization="as printed", + unit_concept="percent", + ) + assert problems(row) == [] + row["value"] = 250 + assert any("at a stated scale" in p for p in problems(row)) + + +@pytest.mark.parametrize( + "raw", + [ + "half per cent", + "one half percent", + "half a per cent", + "half of one per cent", + "a half percentage point", + ], +) +def test_a_fraction_of_a_percentage_keeps_its_value_on_a_percent_row(raw): + """A fraction of a percentage prints its own unit, so "half per cent" stays + 0.5 on a `unit_concept: percent` row, where "half" alone would read as 50.""" + row = mutated( + value_raw=raw, + quote=raw, + value=0.5, + normalization="as printed", + unit_concept="percent", + ) + assert problems(row) == [] + row["value"] = 50 + assert any("at a stated scale" in p for p in problems(row)) + + +@pytest.mark.parametrize( + ("raw", "value", "wrongs"), + [ + ("four", 4, (5, 40)), + ("one", 1, (2,)), + ("twenty-five", 25, (20, 5)), + ("a hundred and five", 105, (100, 5)), + ("one million", 1e6, (1, 2e6)), + ("over a million", 1e6, (1, 1e3)), + ("a hundred thousand", 1e5, (100, 1e3)), + ], +) +def test_a_number_printed_only_in_words_is_that_number(raw, value, wrongs): + """A row that prints its number only in words (OBR's "four", row 2664) + gives those words, at value_raw's scale ("over a million" is 1e6). Before, + it compared nothing and passed whatever its value.""" + assert problems(_share(raw, value, "printed in words")) == [] + for wrong in wrongs: + found = problems(_share(raw, wrong, "printed in words")) + assert any("at a stated scale" in p for p in found), (raw, wrong, found) + + +@settings(max_examples=300, deadline=None) +@given(n=st.integers(1, 999), styles=STYLES, off=st.integers(1, 50)) +def test_any_number_in_words_reads_as_that_number(n, styles, off): + """Every number from one to nine hundred and ninety-nine, in any of the + ways _say prints it, reads back as itself, and n + off doesn't.""" + raw = _say(n, *styles) + assert problems(_share(raw, n, "printed in words")) == [], raw + found = problems(_share(raw, n + off, "printed in words")) + assert any("at a stated scale" in p for p in found), (raw, n + off) + + +@pytest.mark.parametrize( + "raw", ["a thousand and one", "twenty eleven", "one thousand two hundred"] +) +def test_a_number_in_words_the_checker_cant_read_is_a_problem(raw): + """Delta review R1: words alone that make no one number the checker + reads ("twenty eleven"), or one it doesn't ("one thousand two hundred"), + give a problem, rather than count their parts.""" + for value in (1, 20, 1000, 1001, 1200): + found = problems(_share(raw, value, "printed in words")) + assert any("can't read" in p for p in found), (raw, found) + + +@pytest.mark.parametrize("raw", ["two-child limit", "one-off"]) +def test_a_number_word_inside_a_compound_is_a_problem(raw): + """A number word inside a hyphenated word ("two-child") prints no number.""" + assert _cant_read(raw) + + +def _label(raw, value): + return mutated( + value_raw=raw, + quote=raw, + value=value, + normalization="rating as printed", + value_kind="categorical", + ) + + +@pytest.mark.parametrize("raw", ["High", "four", "two-child limit", "one-off"]) +def test_a_categorical_row_prints_a_label_and_compares_nothing(raw): + """A categorical row's words name its label, whatever its value.""" + assert problems(_label(raw, 7)) == [] + + +@pytest.mark.parametrize("raw", ["Tier 2", "3", "1 in 4", "٣"]) +def test_a_categorical_row_that_prints_a_digit_is_a_problem(raw): + """A number on a categorical row would compare nothing, so the checker + takes no digits there.""" + found = problems(_label(raw, 7)) + assert any("prints a number" in p for p in found), (raw, found) + + +@pytest.mark.parametrize( + ("raw", "passes", "fails"), + [ + # a minus on a number in words + ("-four", (-4,), (4,)), + ("−four", (-4,), (4,)), + ("+four", (4,), (-4,)), + ("-three-fifths", (-0.6,), (0.6,)), + ("-half", (-0.5,), (0.5,)), + ("-1 in 4", (-0.25,), (0.25,)), + # a whole number and a fraction + ("two and a half", (2.5,), (0.5, 2, 250)), + ("2 and a third", (7 / 3, 2.3333), (1 / 3, 2)), + ("-two and a half", (-2.5,), (2.5,)), + ("one and a half million", (1.5e6,), (0.5, 1.5, 5e5)), + ("2 and a half bn", (2.5e9,), (2.5, 2.5e6)), + ("two and a half m", (2.5e6,), (2.5, 2.5e9)), + ("two and a half per cent", (0.025, 2.5), (0.5, 2)), + ("twenty-one and a half", (21.5,), (0.5, 1)), + # a fraction of a multiplier + ("half a million", (5e5,), (0.5, 1e6)), + ("half a hundred", (50,), (0.5, 100)), + ("a quarter of a million", (2.5e5,), (0.25, 1e6)), + ("three quarters of a billion", (7.5e8,), (0.75, 1e9)), + ("half a percentage point", (0.005, 0.5), (1, 2)), + ("a third of a million", (333_333,), (1 / 3, 1e6)), + ("half of one million", (5e5,), (0.5, 1e6)), + ("half million", (5e5,), (0.5, 1e6)), + ("a half million", (5e5,), (0.5, 1e6)), + # a fraction of a percentage, with or without "a" or "of" + ("half per cent", (0.005, 0.5), (0.05, 5, 50)), + ("half percent", (0.005, 0.5), (0.05, 5, 50)), + ("half%", (0.005, 0.5), (0.05, 5, 50)), + ("one half percent", (0.005, 0.5), (0.05, 5, 50)), + ("a half percentage point", (0.005, 0.5), (0.05, 5, 50)), + ("half a per cent", (0.005, 0.5), (0.05, 5, 50)), + ("half a percent", (0.005, 0.5), (0.05, 5, 50)), + ("half of a per cent", (0.005, 0.5), (0.05, 5, 50)), + ("half of one per cent", (0.005, 0.5), (0.05, 5, 50)), + ("a quarter of a percentage point", (0.0025, 0.25), (1, 0.025)), + ("three-quarters per cent", (0.0075, 0.75), (75, 0.075)), + ("-half per cent", (-0.005, -0.5), (0.005, 0.5)), + # a whole number up to the hundreds and a fraction + ("one hundred and a half", (100.5,), (0.5, 100, 1.5, 150)), + ("a hundred and five and a half", (105.5,), (0.5, 105, 5.5)), + ("nine hundred and ninety-nine and a half", (999.5,), (0.5, 990)), + ("two hundred and a half million", (200.5e6,), (200.5, 0.5, 2e8)), + ("one hundred and a half per cent", (1.005, 100.5), (0.5, 100)), + ("-one hundred and a half", (-100.5,), (100.5,)), + # a range: the first number takes the second's word + ("£4-5 million", (4e6, 5e6), (4, 5, 4e3)), + ("4-5%", (0.04, 0.05, 4, 5), (40,)), + ("4–5bn", (4e9, 5e9), (4, 5)), + ("4 to 5bn", (4e9, 5e9), (4, 5)), + ("4m to 5bn", (4e6, 5e9), (4e9, 5e6)), + ("4 - 5%", (0.04, 0.05), (45,)), + ("4—5%", (0.04, 0.05), (45,)), + ("four to five", (4, 5), (45, 0.8)), + ("four to five million", (4e6, 5e6), (4, 5)), + ("a third to a half", (1 / 3, 0.5), (0.1,)), + ("a third to half a million", (333_333, 5e5), (1 / 3, 0.5)), + ("-4 to -5", (-4, -5), (4, 5)), + ("-5 to -4", (-5, -4), (5, 4)), + ("200m to 1.5bn", (2e8, 1.5e9), (200, 1.5)), + # a second number in brackets restates the first + ("one third (33%)", (1 / 3, 0.33, 33), (0.5, 3)), + ("1 in 4 (25%)", (0.25, 25), (1, 4)), + ("25% (1 in 4)", (0.25, 25), (1, 4)), + ("half (50%)", (0.5, 50), (2,)), + ("-1 in 4 (-25%)", (-0.25, -25), (0.25, 25)), + ("1 in 8 (13%)", (0.125, 0.13, 13), (1, 8)), + ("1 in 8 (12%)", (0.125, 0.12, 12), (1, 8)), + # words that print a zero + ("nil", (0,), (1,)), + ("nothing", (0,), (1,)), + ("none", (0,), (1,)), + ("no change", (0,), (1,)), + ("no impact", (0,), (1,)), + ("no overall impact", (0,), (1,)), + ("zero", (0,), (1,)), + ("zero in five", (0,), (5, 0.2)), + # words around a number + ("about £2bn a year", (2e9,), (2,)), + ("4 per cent of GDP", (0.04, 4), (40,)), + ("less than a 0.1 percentage point", (0.001, 0.1), (1,)), + ("over a million", (1e6,), (1,)), + # each spelling of a percentage and of a short multiplier + ("4 %", (0.04, 4), (40,)), + ("4 percent", (0.04, 4), (40,)), + ("4 ppts", (0.04, 4), (40,)), + ("+4ppt", (0.04, 4), (40,)), + ("4pp", (0.04, 4), (40,)), + ("2 m", (2e6,), (2,)), + ("2mn", (2e6,), (2,)), + ("2k", (2e3,), (2,)), + ("2tn", (2e12,), (2,)), + ("£3 trillion", (3e12,), (3,)), + ("2-million", (2e6,), (2,)), + ("2 hundred", (200,), (2,)), + # signs and currency in any order + ("-£1.7bn", (-1.7e9,), (1.7e9,)), + ("£-1.7bn", (-1.7e9,), (1.7e9,)), + ("+$2m", (2e6,), (-2e6,)), + ("£5", (5,), (6, 5e3, 5e6, 5e9, 0.05, 500)), + ("4", (4,), (0.04, 400, 4e3, 4e6, 4e9)), + ("$5", (5,), (6,)), + ("€5", (5,), (6,)), + ("-$5", (-5,), (5,)), + ("-€2m", (-2e6,), (2e6,)), + ("$-5", (-5,), (5,)), + ("€-2m", (-2e6,), (2e6,)), + ("−2", (-2,), (2,)), + ("–2", (-2,), (2,)), + ("1E-05", (1e-5,), (1,)), + ("1,234.5", (1234.5,), (1.2345,)), + # a range may fall only if neither number is positive + ("0 to -3", (0, -3), (3,)), + ], +) +def test_each_form_reads_at_its_values_and_no_others(raw, passes, fails): + """Each listed string passes at the listed accepted values and rejects the + listed invalid values.""" + for value in passes: + assert problems(_share(raw, value, "as printed")) == [], (raw, value) + for value in fails: + found = problems(_share(raw, value, "as printed")) + assert any("at a stated scale" in p or "opposite sign" in p for p in found), ( + raw, + value, + found, + ) + + +@pytest.mark.parametrize( + ("raw", "whole"), + [("two and a half", 2.5), ("2 and a half", 2.5), ("one hundred and a half", 100.5)], +) +def test_a_whole_number_with_a_fraction_takes_the_normalization_s_factor(raw, whole): + """With no word of its own, a whole number with a fraction takes the factor, + within 0.1%, and fails at 1.""" + note = "£ million x 1,000,000" + scaled = whole * 1e6 + assert problems(_share(raw, scaled, note)) == [] + assert problems(_share(raw, scaled * 1.0009, note)) == [] + for value in (whole, scaled * 1.00105, whole * 1e9): + found = problems(_share(raw, value, note)) + assert any("at a stated scale" in p for p in found), (raw, value, found) + + +@pytest.mark.parametrize("dash", ["-", "−", "–", "—", "‐", "‑", "‒", "―", " - "]) +def test_a_dash_is_zero_only_where_the_normalization_says_it_prints_nil(dash): + """A table may print a dash for nil or for "not available", so the checker + reads one only if the normalization records nil, and then only as zero.""" + for note in ( + "dash for nil", + "dashes for nil", + "dash means nil", + "dash = nil", + "nil = dash", + "nil as dash", + "the table prints NIL as a dash", + "prints a dash for nil", + "print nil as a dash", + "the dash means nil", + "dashes mean nil", + "dash for nil", + "the producer prints a dash for nil", + "source prints nil as a dash", + "the workbook prints dashes for nil", + "£ million x 1e6; dash for nil", + "as printed, dash for nil", + "as printed. dash for nil", + "as printed (dash for nil)", + ): + assert problems(_share(dash, 0, note)) == [], (dash, note) + for value in (1, -1, 0.5, 1e6): + found = problems(_share(dash, value, note)) + assert any("at a stated scale" in p for p in found), (dash, value, found) + for note in ( + "as printed", + "dash for not available", + "dash means not available, not nil", + "dash means missing, not nil", + "dash does not mean nil", + "not available; nil is printed as 0", + "no dash for nil", + "not a dash for nil", + "never prints nil as a dash", + "nil-rate band", + "nil", + "vanilla", + ): + assert _cant_read(dash, note), (dash, note) + + +def test_every_number_up_to_999_reads_in_every_style(): + """Exhaustively: each number from 0 to 999, however `_say` prints it, passes + alone and rejects itself plus one. Its ratios pass at their shares and reject a + different share.""" + + def rejects(raw, value): + found = problems(_share(raw, value, "as printed")) + return any("at a stated scale" in p for p in found) + + for n in range(1000): + for raw in {_say(n, *style) for style in product([False, True], repeat=3)}: + assert problems(_share(raw, n, "printed in words")) == [], raw + found = problems(_share(raw, n + 1, "printed in words")) + assert any("at a stated scale" in p for p in found), raw + ratio = f"{raw} in a thousand" + assert problems(_share(ratio, n / 1000, "as printed")) == [], raw + assert rejects(ratio, 1.01 * (n or 1) / 1000), raw + if n: + ratio = f"one in {raw}" + assert problems(_share(ratio, 1 / n, "as printed")) == [], raw + assert rejects(ratio, 1.01 / n), raw + + +# Numbers in the forms the README lists, each with its value and with no sign, +# written out here apart from the checker's tables. Ranges, brackets and the words +# for zero have tests of their own. +READABLE = [ + ("5", 5), + ("1,234", 1234), + ("2.5", 2.5), + (".5", 0.5), + ("£5", 5), + ("2m", 2e6), + ("2.5bn", 2.5e9), + ("£2 billion", 2e9), + ("4%", 0.04), + ("4 per cent", 0.04), + ("0.1 percentage points", 0.001), + ("four", 4), + ("twenty-five", 25), + ("a hundred and five", 105), + ("one million", 1e6), + ("a million", 1e6), + ("half", 0.5), + ("a third", 1 / 3), + ("three-fifths", 0.6), + ("half a million", 5e5), + ("half per cent", 0.005), + ("two and a half", 2.5), + ("one hundred and a half", 100.5), + ("1 in 4", 0.25), + ("one-in-eight", 0.125), + ("3 out of 10", 0.3), + ("one in every five", 0.2), +] +SPOILED = st.sampled_from(READABLE).map(lambda pair: pair[0]) +AFTER = [ + " years", + " people", + " or more", + "th", + "-year-olds", + ", 2025", + "; 2025", + ".", + "/yr", + " per household", + " banana", + " in", + " and", + " (", + ")", + "%%", +] +BEFORE = ["the ", "year ", "£5 ", "and ", "Q", "x", "COVID-", "(", "), ", "per ", "9 "] + + +@settings(max_examples=500, deadline=None) +@given( + number=SPOILED, + before=st.sampled_from(["", *BEFORE]), + after=st.sampled_from(["", *AFTER]), + value=st.floats(-1e12, 1e12, allow_nan=False), +) +def test_a_readable_number_with_more_around_it_is_a_problem_at_any_value( + number, before, after, value +): + """Each of READABLE's numbers, with words or characters around it that the + README doesn't list, gives a problem at any value, so the checker never reads + part of a string.""" + if before or after: + found = problems(_share(f"{before}{number}{after}", value, "as printed")) + assert any("can't read" in p for p in found), (before, number, after, found) + + +@settings(max_examples=300, deadline=None) +@given(number=SPOILED, value=st.floats(-1e12, 1e12, allow_nan=False)) +def test_a_word_inside_a_readable_number_is_a_problem_at_any_value(number, value): + """A word at any space inside one of READABLE's numbers gives a problem.""" + for i, ch in enumerate(number): + if ch == " ": + spoiled = f"{number[:i]} banana{number[i:]}" + found = problems(_share(spoiled, value, "as printed")) + assert any("can't read" in p for p in found), (spoiled, found) + + +@settings(max_examples=300, deadline=None) +@given( + pair=st.sampled_from(READABLE), + qualifier=st.sampled_from( + ["about", "almost", "Approx.", "approximately", "around", "at least"] + + ["at most", "fewer than", "just over", "just under", "less than"] + + ["more than", "nearly", "over", "roughly", "some", "under", "up to"] + ), + tail=st.sampled_from(["", " a year", " of GDP"]), + case=st.sampled_from([str, str.upper, str.title]), + gap=st.sampled_from([" ", " ", "\u00a0", "\t"]), + off=st.sampled_from([1.5, 2, 0.5, 7]), +) +def test_a_number_reads_the_same_with_any_qualifier_case_or_spacing( + pair, qualifier, tail, case, gap, off +): + """A qualifier before a number, "a year" or "of GDP" after it, its case and + its spacing change nothing: it passes at its value and fails elsewhere.""" + number, value = pair + raw = case(f"{qualifier} {number}{tail}").replace(" ", gap) + assert problems(_share(raw, value, "as printed")) == [], raw + found = problems(_share(raw, value * off, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, found) + + +@settings(max_examples=300, deadline=None) +@given(pair=st.sampled_from(READABLE), minus=st.sampled_from(["-", "−", "–"])) +def test_a_minus_flips_a_number_in_any_form(pair, minus): + """A minus before a number gives its opposite: the negative passes, the + positive doesn't, and the unsigned number mirrors both.""" + number, value = pair + raw = minus + number + assert problems(_share(raw, -value, "as printed")) == [], raw + flipped = problems(_share(raw, value, "as printed")) + assert any("opposite sign" in p for p in flipped), (raw, flipped) + assert problems(_share(number, value, "as printed")) == [], number + mirror = problems(_share(number, -value, "as printed")) + assert any("opposite sign" in p for p in mirror), (number, mirror) + + +@settings(max_examples=300, deadline=None) +@given( + n=st.integers(1, 9999), + word=st.sampled_from( + [ + (" thousand", 1e3), + (" million", 1e6), + (" billion", 1e9), + (" trillion", 1e12), + ("k", 1e3), + ("m", 1e6), + ("mn", 1e6), + ("bn", 1e9), + ("tn", 1e12), + ] + ), + other=st.sampled_from([1, 1e3, 1e6, 1e9, 1e12, 0.01, 100]), + normalization=st.sampled_from(["as printed", "£ x 1,000,000", "/ 100"]), +) +def test_a_number_s_own_multiplier_sets_its_scale_under_any_normalization( + n, word, other, normalization +): + """A multiplier scales its own number, and no normalization overrides it.""" + text, factor = word + raw = f"{n}{text}" + assert problems(_share(raw, n * factor, normalization)) == [], raw + if other != factor: + found = problems(_share(raw, n * other, normalization)) + assert any("at a stated scale" in p for p in found), (raw, other, found) + + +@pytest.mark.parametrize("normalization", ["as printed", "£ x 1,000,000", "/ 100"]) +@pytest.mark.parametrize( + ("raw", "value", "number"), + [ + ("one million", 1e6, 1), + ("two million", 2e6, 2), + ("a thousand", 1e3, 1), + ("three hundred thousand", 3e5, 300), + ("five billion", 5e9, 5), + ("half a million", 5e5, 0.5), + ("one and a half million", 1.5e6, 1.5), + ], +) +def test_a_worded_multiplier_sets_its_scale_under_any_normalization( + raw, value, number, normalization +): + """A multiplier in words scales its number as a short one does, so "one + million" under "/ 100" passes at a million and fails at 0.01.""" + assert problems(_share(raw, value, normalization)) == [], raw + for scale in (1, 0.01, 1e6): + if number * scale != value: + found = problems(_share(raw, number * scale, normalization)) + assert any("at a stated scale" in p for p in found), (raw, scale, found) + + +@settings(max_examples=200, deadline=None) +@given(n=st.integers(1, 9999)) +def test_digits_alone_take_the_normalization_s_factor_failing_that_one(n): + """Digits with no word of their own take the normalization's factor, failing + that 1, and nothing else: "4" as printed never passes at 4,000,000,000.""" + raw = str(n) + assert problems(_share(raw, n, "as printed")) == [] + for scale in (7, 1e3, 1e6, 1e9, 0.01, 100): + found = problems(_share(raw, n * scale, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, scale, found) + stated = "£ million x 1,000,000" + assert problems(_share(raw, n * 1e6, stated)) == [] + for scale in (1, 1e3, 1e9, 0.01, 100): + found = problems(_share(raw, n * scale, stated)) + assert any("at a stated scale" in p for p in found), (raw, scale, found) + + +@pytest.mark.parametrize( + ("note", "passes", "fails"), + [ + ("£ million x 1e6", (4e6,), (4, 40, 4e9)), + ("£ million X 1E6", (4e6,), (4, 40, 4e9)), + ("£ million x 10^6", (4e6,), (4, 40, 4e9)), + ("£ million x 10**6", (4e6,), (4, 40, 4e9)), + ("£ million x 10 ^ 6", (4e6,), (4, 40, 4e9)), + ("£ million × 1,000,000", (4e6,), (4, 4e3)), + ("£ million (x 1e6)", (4e6,), (4,)), + ("£ million [x 1e6]", (4e6,), (4,)), + ("(x 1e6), sign as printed", (4e6,), (4,)), + ("£ million x 1,000,000, sign as printed", (4e6,), (4,)), + ("£ million x 1e6: sign as printed", (4e6,), (4,)), + ("£ million x 1e6.", (4e6,), (4,)), + ("£ x 1,000,000 monthly", (4e6,), (4,)), + ("thousands * 1000", (4e3,), (4, 4e6)), + ("÷ 100", (0.04,), (4, 400)), + ("percent / 100", (0.04,), (4, 400)), + ("x .5", (2,), (4, 8)), + ("x1e6", (4e6,), (4,)), + ("×1e6", (4e6,), (4,)), + ("(×1e6)", (4e6,), (4,)), + ("[×1e6]", (4e6,), (4,)), + ("£ billion × 1e9 → £", (4e9,), (4,)), + ("per cent / 100 → share", (0.04,), (4,)), + ("x 1,000,000 / 100", (4e4,), (4, 4e6, 0.04)), + ("x 1,000,000 ÷ 100 * 2", (8e4,), (4, 4e6, 4e4, 0.04)), + # two statements, so two readings; a semicolon ends a run of operations + ("x 1e6; percent / 100", (4e6, 0.04), (4, 4e4)), + ("x 1e6; / 100", (4e6, 0.04), (4, 4e4)), + # no factor here + ("x-axis", (4,), (40,)), + ("see box 5", (4,), (20,)), + ("printed as a fall ('lower' / 'fall' / 'drop')", (4,), (40,)), + ("4x", (4,), (40,)), + ], +) +def test_a_bare_number_takes_each_whole_factor_the_normalization_states( + note, passes, fails +): + """Sol R2 and R7: the checker reads a factor's whole operand, and composes + operations in a row, so "4" under "x 10^6" never passes at 40.""" + for value in passes: + assert problems(_share("4", value, note)) == [], (note, value) + for value in fails: + found = problems(_share("4", value, note)) + assert any("at a stated scale" in p for p in found), (note, value, found) + + +@pytest.mark.parametrize( + "note", + [ + "x 1 million", + "x 2 bn", + "x 1 000 000", + "x 10^", + "x 5^2", + "x 5**2", + "x 1,00", + "x 0", + "/ 0", + "x 1e999", + "x 10^999", + "x 1e6a", + "x 100%", + "x 1e6->GBP", + "x 1,000,000 / 100 million", + "x 1 hundred", + "x 1e6 / (100)", + "times 1,000", + "times 1,000", + "times .5", + "times (1,000)", + "times one", + "multiplied by 1e6", + "divided by 100", + "multiplied by 1e6", + "divided by 100", + "x\tby 1e6", + "x 1e6 / (one hundred)", + "£m×1e6", + "£m*1e6", + "£m÷100", + "(£m)×1e6", + "£m× 1e6", + "£m×(-1e6)", + "£m×one million", + "£m;x 1e6", + "£m:x 1e6", + "£m,x 1e6", + "£m=x 1e6", + "->x 1e6", + "£m→x 1e6", + "(£m)x 1e6", + "[£m]x 1e6", + "£m;x one million", + "%/100", + "£m;/100", + "£m:/100", + "£m,/100", + "£m=/100", + "->/100", + "£m→/100", + "(£m)/100", + "[£m]/100", + "£m/100", + "per cent/100", + "per cent/ 100", + "per cent/(100)", + "per cent/(£100)", + "per cent/.01", + "x 1,000,000 / 10^", + ], +) +def test_a_factor_the_checker_cant_read_whole_is_a_problem_at_any_value(note): + """Sol R2: a numeric prefix doesn't count as the factor, and the checker never + falls back to 1 past a factor it can't read.""" + for value in (4, 40, 4e6, 0.04, 0): + found = problems(_share("4", value, note)) + assert any("a factor in normalization" in p for p in found), (note, value) + + +@pytest.mark.parametrize( + ("raw", "value", "wrong"), + [("four", 4, 40), ("twenty-five", 25, 250), ("a hundred and five", 105, 1050)], +) +def test_words_alone_take_the_normalization_s_factor_failing_that_one( + raw, value, wrong +): + """Number words with no multiplier take the normalization's factor, failing + that 1, as digits do.""" + assert problems(_share(raw, value, "as printed")) == [] + for bad in (wrong, value * 1e3, value * 1e6, value * 0.01, value * 100): + found = problems(_share(raw, bad, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, bad, found) + assert problems(_share(raw, value * 1e6, "measures x 1,000,000")) == [] + found = problems(_share(raw, value, "measures x 1,000,000")) + assert any("at a stated scale" in p for p in found), (raw, found) + + +@settings(max_examples=500, deadline=None) +@given( + text=st.lists( + st.sampled_from( + ["1", "4", "2.5", "1,000", "1e3", "1e999", ".5", "£", "$", "-", "−", "–"] + + ["—", "+", "%", "(", ")", "in", "every", "out", "of", "to", "and", "a"] + + ["an", "half", "third", "quarters", "one", "four", "twenty", "hundred"] + + ["thousand", "million", "bn", "m", "k", "per", "cent", "percentage"] + + ["point", "about", "over", "year", "gdp", "nil", "no", "change", ","] + + [" ", " ", "\u00a0", "\u200b", "٣", "th", "s"] + ), + max_size=8, + ).map("".join), + value=st.floats(-1e12, 1e12, allow_nan=False), +) +def test_any_string_of_number_parts_gives_a_verdict_never_an_exception(text, value): + """The checker reads any arrangement of these parts whole or reports it, + and never raises.""" + found = problems(_share(text, value, "as printed")) + assert isinstance(found, list) and all(isinstance(p, str) for p in found) + + +@settings(max_examples=300, deadline=None) +@given(tenths=st.integers(-99_999, 99_999), how=st.integers(0, 2)) +def test_a_printed_percentage_is_its_share_to_floating_point_error(tenths, how): + """Final review F2: a share computed from a printed percentage in any + usual way passes, and any value 1e-12 or more away fails.""" + raw = f"{tenths / 10}%" + share = (tenths / 10 / 100, tenths / 1000, float(raw[:-1]) * 0.01)[how] + note = "per cent / 100 -> share" + assert problems(_share(raw, share, note)) == [] + moved = share + (1e-12 if share >= 0 else -1e-12) + assert any("at a stated scale" in p for p in problems(_share(raw, moved, note))) + + +@settings(max_examples=200, deadline=None) +@given(cell=st.integers(-9999, 9999), off=st.integers(1, 10**8), up=st.booleans()) +def test_a_money_cell_passes_only_at_its_exact_value(cell, off, up): + """Delta review D1-1 and final review F2: a cell printed in £ million is + that many millions, to floating-point error (four units in the last + place). £1 off any cell under £10bn fails: the 0.1% rounding allowance + covers a share of a printed fraction, nothing else.""" + raw = str(cell) + quote = f"Line 1 | 2026-27: {raw}" + exact = mutated(value_raw=raw, quote=quote, value=cell * 1e6) + moved = mutated( + value_raw=raw, quote=quote, value=cell * 1e6 + (off if up else -off) + ) + assert problems(exact) == [] + assert any( + "at a stated scale" in p or "opposite sign" in p for p in problems(moved) + ) + + +@pytest.mark.parametrize("sign", [1, -1]) +@pytest.mark.parametrize("toward_zero", [False, True]) +def test_a_printed_number_matches_to_four_units_in_the_last_place(sign, toward_zero): + """Delta review R3: a value one to four units in the last place from + £1.7bn, on either side and with either sign, passes, and one five units + off fails.""" + raw = "-£1.7bn" if sign < 0 else "£1.7bn" + exact = (-1.7 if sign < 0 else 1.7) * 1e9 + target = 0.0 if toward_zero else math.copysign(math.inf, exact) + value = exact + for units in range(1, 6): + value = math.nextafter(value, target) + row = mutated(value_raw=raw, quote=raw, value=value, normalization="£bn x 1e9") + found = problems(row) + if units <= 4: + assert found == [], (units, value, found) + else: + assert any("at a stated scale" in p for p in found), (units, value, found) + + +def test_malformed_rows_are_reported_not_raised(): + """review A H-6(h).""" + for row in ( + mutated(conditions=["fy"]), + mutated(publication=None), + mutated(measure_key=["x"]), + mutated(quote=None), + "not a row", + ): + assert problems(row), row + + +def test_rule_4_holds_whatever_the_title_case(): + row = mutated( + publication__title="Budget 2026: IMPACT ON HOUSEHOLDS", + value_kind="approx_chart_reading", + ) + found = [p for p in problems(row) if "rule 4" in p] + assert found + # the problem says what the locator should start with (cloud review A6) + assert all("paragraph, table, box or data label" in p for p in found) + + +@pytest.mark.parametrize( + ("locator", "bar_reading"), + [ + ("Figure 1.A, decile 3 bar", True), + ("p.5, Figure 1.B, top bar", True), + ("paragraph 1.7, p.8; discussion of Figure 1.A", False), + ("paragraph 1.7; discussion of Figure 1.A", False), + ("Figure 1.A data label, decile 3", False), + ("Table 2.C, decile 3", False), + ("Table 2.C, p.16, decile 1, column 1 adult", False), + ("paragraph 2.4, p.14; source Table 2.B, p.13", False), + # final review F4: a secondary or negated reference names nothing + ("Figure 1.A, decile 3 bar; no data labels", True), + ("Figure 1.A, decile 3 bar; see paragraph 1.7", True), + ("Figure 1.A decile 3 bar, paragraph 1.7", True), + ("Figure 1.A decile 3 bar beside paragraph 1.7", True), + ("Figure 1.A (no data labels), decile 3", True), + ("no data label; paragraph 1.7, Figure 1.A", True), + ("paragraph 1.7; bar reading from Figure 1.A", True), + ("Figure 1.B; data label", True), + ("data label for decile 3, Figure 1.A", False), + # the figure in other spellings, and negations in other words + ("Figures 1.A and 1.B, decile 3 bars", True), + ("Fig. 1.A, decile 3 bar", True), + ("Figure 1A, decile 3 bar", True), + ("fig 1b; top bar", True), + ("Figure 1.A data label missing, decile 3", True), + ("Figure 1.A data label isn't printed", True), + ("Figure 1.A data label absent", True), + ("Figure 1.B lacks a data label", True), + ("Fig. 1A data label, decile 3", False), + ("Figures 1.A and 1.B data labels", False), + ("Figure 1 below; paragraph 1.7", False), + ("Table 2.C; config 1a", False), + # delta review R2: the first reference takes one of a closed list of + # forms, so a qualifier there, even "(not missing)", reads as a bar; + # and a negation right before a bar-reading phrase cancels it + ("Figure 1.A data label unavailable, decile 3", True), + ("Figure 1.A data label (not missing), decile 3", True), + ("paragraph 1.7 approximately; Figure 1.A", True), + ("paragraph 1.7; not a bar reading from Figure 1.A", False), + ("paragraph 1.7; isn't read off Figure 1.A", False), + ("paragraph 1.7; never a chart reading, Figure 1.A", False), + ("paragraph 1.7; a bar reading from Figure 1.A", True), + ("paragraph 1.7; read off Figure 1.A", True), + ("paragraph 1.7; not a bar reading but read off the chart, Figure 1.A", True), + ("paragraphs 1.7 and 1.8; Figure 1.A", False), + ("data labels on Figure 1.B", False), + ("Box 1.A; Figure 1.A", False), + (" paragraph 1.7 ; Figure 1.A", False), + # delta review D5: any spacing, hyphen or case in a bar-reading phrase + ("paragraph 1.7; bar-reading from Figure 1.A", True), + ("paragraph 1.7; BAR READING from Figure 1.A", True), + ("paragraph 1.7; read off the chart from Figure 1.A", True), + ("paragraph 1.7; chart–reading of Figure 1.A", True), + ("paragraph 1.7; bars read by eye, Figure 1.A", True), + ("paragraph 1.7; reading from the chart, Figure 1.A", True), + ("paragraph 1.7; estimated from the figure", True), + ("paragraph 1.7; estimated from Figure 1.A", True), + ("paragraph 1.7; not a bar-reading from Figure 1.A", False), + # a word between the negation and the phrase, or a comma, ends the + # negation (delta review D5) + ("paragraph 1.7; not only a bar reading", True), + ("paragraph 1.7; no, a bar reading", True), + # the figure with a hyphen or a dash in its name + ("Figure 1-A, decile 3 bar", True), + ("Figure 1–B, decile 3 bar", True), + # cloud review A6: forms that name where HM Treasury prints the number + ("Table 2.C and Figure 1.A", False), + ("paragraph 1.7 and Figure 1.A", False), + ("paragraphs 1.7–1.8; Figure 1.A", False), + ("paragraphs 1.7-1.8; Figure 1.A", False), + ("paragraphs 1.7 to 1.8; Figure 1.A", False), + ("Figure 1.A: data label for decile 3", False), + ("Figure 1.A data label decile 3", False), + ("Figure 1.A, data label decile 3", True), + # Sol N2: a double negation affirms, so one negation alone cancels + ("paragraph 1.7; not without a bar reading from Figure 1.A", True), + ("paragraph 1.7; never without reading off the chart", True), + ("paragraph 1.7; isn't not a chart reading", True), + ("paragraph 1.7; no never a graph", True), + ("paragraph 1.7; without a bar reading from Figure 1.A", False), + ("paragraph 1.7; never reading off the chart", False), + ("paragraph 1.7; no, not a bar reading", False), + # Sol N3 and cloud review M2: how we say we took a number off a picture, + # and the same with a negation before the verb + ("paragraph 1.7; read off of the chart in Figure 1.A", True), + ("paragraph 1.7; not read off of the chart in Figure 1.A", False), + ("paragraph 1.7; read directly off the chart", True), + ("paragraph 1.7; not read directly off the chart", False), + ("paragraph 1.7; read off this chart (Figure 1.A)", True), + ("paragraph 1.7; never read off this chart (Figure 1.A)", False), + ("paragraph 1.7; read from that bar", True), + ("paragraph 1.7; not read from that bar", False), + ("paragraph 1.7; we read it off the bar in Figure 1.A", True), + ("paragraph 1.7; we did not read it off the bar", False), + ("paragraph 1.7; we estimated it from the bar", True), + ("paragraph 1.7; we haven't estimated it from the bar", False), + ("paragraph 1.7; read off the decile 3 bar of Figure 1.A", True), + ("paragraph 1.7; not read off the decile 3 bar of Figure 1.A", False), + ("paragraph 1.7; reading of the decile 3 bar, Figure 1.A", True), + ("paragraph 1.7; not a reading of the decile 3 bar, Figure 1.A", False), + ("paragraph 1.7; taken from the chart in Figure 1.A", True), + ("paragraph 1.7; not taken from the chart, Figure 1.A", False), + ("paragraph 1.7; took it from the chart", True), + ("paragraph 1.7; measured from the bar", True), + ("paragraph 1.7; not measured from the bar", False), + ("decile 3: we read it off the chart", True), + ("paragraph 1.7; reads from the chart", True), + ("paragraph 1.7; never reads from the chart", False), + ("paragraph 1.7; reads off the chart", True), + ("paragraph 1.7; readings from the graph", True), + ("paragraph 1.7; read the number off the bar", True), + ("paragraph 1.7; estimated from Figure 1.A", True), + ("paragraph 1.7; isn't estimated from Figure 1.A", False), + ("paragraph 1.7; read off of Figure 1.A", True), + ("paragraph 1.7; isn't read off of Figure 1.A", False), + ("paragraph 1.7; not a bar reading from the figure", False), + ("paragraph 1.7; not a bar reading from the figures", False), + ("paragraph 1.7; not a bar reading off the figure", False), + ("paragraph 1.7; not a bar reading off of the figure", False), + ("paragraph 1.7; reading of Figure 1.A", True), + ("paragraph 1.7; not a reading of Figure 1.A", False), + ("paragraph 1.7; no readings of the chart", False), + ("paragraph 1.7; no readings from the graph", False), + ("paragraph 1.7; not an estimate from the chart", False), + ("paragraph 1.7; never took it from the chart", False), + ("paragraph 1.7; not read the decile 3 off the bar", False), + ("paragraph 1.7; not read off the top decile 3 bar", False), + ("paragraph 1.7; off of Figure 1.A", True), + # any other bar, chart or graph, and any number from a figure, whatever + # the verb; a negation before a verb we don't list cancels nothing + ("paragraph 1.7; decile 3 bar", True), + ("Table 2.C; the chart shows it", True), + ("paragraph 1.7; graph", True), + ("paragraph 1.7; eyeballed from Figure 1.A", True), + ("paragraph 1.7; interpolated from the chart", True), + ("paragraph 1.7; not interpolated from the chart", True), + ("paragraph 1.7; from Figure 1.A", True), + ("paragraph 1.7; off Figure 1.A", True), + ("paragraph 1.7; no bar", False), + ("paragraph 1.7; without a chart", False), + ("paragraph 1.7; not the graph", False), + ("paragraph 1.7; no bars", False), + # words that only look like one, and readings of something else + ("paragraph 1.7; Barnett formula", False), + ("paragraph 1.7; Charter for Budget Responsibility", False), + ("Table 2.C; read with paragraph 1.7", False), + ("paragraph 1.7; taken from Table 2.C", False), + ("paragraph 1.7; read from the text", False), + ("paragraph 1.7; discussion of Figure 1.A", False), + # Sol N6: any dash in a printed place, as in the figure's name + ("Figure 1-A data label", False), + ("Figure 1–A data label", False), + ("Figure 1—B data label", False), + ("Figure 1‑A data label", False), + ("Figure 1‐A data label", False), + ("Figure 1‒A data label", False), + ("Figure 1―A data label", False), + ("Figures 1-A and 1-B data labels", False), + ("Figure 1.A data-label", False), + ("paragraphs 1.7—1.8; Figure 1.A", False), + ("paragraphs 1.7−1.8; Figure 1.A", False), + ("paragraphs 1.7 — 1.8; Figure 1.A", False), + ("Figure 1-A data label unavailable", True), + # cloud review A-L1: each arm of the negation and the printed forms + ("paragraph 1.7; graph reading, Figure 1.A", True), + ("paragraph 1.7; without a graph reading, Figure 1.A", False), + ("paragraph 1.7; it has not been read off the chart, Figure 1.A", False), + ("paragraph 1.7; isn’t read off the chart, Figure 1.A", False), + ("para 1.7; Figure 1.A", False), + ("para. 1.7; Figure 1.A", False), + ("Boxes 1.1 and 1.2; Figure 1.A", False), + ("Figure 1.B data label on quintile 2", False), + # each dash, in a phrase and in a figure's name + ("paragraph 1.7; not a bar–reading from Figure 1.A", False), + ("Figure 1–B, decile 3", True), + ("Figure 1‐A, decile 3", True), + ("Figure 1‑A, decile 3", True), + # plural figures, each kind of picture, and any spacing + ("paragraph 1.7; not read off figures 1.A and 1.B", False), + ("paragraph 1.7; from figures 1.A and 1.B", True), + ("paragraph 1.7; graphs", True), + ("paragraph 1.7; charts", True), + ("paragraph 1.7; not a bar reading from Figure 1.A", False), + # the figure in any spelling, and the number read on, in or using it + ("paragraph 1.7; read off Fig. 1.A", True), + ("paragraph 1.7; estimated from Fig 1A", True), + ("paragraph 1.7; read off Figs. 1.A and 1.B", True), + ("paragraph 1.7; taken from Fig. 1.B, decile 3", True), + ("paragraph 1.7; eyeballed off Fig. 1.A", True), + ("paragraph 1.7; reading of Fig. 1.A", True), + ("paragraph 1.7; bar reading from Fig. 1.A", True), + ("paragraph 1.7; read on Figure 1.A", True), + ("paragraph 1.7; read in Figure 1.A", True), + ("paragraph 1.7; estimated using Figure 1.A", True), + ("paragraph 1.7; measured on Figure 1.A", True), + ("paragraph 1.7; not read off Fig. 1.A", False), + ("paragraph 1.7; not read on Figure 1.A", False), + ("paragraph 1.7; not estimated using Figure 1.A", False), + ("paragraph 1.7; read in the text", False), + ("paragraph 1.7; read on page 8", False), + ("paragraph 1.7; figure in the text", False), + ("paragraph 1.7; configured using the table", False), + # a second negation anywhere earlier in the clause undoes the first, and + # one in an earlier clause doesn't + ("paragraph 1.7; not possible without reading off the chart", True), + ("paragraph 1.7; cannot be had without reading off the chart", True), + ("paragraph 1.7; can't be had without reading off the chart", True), + ("paragraph 1.7; no, not a bar reading", False), + ("paragraph 1.7; no rounding; not a bar reading", False), + ("paragraph 1.7: no rounding: not a bar reading", False), + ("paragraph 1.7 (no rounding) not a bar reading", False), + ("paragraph 1.7; cannot read off the chart", False), + # Sol R1: an abbreviated figure counts as a figure + ("paragraph 1.7; taken from Fig. 1.A", True), + ("paragraph 1.7; taken from Figs. 1.A and 1.B", True), + ("paragraph 1.7; estimated using fig 1.A", True), + ("paragraph 1.7; not taken from Fig. 1.A", False), + ("Fig. 1.A data label", False), + # Sol R8: the rarer ways to say we read a number off a picture + ("paragraph 1.7; estimated from the plot", True), + ("paragraph 1.7; estimated from the diagram", True), + ("paragraph 1.7; taken from the visual", True), + ("paragraph 1.7; visual estimate of Figure 1.A", True), + ("paragraph 1.7; estimate of Figure 1.A", True), + ("paragraph 1.7; Figure 1.A read by eye", True), + ("paragraph 1.7; read by eye", True), + ("paragraph 1.7; by eye", True), + ("paragraph 1.7; estimated from the plots", True), + ("paragraph 1.7; estimated from the diagrams", True), + ("paragraph 1.7; taken from the visuals", True), + ("paragraph 1.7; column 3 of Figure 1.A", True), + ("paragraph 1.7; columns 3-4 of Figure 1.A", True), + ("paragraph 1.7; the column on Fig. 1.A", True), + ("paragraph 1.7; the third column in Fig. 1.A", True), + ("paragraph 1.7; not estimated from the plot", False), + ("paragraph 1.7; no diagram", False), + ("paragraph 1.7; no visual estimate of Figure 1.A", False), + ("paragraph 1.7; not read by eye", False), + ("paragraph 1.7; Figure 1.A not read by eye", False), + ("paragraph 1.7; no column of Figure 1.A", False), + # a column of a table prints its number + ("Table 2.1, column 3", False), + ("paragraph 1.7; column 3 of Table 2.1", False), + ("paragraph 1.7; subcolumn of Figure 1.A", False), + ("paragraph 1.7; nearby eye", False), + ("paragraph 1.7; by eyewitnesses", False), + ("paragraph 1.7; Table 2.1 column 3", False), + # Sol R7: a negation in capitals reads the same + ("paragraph 1.7; NOT a bar reading", False), + ("paragraph 1.7; NEVER read off the chart", False), + ("paragraph 1.7; DIDN'T read it off the chart", False), + ("paragraph 1.7; NOT WITHOUT a bar reading", True), + ("paragraph 1.7; NOT possible WITHOUT reading off the chart", True), + # the cloud review of 3c65fd7a: Figure 1(a) names Figure 1.A + ("Figure 1(a), decile 3", True), + ("Figure 1 (a), decile 3", True), + ("Fig. 1(b)", True), + ("paragraph 1.7; Figure 1(a)", False), + # the cloud review of 82068821: a bracketed letter names the figure in a + # data label too + ("Figure 1(a) data label", False), + ("Figure 1 (a) data label", False), + ("Figures 1(a) and 1(b) data labels", False), + ("Figures 1.A and 1(b) data labels", False), + ("data label for Figure 1(b)", False), + ("paragraph 1.7 and Figure 1(a)", False), + ("Figure 1(a)", True), + ("Figure 1(a) bar", True), + # a number right after the word still names a figure + ("paragraph 1.7; read off fig1a", True), + ("paragraph 1.7; read off figure1.A", True), + ("paragraph 1.7; read off Fig1A", True), + ("paragraph 1.7; column 3 of fig1a", True), + ("paragraph 1.7; estimated using figure1.B", True), + # a word that starts like a figure or a picture doesn't count + ("paragraph 1.7; taken from the figurehead", False), + ("paragraph 1.7; read off the barometer", False), + ("paragraph 1.7; figures taken from Table 2.C", False), + ("paragraph 1.7; configured using the table", False), + # Sol's review of 82068821: punctuation before the figure doesn't hide it + ("paragraph 1.7; estimated using (Figure 1.A)", True), + ("paragraph 1.7; estimated using: Figure 1.A", True), + ("paragraph 1.7; estimated using(Figure 1.A)", True), + ("paragraph 1.7; read from [Figure 1.A]", True), + ("paragraph 1.7; read off: Fig. 1.A", True), + ("paragraph 1.7; read off:Fig. 1.A", True), + ("paragraph 1.7; read from(Figure 1.A)", True), + ("paragraph 1.7; read from ( Figure 1.A)", True), + ("paragraph 1.7; read from: [Figure 1.A]", True), + ("paragraph 1.7; read from (the Figure 1.A)", True), + ('paragraph 1.7; read from "Figure 1.A"', True), + ("paragraph 1.7; read from 'Figure 1.A'", True), + ("paragraph 1.7; read from “Figure 1.A”", True), + ("paragraph 1.7; read from ‘Figure 1.A’", True), + ("paragraph 1.7; from [Figure 1.A]", True), + ("paragraph 1.7; from: Figure 1.A", True), + ("paragraph 1.7; column 3 of (Figure 1.A)", True), + ("paragraph 1.7; column 3 of: Figure 1.A", True), + # brackets and quotes in a row, and before a word + ('paragraph 1.7; read from ("Figure 1.A")', True), + ("paragraph 1.7; read off ([Figure 1.A])", True), + ('paragraph 1.7; read off ( "Figure 1.A")', True), + ('paragraph 1.7; read from ("the Figure 1.A")', True), + ("paragraph 1.7; read from ( the Figure 1.A", True), + ("paragraph 1.7; read from [the Figure 1.A]", True), + ('paragraph 1.7; read from "the Figure 1.A"', True), + ("paragraph 1.7; read from 'the Figure 1.A'", True), + ("paragraph 1.7; read from “the Figure 1.A”", True), + ("paragraph 1.7; read from ‘the Figure 1.A’", True), + # a word that holds an apostrophe or a dot, or ends a bracket + ("paragraph 1.7; taken from ... Figure 1.A", True), + ("paragraph 1.7; taken from p.3 of Figure 1.A", True), + ("paragraph 1.7; taken from HMT's Figure 1.A", True), + ("paragraph 1.7; taken from HM Treasury’s Figure 1.A", True), + ("paragraph 1.7; read from (HMT) Figure 1.A", True), + ("paragraph 1.7; read from [HMT] Figure 1.A", True), + # and one negation still cancels the phrase + ('paragraph 1.7; not read from ("Figure 1.A")', False), + ("paragraph 1.7; not read off ([Figure 1.A])", False), + ("paragraph 1.7; not read from [the Figure 1.A]", False), + ('paragraph 1.7; not read from "the Figure 1.A"', False), + ("paragraph 1.7; not read from 'the Figure 1.A'", False), + ("paragraph 1.7; not read from “the Figure 1.A”", False), + ("paragraph 1.7; not read from ‘the Figure 1.A’", False), + ("paragraph 1.7; not taken from HMT's Figure 1.A", False), + ("paragraph 1.7; not taken from HM Treasury’s Figure 1.A", False), + ("paragraph 1.7; not read from (HMT) Figure 1.A", False), + ("paragraph 1.7; not read from [HMT] Figure 1.A", False), + ('paragraph 1.7; not read from ("the Figure 1.A")', False), + ("paragraph 1.7; not read from ( the Figure 1.A", False), + # A word before the figure may end a double quote or several brackets. + ('paragraph 1.7; read off the "Impact on households" Figure 1.A', True), + ("paragraph 1.7; read off the “Impact on households” Figure 1.A", True), + ("paragraph 1.7; read from ((HMT)) Figure 1.A", True), + ('paragraph 1.7; read from "HMT" Figure 1.A', True), + ("paragraph 1.7; read from (“HMT”) Figure 1.A", True), + # Up to four words stand between "from" and the figure. + ("paragraph 1.7; read from a b c d Figure 1.A", True), + ("paragraph 1.7; read from a b c d e Figure 1.A", False), + ('paragraph 1.7; not read off the "Impact on households" Figure 1.A', False), + ('paragraph 1.7; not read from "HMT" Figure 1.A', False), + ("paragraph 1.7; not read from (“HMT”) Figure 1.A", False), + ("paragraph 1.7; not read from ((HMT)) Figure 1.A", False), + # a comma ends the words before a figure + ("paragraph 1.7; figures from Table 2.C, Figure 1.A data label", False), + ("paragraph 1.7; not read from [Figure 1.A]", False), + ("paragraph 1.7; not read off: Fig. 1.A", False), + ("paragraph 1.7; no bar reading from: Figure 1.A", False), + ("paragraph 1.7; no bar reading from [Figure 1.A]", False), + # and a table in brackets still prints its number + ("paragraph 1.7; figures from (Table 2.C)", False), + ("paragraph 1.7; read from [Table 2.C]", False), + ("paragraph 1.7; read off: Table 2.C", False), + # a full stop ends a clause + ("paragraph 1.7. No rounding. Not a bar reading", False), + ("paragraph 1.7; no. 5 not a bar reading", False), + # plurals count + ("paragraph 1.7; the decile bars", True), + # a word that holds a negation isn't one, and a bracket ends a clause + ("paragraph 1.7; casino not a bar reading", False), + ("paragraph 1.7; note not a bar reading", False), + ("paragraph 1.7; no rounding (not a bar reading)", False), + # each earlier negation counts + ("paragraph 1.7; without doubt not a bar reading", True), + ("paragraph 1.7; didn’t say not a bar reading", True), + # any phrase that stands decides, and a verb starts at a word's start + ("paragraph 1.7; a bar reading but not a chart reading", True), + ("paragraph 1.7; spread from no chart", False), + ], +) +def test_rule_4_reads_where_the_locator_places_the_number(locator, bar_reading): + """README rule 4: a locator that places the number on Figure 1.A's or + 1.B's bars marks a bar reading; one whose first reference names the + paragraph, table or data label printing it doesn't (delta review D1: + red book row 357's 20% sits in paragraph 1.7; final review F4; delta + review R2).""" + row = mutated( + publication__title="Budget 2026: Impact on households", + publication__locator=locator, + ) + assert any("rule 4" in p for p in problems(row)) == bar_reading + + +@pytest.mark.parametrize( + "negated", + [ + "no data labels", + "not a data label", + "none of its data labels", + "never a data label", + "without data labels", + "data label missing", + "data label absent", + "lacks a data label", + "lacking data labels", + "unlabelled data label", + "data label: unlabeled bars", + "data label isn't printed", + "data label isn’t printed", + ], +) +def test_rule_4_reads_a_negated_data_label_as_a_bar_reading(negated): + """Final review F4 and delta review R2: a first reference with any word + after its data label, a negation included, places the number on a bar.""" + assert reads_a_bar(f"Figure 1.A {negated}") + assert not reads_a_bar("Figure 1.A data label") + + +# Leading references that say where HM Treasury prints a number, and ones +# that don't; and the parts of a locator that name Figure 1.A or 1.B. +PRINTING = [ + "paragraph 1.7", + "paragraphs 1.7 and 1.8", + "Table 2.C", + "Table 2.C and Figure 1.A", + "Box 1.A", + "Figure 1.A data label", + "Fig. 1B data labels", + "data label", + "data label for decile 3", + "data labels for Figure 1.B", +] +NOT_PRINTING = [ + "Figure 1.B", + "Figures 1.A and 1.B", + "Figure 1.A, decile 3 bar", + "p.8", + "no data labels", + "data label missing", + "Figure 1.A data label isn't shown", + "Figure 1.A data label unavailable", + "Figure 1.A data label (not missing)", + "paragraph 1.7 approximately", +] +NAMES_FIGURE = { + "Figure 1.A data label", + "Fig. 1B data labels", + "data labels for Figure 1.B", + "Figure 1.B", + "Figures 1.A and 1.B", + "Figure 1.A, decile 3 bar", + "Figure 1.A data label isn't shown", + "Figure 1.A data label unavailable", + "Figure 1.A data label (not missing)", + "Table 2.C and Figure 1.A", + "discussion of Figure 1.A", + "fig 1a", +} + + +@settings(max_examples=300, deadline=None) +@given( + lead=st.sampled_from(PRINTING + NOT_PRINTING), + rest=st.lists( + st.sampled_from( + [ + "p.8", + "see paragraph 1.7", + "no data labels", + "discussion of Figure 1.A", + "fig 1a", + "decile 3", + "data label", + "Table 2.C", + "not a bar reading", + "never read off the chart", + "isn't a chart reading", + ] + ), + max_size=3, + ), + affirm=st.booleans(), +) +def test_rule_4_follows_the_leading_reference(lead, rest, affirm): + """Final review F4 and delta review R2: where a locator names Figure 1.A + or 1.B, in any spelling, only a first reference in one of the forms + PRINTING lists places the number where HM Treasury prints it, and + anything later in the locator places nothing. A bar-reading phrase + anywhere marks a bar reading, unless a negation comes right before it.""" + locator = "; ".join([lead, *rest, *(["a bar reading"] if affirm else [])]) + names_figure = any(part in NAMES_FIGURE for part in [lead, *rest]) + assert reads_a_bar(locator) == (affirm or (names_figure and lead not in PRINTING)) + + +def test_a_component_with_its_measure_or_a_proposed_key_is_valid(): + """README rule 9: a part of one measure keeps that measure's key; a part + of a measure with no Table 6.1 line keeps that measure's proposed key.""" + keyed = mutated( + conditions__row_type="measure_component", conditions__component="Wales" + ) + proposed = mutated( + measure_key=None, + conditions__row_type="measure_component", + conditions__component="Capital AME", + conditions__proposed_measure_key="ab2026__package_fiscally_neutral_x", + ) + assert problems(keyed) == [] + assert problems(proposed) == [] + + +@settings(max_examples=200, deadline=None) +@given(start=st.integers(1945, 2073), offset=st.integers(-3, 3)) +def test_an_fy_row_is_valid_only_at_the_fy_end_year(start, offset): + fy = f"{start}-{(start + 1) % 100:02d}" + row = mutated(conditions__fy=fy, period=start + 1 + offset) + end_year_problem = any("is not the end year" in p for p in problems(row)) + assert end_year_problem == (offset != 0) + + +@settings(max_examples=200, deadline=None) +@given( + words=st.integers(1, 40), + source=st.sampled_from(["ifs", "resolution_foundation", *sorted(OGL)]), +) +def test_only_ogl_quotes_may_run_to_15_words(words, source): + """README rule 6: under 15 words outside the Open Government Licence.""" + row = mutated(source=source, quote=" ".join(["-2625"] * words)) + long_quote = any("15 or more words" in p for p in problems(row)) + assert long_quote == (source not in OGL and words >= 15) + + +def _write(fam, rows): + buf = io.BytesIO() + with gzip.GzipFile(fileobj=buf, mode="wb", mtime=0, filename="") as gz: + for r in rows: + gz.write((json.dumps(r, sort_keys=True) + "\n").encode()) + (fam / "claims_staged.jsonl.gz").write_bytes(buf.getvalue()) + + +def _family_with_a_proposed_key( + tmp_path, notes_extra, key="ab2026__package_test_scope" +): + fam = tmp_path / "uk_test_family" + shutil.copytree(FAMILY, fam) + rows = read_rows(fam) + i = rows.index(BASE) + rows[i]["measure_key"] = None + rows[i]["conditions"]["proposed_measure_key"] = key + buf = io.BytesIO() + with gzip.GzipFile(fileobj=buf, mode="wb", mtime=0, filename="") as gz: + for r in rows: + gz.write((json.dumps(r, sort_keys=True) + "\n").encode()) + (fam / "claims_staged.jsonl.gz").write_bytes(buf.getvalue()) + with (fam / "NOTES.md").open("a") as fh: + fh.write(notes_extra) + return fam + + +def test_a_family_scopes_every_proposed_key_it_uses_in_its_notes(tmp_path): + unscoped = _family_with_a_proposed_key(tmp_path / "a", "") + scoped = _family_with_a_proposed_key( + tmp_path / "b", "\n- `ab2026__package_test_scope`: Table 6.1 line 1.\n" + ) + assert family_problems(unscoped) == [ + "NOTES.md does not give the scope of ab2026__package_test_scope" + ] + assert family_problems(scoped) == [] + + +def test_a_scope_for_a_longer_key_does_not_scope_its_prefix(tmp_path): + """review A H-6(g): NOTES scopes a key as a whole token.""" + fam = _family_with_a_proposed_key( + tmp_path, + "\n- `ab2026__package_test_scope_wider`: Table 6.1 lines 1-2.\n", + key="ab2026__package_test_scope", + ) + assert family_problems(fam) == [ + "NOTES.md does not give the scope of ab2026__package_test_scope" + ] + + +def _family_with_copies(tmp_path, n, factor=1.0): + fam = tmp_path / "uk_test_family" + shutil.copytree(FAMILY, fam) + rows = read_rows(fam) + i = rows.index(BASE) + extra = copy.deepcopy(BASE) + extra["value"] = BASE["value"] * factor + rows[i + 1 : i + 1] = [copy.deepcopy(extra) for _ in range(n)] + _write(fam, rows) + return fam + + +def test_three_printings_of_one_claim_are_a_problem(tmp_path): + """review A H-3: the AB2025 ingest merges two rows that share a claim + identity and raises on three (red book rows 179, 191 and 200).""" + assert family_problems(_family_with_copies(tmp_path / "a", 1)) == [] + triple = family_problems(_family_with_copies(tmp_path / "b", 2)) + assert len(triple) == 1 and "more than 2" in triple[0], triple + + +def test_a_pair_that_disagrees_is_a_problem(tmp_path): + # a value off by 1% (value_raw unchanged) is also a value_raw mismatch + found = family_problems(_family_with_copies(tmp_path, 1, factor=1.01)) + assert any("differ by over 0.5%" in p for p in found), found + + +def _family(tmp_path): + fam = tmp_path / "uk_test_family" + shutil.copytree(FAMILY, fam) + return fam + + +def _rewrite_manifest(fam, edit): + lines = [ + json.loads(x) for x in (fam / "manifest.jsonl").read_text().splitlines() if x + ] + lines = edit(lines) + (fam / "manifest.jsonl").write_text("".join(json.dumps(m) + "\n" for m in lines)) + + +@pytest.mark.parametrize( + ("edit", "expected"), + [ + (lambda m: [{**m[0], "sha256": "abc"}, *m[1:]], "sha256 is not a sha256"), + (lambda m: [{**m[0], "retrieved": ""}, *m[1:]], "needs url, title"), + # a field that isn't text, and a problem that names its line when the + # url isn't text + (lambda m: [{**m[0], "title": 5}, *m[1:]], "needs url, title"), + (lambda m: [{**m[0], "retrieved": " "}, *m[1:]], "needs url, title"), + ( + lambda m: [{**m[0], "url": ["x"]}, *m[1:]], + "manifest line 0: needs url, title and retrieved as text", + ), + ( + lambda m: [*m[:1], {**m[1], "url": 7, "sha256": "abc"}, *m[2:]], + "manifest line 1: sha256 is not a sha256", + ), + (lambda m: [*m, m[0]], "lists a primary twice"), + (lambda m: m[1:], "primary_sha256 is not in manifest.jsonl"), + (lambda m: [*m, "not an object"], "a line that is not an object"), + ], +) +def test_each_manifest_rule_broken_is_a_problem(tmp_path, edit, expected): + """review A H-7: the manifest checks, reached by a test.""" + fam = _family(tmp_path) + _rewrite_manifest(fam, edit) + found = family_problems(fam) + assert any(expected in p for p in found), found[:5] + + +def test_a_family_missing_a_file_is_a_problem(tmp_path): + fam = _family(tmp_path) + (fam / "NOTES.md").unlink() + assert family_problems(fam) == ["uk_test_family: missing ['NOTES.md']"] + + +@pytest.mark.parametrize( + ("extra", "expected"), + [ + # a copy of the base row whose value is a string: the pair check + # compares the two values + ([{**BASE, "value": "-2625000000"}], "value is not a number"), + (["not a row", None], "row is not an object"), + ( + [mutated(measure_key=None, conditions__proposed_measure_key=["ab2026__x"])], + "condition 'proposed_measure_key' is not a string", + ), + ( + [mutated(publication__primary_sha256=["abc"])], + "primary_sha256 is not in manifest.jsonl", + ), + # final review F3: a copy of the base row without its value, and one + # whose value is an integer too large for a float, pair with it + ([{k: v for k, v in BASE.items() if k != "value"}], "missing fields"), + ([{**BASE, "value": 10**400}], "value is not finite"), + ], +) +def test_a_family_reports_malformed_rows_without_raising(tmp_path, extra, expected): + """Delta review D1-3 and final review F3: family_problems reports a + malformed row as row_problems does. The pair check, the proposed-key + scope check and the manifest lookup skip a value, key or hash they can't + compare.""" + fam = _family(tmp_path) + _write(fam, read_rows(fam) + extra) + found = family_problems(fam) + assert any(expected in p for p in found), found[:5] + + +def test_a_family_reports_unreadable_lines_and_files(tmp_path): + """Final review F3: a line that isn't JSON, or a file that can't be read, + is a problem, never an exception.""" + fam = _family(tmp_path) + gz = fam / "claims_staged.jsonl.gz" + text = gzip.decompress(gz.read_bytes()).decode() + gz.write_bytes(gzip.compress((text + "{not json\n").encode(), mtime=0)) + (fam / "manifest.jsonl").write_text((fam / "manifest.jsonl").read_text() + "[1,\n") + found = family_problems(fam) + assert [p for p in found if p.startswith("row 768")] == ["row 768: is not JSON"] + assert [p for p in found if p.startswith("manifest")] == [ + "manifest line 2: is not JSON" + ] + gz.write_bytes(b"not gzip") + found = family_problems(fam) + assert "claims_staged.jsonl.gz cannot be read (BadGzipFile)" in found, found[:5] + + +def test_a_field_nested_too_deep_to_print_is_a_problem(): + """Final review F3: a field nested too deep to print, or to encode as a + claim identity, is a problem, never an exception.""" + deep = [] + for _ in range(100_000): + deep = [deep] + assert problems(mutated(period=deep)) == ["period is not an integer"] + locator = mutated(publication__locator=deep) + assert problems(locator) == ["publication.locator is not a string"] + assert problems(mutated(invented=deep)) == ["unknown fields ['invented']"] + nested = mutated(conditions__geography_note=deep) + assert problems(nested) == ["condition 'geography_note' is not a string"] + assert duplicate_problems([nested, nested]) == [] + + +# Any JSON value, with the integers JSON allows but a float can't hold. +JSON = st.recursive( + st.none() + | st.booleans() + | st.integers() + | st.floats() + | st.text(max_size=12) + | st.sampled_from([10**400, -(10**400), "1 in 4", "-2,625", ""]), + lambda inner: ( + st.lists(inner, max_size=3) + | st.dictionaries(st.text(max_size=8), inner, max_size=3) + ), + max_leaves=8, +) +FIELDS = sorted( + [*BASE] + + [f"conditions__{k}" for k in BASE["conditions"]] + + [f"publication__{k}" for k in BASE["publication"]] +) + + +def _changed(changes): + """BASE with each field set to a value, or deleted (...), nested fields + first, so a later change to their parent can't strand them.""" + row = copy.deepcopy(BASE) + for path in sorted(changes, key=lambda p: -p.count("__")): + *parents, leaf = path.split("__") + target = row + for p in parents: + target = target[p] + if changes[path] is ...: + target.pop(leaf, None) + else: + target[leaf] = changes[path] + return row + + +# The AB2025 row contract's types, from its README, written out here apart +# from the checker's own lists (delta review R4): each field with the types +# it allows. +STRING_FIELDS = [ + "source", + "source_model", + "value_raw", + "normalization", + "value_kind", + "time_basis", + "attribution", + "benchmark_class", + "quote", + "parse_confidence", + "status", +] +NULLABLE_FIELDS = [ + "reform_hint", + "measure_key", + "baseline_policy", + "source_table", + "source_column", + "metric", + "proposed_metric", + "unit_concept", + "proposed_unit", + "proposed_baseline", + "note", + "local_artifact", +] +PUBLICATION_FIELDS = [ + "title", + "url", + "date", + "publisher", + "primary_sha256", + "locator", + "access", +] +TYPED = ( + [(f, (str,)) for f in STRING_FIELDS] + + [(f, (str, type(None))) for f in NULLABLE_FIELDS] + + [(f"publication__{f}", (str, type(None))) for f in PUBLICATION_FIELDS] + + [(f"conditions__{k}", (str,)) for k in BASE["conditions"]] + + [("period", (int,)), ("value", (int, float))] + + [("conditions", (dict,)), ("publication", (dict,))] +) + + +def _named(path): + """How a problem names a field: "quote", "publication.url" or "condition + 'fy'".""" + if path.startswith("publication__"): + return "publication." + path.split("__")[1] + if path.startswith("conditions__"): + return f"condition {path.split('__')[1]!r}" + return path + + +@pytest.mark.parametrize("field", NULLABLE_FIELDS) +def test_a_nullable_field_takes_null_or_a_string(field): + """Delta review R4: null or a string passes in each field the contract + lets us leave empty.""" + assert type_problems(mutated(**{field: None})) == [] + assert type_problems(mutated(**{field: "x"})) == [] + + +@pytest.mark.parametrize("field", STRING_FIELDS) +def test_a_string_field_takes_no_null(field): + """Delta review R4: null fails in each field that needs a string.""" + assert type_problems(mutated(**{field: None})) == [f"{field} is not a string"] + + +@settings(max_examples=500, deadline=None) +@given(data=st.data(), typed=st.sampled_from(TYPED)) +def test_a_field_of_a_type_the_contract_doesnt_allow_is_a_problem(data, typed): + """Delta review R4, for every field the AB2025 row contract types: any + JSON value of another type gives a problem that names the field.""" + path, allowed = typed + value = data.draw( + JSON.filter(lambda v: isinstance(v, bool) or not isinstance(v, allowed)) + ) + found = problems(_changed({path: value})) + assert any(p.startswith(f"{_named(path)} is not") for p in found), ( + path, + value, + found, + ) + + +@settings(max_examples=400, deadline=None) +@given( + changes=st.dictionaries( + st.sampled_from(FIELDS), JSON | st.just(...), min_size=1, max_size=4 + ) +) +def test_changing_or_deleting_fields_never_raises(changes): + """Final review F3, for every input: changing or deleting fields does not + make row validation, duplicate checking or proposed-key discovery raise + an exception, for a row alone or next to copies of itself and BASE.""" + row = _changed(changes) + found = problems(row) + assert isinstance(found, list) and all(isinstance(p, str) for p in found) + pairs = duplicate_problems([BASE, row]) + duplicate_problems([row, row]) + assert all(isinstance(p, str) for p in pairs) + assert isinstance(proposed_keys([row, BASE]), set) + + +@settings(max_examples=200, deadline=None) +@given(row=JSON) +def test_any_json_value_as_a_row_gives_problems_never_an_exception(row): + found = problems(row) + assert found and all(isinstance(p, str) for p in found) + assert all(isinstance(p, str) for p in duplicate_problems([row, row, BASE])) + assert isinstance(proposed_keys([row]), set) + + +@settings(max_examples=60, deadline=None) +@given(lines=st.lists(JSON.map(json.dumps) | st.text(max_size=30), max_size=4)) +def test_any_family_file_gives_problems_never_an_exception(lines): + """Final review F3: family_problems reads any line, JSON or not.""" + with tempfile.TemporaryDirectory() as d: + fam = Path(d) / "uk_fuzz" + fam.mkdir() + (fam / "NOTES.md").write_text("Fuzzed family.\n") + shutil.copy(FAMILY / "manifest.jsonl", fam / "manifest.jsonl") + body = "".join( + line.replace("\n", " ").replace("\r", " ") + "\n" + for line in [json.dumps(BASE), *lines] + ) + (fam / "claims_staged.jsonl.gz").write_bytes( + gzip.compress(body.encode(), mtime=0) + ) + found = family_problems(fam) + assert all(isinstance(p, str) for p in found) + + +@pytest.mark.parametrize("dash", "-−–—‐‑‒―") +def test_rule_4_reads_each_dash_as_a_space(dash): + """The checker reads a phrase and its negation through any dash.""" + assert reads_a_bar(f"paragraph 1.7; read by{dash}eye") + assert not reads_a_bar(f"paragraph 1.7; not{dash}a bar reading") + + +@pytest.mark.parametrize( + "op", + [ + "x", + "×", + "*", + "/", + "÷", + "times", + "times by", + "times by", + "multiplied by", + "multiply by", + "multiplying by", + "divided by", + "divide by", + "dividing by", + "scaled by", + "scale by", + "scaling by", + "x by", + "× by", + "* by", + "/ by", + "÷ by", + ], +) +@pytest.mark.parametrize( + "operand", + [ + "(1e6)", + "( 1e6)", + "(.5)", + "[1e6]", + "'1e6'", + '"1e6"', + "‘1e6’", + "“1e6”", + "+1e6", + "-1e6", + "−1e6", + "–1e6", + "—1e6", + "‐1e6", + "‑1e6", + "‒1e6", + "―1e6", + "(-1)", + "£1,000", + "$1,000", + "€1,000", + "one", + "twenty-five", + "one million", + "(one million)", + "(-one million)", + "(a million)", + "[one million]", + "'one million'", + '"one million"', + "‘one million’", + "“one million”", + "-one million", + "+one million", + "£one million", + "a million", + "a hundred", + "hundred", + "thousand", + "million", + "billion", + "trillion", + "zero", + "half", + "a half", + "a quarter", + "another half", + "three-quarters", + ], +) +def test_an_operand_the_checker_cant_read_is_a_problem_at_any_value(op, operand): + """Sol's review of 82068821 and both of 4707e917: the checker never scales by 1, + or by part of a chain, past an operation on a bracket, a quote, a sign, a currency + sign or number words, or an operation in words.""" + notes = [ + f"{op} {operand}", + f"as printed; {op} {operand}", + f"({op} {operand})", + f"[{op} {operand}]", + f"x 1e6 {op} {operand}", + ] + if len(op) == 1: + notes.append(f"{op}{operand}") + for note in notes: + for value in (4, 4e6): + found = problems(_share("4", value, note)) + assert any("a factor in normalization" in p for p in found), (note, value) + + +def test_a_long_run_of_quotes_stays_quick_to_read(): + """If a quote could both open a word and stand as a bracket, the reading's time + would grow with about the fifth power of the locator's length.""" + started = time.monotonic() + for run in ("' ", '"a" ', 'a" ', "“a” ", "(a)) "): + assert not reads_a_bar("paragraph 1.7; read from " + run * 120), run + assert time.monotonic() - started < 2 + + +@pytest.mark.parametrize( + ("raw", "value"), + [ + ("4m", 4e6), + ("1 in 4", 0.25), + ("a half", 0.5), + ("nil", 0), + ("4%", 0.04), + ("two and a half", 2.5), + ("half a million", 5e5), + ], +) +def test_an_unread_factor_is_a_problem_whatever_the_number_owns(raw, value): + """Sol's review of 4707e917: the checker reports a factor it can't read before it + looks at the number's own multiplier, its share or its nil.""" + found = problems(_share(raw, value, "times 1,000")) + assert any("a factor in normalization" in p for p in found), (raw, found) + + +@pytest.mark.parametrize( + "note", + [ + "as printed", + "x-axis", + "4x", + "box 5", + "box (5)", + "box one", + "cell 2/3", + "and/or 5", + "4x (5)", + "x onerous", + "x millions", + "/ thousands", + "x (see note)", + "* see note", + "* (note 5)", + "x + y", + "£x million", + "printed as a fall ('lower' / 'fall' / 'drop')", + "sometimes 5", + "3 times the figure", + "times onerous", + "divided by region", + "multiplied by the rate", + "scaled by region", + "multiply by the rate", + "x by y", + "printed fraction two-thirds -> share 2/3", + "£m×rate", + "£m*rate", + "x**2", + "2026/27", + "2/3", + "and/or", + "a;x y", + "(b)/c", + "tax 5", + "lax: y", + ], +) +def test_an_ordinary_note_states_no_factor(note): + """A note that holds an operator or a number beside other words scales nothing, + and the checker reports nothing about a factor.""" + assert problems(_share("4", 4, note)) == [], note + found = problems(_share("4", 4e6, note)) + assert any("at a stated scale" in p for p in found), (note, found) + + +@pytest.mark.parametrize( + ("raw", "value", "wrong"), + [ + ("2 and a half k", 2500, 2.5), + ("2 and a half m", 2.5e6, 2500), + ("2 and a half mn", 2.5e6, 2500), + ("2 and a half bn", 2.5e9, 2.5e6), + ("2 and a half tn", 2.5e12, 2.5e9), + ("2 and a half-bn", 2.5e9, 2.5e6), + ("two and a half thousand", 2500, 2.5), + ("two and a half million", 2.5e6, 2500), + ("two and a half billion", 2.5e9, 2.5e6), + ("two and a half trillion", 2.5e12, 2.5e9), + ], +) +def test_a_whole_number_with_a_fraction_reads_each_multiplier(raw, value, wrong): + """Sol's review of 82068821: its own multiplier scales it.""" + assert problems(_share(raw, value, "as printed")) == [] + found = problems(_share(raw, wrong, "as printed")) + assert any("at a stated scale" in p for p in found), (raw, found) diff --git a/tests/test_ab2026_registry.py b/tests/test_ab2026_registry.py new file mode 100644 index 000000000..223996351 --- /dev/null +++ b/tests/test_ab2026_registry.py @@ -0,0 +1,264 @@ +"""The Autumn Budget 2026 measure registry (#230). + +data/uk/ab2026_measures.json is the key space every AB2026 claim carries in +measure_key, and the computability verdict that decides whether a producer's +row gets a PolicyEngine counterpart or a pe_gap finding. These tests pin the +rules the port depends on: every Table 6.1 line once under a key that cannot +move, every gap with a computed name search at the Budget-day engine, every +dashboard measure tied to a receipt by hash, packages that are exactly the +union of their legs, and an outcome for every pre-event key. +""" + +import hashlib +import json +import os +import re +import subprocess +from pathlib import Path + +import pytest + +from pipeline import ab2026_measure_keys as K +from pipeline.validate_budget_2026_registry import key_prefix, load, validate + +ROOT = Path(__file__).resolve().parent.parent +PATH = ROOT / "data" / "uk" / "ab2026_measures.json" +REG = load(PATH) +BY_KEY = {m["measure_key"]: m for m in REG["measures"]} +PIN = "2.151.0" + +# The seven measures the UK Autumn Budget dashboard ran on Budget day, by +# Table 6.1 line and dashboard id. +DASHBOARD = { + 1: "household_energy_payment_2026", + 2: "domestic_electricity_zero_vat", + 3: "fuel_duty_rise_deferral", + 7: "carers_allowance_earnings_taper", + 15: "trading_allowance_raise", + 52: "state_pension_income_tax_protection", + 61: "property_income_rates_up", +} + + +def by_line(line): + return BY_KEY[K.key(line)] + + +def test_registry_validates(): + assert validate(REG) == len(REG["measures"]) + assert REG["fiscal_event"] == "autumn_budget_2026" + assert key_prefix(REG) == "ab2026__" + + +def test_every_table_61_line_is_registered_once_under_its_written_out_key(): + lines = sorted(m["table_61_line"] for m in REG["measures"] if "table_61_line" in m) + assert lines == list(range(1, 99)) + for line, slug in K.TABLE_61.items(): + m = BY_KEY[K.PREFIX + slug] + assert m["table_61_line"] == line, slug + + +def test_table_62_maps_to_table_61_measures_except_sovereign_ai(): + """Table 6.2 lines are financial transactions of Table 6.1 measures; only + line 4 has no Table 6.1 line and so is a measure of its own.""" + own = [m for m in REG["measures"] if "table_62_line" in m] + assert [m["table_62_line"] for m in own] == [4] + for line, slug in K.TABLE_62.items(): + assert K.PREFIX + slug in BY_KEY, (line, slug) + + +def test_keys_are_unique_and_disjoint_from_the_pre_event_registry(): + keys = [m["measure_key"] for m in REG["measures"]] + assert len(keys) == len(set(keys)) + pre = load(ROOT / "data" / "uk" / "budget_2026_measures.json") + assert not set(keys) & {m["measure_key"] for m in pre["measures"]} + + +def test_every_pre_event_key_has_an_outcome_that_names_real_keys(): + pre = load(ROOT / "data" / "uk" / "budget_2026_measures.json") + outcomes = REG["pre_event_outcomes"] + assert set(outcomes) == {m["measure_key"] for m in pre["measures"]} + for k, text in outcomes.items(): + for named in re.findall(r"\(?(ab2026__[a-z0-9_]+)\)?", text): + assert named in BY_KEY, (k, named) + + +def test_every_gap_has_a_computed_name_search_at_the_pin_and_somewhere_to_go(): + for m in REG["measures"]: + if m["computability"] != "not_expressible": + continue + k = m["measure_key"] + assert re.match(r"https://github\.com/PolicyEngine/", m["action_link"]), k + assert m["pe_reform_delta"] is None, k + assert m["why"].strip(), k + ns = m["name_search"] + assert "Parameters:" in ns and "Variables:" in ns and "VARIABLE" in ns, k + assert f"policyengine-uk {PIN}" in ns, k + assert bool(m.get("out_of_model_scope")) != bool( + m.get("policyengine_uk_development_item") + ), k + + +def test_development_items_name_their_upstream_item(): + devs = [m for m in REG["measures"] if m.get("policyengine_uk_development_item")] + assert len(devs) == REG["triage"]["policyengine_uk_development_item"] + for m in devs: + assert m["upstream_item"].startswith("policyengine-uk:"), m["measure_key"] + + +def test_the_triage_counts_are_computed_from_the_measures(): + t = REG["triage"] + ms = REG["measures"] + for verdict in ("expressible", "partial", "not_expressible"): + assert t[verdict] == sum(m["computability"] == verdict for m in ms), verdict + assert t["executed_by_dashboard"] == len(DASHBOARD) + assert t["executed_by_dashboard"] == sum( + m.get("construction") == "executed_by_dashboard" for m in ms + ) + assert t["out_of_model_scope"] == sum(bool(m.get("out_of_model_scope")) for m in ms) + assert t["announced"] == sum(m["reported_status"] == "announced" for m in ms) + + +def test_the_seven_dashboard_measures_execute_by_receipt_at_the_budget_day_engine(): + run = REG["engine_pin"]["budget_day_runs"] + assert REG["engine_pin"]["policyengine_uk"] == PIN + assert run["certified_for_model_version"] == PIN + for line, dash_id in DASHBOARD.items(): + m = by_line(line) + assert m["computability"] == "expressible", line + assert m["construction"] == "executed_by_dashboard", line + assert m["dashboard_measure_id"] == dash_id, line + rc = m["pe_modifier"]["receipt"] + assert rc["path"].startswith(f"public/data/artifacts/{dash_id}/"), line + for field in ( + "policyengine", + "certified_for_model_version", + "dataset_revision", + "dataset_sha256", + ): + assert rc[field] == run[field], (line, field) + + +def test_the_remaining_expressible_lines_are_deltas_on_current_law(): + """Savings rates (line 62, off the dashboard release) and the BADR limit + (line 60) have no receipt; they are parameter deltas the engine resolves.""" + for line in (60, 62): + m = by_line(line) + assert m["computability"] == "expressible", line + assert m["construction"] == "delta_on_current_law", line + assert m["pe_reform_delta"], line + assert "pe_modifier" not in m, line + + +def test_the_bus_cap_is_partial_because_its_pre_measure_world_is_unknown(): + m = by_line(4) + assert m["computability"] == "partial" + assert m["intended_construction"] == "reversal_on_certified_world" + assert "construction" not in m + hist = m["engine_parameter_history"]["gov.dft.bus.fares.cap"] + assert hist["2027-01-01"] == 2 + assert "bus_fares_gap.json" in m["missing"] + + +def test_packages_are_exactly_their_legs(): + tables = { + "ab2026__package_total_policy_decisions": set(range(1, 99)), + "ab2026__package_household_energy_vat_and_fuel_duty": {1, 2, 3}, + "ab2026__package_policyengine_seven": set(DASHBOARD), + } + for k, lines in tables.items(): + assert set(BY_KEY[k]["package_of"]) == {K.key(n) for n in lines}, k + tax = set(BY_KEY["ab2026__package_total_tax_policy_decisions"]["package_of"]) + spend = set(BY_KEY["ab2026__package_total_spending_policy_decisions"]["package_of"]) + assert not tax & spend + assert tax | spend == set( + BY_KEY["ab2026__package_total_policy_decisions"]["package_of"] + ) + for leg in tax: + assert BY_KEY[leg]["table_61_head"] == "Tax", leg + for leg in spend: + assert BY_KEY[leg]["table_61_head"] == "Spend", leg + + +def test_a_package_is_expressible_only_when_every_leg_is(): + for m in REG["measures"]: + if m.get("construction") != "package_of_registry_measures": + continue + legs = [BY_KEY[leg] for leg in m["package_of"]] + expressible = [ + leg["measure_key"] for leg in legs if leg["computability"] == "expressible" + ] + if m["computability"] == "expressible": + assert len(expressible) == len(legs), m["measure_key"] + else: + assert m["computability"] == "partial", m["measure_key"] + assert sorted(m["expressible_legs"]) == sorted(expressible), m[ + "measure_key" + ] + + +def test_the_combined_receipt_covers_the_seven_package(): + m = BY_KEY["ab2026__package_policyengine_seven"] + assert m["construction"] == "package_of_registry_measures" + assert m["pe_modifier"]["receipt"]["path"].startswith( + "public/data/artifacts/combined--" + ) + + +def test_the_registry_is_regenerated_byte_for_byte(): + """The JSON and REGISTRY_KEYS.md are generated; --check needs the pinned + engine, so it runs only where its venv exists.""" + py = ROOT / ".venv-pe2151" / "bin" / "python" + if not py.exists(): + pytest.skip("the policyengine-uk 2.151.0 venv is not installed here") + out = subprocess.run( + [str(py), "pipeline/build_ab2026_registry.py", "--check"], + cwd=ROOT, + env={**os.environ, "PYTHONPATH": str(ROOT)}, + capture_output=True, + text=True, + check=False, + ) + assert out.returncode == 0, out.stdout + out.stderr + + +def _dashboard_repo(): + path = Path( + os.environ.get( + "UK_BUDGET_DASHBOARD_REPO", + Path.home() / "PolicyEngine" / "uk-autumn-budget-dashboard-2026", + ) + ) + return path if (path / ".git").exists() else None + + +@pytest.mark.parametrize( + "key", + sorted(k for k, m in BY_KEY.items() if m.get("pe_modifier")), +) +def test_each_receipt_matches_the_dashboard_commit(key): + """Hash-check each receipt against the dashboard repository at the pinned + commit. CI has no checkout of that repository, so this runs where one + exists (UK_BUDGET_DASHBOARD_REPO, or the default clone path).""" + repo = _dashboard_repo() + if repo is None: + pytest.skip("no uk-autumn-budget-dashboard-2026 checkout") + rc = BY_KEY[key]["pe_modifier"]["receipt"] + blob = subprocess.run( + ["git", "-C", str(repo), "show", f"{rc['commit']}:{rc['path']}"], + capture_output=True, + check=True, + ).stdout + assert hashlib.sha256(blob).hexdigest() == rc["receipt_file_sha256"] + receipt = json.loads(blob) + ex = receipt["execution_receipt"] + assert ex["reform"]["reform_sha256"] == rc["reform_sha256"] + assert ex["reform"]["binding"] == rc["reform_binding"] + assert receipt["dashboard"]["generated_at"] == rc["generated_at"] + assert ( + ex["certificate"]["certified_for_model_version"] + == rc["certified_for_model_version"] + ) + assert ex["data"]["dataset_revision"] == rc["dataset_revision"] + assert ex["data"]["dataset_sha256"] == rc["dataset_sha256"] + assert ex["wrapper"] == {"name": "policyengine", "version": rc["policyengine"]} diff --git a/tests/test_signs.py b/tests/test_signs.py index eeef21348..59cccf0e9 100644 --- a/tests/test_signs.py +++ b/tests/test_signs.py @@ -3,11 +3,14 @@ rule, and carries the value in that orientation.""" import glob +import gzip import json from collections import Counter from pathlib import Path import pytest +from hypothesis import given, settings +from hypothesis import strategies as st from scorecard_db import signs @@ -71,6 +74,99 @@ def _row(metric, convention=None, *, country="UK", source="x", annotations=(), * ), "unknown", ), + # IFS's estimate of the Budget's tax change, which keeps revenue_change + # (the Autumn Budget 2026 harvest's README rule 10) + ( + _row("revenue_change", "positive = increase in net tax as a share of GDP"), + "same", + ), + # borrowing conventions, verbatim from the Autumn Budget 2026 harvest, + # whose totals of the Budget's decisions take this metric (its README + # rule 10) + ( + _row( + "decisions_effect_on_borrowing", + "Note (verbatim): A positive sign implies an increase in borrowing.", + ), + "same", + ), + ( + _row( + "decisions_effect_on_borrowing", + "positive = increase in PSNB; negative = reduction in PSNB", + ), + "same", + ), + ( + _row( + "decisions_effect_on_borrowing", + "as worded: positive = reduction in underspends / borrowing increase", + ), + "same", + ), + ( + _row("decisions_effect_on_borrowing", "positive = cost to the Exchequer"), + "same", + ), + ( + _row( + "decisions_effect_on_borrowing", + "Note (verbatim): This table uses the convention that a negative " + "sign implies a loss to the Exchequer (and is therefore an " + "increase in PSNB).", + ), + "opposite", + ), + ( + _row( + "decisions_effect_on_borrowing", + "positive = yield to the Exchequer (reduces borrowing); negative = " + "cost to the Exchequer", + ), + "opposite", + ), + ( + _row( + "decisions_effect_on_borrowing", + "positive = raises revenue (reduces borrowing), as RF plots Figure 10", + ), + "opposite", + ), + ( + _row( + "decisions_effect_on_borrowing", + "as worded: positive = borrowing reduction", + ), + "opposite", + ), + ( + _row( + "decisions_effect_on_borrowing", + "positive = increase in net tax as a share of GDP", + ), + "opposite", + ), + ( + _row( + "decisions_effect_on_borrowing", + "as worded: positive = additional investment income", + ), + "opposite", + ), + ( + _row( + "decisions_effect_on_borrowing", + "mixed: row 551 (negative = loss to Exchequer) plus row 555 " + "(positive = increase in PSNB)", + ), + "unknown", + ), + ( + _row( + "decisions_effect_on_borrowing", "absolute average, no directional sign" + ), + "unknown", + ), # households, poverty, bills ( _row("average_household_income_change", "positive = gain to households"), @@ -104,6 +200,38 @@ def _row(metric, convention=None, *, country="UK", source="x", annotations=(), * ), (_row("energy_bill_change", "positive = saving"), "opposite"), (_row("energy_bill_change", "positive = higher council tax bill"), "same"), + # review A H-4: a phrase's negative leg doesn't decide its sign, and a + # phrase that matches both lists reads unknown + ( + _row( + "decisions_effect_on_borrowing", + "positive = increase in borrowing; negative = reduction in borrowing", + ), + "same", + ), + ( + _row( + "revenue_change", + "positive = yield to the Exchequer; negative = increase in borrowing", + ), + "same", + ), + ( + _row( + "average_household_income_change", + "positive = gain to households; negative = loss to households", + ), + "same", + ), + (_row("revenue_change", "positive = cost saving to the Exchequer"), "unknown"), + (_row("revenue_change", "negative = increase in borrowing"), "unknown"), + ( + _row( + "decisions_effect_on_borrowing", + "positive = increase in PSNB; negative = reduction in PSNB", + ), + "same", + ), # levels, and changes with no stated convention (_row("poverty_rate"), "same"), (_row("revenue_change", country="US"), "same"), @@ -114,6 +242,18 @@ def test_declared_conventions(row, relation): assert signs.classify(row)[0] == relation +def test_a_borrowing_total_without_one_direction_is_declared_unknown(): + # a total adding rows under two conventions, and an average of absolute + # values, state why no sign applies rather than going unrecognised + for convention in ( + "mixed: row 551 (negative = loss to Exchequer) plus row 555 " + "(positive = increase in PSNB)", + "absolute average, no directional sign", + ): + row = _row("decisions_effect_on_borrowing", convention) + assert signs.classify(row) == ("unknown", "stated:borrowing:not_this_quantity") + + def test_an_unsigned_magnitude_is_magnitude(): # the issue's example: HMRC "Change personal allowance by 1%" row = _row( @@ -136,6 +276,65 @@ def test_a_result_oriented_to_its_claim_is_same_whatever_the_text(): assert signs.classify(row) == ("same", "result_oriented_to_claim") +# revenue_change counts a gain to the Exchequer as positive and +# decisions_effect_on_borrowing counts more borrowing as positive, so a +# convention that both phrase families read must read same for one metric +# and opposite for the other +_DEFINITE = sorted( + { + phrase + for family in ("exchequer", "borrowing") + for phrases in signs._PHRASES[family][1:] + for phrase in phrases + } +) +_FILLER = st.text(alphabet=" 0123456789;,()=-abcdefghijklmnopqrstuvwxyz", max_size=12) +# a negative leg that names any definite phrase (review A H-5) +# (a phrase that itself describes the negative side can't head one) +_NEGATIVE_LEG = st.sampled_from([p for p in _DEFINITE if "negative" not in p]).map( + lambda p: "; negative = " + p +) + + +@settings(max_examples=300, deadline=None) +@given( + phrase=st.sampled_from(_DEFINITE), + before=_FILLER, + after=st.one_of(_FILLER, _NEGATIVE_LEG), +) +def test_one_phrase_reads_opposite_ways_for_revenue_and_borrowing( + phrase, before, after +): + text = before + phrase + after + revenue = signs.classify(_row("revenue_change", text))[0] + borrowing = signs.classify(_row("decisions_effect_on_borrowing", text))[0] + if {revenue, borrowing} <= {"same", "opposite"}: + assert revenue != borrowing, text + + +def test_published_conventions_read_opposite_ways_for_revenue_and_borrowing(): + texts = {r["conditions"].get("sign_convention") for r in _feed_rows()} + for path in glob.glob( + str(REPO / "sources" / "harvest-uk-*" / "*" / "claims_staged.jsonl.gz") + ): + with gzip.open(path, "rt") as f: + texts |= { + (json.loads(line).get("conditions") or {}).get("sign_convention") + for line in f + } + texts.discard(None) + read_by_both = 0 + for text in texts: + revenue = signs.classify(_row("revenue_change", text))[0] + borrowing = signs.classify(_row("decisions_effect_on_borrowing", text))[0] + if {revenue, borrowing} <= {"same", "opposite"}: + read_by_both += 1 + assert revenue != borrowing, text + # 32 with the feed and the Autumn Budget 2026 harvest alone, 33 with + # every harvest and the PMD feed + assert read_by_both >= 30 + + def test_external_value_pe_sign(): assert signs.external_value_pe_sign(2.0, "same") == 2.0 assert signs.external_value_pe_sign(2.0, "opposite") == -2.0 diff --git a/tests/test_uk_ab2026_harvest.py b/tests/test_uk_ab2026_harvest.py new file mode 100644 index 000000000..3818f4e1f --- /dev/null +++ b/tests/test_uk_ab2026_harvest.py @@ -0,0 +1,498 @@ +"""The Autumn Budget 2026 harvest (#230): vendored data, checked as data. + +sources/harvest-uk-ab2026-2026-10-29/ stages every producer's AB2026 claims +before the tranche-2 ingest exists. These tests hold each staged row to the +row contract in that directory's README.md (the AB2025 contract with the +AB2026 exceptions): field names, closed enums, the FY-end-year period rule, +the fiscal_event slug, measure keys that exist in the AB2026 registry or, for +a Table 6.4 recosting, in the earlier event's registry, sha256-shaped +manifests, and per-family pins that the ingest's exact accounting will read. +""" + +import copy +import json +import re +from collections import Counter +from pathlib import Path + +import pytest + +from pipeline import ab2026_measure_keys as K +from pipeline.ab2026_harvest_contract import ( + family_problems, + read_manifest, + read_rows, + registry_keys, +) +from pipeline.ab2026_proposed_keys import render +from pipeline.harvest_counts import counts +from scorecard_db import signs + +ROOT = Path(__file__).resolve().parent.parent +HARVEST = ROOT / "sources" / "harvest-uk-ab2026-2026-10-29" +KEYS, _ = registry_keys() + +COUNTS = json.loads((HARVEST / "COUNTS.json").read_text()) +FAMILIES = sorted(k for k in COUNTS if not k.startswith("_")) + + +def families(): + return sorted( + p.name + for p in HARVEST.iterdir() + if p.is_dir() and (p / "claims_staged.jsonl.gz").exists() + ) + + +def rows(family): + return read_rows(HARVEST / family) + + +def manifest(family): + return read_manifest(HARVEST / family) + + +def test_every_pinned_family_is_present_and_complete(): + assert set(FAMILIES) == set(families()), set(FAMILIES) ^ set(families()) + for fam in families(): + for name in ("NOTES.md", "manifest.jsonl", "claims_staged.jsonl.gz"): + assert (HARVEST / fam / name).exists(), (fam, name) + + +def test_counts_json_is_what_harvest_counts_computes(): + """Rows, primaries, sources and the claims digest per family, plus the + totals: one function writes COUNTS.json and this re-derives it, so a + silent edit to a vendored row or a family added without its pin fails.""" + assert counts(HARVEST, COUNTS["_totals"]["pinned_on"]) == COUNTS + + +@pytest.mark.parametrize("family", FAMILIES) +def test_rows_follow_the_contract(family): + """pipeline/ab2026_harvest_contract.py: field names, closed enums, the + FY-end-year period, the fiscal_event slug, keys where the row says they + live (README rule 2), a manifest primary for every row, short quotes + outside the OGL (rule 6) that contain the value as printed, components + that name their part and measure (rule 9), a NOTES.md scope for every + proposed key, PolicyEngine-computed same_assumptions rows and no Impact + on households bar readings (rule 4).""" + assert family_problems(HARVEST / family) == [] + + +def test_the_proposed_key_listing_is_derived_from_the_families(): + """PROPOSED_KEYS.md lists every proposed_measure_key a staged row names, + once, with its rows, families and producers: tranche 2 registers or folds + each one, so a key added without the listing moving fails.""" + assert (HARVEST / "PROPOSED_KEYS.md").read_text() == render(HARVEST) + + +def test_the_key_listing_is_derived_from_the_registry(): + text = (HARVEST / "REGISTRY_KEYS.md").read_text() + listed = set(re.findall(r"^\| `([a-z0-9_]+)` \|", text, flags=re.MULTILINE)) + assert listed == KEYS, listed ^ KEYS + + +# --- uk_hmt_tables: the stager's output against the tables' own structure --- + +HMT = "uk_hmt_tables" + + +def _hmt(table): + return [r for r in rows(HMT) if r["conditions"]["table"] == table] + + +def test_table_61_stages_every_line_and_total_for_six_years(): + t61 = _hmt("6.1") + years = sorted({r["conditions"]["fy"] for r in t61}) + assert years == [f"{y}-{(y + 1) % 100:02d}" for y in range(2026, 2032)] + measures = [r for r in t61 if r["conditions"]["row_type"] == "measure"] + assert sorted({int(r["conditions"]["table_line"]) for r in measures}) == list( + range(1, 99) + ) + assert len(measures) == 98 * 6 + totals = [r for r in t61 if r["conditions"]["row_type"] == "total"] + assert {r["measure_key"] for r in totals} == { + K.package_key(s) + for s in ( + "package_total_policy_decisions", + "package_total_tax_policy_decisions", + "package_total_spending_policy_decisions", + ) + } + assert len(totals) == 3 * 6 + # README rule 10: the totals take the borrowing metric, the lines keep + # revenue_change + assert {r["metric"] for r in totals} == {"decisions_effect_on_borrowing"} + assert {r["metric"] for r in measures} == {"revenue_change"} + + +def test_table_61_rows_carry_the_written_out_key_for_their_line(): + for r in _hmt("6.1"): + c = r["conditions"] + if c["row_type"] == "measure": + assert r["measure_key"] == K.key(int(c["table_line"])), c["table_line"] + + +def test_every_hmt_cell_is_a_multiple_of_5m(): + """Every cell is a multiple of £5m and below £10bn (the largest is Table + 6.1's total of 7,595), so a cell staged at the wrong scale fails.""" + for r in rows(HMT): + assert r["value"] % 5e6 == 0, (r["conditions"]["table"], r["value_raw"]) + assert abs(r["value"]) < 10e9, (r["conditions"]["table"], r["value_raw"]) + + +def test_table_61_lines_sum_to_the_printed_totals_within_rounding(): + """Footnote 1: totals may not sum due to rounding. Every staged cell is a + multiple of £5m, so if HM Treasury rounds each line to the nearest £5m, 98 + lines could drift up to 98 × £2.5m from the exact total; the observed gaps + are up to £10m for the grand total and £15m for the Tax and Spend totals + (Spend, 2029-30), so the bound is £25m. Tax plus spend equals the grand + total within the same rule.""" + t61 = _hmt("6.1") + for fy in {r["conditions"]["fy"] for r in t61}: + year = [r for r in t61 if r["conditions"]["fy"] == fy] + total = { + r["measure_key"]: r["value"] + for r in year + if r["conditions"]["row_type"] == "total" + } + by_head = {"Tax": 0.0, "Spend": 0.0} + for r in year: + if r["conditions"]["row_type"] == "measure": + by_head[r["conditions"]["head"]] += r["value"] + tax = total[K.package_key("package_total_tax_policy_decisions")] + spend = total[K.package_key("package_total_spending_policy_decisions")] + grand = total[K.package_key("package_total_policy_decisions")] + assert abs(by_head["Tax"] - tax) <= 25e6, fy + assert abs(by_head["Spend"] - spend) <= 25e6, fy + assert abs(by_head["Tax"] + by_head["Spend"] - grand) <= 25e6, fy + assert abs(tax + spend - grand) <= 3 * 2.5e6, fy + + +def test_table_64_recostings_name_their_event(): + t64 = _hmt("6.4") + assert len(t64) == 17 * 6 + for r in t64: + c = r["conditions"] + event, key = K.TABLE_64[int(c["table_line"])] + assert c["recosting_of"] == event + assert r["measure_key"] == key + assert c["row_type"] == "recosting" + + +# Table 6.2 line 6 reprioritises FT budgets to fund line 5's scheme, and the +# table's total spans lines 1-9: neither is a Table 6.1 measure (review A T-1, +# T-2), so each takes its own proposed key. +T62_PROPOSED = {"6": "ab2026__your_first_home_ft_reprioritisation"} +T62_TOTAL = "ab2026__package_total_financial_transactions" + + +def test_table_62_rows_are_financial_transactions_not_revenue(): + t62 = _hmt("6.2") + lines = [r for r in t62 if r["conditions"]["row_type"] == "measure"] + totals = [r for r in t62 if r["conditions"]["row_type"] == "total"] + assert (len(lines), len(totals)) == (9 * 6, 6) + for r in t62: + assert r["proposed_metric"] == "financial_transaction_cash_impact" + assert "metric" not in r + for r in lines: + line = r["conditions"]["table_line"] + if line in T62_PROPOSED: + assert r["measure_key"] is None + assert r["conditions"]["proposed_measure_key"] == T62_PROPOSED[line] + else: + assert r["measure_key"] == K.PREFIX + K.TABLE_62[int(line)] + for r in totals: + assert r["measure_key"] is None + assert r["conditions"]["proposed_measure_key"] == T62_TOTAL + # the total is the lines' sum within rounding (footnote 1) + for fy in {r["conditions"]["fy"] for r in totals}: + total = next(r["value"] for r in totals if r["conditions"]["fy"] == fy) + summed = sum(r["value"] for r in lines if r["conditions"]["fy"] == fy) + assert abs(total - summed) <= 25e6, fy + + +YEARS = {f"{y}-{(y + 1) % 100:02d}" for y in range(2026, 2032)} +# every line or total each table prints, by (table, row_type) +CELLS = { + ("6.1", "measure"): {str(n) for n in range(1, 99)}, + ("6.1", "total"): { + K.package_key(s) + for s in ( + "package_total_policy_decisions", + "package_total_tax_policy_decisions", + "package_total_spending_policy_decisions", + ) + }, + ("6.2", "measure"): {str(n) for n in K.TABLE_62}, + ("6.2", "total"): {T62_TOTAL}, + ("6.4", "recosting"): {str(n) for n in K.TABLE_64}, +} + + +def _cell_problems(hmt_rows): + """The (table, row_type) groups whose rows aren't exactly one per line, + or total, and year, plus any group the tables don't print.""" + out = [] + for (table, row_type), ids in CELLS.items(): + staged = Counter( + (r["conditions"].get("table_line") or _key(r), r["conditions"]["fy"]) + for r in hmt_rows + if (r["conditions"]["table"], r["conditions"]["row_type"]) + == (table, row_type) + ) + if staged != Counter({(i, fy): 1 for i in ids for fy in YEARS}): + out.append((table, row_type)) + groups = {(r["conditions"]["table"], r["conditions"]["row_type"]) for r in hmt_rows} + return out + sorted(groups - set(CELLS)) + + +def test_each_table_cell_is_staged_once(): + """Delta review D1: one row for each line, or total, and year in every + table. A copy of line 1's 2027-28 cell over its 2028-29 cell (both zero) + leaves every row valid and every sum intact, and fails here.""" + hmt = rows(HMT) + assert _cell_problems(hmt) == [] + copied = list(hmt) + copied[2] = copied[1] + assert _cell_problems(copied) == [("6.1", "measure")] + + +# --- README rule 10: stated effects of the Budget's decisions on PSNB -------- + +BORROWING = "decisions_effect_on_borrowing" + +# keys that name only a stated effect of the Budget's decisions on PSNB or one +# of its splits +TOTAL_KEYS = { + K.package_key(s) + for s in ( + "package_total_policy_decisions", + "package_total_tax_policy_decisions", + "package_total_spending_policy_decisions", + "package_tax_decisions_since_march_2026", + "package_spending_decisions_since_march_2026", + "package_non_scorecard_decisions", + ) +} +# RF's totals that add a continued fuel duty freeze's receipts effect keep +# revenue_change: the freeze's effect on borrowing is stated for 2029-30 only +# (OBR para 3.43), and RF's other years are receipts differences +# (coordinator's call on review B's RF finding 3, option (b)). +FREEZE_TOTALS = "ab2026_option__tax_decisions_with_continued_fuel_duty_freeze" +# the key of the OBR's total, which the OBR stager also gives the workbook's +# Table 1.1 lines by head and its total of receipts measures +GOVERNMENT_DECISIONS = K.package_key("package_government_decisions_since_march_2026") +RECEIPTS_TOTAL = "Total effects of receipts measures (£ millions)" +IFS_TAX_CHANGE = K.package_key("package_ifs_announced_tax_changes") + + +def _key(r): + return r.get("measure_key") or r["conditions"].get("proposed_measure_key") + + +def _label(r): + c = r["conditions"] + return c.get("table_row") or c.get("aggregate") or r.get("reform_hint") or "" + + +def test_rows_keyed_to_a_total_take_the_borrowing_metric(): + keyed = [(fam, r) for fam in FAMILIES for r in rows(fam) if _key(r) in TOTAL_KEYS] + assert {_key(r) for _, r in keyed} == TOTAL_KEYS + for fam, r in keyed: + assert r["metric"] == BORROWING, (fam, _key(r), r["value_raw"]) + + +def test_a_totals_lines_by_head_keep_revenue_change(): + """The OBR stager keys the workbook's Table 1.1 lines by tax and spending + head, and its total of receipts measures, to the total effect of + Government decisions. Those rows keep revenue_change; every other row on + that key gives the total, its direct or indirect effects or a part of + them, and takes the borrowing metric or, for the current budget deficit, + proposes fiscal_balance_change.""" + on_key = [ + r for fam in FAMILIES for r in rows(fam) if _key(r) == GOVERNMENT_DECISIONS + ] + by_head = [ + r + for r in on_key + if r.get("metric") == "revenue_change" and _label(r) != RECEIPTS_TOTAL + ] + assert len(by_head) == 288 + for r in by_head: + assert r["source_table"].startswith("Table 1.1: Breakdown of policy decisions") + assert not re.search(r"\b(total|effects? of)\b", _label(r), re.I), _label(r) + for r in on_key: + if r.get("metric") != "revenue_change": + assert ( + r.get("metric") == BORROWING + or r.get("proposed_metric") == "fiscal_balance_change" + ), _label(r) + + +def test_the_fuel_freeze_totals_keep_revenue_change(): + freeze = [r for r in rows("uk_rf_ab2026") if _key(r) == FREEZE_TOTALS] + assert len(freeze) == 11 + assert {r["metric"] for r in freeze} == {"revenue_change"} + + +def test_receipts_totals_and_tax_change_estimates_keep_revenue_change(): + """README rule 10 (delta review of 8b7b23db, findings 1 and 2): a receipts + total or a tax-change estimate keeps revenue_change unless its evidence + establishes PSNB scope. The OBR workbook's total of receipts measures sums + its receipts heads, and nothing in IFS's chart ties its estimate of the + Budget's tax change at the forecast horizon to PSNB.""" + receipts = [r for r in rows("uk_obr_tables") if _label(r) == RECEIPTS_TOTAL] + tax_change = [r for r in rows("uk_ifs_ab2026") if _key(r) == IFS_TAX_CHANGE] + assert (len(receipts), len(tax_change)) == (6, 1) + assert {r["metric"] for r in receipts + tax_change} == {"revenue_change"} + + +def test_a_measure_takes_the_borrowing_metric_only_where_its_producer_says_so(): + """README rule 10's exception: the OBR's paragraphs 3.20, 3.21 and 3.43 + give four policies' effects on borrowing, and IFS gives the Budget's new + giveaways' effect on it.""" + outside = Counter( + (fam, r["source_table"] if fam == "uk_obr_tables" else _key(r)) + for fam in FAMILIES + for r in rows(fam) + if r.get("metric") == BORROWING + and _key(r) not in TOTAL_KEYS | {GOVERNMENT_DECISIONS, None} + ) + assert outside == { + ("uk_obr_tables", "para 3.20"): 2, + ("uk_obr_tables", "para 3.21"): 4, + ("uk_obr_tables", "para 3.43"): 1, + ("uk_ifs_ab2026", "ab2026__package_ifs_new_giveaways"): 2, + } + + +DEFICITS = ("current budget deficit", "primary deficit") + + +def _deficit_measured(r): + """The deficit a fiscal_balance_change row measures, read from its + producer's label (its aggregate, table row or fiscal rule), never from + its sign convention (delta review D1-2). The stability rule targets the + current budget.""" + c = r["conditions"] + label = (c.get("aggregate") or c.get("table_row") or "").lower() + if "primary" in label: + return "primary deficit" + if "current budget" in label or c.get("fiscal_rule") == "stability": + return "current budget deficit" + return None + + +def _names_its_deficit(r): + """The row's sign convention names the deficit it measures, and not the + other one.""" + measured = _deficit_measured(r) + sign = r["conditions"].get("sign_convention") or "" + return measured is not None and all( + (d in sign) == (d == measured) for d in DEFICITS + ) + + +def _balance_rows(): + return [ + (fam, r) + for fam in FAMILIES + for r in rows(fam) + if r.get("proposed_metric") == "fiscal_balance_change" + ] + + +def test_each_balance_row_names_the_deficit_it_measures(): + """Every row that proposes fiscal_balance_change names, in its sign, the + deficit it measures and only that one (rows selected on the metric, not + the label: review A H-7; the deficit read from the label, not the sign: + delta review D1-2). The red book's primary balance outturn measures the + primary deficit. Its current budget outturn, Chart 1.6's stability rule + steps and both producers' memo lines measure the current budget deficit.""" + balance = _balance_rows() + memos = [ + (fam, r) + for fam in FAMILIES + for r in rows(fam) + if re.search(r"memo:.*current budget deficit", _label(r), re.I) + ] + assert sorted(Counter(fam for fam, _ in balance).items()) == [ + ("uk_hmt_redbook", 16), + ("uk_obr_tables", 6), + ] + ids = {json.dumps(r, sort_keys=True) for _, r in balance} + assert all(json.dumps(r, sort_keys=True) in ids for _, r in memos) + assert Counter(_deficit_measured(r) for _, r in balance) == { + "current budget deficit": 21, + "primary deficit": 1, + } + for fam, r in balance: + assert r.get("metric") is None, fam + assert _names_its_deficit(r), ( + fam, + _label(r), + r["conditions"]["sign_convention"], + ) + + +def test_a_balance_row_naming_the_other_deficit_fails(): + """Delta review D1-2: swap the two deficits' names in any balance row's + sign convention, the red book's current budget and primary balance + outturns among them, and the check above fails.""" + balance = _balance_rows() + assert {"current budget", "primary balance"} <= { + r["conditions"].get("aggregate") for _, r in balance + } + current, primary = DEFICITS + for fam, r in balance: + swapped = copy.deepcopy(r) + sign = swapped["conditions"]["sign_convention"] + swapped["conditions"]["sign_convention"] = ( + sign.replace(current, "\0").replace(primary, current).replace("\0", primary) + ) + assert not _names_its_deficit(swapped), (fam, _label(r)) + + +def test_every_borrowing_row_says_which_way_it_runs(): + """signs.py reads each row's sign_convention as same or opposite, or as a + stated reason no sign applies (a total that adds rows under two + conventions, or an average of absolute values), never as unrecognised.""" + for fam in FAMILIES: + for r in rows(fam): + if r.get("metric") != BORROWING: + continue + relation, basis = signs.classify( + {"metric": BORROWING, "conditions": r["conditions"], "country": "UK"} + ) + assert relation in ("same", "opposite") or basis.endswith( + ":not_this_quantity" + ), (fam, r["conditions"].get("sign_convention")) + + +# review A H-5: every (metric, sign convention) pair a staged row carries, for +# a metric signs.py orients, with the relation a reviewer checked it reads +# (4 November 2026). A new phrase, or a signs.py edit that changes a reading, +# fails here until the pair is reviewed and pinned. +SIGN_READINGS = { + (p["metric"], p["sign_convention"]): p["relation"] + for p in json.loads( + (ROOT / "tests" / "fixtures" / "ab2026_sign_readings.json").read_text() + ) +} + + +def test_every_staged_sign_convention_reads_as_reviewed(): + seen = set() + for fam in FAMILIES: + for r in rows(fam): + metric = r.get("metric") + if metric not in signs.ORIENTATION: + continue + pair = (metric, r["conditions"].get("sign_convention")) + seen.add(pair) + assert pair in SIGN_READINGS, (fam, pair) + relation, _ = signs.classify( + {"metric": metric, "conditions": r["conditions"], "country": "UK"} + ) + assert relation == SIGN_READINGS[pair], (fam, pair, relation) + assert seen == set(SIGN_READINGS), set(SIGN_READINGS) - seen