diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10ba2982c..441edf583 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + # tests/test_uk_ab2026_ingest.py compares AB2025's ingest with main's + - run: git fetch --no-tags --depth=1 origin main:refs/remotes/origin/main - uses: astral-sh/setup-uv@v5 - run: uvx ruff format --check be nz scorecard_db tests pipeline # The database is a DERIVED artifact (scorecard_db/build_db.py): diff --git a/data/uk/ab2026_measures.json b/data/uk/ab2026_measures.json index 31753bb1a..c18ed674f 100644 --- a/data/uk/ab2026_measures.json +++ b/data/uk/ab2026_measures.json @@ -28,7 +28,9 @@ "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" + "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", + "receipts_of_registry_measures": "a producer's receipts allocation of registry measures (`receipts_of`, a list of keys): the OBR's Table 3.1 tax groups; a PolicyEngine run gives each leg's whole effect, so a counterpart is constructed, never like-for-like", + "producer_scope": "a package a producer defines in its own words (`package_of`, a string, as AB2025's totals are), with no exact list of registry measures" }, "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.", @@ -49,13 +51,13 @@ "ab2026__ated_increase_and_sdlt_envelope_close": "not in Table 6.1 or 6.4" }, "triage": { - "expressible": 11, - "partial": 4, - "not_expressible": 89, + "expressible": 17, + "partial": 33, + "not_expressible": 140, "executed_by_dashboard": 7, - "policyengine_uk_development_item": 13, - "out_of_model_scope": 76, - "announced": 104 + "policyengine_uk_development_item": 23, + "out_of_model_scope": 117, + "announced": 177 }, "measures": [ { @@ -2300,6 +2302,1678 @@ } }, "note": "Run as one simulation of all seven measures (the combined run), not as a sum of the seven runs." + }, + { + "measure_key": "ab2026__british_business_bank_defence_commitments_accelerated", + "title": "British Business Bank: accelerate £450m of commitments to defence-related and dual-use businesses", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 9 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: HM Treasury's policy costing with no identifiable Table 6.1 line; by Table 6.1's footnote 2 and £10m bar, probably inside line 41, so we never add it to Table 6.1's lines or totals.", + "program": "financial_transactions", + "producers": [ + "hm_treasury" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (British Business Bank commitments to defence-related businesses): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /british_business_bank|defence|dual_use/. 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__departmental_spending_growth_2031_32", + "title": "Departmental spending: grow day-to-day spending by 0.7% in real terms in 2031-32", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 13 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's change to the 2031-32 pre-measures RDEL assumption (a £5.5bn reduction); no Table 6.1 line.", + "program": "public_spending", + "producers": [ + "obr_efo" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (the 2031-32 departmental resource spending assumption), 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 /departmental|resource_spending|rdel/. 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__energy_debt_circuit_breaker", + "title": "Energy Debt Circuit Breaker: a debt strategy and a one-off targeted energy debt relief scheme", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 3 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 3.8's debt strategy, which HM Treasury says saves all billpayers around £30; no Table 6.1 line.", + "program": "energy_bills", + "producers": [ + "hm_treasury" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No energy debt and no component of household energy bills that recovers suppliers' bad debt: the engine holds consumption, not the bill's parts.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /energy_debt|bad_debt|standing_charge|unit_rate|supplier|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.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: household energy bills split into standing charges, unit rates, levies and debt costs (gas_consumption and electricity_consumption are the nearest variables)", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": "gas_consumption and electricity_consumption hold a household's energy use, not the parts of its bill" + }, + { + "measure_key": "ab2026__gas_standing_charge_moved_to_unit_rates", + "title": "Abolish the gas standing charge and recover it through unit rates", + "reported_status": "announced", + "source_note": "`ifs` and `resolution_foundation` score it on 34 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The announced move of the typical household's gas standing charge onto unit rates, which costs the Exchequer nothing and has no Table 6.1 line (RF and IFS families).", + "program": "energy_bills", + "producers": [ + "ifs", + "resolution_foundation" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No gas standing charge or unit rate: the engine holds gas consumption, not the tariff that turns it into a bill, so it cannot move a fixed charge onto use.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /standing_charge|unit_rate|tariff|gas/. Parameters: 27 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: 7 ['esa_income_tariff_income', 'gas_consumption', 'housing_benefit_tariff_income', 'income_support_tariff_income', 'jsa_income_tariff_income', 'natural_gas_kg']. 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: household energy bills split into standing charges, unit rates, levies and debt costs (gas_consumption and electricity_consumption are the nearest variables)", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": "gas_consumption holds use; no variable splits a gas bill into a standing charge and a unit rate" + }, + { + "measure_key": "ab2026__gas_supplier_levy_funded_from_general_taxation", + "title": "Fund the Gas Supplier Levy from general taxation", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's footnote 12 figure for moving the levy off household bills; we found no Table 6.1 line.", + "program": "energy_bills", + "producers": [ + "resolution_foundation" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "No levies or policy costs on household energy bills: the engine holds consumption, not the bill's parts, so it cannot take a levy off a bill.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /supplier|levy|policy_cost|standing_charge|gas/. Parameters: 1 node(s) ['gov.hmrc.fuel_duty.natural_gas']. Variables: 2 ['gas_consumption', 'natural_gas_kg']. 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: household energy bills split into standing charges, unit rates, levies and debt costs (gas_consumption and electricity_consumption are the nearest variables)", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": "gas_consumption holds use; no variable holds the levies a gas bill recovers" + }, + { + "measure_key": "ab2026__minimum_wage_uprating_april_2027", + "title": "Raise the National Living Wage and National Minimum Wage rates from 1 April 2027", + "reported_status": "announced", + "source_note": "`hm_treasury` and `resolution_foundation` score it on 4 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The April 2027 minimum wage rates the Chancellor confirmed (red book paragraph 3.18), a regulation with no Table 6.1 line.", + "program": "minimum_wage", + "producers": [ + "hm_treasury", + "resolution_foundation" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine carries the minimum wage rates (gov.hmrc.minimum_wage) but holds employment income as an input, so raising a rate raises no worker's pay. The minimum_wage variable feeds only Universal Credit's minimum income floor, the benefit cap's earnings exception and the childcare income tests.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /minimum_wage|living_wage/. 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: 2 ['minimum_wage', 'minimum_wage_category']. 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: employment income that responds to minimum wage rates (employment_income is an input)", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230", + "nearest_variable_and_why_it_does_not_work": "minimum_wage reads gov.hmrc.minimum_wage, and employment_income does not read minimum_wage" + }, + { + "measure_key": "ab2026__mod_counter_fraud_strategy", + "title": "Ministry of Defence Counter Fraud Strategy", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 5.32's strategy, set to deliver £250 million of benefits; no Table 6.1 line.", + "program": "compliance_and_administration", + "producers": [ + "hm_treasury" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (counter-fraud work in defence procurement): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /fraud|defence|procurement/. 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__private_landlord_register_fee_65", + "title": "Renters' Rights: a £65 fee for the 'Register your rental property' service from 15 December 2026", + "reported_status": "announced", + "source_note": "`hm_treasury` and `obr_efo` score it on 25 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: HM Treasury's costing of the fee (not on Table 6.1, footnote 2), offset by DEL spending and so fiscally neutral; the OBR stages its receipts, current DEL and total.", + "program": "regulation", + "producers": [ + "hm_treasury", + "obr_efo" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A fee for a public registration service, which HM Treasury offsets with departmental spending: the engine has no landlord register, and no tax or benefit rule for households changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /landlord|rental|register/. Parameters: 28 node(s) ['gov.economic_assumptions.yoy_growth.ons.private_rental_prices.UNITED_KINGDOM', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.ENGLAND', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.WALES', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.SCOTLAND', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.NORTHERN_IRELAND', 'gov.economic_assumptions.yoy_growth.ons.private_rental_prices.NORTH_EAST']. Variables: 2 ['property_rental_income', '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.", + "out_of_model_scope": true, + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026__public_sector_pensions_2024_valuations", + "title": "Public sector pensions: net impact of the 2024 valuations", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 27 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's departmental reductions, net public service pension payments and their net total from the 2024 valuations of the unfunded schemes; no Table 6.1 line.", + "program": "public_spending", + "producers": [ + "obr_efo" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (employer contributions to the unfunded public service pension schemes), 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 /public_service_pension|employer_contribution|unfunded/. 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__pwlb_debt_relief_councils_severe_distress", + "title": "Public Works Loan Board debt relief for councils in severe financial distress", + "reported_status": "announced", + "source_note": "`hm_treasury` and `obr_efo` score it on 18 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: HM Treasury's costing (not on Table 6.1, footnote 2) and the OBR's capital AME and total.", + "program": "financial_transactions", + "producers": [ + "hm_treasury", + "obr_efo" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (debt relief on councils' Public Works Loan Board loans): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /pwlb|public_works|council_debt/. 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__regulatory_administrative_savings", + "title": "Regulatory administrative savings for business", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 5 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The red book's chapter 6 decision (paragraph 6.36) and paragraph 4.52's estimated gross administrative savings for business, with its parts as components; no Table 6.1 line.", + "program": "regulation", + "producers": [ + "hm_treasury" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A regulatory change (administrative burdens of regulation on business) with no tax or benefit rule for households.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /regulat|administrative/. Parameters: 0 node(s) []. Variables: 1 ['housing_benefit_pension_age_regulations_apply']. 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__rolls_royce_gas_turbine_programme", + "title": "Co-investment in a 10-year £2.5 billion next-generation gas turbine programme", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 4.80's programme for civil and defence aerospace, not yet contracted (paragraph 4.83); no Table 6.1 line named.", + "program": "financial_transactions", + "producers": [ + "hm_treasury" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (co-investment in aerospace gas turbine research): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /aerospace|turbine|research/. 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__scottish_air_passenger_duty_devolution", + "title": "Devolve Air Passenger Duty to the Scottish Government in April 2027", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 18 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's Scottish block grant adjustment, self-financed expenditure and total; no Table 6.1 line.", + "program": "indirect_tax", + "producers": [ + "obr_efo" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A transfer of a tax between the UK and Scottish governments, with a block grant adjustment: no tax or benefit rule for households changes, and the engine holds no air travel.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /air_passenger|aviation|flight/. 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__state_pension_triple_lock_adjustment", + "title": "Adjust the State Pension triple lock from April 2030 to hold the pension's value relative to earnings as reached in April 2029", + "reported_status": "announced", + "source_note": "`hm_treasury` and `obr_efo` score it on 4 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 5.23 and OBR paragraph 3.49: from April 2030, rises of the highest of 2.5%, inflation, or the rise that keeps the pension's April 2029 ratio to earnings; no Table 6.1 line, since its savings fall after the forecast.", + "program": "state_pension", + "producers": [ + "hm_treasury", + "obr_efo" + ], + "computability": "expressible", + "construction": "delta_on_current_law", + "pe_reform_delta": { + "gov.dwp.state_pension.triple_lock.include_earnings": { + "2030": false, + "2031": false + }, + "gov.dwp.state_pension.triple_lock.earnings_path_guarantee": { + "2030": true, + "2031": true + } + }, + "delta_kind": "absolute_value_by_year", + "engine_baseline_2026": { + "gov.dwp.state_pension.triple_lock.include_earnings": true, + "gov.dwp.state_pension.triple_lock.earnings_path_guarantee": false + }, + "note": "The engine's parameter documentation names this reading for the plan announced on 29 September 2026: include_earnings false and earnings_path_guarantee true from 2030. The guarantee anchors an earnings path at the pension's level in the year before it first applies, 2029-30. The engine rebuilds the uprating rates only through Scenario(parameter_changes=...): a reform dictionary changes the parameters but not the rates." + }, + { + "measure_key": "ab2026__your_first_home_ft_reprioritisation", + "title": "Reprioritise financial transactions budgets to fund the new equity loan scheme", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.2 line 6, with no Table 6.1 line; line 5 is the scheme itself and keeps ab2026__your_first_home_equity_loan.", + "table_62_line": 6, + "program": "financial_transactions", + "producers": [ + "hm_treasury" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (financial transactions budgets reprioritised to an equity loan scheme): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /equity_loan|help_to_buy|financial_transaction/. 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_business_rates_rhl_sbrr_and_transitional_support", + "title": "Business rates: the SBRR thresholds, the real-terms freeze and the transitional support extension, together", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 13 and 14, the three bullets of red book paragraph 3.22; the red book doesn't say whether line 12's pubs relief also counts, so we leave it out.", + "program": "package", + "producers": [ + "hm_treasury" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__business_rates_sbrr_rhl_thresholds_raised", + "ab2026__business_rates_rhl_transitional_support" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 2 legs. ab2026__business_rates_sbrr_rhl_thresholds_raised: 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. ab2026__business_rates_rhl_transitional_support: 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": "Each leg's search. ab2026__business_rates_sbrr_rhl_thresholds_raised: 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. ab2026__business_rates_rhl_transitional_support: 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__package_carbon_price_support_and_cfd_levies", + "title": "Abolish carbon price support and fund the LCCC to reduce CfD levies, together", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 70 and 71 (OBR family).", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__british_industrial_competitiveness_scheme", + "ab2026__carbon_price_support_removed" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 2 legs. ab2026__british_industrial_competitiveness_scheme: 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. ab2026__carbon_price_support_removed: 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": "Each leg's search. ab2026__british_industrial_competitiveness_scheme: 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. ab2026__carbon_price_support_removed: 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__package_dividend_and_capital_gains_tax_changes", + "title": "OBR Table 3.1: changes to dividend and capital gains taxation", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 26, 49 and 60, as the OBR family's NOTES gives them.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__founders_relief_cgt", + "ab2026__distributions_framework_modernised", + "ab2026__badr_lifetime_limit_500000" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "2 of 3 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 1 expressible legs: ['ab2026__badr_lifetime_limit_500000']", + "expressible_legs": [ + "ab2026__badr_lifetime_limit_500000" + ] + }, + { + "measure_key": "ab2026__package_hmrc_tax_gap_and_online_marketplace", + "title": "HMRC's tax gap measures and online marketplace liability, together", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Exactly Table 6.1 lines 45 and 46: red book Table 6.3's subtotal including memo, and footnote 73.", + "program": "package", + "producers": [ + "hm_treasury" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__hmrc_tax_gap_package", + "ab2026__online_marketplace_liability_uk_businesses" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 2 legs. ab2026__hmrc_tax_gap_package: An enforcement, compliance or administrative change (HMRC measures to close the tax gap): the rules households face do not change. ab2026__online_marketplace_liability_uk_businesses: An enforcement, compliance or administrative change (online marketplace VAT liability): the rules households face do not change.", + "name_search": "Each leg's search. ab2026__hmrc_tax_gap_package: 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. ab2026__online_marketplace_liability_uk_businesses: 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__package_household_energy_payment_and_electricity_vat", + "title": "The Household Energy Payment and zero VAT on domestic electricity, together", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 5 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 1 and 2; RF's sums show its VAT figure covers the whole cut, as line 2 does.", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__household_energy_payment_100_bands_a_to_d", + "ab2026__electricity_vat_zero_rate_to_july_2027" + ], + "pe_reform_delta": null, + "computability": "expressible", + "note": "Every leg is expressible; a counterpart is the legs' runs combined, stated as constructed." + }, + { + "measure_key": "ab2026__package_property_and_savings_income_rates", + "title": "Property and savings income tax rates up 2ppts, together", + "reported_status": "announced", + "source_note": "`hm_treasury`, `ifs`, `resolution_foundation` and `tax_policy_associates` score it on 33 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Exactly Table 6.1 lines 61 and 62 (red book, IFS, RF and TPA families).", + "program": "package", + "producers": [ + "hm_treasury", + "ifs", + "resolution_foundation", + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ], + "pe_reform_delta": null, + "computability": "expressible", + "note": "Every leg is expressible; a counterpart is the legs' runs combined, stated as constructed." + }, + { + "measure_key": "ab2026__package_hmt_distributional_budget_2026", + "title": "HM Treasury's Impact on households: the Budget 2026 policies it models", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: 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, and the private landlord registration fee, without line 1.", + "program": "package", + "producers": [ + "hm_treasury" + ], + "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__bus_fare_cap_2_england_outside_london_2027", + "ab2026__mileage_allowance_payments_55p", + "ab2026__uc_surplus_earnings_threshold_2500_extended", + "ab2026__cash_isa_limit_held_at_20000", + "ab2026__trading_allowance_3000", + "ab2026__founders_relief_cgt", + "ab2026__lifetime_isa_withdrawal_charge_20pc_above_cap", + "ab2026__distributions_framework_modernised", + "ab2026__pension_tax_allowance", + "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__youth_guarantee_and_apprenticeships_spring_2026", + "ab2026__low_value_imports_customs_relief_removed", + "ab2026__private_landlord_register_fee_65" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "10 of 18 legs are not expressible and 1 partial (ab2026__bus_fare_cap_2_england_outside_london_2027) (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_rf_ab26_permanent_personal_measures", + "title": "RF Figure 20's AB26 changes: permanent personal tax and benefit measures", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 19 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 52, 56, 61 and 62 and the gas standing charge change (RF's workbook column K equals columns F, G, I and J).", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__pension_tax_allowance", + "ab2026__machine_games_duty_higher_stake_25pc", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp", + "ab2026__gas_standing_charge_moved_to_unit_rates" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "2 of 5 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 3 expressible legs: ['ab2026__pension_tax_allowance', 'ab2026__property_income_rates_plus_2pp', 'ab2026__savings_income_rates_plus_2pp']", + "expressible_legs": [ + "ab2026__pension_tax_allowance", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ] + }, + { + "measure_key": "ab2026__package_non_scorecard_decisions", + "title": "OBR: direct effect of non-scorecard decisions", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 12 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Exactly the departmental spending assumption change and the public pension valuations, which have no Table 6.1 lines.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__departmental_spending_growth_2031_32", + "ab2026__public_sector_pensions_2024_valuations" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 2 legs. ab2026__departmental_spending_growth_2031_32: Public spending (the 2031-32 departmental resource spending assumption), 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. ab2026__public_sector_pensions_2024_valuations: Public spending (employer contributions to the unfunded public service pension schemes), 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": "Each leg's search. ab2026__departmental_spending_growth_2031_32: Searched BOTH the parameter tree and the VARIABLE list for /departmental|resource_spending|rdel/. 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. ab2026__public_sector_pensions_2024_valuations: Searched BOTH the parameter tree and the VARIABLE list for /public_service_pension|employer_contribution|unfunded/. 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_tpa_business_rates", + "title": "TPA: business rates", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 8 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 12, 13, 14, 57, 76 and 80 (TPA's three charts); on the by-tax bar, TPA's NOTES places line 76, zero in 2027-28, by assumption.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__business_rates_pubs_relief_35pc", + "ab2026__business_rates_sbrr_rhl_thresholds_raised", + "ab2026__business_rates_rhl_transitional_support", + "ab2026__business_rates_vape_shops_and_agcs_reliefs_removed", + "ab2026__leeds_city_fund", + "ab2026__business_rates_ev_charging_relief" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 6 legs. ab2026__business_rates_pubs_relief_35pc: 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. ab2026__business_rates_sbrr_rhl_thresholds_raised: 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. ab2026__business_rates_rhl_transitional_support: 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. ab2026__business_rates_vape_shops_and_agcs_reliefs_removed: 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. ab2026__leeds_city_fund: 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. ab2026__business_rates_ev_charging_relief: 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": "Each leg's search. ab2026__business_rates_pubs_relief_35pc: 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. ab2026__business_rates_sbrr_rhl_thresholds_raised: 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. ab2026__business_rates_rhl_transitional_support: 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. ab2026__business_rates_vape_shops_and_agcs_reliefs_removed: 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. ab2026__leeds_city_fund: 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. ab2026__business_rates_ev_charging_relief: 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__package_tpa_cgt_founders_relief_and_badr", + "title": "TPA: CGT (Founders' Relief and BADR)", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 26 and 60 (TPA's by-tax chart).", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__founders_relief_cgt", + "ab2026__badr_lifetime_limit_500000" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "1 of 2 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 1 expressible legs: ['ab2026__badr_lifetime_limit_500000']", + "expressible_legs": [ + "ab2026__badr_lifetime_limit_500000" + ] + }, + { + "measure_key": "ab2026__package_tpa_energy_and_environment", + "title": "TPA: energy and environment", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 17, 69, 71, 90 and 96 (TPA's by-year chart).", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__climate_change_levy_rates_2028", + "ab2026__electricity_generator_levy_55pc", + "ab2026__carbon_price_support_removed", + "ab2026__landfill_communities_fund_credit_cap", + "ab2026__ets_energy_from_waste_delay" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 5 legs. ab2026__climate_change_levy_rates_2028: 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. ab2026__electricity_generator_levy_55pc: 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. ab2026__carbon_price_support_removed: 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. ab2026__landfill_communities_fund_credit_cap: 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. ab2026__ets_energy_from_waste_delay: 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": "Each leg's search. ab2026__climate_change_levy_rates_2028: 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. ab2026__electricity_generator_levy_55pc: 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. ab2026__carbon_price_support_removed: 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. ab2026__landfill_communities_fund_credit_cap: 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. ab2026__ets_energy_from_waste_delay: 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__package_tpa_fuel_duty_red_diesel_and_hgv_ved", + "title": "TPA: fuel duty cut, red diesel and HGV VED", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 3, 18 and 65 (TPA's by-tax chart).", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred", + "ab2026__red_diesel_duty_cut", + "ab2026__hgv_ved_1_for_12_months" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "2 of 3 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 1 expressible legs: ['ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred']", + "expressible_legs": [ + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred" + ] + }, + { + "measure_key": "ab2026__package_tpa_other_by_measure", + "title": "TPA: other (by-measure chart)", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 11, 17, 18, 19, 28, 36, 50, 51, 53, 65, 66, 69, 71, 79, 88, 89, 90, 93, 94, 97 and 98.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__cash_isa_limit_held_at_20000", + "ab2026__climate_change_levy_rates_2028", + "ab2026__red_diesel_duty_cut", + "ab2026__alcohol_duty_small_producer_relief", + "ab2026__emi2_option_limit_120000", + "ab2026__vat_zero_rate_land_for_social_housing", + "ab2026__advance_corporation_tax_abolished", + "ab2026__vat_reverse_charge_overseas_services_restricted", + "ab2026__pension_death_benefits_two_year_rule_removed", + "ab2026__hgv_ved_1_for_12_months", + "ab2026__vat_5pc_family_days_out_summer_2026", + "ab2026__electricity_generator_levy_55pc", + "ab2026__carbon_price_support_removed", + "ab2026__securities_transfer_tax", + "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__gas_distribution_revenue_recognition_spread", + "ab2026__us_llc_double_taxation_relief" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 21 legs. ab2026__cash_isa_limit_held_at_20000: No ISA subscription or subscription limit: the engine holds ISA balances and interest, not subscriptions, so a limit has nothing to bind. ab2026__climate_change_levy_rates_2028: 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. ab2026__red_diesel_duty_cut: 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. ab2026__alcohol_duty_small_producer_relief: 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. ab2026__emi2_option_limit_120000: 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. ab2026__vat_zero_rate_land_for_social_housing: 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. ab2026__advance_corporation_tax_abolished: 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. ab2026__vat_reverse_charge_overseas_services_restricted: 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. ab2026__pension_death_benefits_two_year_rule_removed: 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. ab2026__hgv_ved_1_for_12_months: 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. ab2026__vat_5pc_family_days_out_summer_2026: 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. ab2026__electricity_generator_levy_55pc: 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. ab2026__carbon_price_support_removed: 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. ab2026__securities_transfer_tax: 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. ab2026__vat_zero_rate_donated_medicines: 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. ab2026__vat_medical_deputies_staffing: 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. ab2026__landfill_communities_fund_credit_cap: 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. ab2026__hvcts_deferrals_discounts_exemptions: 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. ab2026__benefits_in_kind_payrolling_delay: An enforcement, compliance or administrative change (the timing of mandatory payrolling of benefits in kind): the rules households face do not change. ab2026__gas_distribution_revenue_recognition_spread: 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. ab2026__us_llc_double_taxation_relief: 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": "Each leg's search. ab2026__cash_isa_limit_held_at_20000: 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. ab2026__climate_change_levy_rates_2028: 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. ab2026__red_diesel_duty_cut: 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. ab2026__alcohol_duty_small_producer_relief: 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. ab2026__emi2_option_limit_120000: 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. ab2026__vat_zero_rate_land_for_social_housing: 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. ab2026__advance_corporation_tax_abolished: 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. ab2026__vat_reverse_charge_overseas_services_restricted: 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. ab2026__pension_death_benefits_two_year_rule_removed: 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. ab2026__hgv_ved_1_for_12_months: 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. ab2026__vat_5pc_family_days_out_summer_2026: 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. ab2026__electricity_generator_levy_55pc: 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. ab2026__carbon_price_support_removed: 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. ab2026__securities_transfer_tax: 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. ab2026__vat_zero_rate_donated_medicines: 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. ab2026__vat_medical_deputies_staffing: 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. ab2026__landfill_communities_fund_credit_cap: 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. ab2026__hvcts_deferrals_discounts_exemptions: 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. ab2026__benefits_in_kind_payrolling_delay: 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. ab2026__gas_distribution_revenue_recognition_spread: 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. ab2026__us_llc_double_taxation_relief: 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.", + "policyengine_uk_development_item": true, + "upstream_item": "policyengine-uk: ISA subscriptions, a subscription limit, and Lifetime and first-time-buyer ISA withdrawals; policyengine-uk: estates, death benefits and their income tax treatment; policyengine-uk: consumption detailed enough to separate admissions to attractions and days out; 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__package_tpa_other_by_tax_2027_28", + "title": "TPA: other (by-tax chart, 2027-28)", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 17, 19, 44, 56, 69, 71, 79, 90, 93, 96 and 98; TPA's NOTES places the lines that are zero in 2027-28 by assumption and leaves line 66 undetermined, so we leave line 66 out.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__climate_change_levy_rates_2028", + "ab2026__alcohol_duty_small_producer_relief", + "ab2026__uk_export_finance_defence_capacity", + "ab2026__machine_games_duty_higher_stake_25pc", + "ab2026__electricity_generator_levy_55pc", + "ab2026__carbon_price_support_removed", + "ab2026__securities_transfer_tax", + "ab2026__landfill_communities_fund_credit_cap", + "ab2026__hvcts_deferrals_discounts_exemptions", + "ab2026__ets_energy_from_waste_delay", + "ab2026__us_llc_double_taxation_relief" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 11 legs. ab2026__climate_change_levy_rates_2028: 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. ab2026__alcohol_duty_small_producer_relief: 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. ab2026__uk_export_finance_defence_capacity: Lending, guarantees, investment or a financial transaction (UK Export Finance): no household tax or benefit rule changes. ab2026__machine_games_duty_higher_stake_25pc: 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. ab2026__electricity_generator_levy_55pc: 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. ab2026__carbon_price_support_removed: 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. ab2026__securities_transfer_tax: 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. ab2026__landfill_communities_fund_credit_cap: 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. ab2026__hvcts_deferrals_discounts_exemptions: 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. ab2026__ets_energy_from_waste_delay: 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. ab2026__us_llc_double_taxation_relief: 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": "Each leg's search. ab2026__climate_change_levy_rates_2028: 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. ab2026__alcohol_duty_small_producer_relief: 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. ab2026__uk_export_finance_defence_capacity: 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. ab2026__machine_games_duty_higher_stake_25pc: 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. ab2026__electricity_generator_levy_55pc: 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. ab2026__carbon_price_support_removed: 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. ab2026__securities_transfer_tax: 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. ab2026__landfill_communities_fund_credit_cap: 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. ab2026__hvcts_deferrals_discounts_exemptions: 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. ab2026__ets_energy_from_waste_delay: 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. ab2026__us_llc_double_taxation_relief: 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.", + "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__package_tpa_other_by_year", + "title": "TPA: other (by-year chart)", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 10, 16, 19, 26, 44, 56, 60, 77, 78, 79, 93, 95 and 98.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__food_and_heating_oil_tariff_suspensions", + "ab2026__business_tariff_suspensions", + "ab2026__alcohol_duty_small_producer_relief", + "ab2026__founders_relief_cgt", + "ab2026__uk_export_finance_defence_capacity", + "ab2026__machine_games_duty_higher_stake_25pc", + "ab2026__badr_lifetime_limit_500000", + "ab2026__uk_india_ceta_and_double_contributions_convention", + "ab2026__steel_tariff_and_quotas", + "ab2026__securities_transfer_tax", + "ab2026__hvcts_deferrals_discounts_exemptions", + "ab2026__low_value_imports_customs_relief_removed", + "ab2026__us_llc_double_taxation_relief" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "12 of 13 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 1 expressible legs: ['ab2026__badr_lifetime_limit_500000']", + "expressible_legs": [ + "ab2026__badr_lifetime_limit_500000" + ] + }, + { + "measure_key": "ab2026__package_tpa_other_corporate_tax", + "title": "TPA: other corporate tax", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 49, 50, 54, 68 and 97; on the by-tax bar, TPA's NOTES places lines 49 and 50, zero in 2027-28, by assumption.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__distributions_framework_modernised", + "ab2026__advance_corporation_tax_abolished", + "ab2026__foreign_sovereign_investments_taxation", + "ab2026__foreign_permanent_establishment_exemption_mandatory", + "ab2026__gas_distribution_revenue_recognition_spread" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 5 legs. ab2026__distributions_framework_modernised: 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. ab2026__advance_corporation_tax_abolished: 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. ab2026__foreign_sovereign_investments_taxation: 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. ab2026__foreign_permanent_establishment_exemption_mandatory: 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. ab2026__gas_distribution_revenue_recognition_spread: 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": "Each leg's search. ab2026__distributions_framework_modernised: 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. ab2026__advance_corporation_tax_abolished: 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. ab2026__foreign_sovereign_investments_taxation: 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. ab2026__foreign_permanent_establishment_exemption_mandatory: 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. ab2026__gas_distribution_revenue_recognition_spread: 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__package_tpa_other_income_tax", + "title": "TPA: other income tax", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 5, 15, 28, 52, 53, 86 and 94; on the by-tax bar, TPA's NOTES places lines 15 and 86, zero in 2027-28, by assumption.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__mileage_allowance_payments_55p", + "ab2026__trading_allowance_3000", + "ab2026__emi2_option_limit_120000", + "ab2026__pension_tax_allowance", + "ab2026__pension_death_benefits_two_year_rule_removed", + "ab2026__company_car_tax_rates_2030_31", + "ab2026__benefits_in_kind_payrolling_delay" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "5 of 7 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 2 expressible legs: ['ab2026__trading_allowance_3000', 'ab2026__pension_tax_allowance']", + "expressible_legs": [ + "ab2026__trading_allowance_3000", + "ab2026__pension_tax_allowance" + ] + }, + { + "measure_key": "ab2026__package_tpa_other_vat", + "title": "TPA: other VAT", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 36, 46, 51, 59, 88 and 89; TPA's NOTES says the by-tax bar may also hold line 66, zero in 2027-28, which we leave out.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__vat_zero_rate_land_for_social_housing", + "ab2026__online_marketplace_liability_uk_businesses", + "ab2026__vat_reverse_charge_overseas_services_restricted", + "ab2026__private_hire_operators_vat_full_fare", + "ab2026__vat_zero_rate_donated_medicines", + "ab2026__vat_medical_deputies_staffing" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 6 legs. ab2026__vat_zero_rate_land_for_social_housing: 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. ab2026__online_marketplace_liability_uk_businesses: An enforcement, compliance or administrative change (online marketplace VAT liability): the rules households face do not change. ab2026__vat_reverse_charge_overseas_services_restricted: 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. ab2026__private_hire_operators_vat_full_fare: 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. ab2026__vat_zero_rate_donated_medicines: 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. ab2026__vat_medical_deputies_staffing: 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": "Each leg's search. ab2026__vat_zero_rate_land_for_social_housing: 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. ab2026__online_marketplace_liability_uk_businesses: 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. ab2026__vat_reverse_charge_overseas_services_restricted: 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. ab2026__private_hire_operators_vat_full_fare: 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. ab2026__vat_zero_rate_donated_medicines: 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. ab2026__vat_medical_deputies_staffing: 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__package_tpa_savings_property_income_and_cash_isa", + "title": "TPA: savings and property income tax", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 11, 61 and 62; the group includes line 11, the cash ISA limit, which TPA doesn't mention.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__cash_isa_limit_held_at_20000", + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "1 of 3 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 2 expressible legs: ['ab2026__property_income_rates_plus_2pp', 'ab2026__savings_income_rates_plus_2pp']", + "expressible_legs": [ + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ] + }, + { + "measure_key": "ab2026__package_tpa_tariffs", + "title": "TPA: tariffs (including UK-India)", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 10, 16, 77, 78 and 95; on the by-tax bar, TPA's NOTES places line 95, zero in 2027-28, by assumption.", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "construction": "package_of_registry_measures", + "package_of": [ + "ab2026__food_and_heating_oil_tariff_suspensions", + "ab2026__business_tariff_suspensions", + "ab2026__uk_india_ceta_and_double_contributions_convention", + "ab2026__steel_tariff_and_quotas", + "ab2026__low_value_imports_customs_relief_removed" + ], + "pe_reform_delta": null, + "computability": "not_expressible", + "why": "The engine can't express any of these 5 legs. ab2026__food_and_heating_oil_tariff_suspensions: 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. ab2026__business_tariff_suspensions: 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. ab2026__uk_india_ceta_and_double_contributions_convention: 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. ab2026__steel_tariff_and_quotas: 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. ab2026__low_value_imports_customs_relief_removed: 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": "Each leg's search. ab2026__food_and_heating_oil_tariff_suspensions: 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. ab2026__business_tariff_suspensions: 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. ab2026__uk_india_ceta_and_double_contributions_convention: 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. ab2026__steel_tariff_and_quotas: 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. ab2026__low_value_imports_customs_relief_removed: 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__package_tpa_temporary_vat_and_fuel_cuts", + "title": "TPA: temporary VAT and fuel cuts", + "reported_status": "announced", + "source_note": "`tax_policy_associates` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 2, 3, 18, 65 and 66 (TPA's by-year chart).", + "program": "package", + "producers": [ + "tax_policy_associates" + ], + "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__red_diesel_duty_cut", + "ab2026__hgv_ved_1_for_12_months", + "ab2026__vat_5pc_family_days_out_summer_2026" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "3 of 5 legs are not expressible (see each leg's verdict); a PolicyEngine number covers only the 2 expressible legs: ['ab2026__electricity_vat_zero_rate_to_july_2027', 'ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred']", + "expressible_legs": [ + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred" + ] + }, + { + "measure_key": "ab2026__package_fuel_duty_and_electricity_vat", + "title": "OBR Table 3.1: fuel duty freeze and VAT off domestic energy bills (receipts)", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 11 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The receipts of Table 6.1 lines 2 and 3 only (the OBR groups Table 3.1 by receipts head); line 1 doesn't count.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "receipts_of_registry_measures", + "receipts_of": [ + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "The producer allocates its figure to receipts, and a PolicyEngine run gives each leg's whole effect, not its receipts head, so a counterpart is constructed and never like-for-like; the expressible legs are ['ab2026__electricity_vat_zero_rate_to_july_2027', 'ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred']", + "expressible_legs": [ + "ab2026__electricity_vat_zero_rate_to_july_2027", + "ab2026__fuel_duty_5p_cut_extended_and_rpi_rise_deferred" + ] + }, + { + "measure_key": "ab2026__package_property_and_savings_income_rates_receipts", + "title": "OBR Table 3.1: changes to savings and property income tax rates (receipts)", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The receipts of Table 6.1 lines 61 and 62, which differ from the lines' totals, so not ab2026__package_property_and_savings_income_rates.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "receipts_of_registry_measures", + "receipts_of": [ + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ], + "pe_reform_delta": null, + "computability": "partial", + "missing": "The producer allocates its figure to receipts, and a PolicyEngine run gives each leg's whole effect, not its receipts head, so a counterpart is constructed and never like-for-like; the expressible legs are ['ab2026__property_income_rates_plus_2pp', 'ab2026__savings_income_rates_plus_2pp']", + "expressible_legs": [ + "ab2026__property_income_rates_plus_2pp", + "ab2026__savings_income_rates_plus_2pp" + ] + }, + { + "measure_key": "ab2026__package_tax_administration_compliance_and_debt_collection_receipts", + "title": "OBR Table 3.1: tax administration, compliance and debt collection measures (receipts)", + "reported_status": "announced", + "source_note": "`obr_efo` and `resolution_foundation` score it on 13 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The receipts of Table 6.1 lines 45 and 46, equal in all six years, whose totals round differently; RF restates the OBR's group.", + "program": "package", + "producers": [ + "obr_efo", + "resolution_foundation" + ], + "construction": "receipts_of_registry_measures", + "receipts_of": [ + "ab2026__hmrc_tax_gap_package", + "ab2026__online_marketplace_liability_uk_businesses" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine can't express any of these 2 legs. ab2026__hmrc_tax_gap_package: An enforcement, compliance or administrative change (HMRC measures to close the tax gap): the rules households face do not change. ab2026__online_marketplace_liability_uk_businesses: An enforcement, compliance or administrative change (online marketplace VAT liability): the rules households face do not change.", + "name_search": "Each leg's search. ab2026__hmrc_tax_gap_package: 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. ab2026__online_marketplace_liability_uk_businesses: 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__package_temporary_business_rates_reliefs_receipts", + "title": "OBR: the package of temporary business rates measures (receipts)", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The receipts of Table 6.1 lines 12, 13 and 14: OBR paragraph 3.19's net cost of around £0.5 billion in 2028-29 matches their receipts, not their totals.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "receipts_of_registry_measures", + "receipts_of": [ + "ab2026__business_rates_pubs_relief_35pc", + "ab2026__business_rates_sbrr_rhl_thresholds_raised", + "ab2026__business_rates_rhl_transitional_support" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine can't express any of these 3 legs. ab2026__business_rates_pubs_relief_35pc: 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. ab2026__business_rates_sbrr_rhl_thresholds_raised: 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. ab2026__business_rates_rhl_transitional_support: 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": "Each leg's search. ab2026__business_rates_pubs_relief_35pc: 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. ab2026__business_rates_sbrr_rhl_thresholds_raised: 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. ab2026__business_rates_rhl_transitional_support: 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__package_barnett_consequentials", + "title": "Barnett consequentials of decisions confirmed at Budget for the devolved governments", + "reported_status": "announced", + "source_note": "`hm_treasury` and `welsh_government` score it on 16 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 4.150: the consequentials for the Scottish, Welsh and Northern Ireland governments, 2026-27 to 2029-30, without the technical reduction from lower employer pension contributions; each government's figure is a component, and conditions.geography names the nation.", + "program": "public_spending", + "producers": [ + "hm_treasury", + "welsh_government" + ], + "construction": "producer_scope", + "package_of": "Red book paragraph 4.150: the consequentials for the Scottish, Welsh and Northern Ireland governments, 2026-27 to 2029-30, without the technical reduction from lower employer pension contributions; each government's figure is a component, and conditions.geography names the nation.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Block grant funding between the UK and devolved governments: no tax or benefit rule for households changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /barnett|block_grant|devolved/. 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_breathing_space_for_households", + "title": "Government action at this Budget to provide breathing space for households", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 3.2's action, whose CPI effect the OBR expects at 0.1 percentage points in 2027. The red book lists no lines for the figure, Box 3.A's breathing space covers lines 1 and 2, and Table 6.1's heading groups lines 1 to 11, so we keep HM Treasury's words.", + "program": "package", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "Red book paragraph 3.2's action, whose CPI effect the OBR expects at 0.1 percentage points in 2027. The red book lists no lines for the figure, Box 3.A's breathing space covers lines 1 and 2, and Table 6.1's heading groups lines 1 to 11, so we keep HM Treasury's words.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: HM Treasury lists no Table 6.1 lines for the figure, and three readings (lines 1 and 2, lines 2 and 3, lines 1 to 11) are open. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_civil_service_transformation_programme", + "title": "OBR: the civil service transformation programme", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's programme to reduce resource spending; the OBR names no lines, though lines 63 and 64 probably belong.", + "program": "public_spending", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's programme to reduce resource spending; the OBR names no lines, though lines 63 and 64 probably belong.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (civil service running 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 /civil_service|administration_budget/. 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_compliance_measures_announced", + "title": "OBR Box 3.1: the compliance measures announced in this Budget", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR doesn't list them; they are probably line 45's items and line 46, but the OBR doesn't say so.", + "program": "compliance_and_administration", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR doesn't list them; they are probably line 45's items and line 46, but the OBR doesn't say so.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (tax compliance measures): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /compliance|tax_gap/. 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_corporation_and_bank_tax_changes", + "title": "OBR Table 3.1: changes to corporation and bank taxation", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's group; paragraph 3.16 discusses lines 54, 55 and 58, and the OBR publishes no full decomposition.", + "program": "business_tax", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's group; paragraph 3.16 discusses lines 54, 55 and 58, and the OBR publishes no full decomposition.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A tax on businesses (corporation tax and the bank 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 /corporation_tax|bank_surcharge|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__package_defence_investment_plan", + "title": "The Defence Investment Plan", + "reported_status": "announced", + "source_note": "`hm_treasury` and `obr_efo` score it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The plan published in June 2026, which no single line covers; Table 6.1 prints its savings and funding on lines 40 to 42, and the OBR's £1.8 billion a year, its RDEL part, is a component.", + "program": "public_spending", + "producers": [ + "hm_treasury", + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The plan published in June 2026, which no single line covers; Table 6.1 prints its savings and funding on lines 40 to 42, and the OBR's £1.8 billion a year, its RDEL part, is a component.", + "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 /defence|military/. 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_dwp_fraud_and_error_measures", + "title": "DWP: this Budget's new fraud and error measures", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 5.17's new measures, expected to save an additional £1.4 billion over the forecast; the red book doesn't list them, and the figure reconciles with no printed basis for line 47.", + "program": "compliance_and_administration", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "Red book paragraph 5.17's new measures, expected to save an additional £1.4 billion over the forecast; the red book doesn't list them, and the figure reconciles with no printed basis for line 47.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (benefit fraud and error prevention): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /fraud|error|overpayment/. 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_fuel_duty_freezes_since_2010_11", + "title": "OBR: cumulative fuel duty freezes from 2010-11 to 2027-28 and the 5p cut", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's cumulative cost against RPI uprating, which includes line 3 and every freeze since 2010-11; RF's ab2026_option__fuel_duty_rpi_uprating_since_2011 sees the same pair of paths from the other side.", + "program": "fuel_duty", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's cumulative cost against RPI uprating, which includes line 3 and every freeze since 2010-11; RF's ab2026_option__fuel_duty_rpi_uprating_since_2011 sees the same pair of paths from the other side.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A sum of the receipts that seventeen years of fuel duty decisions forgo against RPI uprating: the engine scores one world against another in a policy year, not a cumulative history of past decisions.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /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__package_government_decisions_since_march_2026", + "title": "The total effect of Government decisions since March 2026", + "reported_status": "announced", + "source_note": "`hm_treasury`, `obr_efo` and `resolution_foundation` score it on 368 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's total effect of decisions on PSNB: Table 6.1 lines 1 to 98, the three fiscally neutral measures with no line (PWLB debt relief, Scottish APD devolution and the landlord registration fee) and the two non-scorecard decisions, with direct and indirect effects; the red book's Table 1.3 and RF restate it.", + "program": "package", + "producers": [ + "hm_treasury", + "obr_efo", + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "The OBR's total effect of decisions on PSNB: Table 6.1 lines 1 to 98, the three fiscally neutral measures with no line (PWLB debt relief, Scottish APD devolution and the landlord registration fee) and the two non-scorecard decisions, with direct and indirect effects; the red book's Table 1.3 and RF restate it.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: the OBR adds its indirect effects and two non-scorecard decisions to Table 6.1's lines. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_hmt_distributional_since_ab2024", + "title": "HM Treasury's Impact on households: modelled policies from Autumn Budget 2024 to Budget 2026", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Impact on households paragraph 1.8: the Budget 2026 policies above plus earlier events' measures, which aren't Table 6.1 lines.", + "program": "package", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "Impact on households paragraph 1.8: the Budget 2026 policies above plus earlier events' measures, which aren't Table 6.1 lines.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: HM Treasury adds earlier events' measures, which this registry doesn't hold. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_household_energy_vat_and_household_share_of_fuel_duty", + "title": "RF's cost-of-living package: lines 1 and 2 and the household share of the fuel duty cut", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 3 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 1 and 2 plus the share of line 3 that accrues directly to households (RF footnote 19), a two-year total; not lines 1 to 3 exactly (rule 3).", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "Table 6.1 lines 1 and 2 plus the share of line 3 that accrues directly to households (RF footnote 19), a two-year total; not lines 1 to 3 exactly (rule 3).", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: RF counts only the household-incidence share of line 3, which no registry measure holds. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_ifs_announced_tax_changes", + "title": "IFS: the tax change Budget 2026 announced, at the forecast horizon", + "reported_status": "announced", + "source_note": "`ifs` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: IFS's estimate as a share of GDP; the chart lists no Table 6.1 line and names no OBR grouping.", + "program": "package", + "producers": [ + "ifs" + ], + "construction": "producer_scope", + "package_of": "IFS's estimate as a share of GDP; the chart lists no Table 6.1 line and names no OBR grouping.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: IFS lists no Table 6.1 lines and names no OBR grouping. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_ifs_new_giveaways", + "title": "IFS: the Budget's new giveaways", + "reported_status": "announced", + "source_note": "`ifs` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: IFS's new giveaways that push up borrowing this year and next; IFS names no OBR line, and doesn't say they cover every decision since March.", + "program": "package", + "producers": [ + "ifs" + ], + "construction": "producer_scope", + "package_of": "IFS's new giveaways that push up borrowing this year and next; IFS names no OBR line, and doesn't say they cover every decision since March.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: IFS names no lines and doesn't say which decisions its giveaways cover. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_national_wealth_fund_and_british_business_bank", + "title": "OBR: the National Wealth Fund and British Business Bank's additional investment", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 5 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Table 6.1 lines 29 and 30 and their Table 6.2 financial transactions: OBR paragraph 3.20's financing requirement, net debt and borrowing effects, with gross debt and additional income as parts.", + "program": "financial_transactions", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "Table 6.1 lines 29 and 30 and their Table 6.2 financial transactions: OBR paragraph 3.20's financing requirement, net debt and borrowing effects, with gross debt and additional income as parts.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (National Wealth Fund and British Business Bank investment): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /wealth_fund|british_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__package_obr_other_ame_spending_decisions", + "title": "OBR Table 3.1: other AME spending decisions", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's residual AME group, without the pension valuations and net of line 1's council tax rebate; the OBR publishes no line decomposition.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's residual AME group, without the pension valuations and net of line 1's council tax rebate; the OBR publishes no line decomposition.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: the OBR publishes no Table 6.1 line decomposition of its group. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_obr_other_departmental_spending_changes", + "title": "OBR Table 3.1: other departmental spending changes", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Departmental spending changes without the pension valuations, including line 1's DEL funding, defence, capital spending and the £5.5bn 2031-32 RDEL reduction.", + "program": "public_spending", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "Departmental spending changes without the pension valuations, including line 1's DEL funding, defence, capital spending and the £5.5bn 2031-32 RDEL reduction.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (departmental spending), 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 /departmental|resource_spending|capital_spending/. 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_obr_other_hmrc_compliance_and_debt", + "title": "OBR paragraph 3.13: other HMRC compliance and debt measures", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Direct debt recovery, e-invoicing and debt collection agencies (parts of line 45) and online marketplace liability (line 46).", + "program": "compliance_and_administration", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "Direct debt recovery, e-invoicing and debt collection agencies (parts of line 45) and online marketplace liability (line 46).", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (HMRC debt collection and compliance): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /debt_collection|compliance|e_invoic/. 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_obr_other_tax_measures", + "title": "OBR Table 3.1: other tax measures", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's residual of Table 6.1's tax measures after its five named groups; the OBR enumerates no lines.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's residual of Table 6.1's tax measures after its five named groups; the OBR enumerates no lines.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: the OBR enumerates no lines for its residual group. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_parliament_fuel_duty_decisions", + "title": "The Government's fuel duty decisions across this Parliament", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 3 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 3.13: line 3 plus earlier events' fuel duty decisions, against the previous government's plans (footnote 98).", + "program": "package", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "Red book paragraph 3.13: line 3 plus earlier events' fuel duty decisions, against the previous government's plans (footnote 98).", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: HM Treasury adds earlier events' fuel duty decisions, which this registry doesn't hold. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_parliament_tax_gap_measures", + "title": "Measures to close the tax gap announced during this Parliament", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 2.46: lines 45 and 46 plus the tax gap measures of Autumn Budget 2024, Spring Statement 2025 and Budget 2025 (footnote 73).", + "program": "compliance_and_administration", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "Red book paragraph 2.46: lines 45 and 46 plus the tax gap measures of Autumn Budget 2024, Spring Statement 2025 and Budget 2025 (footnote 73).", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (tax gap measures): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /compliance|tax_gap/. 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_welfare_fraud_and_error_savings_in_forecast", + "title": "Total savings from welfare fraud and error measures over the forecast", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Red book paragraph 5.17: this Budget's new fraud and error measures plus those already in the forecast; the red book doesn't say which earlier measures count.", + "program": "compliance_and_administration", + "producers": [ + "hm_treasury" + ], + "proposed_as": "ab2026__package_parliament_welfare_fraud_and_error_savings", + "construction": "producer_scope", + "package_of": "Red book paragraph 5.17: this Budget's new fraud and error measures plus those already in the forecast; the red book doesn't say which earlier measures count.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "An enforcement, compliance or administrative change (benefit fraud and error prevention): the rules households face do not change.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /fraud|error|overpayment/. 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_planned_capital_spending_reductions", + "title": "OBR: reductions in planned capital spending", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's changes to departmental capital spending; it enumerates no lines.", + "program": "public_spending", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's changes to departmental capital spending; it enumerates no lines.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (departmental capital spending), 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 /capital_spending|cdel|departmental/. 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_pubs_relief_35pc_total", + "title": "The whole 35% business rates relief for pubs, social clubs and live music venues in England", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The 15% announced in January 2026 (red book paragraph 6.189, no AB2026 line) plus line 12's further 20ppt.", + "program": "business_rates", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "The 15% announced in January 2026 (red book paragraph 6.189, no AB2026 line) plus line 12's further 20ppt.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A business rates measure (relief for pubs, social clubs and live music 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|pub/. Parameters: 5 node(s) ['gov.contrib.policyengine.budget.other_public_spending', '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', 'other_public_spending_budget_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__package_rdel_decisions_excluding_household_energy_payment", + "title": "RF: the Budget's RDEL decisions over the Spending Review period except the Household Energy Payment", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 3 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's fiscal aggregate of resource spending decisions, not a programme allocation.", + "program": "public_spending", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "RF's fiscal aggregate of resource spending decisions, not a programme allocation.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (departmental resource spending), 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 /departmental|resource_spending|rdel/. 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_regulation_tariff_and_sandbox_business_savings", + "title": "Business savings from regulation cuts, tariff suspensions and testing powers", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The executive summary's savings for business, across line 16 (tariff suspensions) and measures with no Table 6.1 line.", + "program": "regulation", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "The executive summary's savings for business, across line 16 (tariff suspensions) and measures with no Table 6.1 line.", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A regulatory change (regulation, tariff suspensions and technology testing powers) with no tax or benefit rule for households.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /regulat|tariff|customs/. 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: 6 ['esa_income_tariff_income', 'housing_benefit_pension_age_regulations_apply', '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__package_rf_absolute_policy_changes", + "title": "RF: every policy decision counted at its absolute value", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's fiscal-event size measure; RF lists no lines.", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "RF's fiscal-event size measure; RF lists no lines.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: RF lists no lines, and sums each decision's absolute value, which no package of signed legs gives. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_rf_energy_bill_support_announced_at_budget", + "title": "RF: the energy bill support announced at the Budget", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's support of up to £116, which includes line 1's £100 Household Energy Payment; RF doesn't itemise the rest.", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "RF's support of up to £116, which includes line 1's £100 Household Energy Payment; RF doesn't itemise the rest.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: RF doesn't itemise the support beyond line 1. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_rf_other_tax_measures", + "title": "RF Figure 10: other tax measures", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's residual: the OBR's net direct effects less fuel duty, the bank surcharge, capital allowances, savings and property, and tax administration.", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "RF's residual: the OBR's net direct effects less fuel duty, the bank surcharge, capital allowances, savings and property, and tax administration.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: RF defines a residual of the OBR's groups, not a list of lines. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_rf_parliament_permanent_tax_and_benefit_measures", + "title": "RF: permanent personal tax and benefit changes announced this Parliament", + "reported_status": "announced", + "source_note": "`resolution_foundation` scores it on 42 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF compares every permanent personal tax and benefit change from the 2024 election through AB26 with the policy the Government inherited. From AB26, RF includes lines 52, 56, 61 and 62 and the gas standing charge.", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "RF compares every permanent personal tax and benefit change from the 2024 election through AB26 with the policy the Government inherited. From AB26, RF includes lines 52, 56, 61 and 62 and the gas standing charge.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: RF spans several events, whose measures this registry doesn't hold. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_spending_decisions_since_march_2026", + "title": "OBR: direct effect of spending measures since March 2026", + "reported_status": "announced", + "source_note": "`obr_efo` scores it on 13 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's expenditure-side effects of decisions since March, including the pension valuations and the 2031-32 RDEL assumption; not HM Treasury's spending total.", + "program": "package", + "producers": [ + "obr_efo" + ], + "construction": "producer_scope", + "package_of": "The OBR's expenditure-side effects of decisions since March, including the pension valuations and the 2031-32 RDEL assumption; not HM Treasury's spending total.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: the OBR includes non-scorecard decisions and publishes no line decomposition. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_tax_decisions_since_march_2026", + "title": "OBR: direct effect of tax measures since March 2026", + "reported_status": "announced", + "source_note": "`obr_efo` and `resolution_foundation` score it on 20 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: The OBR's Table 3.1 line, a receipts grouping as the OBR classifies decisions, which differs from Table 6.1's tax total (−£1,749m against −£1,645m in 2026-27); RF restates it.", + "program": "package", + "producers": [ + "obr_efo", + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "The OBR's Table 3.1 line, a receipts grouping as the OBR classifies decisions, which differs from Table 6.1's tax total (−£1,749m against −£1,645m in 2026-27); RF restates it.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: the OBR classifies decisions as tax measures by their receipts effects, not by Table 6.1's heads. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." + }, + { + "measure_key": "ab2026__package_total_financial_transactions", + "title": "Table 6.2: total cash impacts of financial transactions", + "reported_status": "announced", + "source_note": "`hm_treasury` scores it on 6 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Exactly Table 6.2 lines 1 to 9 (footnote 1: totals may not sum due to rounding).", + "program": "financial_transactions", + "producers": [ + "hm_treasury" + ], + "construction": "producer_scope", + "package_of": "Exactly Table 6.2 lines 1 to 9 (footnote 1: totals may not sum due to rounding).", + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Lending, guarantees, investment or a financial transaction (Table 6.2's financial transactions): no household tax or benefit rule changes.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /financial_transaction|loan|equity/. Parameters: 39 node(s) ['gov.dfe.maintenance_loans.full_time.maximum.living_with_parents', 'gov.dfe.maintenance_loans.full_time.maximum.away_outside_london', 'gov.dfe.maintenance_loans.full_time.maximum.away_in_london', 'gov.dfe.maintenance_loans.full_time.maximum_entitled_to_benefits.living_with_parents', 'gov.dfe.maintenance_loans.full_time.maximum_entitled_to_benefits.away_outside_london', 'gov.dfe.maintenance_loans.full_time.maximum_entitled_to_benefits.away_in_london']. Variables: 20 ['adult_dependants_grant_receives_postgraduate_loan', 'childcare_grant_receives_postgraduate_loan', 'has_student_loan', 'maintenance_loan', 'maintenance_loan_candidate_benunit_income', 'maintenance_loan_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_option__cgt_reform_package", + "title": "CenTax: structural reform of CGT, with rates equal to income tax rates", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 10 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's package: CGT rates equal to income tax rates, an investment allowance for the risk-free rate, no uplift at death, and rebasing on arrival with deemed disposal on departure; CenTax doesn't cost its fifth element, more generous loss relief.", + "program": "capital_gains_tax", + "producers": [ + "centax" + ], + "computability": "partial", + "pe_reform_delta": null, + "missing": "Only the rate leg resolves: gov.hmrc.cgt.basic_rate, higher_rate and additional_rate. The engine has no investment allowance, no uplift at death (it holds no estates) and no rebasing on arrival or deemed disposal on departure, and CenTax costs the four elements together.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /cgt|capital_gains/. Parameters: 18 node(s) ['gov.economic_assumptions.yoy_growth.capital_gains', 'gov.economic_assumptions.indices.capital_gains', 'gov.hmrc.cgt.additional_rate', 'gov.hmrc.cgt.annual_exempt_amount', 'gov.hmrc.cgt.badr.lifetime_limit', 'gov.hmrc.cgt.badr.rate']. Variables: 13 ['capital_gains', 'capital_gains_badr', 'capital_gains_badr_behavioural_response', 'capital_gains_badr_elasticity', 'capital_gains_before_response', 'capital_gains_behavioural_response']. Both are searched because a parameter-only search misses a variable (#106). Re-run at policyengine-uk 2.151.0." + }, + { + "measure_key": "ab2026_option__childcare_100k_entitlement_taper", + "title": "CenTax: taper the withdrawal of free childcare above £100,000", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 3 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's taper of 8p, 18p or 28p per £1 over £100,000 (conditions.taper_rate).", + "program": "childcare", + "producers": [ + "centax" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine withdraws the extended childcare entitlement in one step at gov.dfe.extended_childcare_entitlement.income.limit; it has no taper above the limit.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /childcare.*(income|limit|taper)|extended_childcare/. Parameters: 30 node(s) ['gov.dfe.childcare_grant.income_limit.one_child', 'gov.dfe.childcare_grant.income_limit.two_or_more_children', 'gov.dfe.extended_childcare_entitlement.disability_criteria', 'gov.dfe.extended_childcare_entitlement.exemption.income_limit_applies', 'gov.dfe.extended_childcare_entitlement.exemption.partner_exclusion_criteria', 'gov.dfe.extended_childcare_entitlement.hours[0].threshold']. Variables: 15 ['childcare_grant_household_income', 'extended_childcare_entitlement', 'extended_childcare_entitlement_eligible', 'extended_childcare_entitlement_limited_capability_or_specified_benefit', 'extended_childcare_entitlement_meets_income_requirements', 'extended_childcare_entitlement_per_child']. 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: an extended childcare income limit that tapers, or varies by hours and child age", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026_option__childcare_100k_threshold_raised", + "title": "CenTax: raise the free childcare income limit from £100,000", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's options to raise the limit to £125,000 or £150,000 (conditions.threshold).", + "program": "childcare", + "producers": [ + "centax" + ], + "computability": "expressible", + "construction": "delta_on_current_law", + "pe_reform_delta": { + "gov.dfe.extended_childcare_entitlement.income.limit": 125000 + }, + "delta_kind": "absolute_value", + "engine_baseline_2026": { + "gov.dfe.extended_childcare_entitlement.income.limit": 100000 + }, + "note": "The delta gives the £125,000 variant; the £150,000 variant (conditions.threshold) sets the same parameter to 150000. Tax-Free Childcare keeps its own income test." + }, + { + "measure_key": "ab2026_option__childcare_100k_threshold_removed", + "title": "CenTax: remove the £100,000 free childcare income limit", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 3 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's option to make the free childcare entitlement in England available to parents with incomes over £100,000.", + "program": "childcare", + "producers": [ + "centax" + ], + "computability": "expressible", + "construction": "delta_on_current_law", + "pe_reform_delta": { + "gov.dfe.extended_childcare_entitlement.income.limit": null + }, + "delta_kind": "absolute_value", + "engine_baseline_2026": { + "gov.dfe.extended_childcare_entitlement.income.limit": 100000 + }, + "note": "null records inf (the limit removed). Tax-Free Childcare keeps its own income test.", + "uncapped_sentinel": "inf (limit removed), recorded as null in JSON" + }, + { + "measure_key": "ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s", + "title": "CenTax: remove the income limit for the first 15 hours of childcare for under-3s", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's narrower option, for the first 15 hours only and children under 3.", + "program": "childcare", + "producers": [ + "centax" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine applies one income limit to the whole extended entitlement (gov.dfe.extended_childcare_entitlement.income.limit); it cannot lift it for the first 15 hours of one age group.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /childcare.*(income|limit|taper)|extended_childcare/. Parameters: 30 node(s) ['gov.dfe.childcare_grant.income_limit.one_child', 'gov.dfe.childcare_grant.income_limit.two_or_more_children', 'gov.dfe.extended_childcare_entitlement.disability_criteria', 'gov.dfe.extended_childcare_entitlement.exemption.income_limit_applies', 'gov.dfe.extended_childcare_entitlement.exemption.partner_exclusion_criteria', 'gov.dfe.extended_childcare_entitlement.hours[0].threshold']. Variables: 15 ['childcare_grant_household_income', 'extended_childcare_entitlement', 'extended_childcare_entitlement_eligible', 'extended_childcare_entitlement_limited_capability_or_specified_benefit', 'extended_childcare_entitlement_meets_income_requirements', 'extended_childcare_entitlement_per_child']. 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: an extended childcare income limit that tapers, or varies by hours and child age", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026_option__fuel_duty_continued_freeze", + "title": "Keep fuel duty frozen until 2029-30 instead of the rise in July 2027", + "reported_status": "option_costed_by_others", + "source_note": "`obr_efo` and `resolution_foundation` score it on 7 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: Rates held at 52.95p a litre to 2029-30 against the announced policy, which extends line 3: OBR paragraph 3.43's alternative and RF's series for the OBR's constant-duty-rate forecast.", + "program": "fuel_duty", + "producers": [ + "obr_efo", + "resolution_foundation" + ], + "computability": "partial", + "pe_reform_delta": null, + "missing": "The rate leg resolves (gov.hmrc.fuel_duty.petrol_and_diesel), but the option's baseline is the announced path, Table 6.1 line 3, which the dashboard ran as a modifier with no parameter path. A counterpart needs line 3's modifier as its baseline and the frozen rate as its reform.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /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." + }, + { + "measure_key": "ab2026_option__fuel_duty_rpi_uprating_since_2011", + "title": "Fuel duty uprated by RPI since January 2011", + "reported_status": "option_costed_by_others", + "source_note": "`resolution_foundation` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's revenue that the freezes forgo against RPI uprating since January 2011; it mirrors the OBR's ab2026__package_fuel_duty_freezes_since_2010_11.", + "program": "fuel_duty", + "producers": [ + "resolution_foundation" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A counterfactual history of fuel duty rates since 2011: the engine scores one world against another in a policy year, not a path of past decisions.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /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_option__health_foundation_social_care_reforms", + "title": "Health Foundation's illustrative social care reforms", + "reported_status": "option_costed_by_others", + "source_note": "`obr_efo` scores it on 2 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: OBR paragraph 3.41's citation of the Health Foundation's costs, from limited home-care reform to wider schemes, in 2035-36 (footnote 13); not a settled AB2026 policy.", + "program": "public_spending", + "producers": [ + "obr_efo" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "Public spending (adult social care), 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_care|care_home|residential/. Parameters: 180 node(s) ['gov.dwp.housing_benefit.means_test.capital.working_age.residential_threshold', 'gov.hmrc.cgt.residential_property.additional_rate', 'gov.hmrc.cgt.residential_property.basic_rate', 'gov.hmrc.cgt.residential_property.higher_rate', 'gov.hmrc.stamp_duty.non_residential.purchase[0].threshold', 'gov.hmrc.stamp_duty.non_residential.purchase[0].rate']. Variables: 28 ['additional_residential_property_purchased', 'capital_gains_residential_property', 'cumulative_non_residential_rent', 'cumulative_residential_rent', 'housing_benefit_residential_capital_exception', 'lbtt_on_non_residential_property_rent']. 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_option__income_tax_5pc_share_devolved_to_mayors", + "title": "IPPR North: devolve 5% of income tax to mayors", + "reported_status": "option_costed_by_others", + "source_note": "`ippr` scores it on 1 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: IPPR North's option beyond the Budget's commitment on income tax devolution; no Table 6.1 line sets a 5% share.", + "program": "income_tax", + "producers": [ + "ippr" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "A share of a tax assigned between governments: no tax or benefit rule for households changes, and the engine holds no mayoral authorities.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /mayor|devolv|combined_authority/. 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_option__lha_unfreeze_2027_28", + "title": "Unfreeze Local Housing Allowance in 2027-28", + "reported_status": "option_costed_by_others", + "source_note": "`resolution_foundation` scores it on 17 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF's option of unfreezing LHA in 2027-28 instead of prolonging the freeze; no Table 6.1 line.", + "program": "housing_benefit", + "producers": [ + "resolution_foundation" + ], + "computability": "expressible", + "construction": "delta_on_current_law", + "pe_reform_delta": { + "gov.dwp.LHA.freeze": { + "2027": false + } + }, + "delta_kind": "absolute_value_by_year", + "engine_baseline_2026": { + "gov.dwp.LHA.freeze": true + }, + "note": "While gov.dwp.LHA.freeze holds true, the engine freezes Great Britain's LHA rates at the level of the latest year in which it was false; false in 2027 resets them in 2027-28, and the freeze resumes after." + }, + { + "measure_key": "ab2026_option__nics_on_investment_income", + "title": "CenTax: an equivalent of Class 1 NICs on investment income", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 10 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's option for rental income, savings income outside ISAs and other non-dividend investment income (conditions.income_type).", + "program": "national_insurance", + "producers": [ + "centax" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine charges National Insurance on employment and self-employment income only; it has no NICs base or rate for property, savings or other investment income.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /national_insurance|nics|investment_income|property_income|savings_interest/. Parameters: 41 node(s) ['gov.dwp.universal_credit.means_test.minimum_income_floor.self_employed_national_insurance', 'gov.hmrc.national_insurance.class_1.directors.full_year_category_a_2022_23.employee_scale[0].threshold', 'gov.hmrc.national_insurance.class_1.directors.full_year_category_a_2022_23.employee_scale[0].rate', 'gov.hmrc.national_insurance.class_1.directors.full_year_category_a_2022_23.employee_scale[1].threshold', 'gov.hmrc.national_insurance.class_1.directors.full_year_category_a_2022_23.employee_scale[1].rate', 'gov.hmrc.national_insurance.class_1.directors.full_year_category_a_2022_23.employee_scale[2].threshold']. Variables: 13 ['national_insurance', 'other_investment_income', 'property_income', 'property_income_after_finance_costs', 'property_income_tax', 'savings_interest_income']. 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: National Insurance on property, savings and other non-dividend investment income", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026_option__nics_on_partnership_income", + "title": "CenTax: an equivalent of employer NICs on partnership profits", + "reported_status": "option_costed_by_others", + "source_note": "`centax` scores it on 24 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: CenTax's top-up rates on partnership profits by income tax band, with a partnership allowance and an annual exempt amount per partner.", + "program": "national_insurance", + "producers": [ + "centax" + ], + "computability": "not_expressible", + "pe_reform_delta": null, + "why": "The engine holds self-employment income without separating partnership profits, and has no employer-equivalent NICs charge on them.", + "name_search": "Searched BOTH the parameter tree and the VARIABLE list for /partnership|self_employment|class_4/. Parameters: 14 node(s) ['gov.dwp.ESA.income.self_employment_class_2.above_lower_profits_threshold', 'gov.dwp.ESA.income.self_employment_class_2.deducted', 'gov.hmrc.income_tax.bases.taxable_self_employment_income_deductions', 'gov.hmrc.national_insurance.class_4.annual_maximum.includes_class_2', 'gov.hmrc.national_insurance.class_4.contribution_scale[0].threshold', 'gov.hmrc.national_insurance.class_4.contribution_scale[0].rate']. Variables: 18 ['ni_class_4', 'ni_class_4_liable', 'ni_class_4_loss_relief', 'ni_class_4_losses_brought_forward', 'ni_class_4_losses_carried_forward', 'ni_class_4_main']. 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: partnership profits apart from other self-employment income, with an employer-equivalent NICs charge", + "action_link": "https://github.com/PolicyEngine/policyengine-scorecard/issues/230" + }, + { + "measure_key": "ab2026_option__tax_decisions_with_continued_fuel_duty_freeze", + "title": "RF: the OBR's direct effect of tax measures with fuel duty kept frozen", + "reported_status": "option_costed_by_others", + "source_note": "`resolution_foundation` scores it on 11 staged rows of the Autumn Budget 2026 harvest (KEY_DECISIONS.md). Scope, from the families' NOTES.md: RF Figure 10's net effect if fuel duty stayed frozen: the OBR's direct effect of tax measures plus the continued freeze's receipts effect.", + "program": "package", + "producers": [ + "resolution_foundation" + ], + "construction": "producer_scope", + "package_of": "RF Figure 10's net effect if fuel duty stayed frozen: the OBR's direct effect of tax measures plus the continued freeze's receipts effect.", + "pe_reform_delta": null, + "computability": "partial", + "missing": "The scope is the producer's own words: RF adds an option the Government didn't adopt to the OBR's tax grouping, which lists no lines. A PolicyEngine number can cover only the registered measures inside it, stated as constructed, never like-for-like." } ] } diff --git a/pipeline/ab2026_key_decisions.py b/pipeline/ab2026_key_decisions.py new file mode 100644 index 000000000..8e69913fc --- /dev/null +++ b/pipeline/ab2026_key_decisions.py @@ -0,0 +1,1208 @@ +"""The decision on each AB2026 measure key a family proposed (#230). + +A staged row whose scope matched no registered measure had +`measure_key: null` and a proposed key in `conditions.proposed_measure_key` +(harvest README rule 2). This module records, for each of the 86 proposed +keys, whether we register it in `data/uk/ab2026_measures.json` or fold it into +a registered key, the scope the family's NOTES.md gives it, and the registry +verdict. `pipeline/build_ab2026_registry.py` builds an entry from each +registered key, and `pipeline/apply_ab2026_key_decisions.py` moves each row's +key into `measure_key`, where AB2025's rows name theirs, and writes +`KEY_DECISIONS.md`. + +Two producers' packages share a key only if their scopes match line for line +(rule 3). We register a package as a list of registry keys (`legs`) when we +record every leg in NOTES. We build 21 such packages from Table 6.1 lines and +one from two measures outside that table. We register the OBR's Table 3.1 tax +groups as the receipts of their lines (`receipts_of`), and every other package +in its producer's words (`words`). + +Verdicts: + ("legs",) computed from the legs, as the builder does + for tranche 1's packages + ("receipts",) not_expressible when every leg takes that + verdict, otherwise partial: a run gives + each leg's whole effect, not the producer's + receipts head + ("words", missing) partial: the producer lists no set of + registry measures + ("scope", template, what, regex) not_expressible, out of the model's scope, + with one of the builder's templates + ("scope_why", why, regex) the same, with its own `why` + ("gap", why, regex, upstream, nearest) + not_expressible, a policyengine-uk + development item + ("delta", delta, kind, baseline_paths, note) + expressible as a delta on current law + ("partial", missing, regex) partial, with its own `missing` +""" + +PREFIX = "ab2026__" + +# The registered key for a proposed key we rename as we register it. +RENAMED = { + # The red book's paragraph 5.17 counts this Budget's + # fraud and error measures with those already in the forecast, and + # names no Parliament, so the key's name no longer says "parliament". + "ab2026__package_parliament_welfare_fraud_and_error_savings": "ab2026__package_welfare_fraud_and_error_savings_in_forecast", +} + +# Proposed keys we fold into a registered key: none (rule 3; +# test_no_two_registered_packages_share_a_list_of_legs). +FOLDED: dict[str, tuple[str, str]] = {} + + +def _d(kind, title, scope, verdict, program, producers, rows, **kw): + return { + "kind": kind, + "title": title, + "scope": scope, + "verdict": verdict, + "program": program, + "producers": producers, + "rows": rows, + **kw, + } + + +HMT, OBR, RF, IFS, TPA, CENTAX = ( + "hm_treasury", + "obr_efo", + "resolution_foundation", + "ifs", + "tax_policy_associates", + "centax", +) + +ENERGY_BILLS = "energy_bills" +CHILDCARE = "childcare_limits" + +DECISIONS = { + # --- measures with no Table 6.1 line ----------------------------------- + "ab2026__british_business_bank_defence_commitments_accelerated": _d( + "measure", + "British Business Bank: accelerate £450m of commitments to defence-related and dual-use businesses", + "HM Treasury's policy costing with no identifiable Table 6.1 line; by Table 6.1's footnote 2 and £10m bar, probably inside line 41, so we never add it to Table 6.1's lines or totals.", + ( + "scope", + "FINANCE", + "British Business Bank commitments to defence-related businesses", + r"british_business_bank|defence|dual_use", + ), + "financial_transactions", + (HMT,), + 9, + ), + "ab2026__departmental_spending_growth_2031_32": _d( + "measure", + "Departmental spending: grow day-to-day spending by 0.7% in real terms in 2031-32", + "The OBR's change to the 2031-32 pre-measures RDEL assumption (a £5.5bn reduction); no Table 6.1 line.", + ( + "scope", + "SPEND", + "the 2031-32 departmental resource spending assumption", + r"departmental|resource_spending|rdel", + ), + "public_spending", + (OBR,), + 13, + ), + "ab2026__energy_debt_circuit_breaker": _d( + "measure", + "Energy Debt Circuit Breaker: a debt strategy and a one-off targeted energy debt relief scheme", + "Red book paragraph 3.8's debt strategy, which HM Treasury says saves all billpayers around £30; no Table 6.1 line.", + ( + "gap", + "No energy debt and no component of household energy bills that recovers suppliers' bad debt: the engine holds consumption, not the bill's parts.", + r"energy_debt|bad_debt|standing_charge|unit_rate|supplier|levy", + ENERGY_BILLS, + "gas_consumption and electricity_consumption hold a household's energy use, not the parts of its bill", + ), + "energy_bills", + (HMT,), + 3, + ), + "ab2026__gas_standing_charge_moved_to_unit_rates": _d( + "measure", + "Abolish the gas standing charge and recover it through unit rates", + "The announced move of the typical household's gas standing charge onto unit rates, which costs the Exchequer nothing and has no Table 6.1 line (RF and IFS families).", + ( + "gap", + "No gas standing charge or unit rate: the engine holds gas consumption, not the tariff that turns it into a bill, so it cannot move a fixed charge onto use.", + r"standing_charge|unit_rate|tariff|gas", + ENERGY_BILLS, + "gas_consumption holds use; no variable splits a gas bill into a standing charge and a unit rate", + ), + "energy_bills", + (IFS, RF), + 34, + ), + "ab2026__gas_supplier_levy_funded_from_general_taxation": _d( + "measure", + "Fund the Gas Supplier Levy from general taxation", + "RF's footnote 12 figure for moving the levy off household bills; we found no Table 6.1 line.", + ( + "gap", + "No levies or policy costs on household energy bills: the engine holds consumption, not the bill's parts, so it cannot take a levy off a bill.", + r"supplier|levy|policy_cost|standing_charge|gas", + ENERGY_BILLS, + "gas_consumption holds use; no variable holds the levies a gas bill recovers", + ), + "energy_bills", + (RF,), + 1, + ), + "ab2026__minimum_wage_uprating_april_2027": _d( + "measure", + "Raise the National Living Wage and National Minimum Wage rates from 1 April 2027", + "The April 2027 minimum wage rates the Chancellor confirmed (red book paragraph 3.18), a regulation with no Table 6.1 line.", + ( + "gap", + "The engine carries the minimum wage rates (gov.hmrc.minimum_wage) but holds employment income as an input, so raising a rate raises no worker's pay. The minimum_wage variable feeds only Universal Credit's minimum income floor, the benefit cap's earnings exception and the childcare income tests.", + r"minimum_wage|living_wage", + "earnings", + "minimum_wage reads gov.hmrc.minimum_wage, and employment_income does not read minimum_wage", + ), + "minimum_wage", + (HMT, RF), + 4, + ), + "ab2026__mod_counter_fraud_strategy": _d( + "measure", + "Ministry of Defence Counter Fraud Strategy", + "Red book paragraph 5.32's strategy, set to deliver £250 million of benefits; no Table 6.1 line.", + ( + "scope", + "ENFORCE", + "counter-fraud work in defence procurement", + r"fraud|defence|procurement", + ), + "compliance_and_administration", + (HMT,), + 1, + ), + "ab2026__private_landlord_register_fee_65": _d( + "measure", + "Renters' Rights: a £65 fee for the 'Register your rental property' service from 15 December 2026", + "HM Treasury's costing of the fee (not on Table 6.1, footnote 2), offset by DEL spending and so fiscally neutral; the OBR stages its receipts, current DEL and total.", + ( + "scope_why", + "A fee for a public registration service, which HM Treasury offsets with departmental spending: the engine has no landlord register, and no tax or benefit rule for households changes.", + r"landlord|rental|register", + ), + "regulation", + (HMT, OBR), + 25, + ), + "ab2026__public_sector_pensions_2024_valuations": _d( + "measure", + "Public sector pensions: net impact of the 2024 valuations", + "The OBR's departmental reductions, net public service pension payments and their net total from the 2024 valuations of the unfunded schemes; no Table 6.1 line.", + ( + "scope", + "SPEND", + "employer contributions to the unfunded public service pension schemes", + r"public_service_pension|employer_contribution|unfunded", + ), + "public_spending", + (OBR,), + 27, + ), + "ab2026__pwlb_debt_relief_councils_severe_distress": _d( + "measure", + "Public Works Loan Board debt relief for councils in severe financial distress", + "HM Treasury's costing (not on Table 6.1, footnote 2) and the OBR's capital AME and total.", + ( + "scope", + "FINANCE", + "debt relief on councils' Public Works Loan Board loans", + r"pwlb|public_works|council_debt", + ), + "financial_transactions", + (HMT, OBR), + 18, + ), + "ab2026__regulatory_administrative_savings": _d( + "measure", + "Regulatory administrative savings for business", + "The red book's chapter 6 decision (paragraph 6.36) and paragraph 4.52's estimated gross administrative savings for business, with its parts as components; no Table 6.1 line.", + ( + "scope", + "REGULATE", + "administrative burdens of regulation on business", + r"regulat|administrative", + ), + "regulation", + (HMT,), + 5, + ), + "ab2026__rolls_royce_gas_turbine_programme": _d( + "measure", + "Co-investment in a 10-year £2.5 billion next-generation gas turbine programme", + "Red book paragraph 4.80's programme for civil and defence aerospace, not yet contracted (paragraph 4.83); no Table 6.1 line named.", + ( + "scope", + "FINANCE", + "co-investment in aerospace gas turbine research", + r"aerospace|turbine|research", + ), + "financial_transactions", + (HMT,), + 1, + ), + "ab2026__scottish_air_passenger_duty_devolution": _d( + "measure", + "Devolve Air Passenger Duty to the Scottish Government in April 2027", + "The OBR's Scottish block grant adjustment, self-financed expenditure and total; no Table 6.1 line.", + ( + "scope_why", + "A transfer of a tax between the UK and Scottish governments, with a block grant adjustment: no tax or benefit rule for households changes, and the engine holds no air travel.", + r"air_passenger|aviation|flight", + ), + "indirect_tax", + (OBR,), + 18, + ), + "ab2026__state_pension_triple_lock_adjustment": _d( + "measure", + "Adjust the State Pension triple lock from April 2030 to hold the pension's value relative to earnings as reached in April 2029", + "Red book paragraph 5.23 and OBR paragraph 3.49: from April 2030, rises of the highest of 2.5%, inflation, or the rise that keeps the pension's April 2029 ratio to earnings; no Table 6.1 line, since its savings fall after the forecast.", + ( + "delta", + { + "gov.dwp.state_pension.triple_lock.include_earnings": { + "2030": False, + "2031": False, + }, + "gov.dwp.state_pension.triple_lock.earnings_path_guarantee": { + "2030": True, + "2031": True, + }, + }, + "absolute_value_by_year", + ( + "gov.dwp.state_pension.triple_lock.include_earnings", + "gov.dwp.state_pension.triple_lock.earnings_path_guarantee", + ), + "The engine's parameter documentation names this reading for the plan announced on 29 September 2026: include_earnings false and earnings_path_guarantee true from 2030. The guarantee anchors an earnings path at the pension's level in the year before it first applies, 2029-30. The engine rebuilds the uprating rates only through Scenario(parameter_changes=...): a reform dictionary changes the parameters but not the rates.", + ), + "state_pension", + (HMT, OBR), + 4, + ), + "ab2026__your_first_home_ft_reprioritisation": _d( + "measure", + "Reprioritise financial transactions budgets to fund the new equity loan scheme", + "Table 6.2 line 6, with no Table 6.1 line; line 5 is the scheme itself and keeps ab2026__your_first_home_equity_loan.", + ( + "scope", + "FINANCE", + "financial transactions budgets reprioritised to an equity loan scheme", + r"equity_loan|help_to_buy|financial_transaction", + ), + "financial_transactions", + (HMT,), + 6, + table_62_line=6, + ), + # --- packages of Table 6.1 lines, exactly ------------------------------ + "ab2026__package_business_rates_rhl_sbrr_and_transitional_support": _d( + "package", + "Business rates: the SBRR thresholds, the real-terms freeze and the transitional support extension, together", + "Table 6.1 lines 13 and 14, the three bullets of red book paragraph 3.22; the red book doesn't say whether line 12's pubs relief also counts, so we leave it out.", + ("legs",), + "package", + (HMT,), + 2, + legs=[13, 14], + ), + "ab2026__package_carbon_price_support_and_cfd_levies": _d( + "package", + "Abolish carbon price support and fund the LCCC to reduce CfD levies, together", + "Table 6.1 lines 70 and 71 (OBR family).", + ("legs",), + "package", + (OBR,), + 2, + legs=[70, 71], + ), + "ab2026__package_dividend_and_capital_gains_tax_changes": _d( + "package", + "OBR Table 3.1: changes to dividend and capital gains taxation", + "Table 6.1 lines 26, 49 and 60, as the OBR family's NOTES gives them.", + ("legs",), + "package", + (OBR,), + 6, + legs=[26, 49, 60], + ), + "ab2026__package_hmrc_tax_gap_and_online_marketplace": _d( + "package", + "HMRC's tax gap measures and online marketplace liability, together", + "Exactly Table 6.1 lines 45 and 46: red book Table 6.3's subtotal including memo, and footnote 73.", + ("legs",), + "package", + (HMT,), + 7, + legs=[45, 46], + ), + "ab2026__package_household_energy_payment_and_electricity_vat": _d( + "package", + "The Household Energy Payment and zero VAT on domestic electricity, together", + "Table 6.1 lines 1 and 2; RF's sums show its VAT figure covers the whole cut, as line 2 does.", + ("legs",), + "package", + (RF,), + 5, + legs=[1, 2], + ), + "ab2026__package_property_and_savings_income_rates": _d( + "package", + "Property and savings income tax rates up 2ppts, together", + "Exactly Table 6.1 lines 61 and 62 (red book, IFS, RF and TPA families).", + ("legs",), + "package", + (HMT, IFS, RF, TPA), + 33, + legs=[61, 62], + ), + "ab2026__package_hmt_distributional_budget_2026": _d( + "package", + "HM Treasury's Impact on households: the Budget 2026 policies it models", + "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, and the private landlord registration fee, without line 1.", + ("legs",), + "package", + (HMT,), + 1, + legs=[2, 3, 4, 5, 8, 11, 15, 26, 39, 49, 52, 59, 60, 61, 62, 72, 95] + + ["ab2026__private_landlord_register_fee_65"], + ), + "ab2026__package_rf_ab26_permanent_personal_measures": _d( + "package", + "RF Figure 20's AB26 changes: permanent personal tax and benefit measures", + "Table 6.1 lines 52, 56, 61 and 62 and the gas standing charge change (RF's workbook column K equals columns F, G, I and J).", + ("legs",), + "package", + (RF,), + 19, + legs=[52, 56, 61, 62, "ab2026__gas_standing_charge_moved_to_unit_rates"], + ), + "ab2026__package_non_scorecard_decisions": _d( + "package", + "OBR: direct effect of non-scorecard decisions", + "Exactly the departmental spending assumption change and the public pension valuations, which have no Table 6.1 lines.", + ("legs",), + "package", + (OBR,), + 12, + legs=[ + "ab2026__departmental_spending_growth_2031_32", + "ab2026__public_sector_pensions_2024_valuations", + ], + ), + "ab2026__package_tpa_business_rates": _d( + "package", + "TPA: business rates", + "Table 6.1 lines 12, 13, 14, 57, 76 and 80 (TPA's three charts); on the by-tax bar, TPA's NOTES places line 76, zero in 2027-28, by assumption.", + ("legs",), + "package", + (TPA,), + 8, + legs=[12, 13, 14, 57, 76, 80], + ), + "ab2026__package_tpa_cgt_founders_relief_and_badr": _d( + "package", + "TPA: CGT (Founders' Relief and BADR)", + "Table 6.1 lines 26 and 60 (TPA's by-tax chart).", + ("legs",), + "package", + (TPA,), + 1, + legs=[26, 60], + ), + "ab2026__package_tpa_energy_and_environment": _d( + "package", + "TPA: energy and environment", + "Table 6.1 lines 17, 69, 71, 90 and 96 (TPA's by-year chart).", + ("legs",), + "package", + (TPA,), + 6, + legs=[17, 69, 71, 90, 96], + ), + "ab2026__package_tpa_fuel_duty_red_diesel_and_hgv_ved": _d( + "package", + "TPA: fuel duty cut, red diesel and HGV VED", + "Table 6.1 lines 3, 18 and 65 (TPA's by-tax chart).", + ("legs",), + "package", + (TPA,), + 1, + legs=[3, 18, 65], + ), + "ab2026__package_tpa_other_by_measure": _d( + "package", + "TPA: other (by-measure chart)", + "Table 6.1 lines 11, 17, 18, 19, 28, 36, 50, 51, 53, 65, 66, 69, 71, 79, 88, 89, 90, 93, 94, 97 and 98.", + ("legs",), + "package", + (TPA,), + 1, + legs=[ + 11, + 17, + 18, + 19, + 28, + 36, + 50, + 51, + 53, + 65, + 66, + 69, + 71, + 79, + 88, + 89, + 90, + 93, + 94, + 97, + 98, + ], + ), + "ab2026__package_tpa_other_by_tax_2027_28": _d( + "package", + "TPA: other (by-tax chart, 2027-28)", + "Table 6.1 lines 17, 19, 44, 56, 69, 71, 79, 90, 93, 96 and 98; TPA's NOTES places the lines that are zero in 2027-28 by assumption and leaves line 66 undetermined, so we leave line 66 out.", + ("legs",), + "package", + (TPA,), + 1, + legs=[17, 19, 44, 56, 69, 71, 79, 90, 93, 96, 98], + ), + "ab2026__package_tpa_other_by_year": _d( + "package", + "TPA: other (by-year chart)", + "Table 6.1 lines 10, 16, 19, 26, 44, 56, 60, 77, 78, 79, 93, 95 and 98.", + ("legs",), + "package", + (TPA,), + 6, + legs=[10, 16, 19, 26, 44, 56, 60, 77, 78, 79, 93, 95, 98], + ), + "ab2026__package_tpa_other_corporate_tax": _d( + "package", + "TPA: other corporate tax", + "Table 6.1 lines 49, 50, 54, 68 and 97; on the by-tax bar, TPA's NOTES places lines 49 and 50, zero in 2027-28, by assumption.", + ("legs",), + "package", + (TPA,), + 7, + legs=[49, 50, 54, 68, 97], + ), + "ab2026__package_tpa_other_income_tax": _d( + "package", + "TPA: other income tax", + "Table 6.1 lines 5, 15, 28, 52, 53, 86 and 94; on the by-tax bar, TPA's NOTES places lines 15 and 86, zero in 2027-28, by assumption.", + ("legs",), + "package", + (TPA,), + 7, + legs=[5, 15, 28, 52, 53, 86, 94], + ), + "ab2026__package_tpa_other_vat": _d( + "package", + "TPA: other VAT", + "Table 6.1 lines 36, 46, 51, 59, 88 and 89; TPA's NOTES says the by-tax bar may also hold line 66, zero in 2027-28, which we leave out.", + ("legs",), + "package", + (TPA,), + 7, + legs=[36, 46, 51, 59, 88, 89], + ), + "ab2026__package_tpa_savings_property_income_and_cash_isa": _d( + "package", + "TPA: savings and property income tax", + "Table 6.1 lines 11, 61 and 62; the group includes line 11, the cash ISA limit, which TPA doesn't mention.", + ("legs",), + "package", + (TPA,), + 7, + legs=[11, 61, 62], + ), + "ab2026__package_tpa_tariffs": _d( + "package", + "TPA: tariffs (including UK-India)", + "Table 6.1 lines 10, 16, 77, 78 and 95; on the by-tax bar, TPA's NOTES places line 95, zero in 2027-28, by assumption.", + ("legs",), + "package", + (TPA,), + 2, + legs=[10, 16, 77, 78, 95], + ), + "ab2026__package_tpa_temporary_vat_and_fuel_cuts": _d( + "package", + "TPA: temporary VAT and fuel cuts", + "Table 6.1 lines 2, 3, 18, 65 and 66 (TPA's by-year chart).", + ("legs",), + "package", + (TPA,), + 6, + legs=[2, 3, 18, 65, 66], + ), + # --- the receipts of Table 6.1 lines (OBR Table 3.1 tax groups) -------- + "ab2026__package_fuel_duty_and_electricity_vat": _d( + "package", + "OBR Table 3.1: fuel duty freeze and VAT off domestic energy bills (receipts)", + "The receipts of Table 6.1 lines 2 and 3 only (the OBR groups Table 3.1 by receipts head); line 1 doesn't count.", + ("receipts",), + "package", + (OBR,), + 11, + receipts_of=[2, 3], + ), + "ab2026__package_property_and_savings_income_rates_receipts": _d( + "package", + "OBR Table 3.1: changes to savings and property income tax rates (receipts)", + "The receipts of Table 6.1 lines 61 and 62, which differ from the lines' totals, so not ab2026__package_property_and_savings_income_rates.", + ("receipts",), + "package", + (OBR,), + 7, + receipts_of=[61, 62], + ), + "ab2026__package_tax_administration_compliance_and_debt_collection_receipts": _d( + "package", + "OBR Table 3.1: tax administration, compliance and debt collection measures (receipts)", + "The receipts of Table 6.1 lines 45 and 46, equal in all six years, whose totals round differently; RF restates the OBR's group.", + ("receipts",), + "package", + (OBR, RF), + 13, + receipts_of=[45, 46], + ), + "ab2026__package_temporary_business_rates_reliefs_receipts": _d( + "package", + "OBR: the package of temporary business rates measures (receipts)", + "The receipts of Table 6.1 lines 12, 13 and 14: OBR paragraph 3.19's net cost of around £0.5 billion in 2028-29 matches their receipts, not their totals.", + ("receipts",), + "package", + (OBR,), + 1, + receipts_of=[12, 13, 14], + ), + # --- packages in their producer's words ------------------------------- + "ab2026__package_barnett_consequentials": _d( + "package", + "Barnett consequentials of decisions confirmed at Budget for the devolved governments", + "Red book paragraph 4.150: the consequentials for the Scottish, Welsh and Northern Ireland governments, 2026-27 to 2029-30, without the technical reduction from lower employer pension contributions; each government's figure is a component, and conditions.geography names the nation.", + ( + "scope_why", + "Block grant funding between the UK and devolved governments: no tax or benefit rule for households changes.", + r"barnett|block_grant|devolved", + ), + "public_spending", + (HMT, "welsh_government"), + 16, + ), + "ab2026__package_breathing_space_for_households": _d( + "package", + "Government action at this Budget to provide breathing space for households", + "Red book paragraph 3.2's action, whose CPI effect the OBR expects at 0.1 percentage points in 2027. The red book lists no lines for the figure, Box 3.A's breathing space covers lines 1 and 2, and Table 6.1's heading groups lines 1 to 11, so we keep HM Treasury's words.", + ( + "words", + "HM Treasury lists no Table 6.1 lines for the figure, and three readings (lines 1 and 2, lines 2 and 3, lines 1 to 11) are open", + ), + "package", + (HMT,), + 1, + ), + "ab2026__package_civil_service_transformation_programme": _d( + "package", + "OBR: the civil service transformation programme", + "The OBR's programme to reduce resource spending; the OBR names no lines, though lines 63 and 64 probably belong.", + ( + "scope", + "SPEND", + "civil service running costs", + r"civil_service|administration_budget", + ), + "public_spending", + (OBR,), + 1, + ), + "ab2026__package_compliance_measures_announced": _d( + "package", + "OBR Box 3.1: the compliance measures announced in this Budget", + "The OBR doesn't list them; they are probably line 45's items and line 46, but the OBR doesn't say so.", + ( + "scope", + "ENFORCE", + "tax compliance measures", + r"compliance|tax_gap", + ), + "compliance_and_administration", + (OBR,), + 1, + ), + "ab2026__package_corporation_and_bank_tax_changes": _d( + "package", + "OBR Table 3.1: changes to corporation and bank taxation", + "The OBR's group; paragraph 3.16 discusses lines 54, 55 and 58, and the OBR publishes no full decomposition.", + ( + "scope", + "BUSINESS", + "corporation tax and the bank surcharge", + r"corporation_tax|bank_surcharge|bank_levy", + ), + "business_tax", + (OBR,), + 7, + ), + "ab2026__package_defence_investment_plan": _d( + "package", + "The Defence Investment Plan", + "The plan published in June 2026, which no single line covers; Table 6.1 prints its savings and funding on lines 40 to 42, and the OBR's £1.8 billion a year, its RDEL part, is a component.", + ( + "scope", + "SPEND", + "defence", + r"defence|military", + ), + "public_spending", + (HMT, OBR), + 2, + ), + "ab2026__package_dwp_fraud_and_error_measures": _d( + "package", + "DWP: this Budget's new fraud and error measures", + "Red book paragraph 5.17's new measures, expected to save an additional £1.4 billion over the forecast; the red book doesn't list them, and the figure reconciles with no printed basis for line 47.", + ( + "scope", + "ENFORCE", + "benefit fraud and error prevention", + r"fraud|error|overpayment", + ), + "compliance_and_administration", + (HMT,), + 1, + ), + "ab2026__package_fuel_duty_freezes_since_2010_11": _d( + "package", + "OBR: cumulative fuel duty freezes from 2010-11 to 2027-28 and the 5p cut", + "The OBR's cumulative cost against RPI uprating, which includes line 3 and every freeze since 2010-11; RF's ab2026_option__fuel_duty_rpi_uprating_since_2011 sees the same pair of paths from the other side.", + ( + "scope_why", + "A sum of the receipts that seventeen years of fuel duty decisions forgo against RPI uprating: the engine scores one world against another in a policy year, not a cumulative history of past decisions.", + r"fuel_duty", + ), + "fuel_duty", + (OBR,), + 1, + ), + "ab2026__package_government_decisions_since_march_2026": _d( + "package", + "The total effect of Government decisions since March 2026", + "The OBR's total effect of decisions on PSNB: Table 6.1 lines 1 to 98, the three fiscally neutral measures with no line (PWLB debt relief, Scottish APD devolution and the landlord registration fee) and the two non-scorecard decisions, with direct and indirect effects; the red book's Table 1.3 and RF restate it.", + ( + "words", + "the OBR adds its indirect effects and two non-scorecard decisions to Table 6.1's lines", + ), + "package", + (HMT, OBR, RF), + 368, + ), + "ab2026__package_hmt_distributional_since_ab2024": _d( + "package", + "HM Treasury's Impact on households: modelled policies from Autumn Budget 2024 to Budget 2026", + "Impact on households paragraph 1.8: the Budget 2026 policies above plus earlier events' measures, which aren't Table 6.1 lines.", + ( + "words", + "HM Treasury adds earlier events' measures, which this registry doesn't hold", + ), + "package", + (HMT,), + 1, + ), + "ab2026__package_household_energy_vat_and_household_share_of_fuel_duty": _d( + "package", + "RF's cost-of-living package: lines 1 and 2 and the household share of the fuel duty cut", + "Table 6.1 lines 1 and 2 plus the share of line 3 that accrues directly to households (RF footnote 19), a two-year total; not lines 1 to 3 exactly (rule 3).", + ( + "words", + "RF counts only the household-incidence share of line 3, which no registry measure holds", + ), + "package", + (RF,), + 3, + ), + "ab2026__package_ifs_announced_tax_changes": _d( + "package", + "IFS: the tax change Budget 2026 announced, at the forecast horizon", + "IFS's estimate as a share of GDP; the chart lists no Table 6.1 line and names no OBR grouping.", + ( + "words", + "IFS lists no Table 6.1 lines and names no OBR grouping", + ), + "package", + (IFS,), + 1, + ), + "ab2026__package_ifs_new_giveaways": _d( + "package", + "IFS: the Budget's new giveaways", + "IFS's new giveaways that push up borrowing this year and next; IFS names no OBR line, and doesn't say they cover every decision since March.", + ( + "words", + "IFS names no lines and doesn't say which decisions its giveaways cover", + ), + "package", + (IFS,), + 2, + ), + "ab2026__package_national_wealth_fund_and_british_business_bank": _d( + "package", + "OBR: the National Wealth Fund and British Business Bank's additional investment", + "Table 6.1 lines 29 and 30 and their Table 6.2 financial transactions: OBR paragraph 3.20's financing requirement, net debt and borrowing effects, with gross debt and additional income as parts.", + ( + "scope", + "FINANCE", + "National Wealth Fund and British Business Bank investment", + r"wealth_fund|british_business_bank", + ), + "financial_transactions", + (OBR,), + 5, + ), + "ab2026__package_obr_other_ame_spending_decisions": _d( + "package", + "OBR Table 3.1: other AME spending decisions", + "The OBR's residual AME group, without the pension valuations and net of line 1's council tax rebate; the OBR publishes no line decomposition.", + ( + "words", + "the OBR publishes no Table 6.1 line decomposition of its group", + ), + "package", + (OBR,), + 6, + ), + "ab2026__package_obr_other_departmental_spending_changes": _d( + "package", + "OBR Table 3.1: other departmental spending changes", + "Departmental spending changes without the pension valuations, including line 1's DEL funding, defence, capital spending and the £5.5bn 2031-32 RDEL reduction.", + ( + "scope", + "SPEND", + "departmental spending", + r"departmental|resource_spending|capital_spending", + ), + "public_spending", + (OBR,), + 7, + ), + "ab2026__package_obr_other_hmrc_compliance_and_debt": _d( + "package", + "OBR paragraph 3.13: other HMRC compliance and debt measures", + "Direct debt recovery, e-invoicing and debt collection agencies (parts of line 45) and online marketplace liability (line 46).", + ( + "scope", + "ENFORCE", + "HMRC debt collection and compliance", + r"debt_collection|compliance|e_invoic", + ), + "compliance_and_administration", + (OBR,), + 1, + ), + "ab2026__package_obr_other_tax_measures": _d( + "package", + "OBR Table 3.1: other tax measures", + "The OBR's residual of Table 6.1's tax measures after its five named groups; the OBR enumerates no lines.", + ( + "words", + "the OBR enumerates no lines for its residual group", + ), + "package", + (OBR,), + 6, + ), + "ab2026__package_parliament_fuel_duty_decisions": _d( + "package", + "The Government's fuel duty decisions across this Parliament", + "Red book paragraph 3.13: line 3 plus earlier events' fuel duty decisions, against the previous government's plans (footnote 98).", + ( + "words", + "HM Treasury adds earlier events' fuel duty decisions, which this registry doesn't hold", + ), + "package", + (HMT,), + 3, + ), + "ab2026__package_parliament_tax_gap_measures": _d( + "package", + "Measures to close the tax gap announced during this Parliament", + "Red book paragraph 2.46: lines 45 and 46 plus the tax gap measures of Autumn Budget 2024, Spring Statement 2025 and Budget 2025 (footnote 73).", + ( + "scope", + "ENFORCE", + "tax gap measures", + r"compliance|tax_gap", + ), + "compliance_and_administration", + (HMT,), + 1, + ), + "ab2026__package_parliament_welfare_fraud_and_error_savings": _d( + "package", + "Total savings from welfare fraud and error measures over the forecast", + "Red book paragraph 5.17: this Budget's new fraud and error measures plus those already in the forecast; the red book doesn't say which earlier measures count.", + ( + "scope", + "ENFORCE", + "benefit fraud and error prevention", + r"fraud|error|overpayment", + ), + "compliance_and_administration", + (HMT,), + 1, + ), + "ab2026__package_planned_capital_spending_reductions": _d( + "package", + "OBR: reductions in planned capital spending", + "The OBR's changes to departmental capital spending; it enumerates no lines.", + ( + "scope", + "SPEND", + "departmental capital spending", + r"capital_spending|cdel|departmental", + ), + "public_spending", + (OBR,), + 1, + ), + "ab2026__package_pubs_relief_35pc_total": _d( + "package", + "The whole 35% business rates relief for pubs, social clubs and live music venues in England", + "The 15% announced in January 2026 (red book paragraph 6.189, no AB2026 line) plus line 12's further 20ppt.", + ( + "scope", + "RATES", + "relief for pubs, social clubs and live music venues", + r"business_rates|pub", + ), + "business_rates", + (HMT,), + 1, + ), + "ab2026__package_rdel_decisions_excluding_household_energy_payment": _d( + "package", + "RF: the Budget's RDEL decisions over the Spending Review period except the Household Energy Payment", + "RF's fiscal aggregate of resource spending decisions, not a programme allocation.", + ( + "scope", + "SPEND", + "departmental resource spending", + r"departmental|resource_spending|rdel", + ), + "public_spending", + (RF,), + 3, + ), + "ab2026__package_regulation_tariff_and_sandbox_business_savings": _d( + "package", + "Business savings from regulation cuts, tariff suspensions and testing powers", + "The executive summary's savings for business, across line 16 (tariff suspensions) and measures with no Table 6.1 line.", + ( + "scope", + "REGULATE", + "regulation, tariff suspensions and technology testing powers", + r"regulat|tariff|customs", + ), + "regulation", + (HMT,), + 1, + ), + "ab2026__package_rf_absolute_policy_changes": _d( + "package", + "RF: every policy decision counted at its absolute value", + "RF's fiscal-event size measure; RF lists no lines.", + ( + "words", + "RF lists no lines, and sums each decision's absolute value, which no package of signed legs gives", + ), + "package", + (RF,), + 2, + ), + "ab2026__package_rf_energy_bill_support_announced_at_budget": _d( + "package", + "RF: the energy bill support announced at the Budget", + "RF's support of up to £116, which includes line 1's £100 Household Energy Payment; RF doesn't itemise the rest.", + ( + "words", + "RF doesn't itemise the support beyond line 1", + ), + "package", + (RF,), + 2, + ), + "ab2026__package_rf_other_tax_measures": _d( + "package", + "RF Figure 10: other tax measures", + "RF's residual: the OBR's net direct effects less fuel duty, the bank surcharge, capital allowances, savings and property, and tax administration.", + ( + "words", + "RF defines a residual of the OBR's groups, not a list of lines", + ), + "package", + (RF,), + 6, + ), + "ab2026__package_rf_parliament_permanent_tax_and_benefit_measures": _d( + "package", + "RF: permanent personal tax and benefit changes announced this Parliament", + "RF compares every permanent personal tax and benefit change from the 2024 election through AB26 with the policy the Government inherited. From AB26, RF includes lines 52, 56, 61 and 62 and the gas standing charge.", + ( + "words", + "RF spans several events, whose measures this registry doesn't hold", + ), + "package", + (RF,), + 42, + ), + "ab2026__package_spending_decisions_since_march_2026": _d( + "package", + "OBR: direct effect of spending measures since March 2026", + "The OBR's expenditure-side effects of decisions since March, including the pension valuations and the 2031-32 RDEL assumption; not HM Treasury's spending total.", + ( + "words", + "the OBR includes non-scorecard decisions and publishes no line decomposition", + ), + "package", + (OBR,), + 13, + ), + "ab2026__package_tax_decisions_since_march_2026": _d( + "package", + "OBR: direct effect of tax measures since March 2026", + "The OBR's Table 3.1 line, a receipts grouping as the OBR classifies decisions, which differs from Table 6.1's tax total (−£1,749m against −£1,645m in 2026-27); RF restates it.", + ( + "words", + "the OBR classifies decisions as tax measures by their receipts effects, not by Table 6.1's heads", + ), + "package", + (OBR, RF), + 20, + ), + "ab2026__package_total_financial_transactions": _d( + "package", + "Table 6.2: total cash impacts of financial transactions", + "Exactly Table 6.2 lines 1 to 9 (footnote 1: totals may not sum due to rounding).", + ( + "scope", + "FINANCE", + "Table 6.2's financial transactions", + r"financial_transaction|loan|equity", + ), + "financial_transactions", + (HMT,), + 6, + ), + # --- options producers costed ------------------------------------------- + "ab2026_option__cgt_reform_package": _d( + "option", + "CenTax: structural reform of CGT, with rates equal to income tax rates", + "CenTax's package: CGT rates equal to income tax rates, an investment allowance for the risk-free rate, no uplift at death, and rebasing on arrival with deemed disposal on departure; CenTax doesn't cost its fifth element, more generous loss relief.", + ( + "partial", + "Only the rate leg resolves: gov.hmrc.cgt.basic_rate, higher_rate and additional_rate. The engine has no investment allowance, no uplift at death (it holds no estates) and no rebasing on arrival or deemed disposal on departure, and CenTax costs the four elements together.", + r"cgt|capital_gains", + ), + "capital_gains_tax", + (CENTAX,), + 10, + ), + "ab2026_option__childcare_100k_entitlement_taper": _d( + "option", + "CenTax: taper the withdrawal of free childcare above £100,000", + "CenTax's taper of 8p, 18p or 28p per £1 over £100,000 (conditions.taper_rate).", + ( + "gap", + "The engine withdraws the extended childcare entitlement in one step at gov.dfe.extended_childcare_entitlement.income.limit; it has no taper above the limit.", + r"childcare.*(income|limit|taper)|extended_childcare", + CHILDCARE, + None, + ), + "childcare", + (CENTAX,), + 3, + ), + "ab2026_option__childcare_100k_threshold_raised": _d( + "option", + "CenTax: raise the free childcare income limit from £100,000", + "CenTax's options to raise the limit to £125,000 or £150,000 (conditions.threshold).", + ( + "delta", + {"gov.dfe.extended_childcare_entitlement.income.limit": 125000}, + "absolute_value", + ("gov.dfe.extended_childcare_entitlement.income.limit",), + "The delta gives the £125,000 variant; the £150,000 variant (conditions.threshold) sets the same parameter to 150000. Tax-Free Childcare keeps its own income test.", + ), + "childcare", + (CENTAX,), + 2, + ), + "ab2026_option__childcare_100k_threshold_removed": _d( + "option", + "CenTax: remove the £100,000 free childcare income limit", + "CenTax's option to make the free childcare entitlement in England available to parents with incomes over £100,000.", + ( + "delta", + {"gov.dfe.extended_childcare_entitlement.income.limit": None}, + "absolute_value", + ("gov.dfe.extended_childcare_entitlement.income.limit",), + "null records inf (the limit removed). Tax-Free Childcare keeps its own income test.", + ), + "childcare", + (CENTAX,), + 3, + uncapped_sentinel="inf (limit removed), recorded as null in JSON", + ), + "ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s": _d( + "option", + "CenTax: remove the income limit for the first 15 hours of childcare for under-3s", + "CenTax's narrower option, for the first 15 hours only and children under 3.", + ( + "gap", + "The engine applies one income limit to the whole extended entitlement (gov.dfe.extended_childcare_entitlement.income.limit); it cannot lift it for the first 15 hours of one age group.", + r"childcare.*(income|limit|taper)|extended_childcare", + CHILDCARE, + None, + ), + "childcare", + (CENTAX,), + 1, + ), + "ab2026_option__fuel_duty_continued_freeze": _d( + "option", + "Keep fuel duty frozen until 2029-30 instead of the rise in July 2027", + "Rates held at 52.95p a litre to 2029-30 against the announced policy, which extends line 3: OBR paragraph 3.43's alternative and RF's series for the OBR's constant-duty-rate forecast.", + ( + "partial", + "The rate leg resolves (gov.hmrc.fuel_duty.petrol_and_diesel), but the option's baseline is the announced path, Table 6.1 line 3, which the dashboard ran as a modifier with no parameter path. A counterpart needs line 3's modifier as its baseline and the frozen rate as its reform.", + r"fuel_duty", + ), + "fuel_duty", + (OBR, RF), + 7, + ), + "ab2026_option__fuel_duty_rpi_uprating_since_2011": _d( + "option", + "Fuel duty uprated by RPI since January 2011", + "RF's revenue that the freezes forgo against RPI uprating since January 2011; it mirrors the OBR's ab2026__package_fuel_duty_freezes_since_2010_11.", + ( + "scope_why", + "A counterfactual history of fuel duty rates since 2011: the engine scores one world against another in a policy year, not a path of past decisions.", + r"fuel_duty", + ), + "fuel_duty", + (RF,), + 2, + ), + "ab2026_option__health_foundation_social_care_reforms": _d( + "option", + "Health Foundation's illustrative social care reforms", + "OBR paragraph 3.41's citation of the Health Foundation's costs, from limited home-care reform to wider schemes, in 2035-36 (footnote 13); not a settled AB2026 policy.", + ( + "scope", + "SPEND", + "adult social care", + r"social_care|care_home|residential", + ), + "public_spending", + (OBR,), + 2, + ), + "ab2026_option__income_tax_5pc_share_devolved_to_mayors": _d( + "option", + "IPPR North: devolve 5% of income tax to mayors", + "IPPR North's option beyond the Budget's commitment on income tax devolution; no Table 6.1 line sets a 5% share.", + ( + "scope_why", + "A share of a tax assigned between governments: no tax or benefit rule for households changes, and the engine holds no mayoral authorities.", + r"mayor|devolv|combined_authority", + ), + "income_tax", + ("ippr",), + 1, + ), + "ab2026_option__lha_unfreeze_2027_28": _d( + "option", + "Unfreeze Local Housing Allowance in 2027-28", + "RF's option of unfreezing LHA in 2027-28 instead of prolonging the freeze; no Table 6.1 line.", + ( + "delta", + {"gov.dwp.LHA.freeze": {"2027": False}}, + "absolute_value_by_year", + ("gov.dwp.LHA.freeze",), + "While gov.dwp.LHA.freeze holds true, the engine freezes Great Britain's LHA rates at the level of the latest year in which it was false; false in 2027 resets them in 2027-28, and the freeze resumes after.", + ), + "housing_benefit", + (RF,), + 17, + ), + "ab2026_option__nics_on_investment_income": _d( + "option", + "CenTax: an equivalent of Class 1 NICs on investment income", + "CenTax's option for rental income, savings income outside ISAs and other non-dividend investment income (conditions.income_type).", + ( + "gap", + "The engine charges National Insurance on employment and self-employment income only; it has no NICs base or rate for property, savings or other investment income.", + r"national_insurance|nics|investment_income|property_income|savings_interest", + "nics_investment", + None, + ), + "national_insurance", + (CENTAX,), + 10, + ), + "ab2026_option__nics_on_partnership_income": _d( + "option", + "CenTax: an equivalent of employer NICs on partnership profits", + "CenTax's top-up rates on partnership profits by income tax band, with a partnership allowance and an annual exempt amount per partner.", + ( + "gap", + "The engine holds self-employment income without separating partnership profits, and has no employer-equivalent NICs charge on them.", + r"partnership|self_employment|class_4", + "nics_partnership", + None, + ), + "national_insurance", + (CENTAX,), + 24, + ), + "ab2026_option__tax_decisions_with_continued_fuel_duty_freeze": _d( + "option", + "RF: the OBR's direct effect of tax measures with fuel duty kept frozen", + "RF Figure 10's net effect if fuel duty stayed frozen: the OBR's direct effect of tax measures plus the continued freeze's receipts effect.", + ( + "words", + "RF adds an option the Government didn't adopt to the OBR's tax grouping, which lists no lines", + ), + "package", + (RF,), + 11, + ), +} + +assert len(DECISIONS) == 86, len(DECISIONS) +assert set(RENAMED) <= set(DECISIONS) + + +def registered_key(proposed): + """The registered key for rows with this proposed key.""" + if proposed in FOLDED: + return FOLDED[proposed][0] + return RENAMED.get(proposed, proposed) diff --git a/pipeline/apply_ab2026_key_decisions.py b/pipeline/apply_ab2026_key_decisions.py new file mode 100644 index 000000000..9122bfd42 --- /dev/null +++ b/pipeline/apply_ab2026_key_decisions.py @@ -0,0 +1,204 @@ +"""Give each staged AB2026 row its registered key, and write KEY_DECISIONS.md. + +Tranche 1 staged 973 rows with `measure_key: null` and a proposed key in +`conditions.proposed_measure_key` (harvest README rule 2). Tranche 2 +registers each proposed key, or folds it into a registered key +(pipeline/ab2026_key_decisions.py). AB2025's rows name their registry key in +`measure_key`, and the contract checker rejects a registered key left in +`proposed_measure_key`, so this script moves each row's key into +`measure_key` and drops the condition. It changes nothing else in a row, and +it writes each claims file as the stagers do: sorted keys, UTF-8, gzip level 9 +with no name or time in the header. + +Every registered key is new to the registry and we fold none, so the rows a +decision covers are exactly the rows that now name its key. `render` +rebuilds KEY_DECISIONS.md from the rewritten claims, and the tests check it. + +Usage: + python pipeline/apply_ab2026_key_decisions.py # rewrite and write + python pipeline/apply_ab2026_key_decisions.py --check # check only + +After a rewrite, re-pin COUNTS.json with pipeline/harvest_counts.py and +regenerate PROPOSED_KEYS.md with pipeline/ab2026_proposed_keys.py. +""" + +import gzip +import io +import json +import sys +from collections import defaultdict +from pathlib import Path + +try: + from pipeline import ab2026_key_decisions as D +except ModuleNotFoundError: # direct script invocation without PYTHONPATH + import ab2026_key_decisions as D + +REPO = Path(__file__).resolve().parent.parent +HARVEST = REPO / "sources/harvest-uk-ab2026-2026-10-29" +REGISTRY = REPO / "data/uk/ab2026_measures.json" +OUT = HARVEST / "KEY_DECISIONS.md" + + +def families(harvest=HARVEST): + return sorted( + p.name for p in harvest.iterdir() if (p / "claims_staged.jsonl.gz").exists() + ) + + +def read(path): + with gzip.open(path, "rt", encoding="utf-8") as fh: + return [json.loads(line) for line in fh if line.strip()] + + +def write(path, 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, ensure_ascii=False) + "\n").encode() + ) + path.write_bytes(buf.getvalue()) + + +def rekey(row): + """The row with its proposed key moved into measure_key (or unchanged).""" + pk = (row.get("conditions") or {}).get("proposed_measure_key") + if not pk: + return row + if pk not in D.DECISIONS: + raise ValueError(f"{pk} has no decision in pipeline/ab2026_key_decisions.py") + out = dict(row) + out["conditions"] = { + k: v for k, v in row["conditions"].items() if k != "proposed_measure_key" + } + out["measure_key"] = D.registered_key(pk) + return out + + +def apply(harvest=HARVEST): + changed = {} + for fam in families(harvest): + path = harvest / fam / "claims_staged.jsonl.gz" + rows = read(path) + new = [rekey(r) for r in rows] + n = sum(a is not b for a, b in zip(rows, new)) + if n: + write(path, new) + changed[fam] = n + return changed + + +def _ranges(idx): + out, start, prev = [], None, None + for i in idx: + if start is None: + start = prev = i + elif i == prev + 1: + prev = i + else: + out.append((start, prev)) + start = prev = i + if start is not None: + out.append((start, prev)) + return ", ".join(str(a) if a == b else f"{a}–{b}" for a, b in out) + + +def _why(d): + v = d["verdict"] + kind = v[0] + if kind == "legs": + return "We combine the named registry measures." + if kind == "receipts": + return "We register it as the receipts of the named Table 6.1 measures." + if kind == "words": + return f"Its producer gives the scope in words: {v[1]}." + if kind in ("scope", "scope_why"): + return "We can't estimate this quantity within the household model." + if kind == "gap": + return "We need further policyengine-uk development to estimate this quantity." + if kind == "delta": + return "We represent this change with parameter deltas on current law." + if kind == "partial": + return "We can estimate part of this change." + raise ValueError(kind) + + +def render(harvest=HARVEST): + """KEY_DECISIONS.md from the decisions and the rows that name each key.""" + reg = {m["measure_key"]: m for m in json.loads(REGISTRY.read_text())["measures"]} + rows_of = defaultdict(lambda: defaultdict(list)) + for fam in families(harvest): + for i, r in enumerate(read(harvest / fam / "claims_staged.jsonl.gz")): + rows_of[r["measure_key"]][fam].append(i) + kinds = defaultdict(int) + for d in D.DECISIONS.values(): + kinds[d["kind"]] += 1 + total = sum(d["rows"] for d in D.DECISIONS.values()) + out = [ + "# Key decisions for the AB2026 harvest (#230)", + "", + "Generated by `pipeline/apply_ab2026_key_decisions.py` from `pipeline/ab2026_key_decisions.py` and the staged families; don't edit by hand.", + "", + f"We register {len(D.DECISIONS) - len(D.FOLDED)} AB2026 keys ({kinds['measure']} measures, {kinds['package']} packages and {kinds['option']} options) for {total} staged figures. " + "We give two producers' packages one key only when they identify the same legs (rule 3). " + f"For {len(D.RENAMED)} key, we retain the proposed name in `proposed_as`. " + "We store registered keys in `measure_key` and copy each producer's scope from NOTES.md into `source_note`. " + "We number each family's rows from 0, in the order of its `claims_staged.jsonl.gz`, and register the keys in `data/uk/ab2026_measures.json`.", + "", + "| proposed key | decision | registered key | verdict | why | rows |", + "|---|---|---|---|---|---|", + ] + for pk, d in sorted(D.DECISIONS.items()): + key = D.registered_key(pk) + if pk in D.FOLDED: + decision, why = "folded", D.FOLDED[pk][1] + elif pk in D.RENAMED: + decision, why = "registered, renamed", _why(d) + else: + decision, why = "registered", _why(d) + m = reg.get(key) + verdict = m["computability"] if m else "MISSING" + cover = "; ".join( + f"{fam} {_ranges(idx)}" for fam, idx in sorted(rows_of[key].items()) + ) + n = sum(len(v) for v in rows_of[key].values()) + out.append( + f"| `{pk}` | {decision} | `{key}` | {verdict} | {why} Scope: {d['scope'].replace('|', '/')} | {n}: {cover} |" + ) + return "\n".join(out) + "\n" + + +def problems(harvest=HARVEST): + reg = {m["measure_key"] for m in json.loads(REGISTRY.read_text())["measures"]} + out = [] + for fam in families(harvest): + for i, r in enumerate(read(harvest / fam / "claims_staged.jsonl.gz")): + if (r.get("conditions") or {}).get("proposed_measure_key"): + out.append(f"{fam} row {i} still names a proposed key") + counted = defaultdict(int) + for fam in families(harvest): + for r in read(harvest / fam / "claims_staged.jsonl.gz"): + counted[r["measure_key"]] += 1 + for pk, d in D.DECISIONS.items(): + key = D.registered_key(pk) + if key not in reg: + out.append(f"{key} is not in the registry") + if pk not in D.FOLDED and counted[key] != d["rows"]: + out.append(f"{key}: {counted[key]} rows, the decision records {d['rows']}") + if OUT.read_text() != render(harvest): + out.append("KEY_DECISIONS.md is stale") + return out + + +def main(argv): + if "--check" not in argv: + print(json.dumps(apply(), indent=1)) + OUT.write_text(render()) + bad = problems() + print("\n".join(bad) if bad else "ok") + return 1 if bad else 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/pipeline/build_ab2026_registry.py b/pipeline/build_ab2026_registry.py index 836ecb7a4..2b471bc76 100644 --- a/pipeline/build_ab2026_registry.py +++ b/pipeline/build_ab2026_registry.py @@ -34,9 +34,11 @@ from pathlib import Path try: + from pipeline import ab2026_key_decisions as D 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_key_decisions as D import ab2026_measure_keys as K from uk_engine_registry import engine_dumps @@ -118,6 +120,13 @@ def ns(pattern): "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", + # pipeline/ab2026_key_decisions.py: measures and options with + # no Table 6.1 line + "energy_bills": "policyengine-uk: household energy bills split into standing charges, unit rates, levies and debt costs (gas_consumption and electricity_consumption are the nearest variables)", + "earnings": "policyengine-uk: employment income that responds to minimum wage rates (employment_income is an input)", + "childcare_limits": "policyengine-uk: an extended childcare income limit that tapers, or varies by hours and child age", + "nics_investment": "policyengine-uk: National Insurance on property, savings and other non-dividend investment income", + "nics_partnership": "policyengine-uk: partnership profits apart from other self-employment income, with an employer-equivalent NICs charge", } # The engine's exogenous incidence levers (descriptions read at the pin from @@ -180,6 +189,32 @@ def scope(why, pattern, link=None): } +def no_expressible_leg(legs): + """Derive a package's gap evidence from its legs when the engine can + express none of them: `why`, `name_search`, the triage flag and the + upstream items come from the legs.""" + assert legs and all(m["computability"] == "not_expressible" for m in legs) + out = { + "computability": "not_expressible", + "pe_reform_delta": None, + "why": f"The engine can't express any of these {len(legs)} legs. " + + " ".join(f"{m['measure_key']}: {m['why']}" for m in legs), + "name_search": "Each leg's search. " + + " ".join(f"{m['measure_key']}: {m['name_search']}" for m in legs), + } + upstream = list( + dict.fromkeys(m["upstream_item"] for m in legs if m.get("upstream_item")) + ) + if upstream: + out["policyengine_uk_development_item"] = True + out["upstream_item"] = "; ".join(upstream) + else: + out["out_of_model_scope"] = True + links = {m["action_link"] for m in legs} + out["action_link"] = links.pop() if len(links) == 1 else ISSUE + return out + + def baseline(*paths): return {p: P[p] for p in paths} @@ -1033,6 +1068,8 @@ def _spend(lever): m["note"] = ( "Every leg is expressible; a counterpart is the legs' runs combined, stated as constructed." ) + elif all(c == "not_expressible" for c in comp): + m.update(no_expressible_leg([BY_LINE[l] for l in lines])) else: m["computability"] = "partial" not_expr = [l for l, c in zip(lines, comp) if c == "not_expressible"] @@ -1052,6 +1089,180 @@ def _spend(lever): measures.append(m) +# --------------------------------------------------------------------------- +# The keys the families proposed (pipeline/ab2026_key_decisions.py, +# KEY_DECISIONS.md), appended after the Table 6.1 entries so those keep +# their order +# --------------------------------------------------------------------------- + +TEMPLATES = { + "SPEND": SPEND, + "BUSINESS": BUSINESS, + "RATES": RATES, + "INDIRECT": INDIRECT, + "FINANCE": FINANCE, + "ENFORCE": ENFORCE, + "REGULATE": REGULATE, +} + + +def _legs_of(d): + return [K.key(x) if isinstance(x, int) else x for x in d.get("legs") or []] + + +def _names(producers): + names = [f"`{p}`" for p in producers] + return names[0] if len(names) == 1 else ", ".join(names[:-1]) + " and " + names[-1] + + +def _producer_note(proposed, d): + return ( + f"{_names(d['producers'])} {'scores' if len(d['producers']) == 1 else 'score'} " + f"it on {d['rows']} staged rows of the Autumn Budget 2026 harvest " + "(KEY_DECISIONS.md). " + f"Scope, from the families' NOTES.md: {d['scope']}" + ) + + +def _verdict(d): + v = d["verdict"] + kind = v[0] + if kind == "scope": + _, template, what, pattern = v + return { + "computability": "not_expressible", + **scope(TEMPLATES[template].format(what=what), pattern), + } + if kind == "scope_why": + _, why, pattern = v + return {"computability": "not_expressible", **scope(why, pattern)} + if kind == "gap": + _, why, pattern, upstream, nearest = v + return { + "computability": "not_expressible", + **gap(why, pattern, upstream=upstream, nearest=nearest), + } + if kind == "delta": + _, delta, delta_kind, paths, note = v + return { + "computability": "expressible", + "construction": "delta_on_current_law", + "pe_reform_delta": delta, + "delta_kind": delta_kind, + "engine_baseline_2026": baseline(*paths), + "note": note, + } + if kind == "partial": + _, missing, pattern = v + return { + "computability": "partial", + "pe_reform_delta": None, + "missing": missing, + "name_search": ns(pattern), + } + raise ValueError(f"unknown verdict {kind!r}") + + +def _package_verdict(d): + kind = d["verdict"][0] + if kind == "legs": + legs = _legs_of(d) + comp = [BY_KEY[k]["computability"] for k in legs] + out = { + "construction": "package_of_registry_measures", + "package_of": legs, + "pe_reform_delta": None, + } + if all(c == "expressible" for c in comp): + out["computability"] = "expressible" + out["note"] = ( + "Every leg is expressible; a counterpart is the legs' runs combined, stated as constructed." + ) + return out + if all(c == "not_expressible" for c in comp): + out.update(no_expressible_leg([BY_KEY[k] for k in legs])) + return out + expressible = [k for k, c in zip(legs, comp) if c == "expressible"] + not_expr = sum(c == "not_expressible" for c in comp) + partial = [k for k, c in zip(legs, comp) if c == "partial"] + out["computability"] = "partial" + out["missing"] = ( + f"{not_expr} of {len(legs)} legs are not expressible" + + (f" and {len(partial)} partial ({', '.join(partial)})" if partial else "") + + " (see each leg's verdict); a PolicyEngine number covers only " + f"the {len(expressible)} expressible legs: {expressible}" + ) + out["expressible_legs"] = expressible + return out + if kind == "receipts": + legs = [K.key(x) for x in d["receipts_of"]] + if all(BY_KEY[k]["computability"] == "not_expressible" for k in legs): + return { + "construction": "receipts_of_registry_measures", + "receipts_of": legs, + **no_expressible_leg([BY_KEY[k] for k in legs]), + } + expressible = [k for k in legs if BY_KEY[k]["computability"] == "expressible"] + return { + "construction": "receipts_of_registry_measures", + "receipts_of": legs, + "pe_reform_delta": None, + "computability": "partial", + "missing": ( + "The producer allocates its figure to receipts, and a PolicyEngine run gives each leg's whole " + "effect, not its receipts head, so a counterpart is constructed and never like-for-like; " + f"the expressible legs are {expressible}" + ), + "expressible_legs": expressible, + } + if kind == "words": + return { + "construction": "producer_scope", + "package_of": d["scope"], + "pe_reform_delta": None, + "computability": "partial", + "missing": ( + f"The scope is the producer's own words: {d['verdict'][1]}. A PolicyEngine number can cover " + "only the registered measures inside it, stated as constructed, never like-for-like." + ), + } + return {"construction": "producer_scope", "package_of": d["scope"], **_verdict(d)} + + +STATUS = { + "measure": "announced", + "package": "announced", + "option": "option_costed_by_others", +} + +for _pass in ("measure", "package"): + BY_KEY = {m["measure_key"]: m for m in measures} + for proposed, d in D.DECISIONS.items(): + if proposed in D.FOLDED or (d["kind"] == "measure") != (_pass == "measure"): + continue + m = { + "measure_key": D.registered_key(proposed), + "title": d["title"], + "reported_status": STATUS[d["kind"]], + "source_note": _producer_note(proposed, d), + } + if d.get("table_62_line"): + m["table_62_line"] = d["table_62_line"] + m["program"] = d["program"] + m["producers"] = list(d["producers"]) + if proposed in D.RENAMED: + m["proposed_as"] = proposed + if d["kind"] == "measure" or ( + d["kind"] == "option" and d["verdict"][0] not in ("words",) + ): + m.update(_verdict(d)) + else: + m.update(_package_verdict(d)) + if d.get("uncapped_sentinel"): + m["uncapped_sentinel"] = d["uncapped_sentinel"] + 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" @@ -1110,6 +1321,8 @@ def registry(): "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", + "receipts_of_registry_measures": "a producer's receipts allocation of registry measures (`receipts_of`, a list of keys): the OBR's Table 3.1 tax groups; a PolicyEngine run gives each leg's whole effect, so a counterpart is constructed, never like-for-like", + "producer_scope": "a package a producer defines in its own words (`package_of`, a string, as AB2025's totals are), with no exact list of registry measures", }, "exogenous_levers_note": ( "The engine carries exogenous incidence levers that spread a £ amount supplied as an input: " diff --git a/pipeline/stage_ab2026_hmt_tables.py b/pipeline/stage_ab2026_hmt_tables.py index cedaea600..1aee110c1 100644 --- a/pipeline/stage_ab2026_hmt_tables.py +++ b/pipeline/stage_ab2026_hmt_tables.py @@ -75,9 +75,10 @@ ) # 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"} +# takes its own key, as Table 6.1 line 34's reprioritisation does (review A +# T-1). The registry holds both keys (pipeline/ab2026_key_decisions.py). +T62_OWN = {6: "ab2026__your_first_home_ft_reprioritisation"} +T62_TOTAL = "ab2026__package_total_financial_transactions" # 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" @@ -295,10 +296,7 @@ def stage_t62(wb, out, totals): "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 + key = T62_OWN.get(line, K.PREFIX + K.TABLE_62[line]) r = { **base_row( T61, @@ -313,7 +311,7 @@ def stage_t62(wb, out, totals): ), "measure_key": key, } - if key is None: + if line in T62_OWN: r["note"] = ( "Table 6.2 line 6 reprioritises existing financial " "transactions budgets to fund line 5's equity loan scheme; " @@ -341,11 +339,10 @@ def stage_t62(wb, out, totals): "sign_convention": FT_SIGN, "table": "6.2", "row_type": "total", - "proposed_measure_key": "ab2026__package_total_financial_transactions", }, metric=FT, ), - "measure_key": None, + "measure_key": T62_TOTAL, "note": "Table footnote 1: totals may not sum due to rounding.", } ) diff --git a/scorecard_db/baselines.py b/scorecard_db/baselines.py index bb80d3cf4..69d2bb972 100644 --- a/scorecard_db/baselines.py +++ b/scorecard_db/baselines.py @@ -397,6 +397,20 @@ "stamped by scorecard_db/ingest_obr_policy_effects.py " "(_baseline_descriptor).", ), + ( + { + "policy": "obr_pre_measures_autumn_budget_2026", + "counterfactual": "policy_parameters", + }, + "obr_pre_measures_autumn_budget_2026__policy_parameters", + "OBR's pre-measures October 2026 forecast, the world the " + "Autumn Budget 2026 package and its individually scored measures " + "are measured against; counterfactual kind: the measures' pre-announcement legislated parameters.", + "policy_ref", + "sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables (proposed_baseline " + "'OBR pre-measures Autumn Budget 2026 policy parameters'); mapped by " + "scorecard_db/ingest_uk_ab2026.py, as AB2025's world is for its OBR rows.", + ), ( { "policy": "obr_november_2025_budget_forecast", diff --git a/scorecard_db/ingest_uk_ab2026.py b/scorecard_db/ingest_uk_ab2026.py new file mode 100644 index 000000000..03c062212 --- /dev/null +++ b/scorecard_db/ingest_uk_ab2026.py @@ -0,0 +1,1024 @@ +"""Ingest every Autumn Budget 2026 score (#230). + +We stage 5,952 rows in ``sources/harvest-uk-ab2026-2026-10-29/`` from 12 +families: HM Treasury's tables, costings and red book, the OBR's +October 2026 EFO and policy workbook, Resolution Foundation, IFS, Tax Policy +Associates, CenTax, IPPR, the devolved governments, Trussell and four smaller +producers. This module turns each row into a claim or a tallied drop with a +written reason, and ``check_accounting`` pins ``read = ingested + dropped`` +per family against ``ingest_uk_ab2026_expected.json``. + +We model it on ``ingest_uk_ab2025`` and keep its behaviour, reusing its +helpers where the two agree: + +- the order of drops: restated rows first (#86), then categorical ratings, + specimen households, the dropped metric and unit names, and only then a + metric disposition, so a restated figure can't land on a registered metric; +- every AB2025 metric disposition, drop reason and unit, every condition it + copies or canonicalises, its engine checks (``_source_model``), its + registered worlds (#13), the macro verdict on macro-fiscal metrics (#55), + ``publish_without_result`` on every UK row, the merge of one + producer's twin printings, and the claim-id uniqueness gate; +- the pe_gap verdict rows (``ingest_verdicts``), stated against the engine + the registry pins. + +The AB2026 ingest adds six steps: + +1. **Keys.** We stage a keyed row under an AB2026 key, or for a Table 6.4 + recosting under the earlier event's key named in + ``conditions.recosting_of``. We keep keyless quantities where no producer + identifies one measure. The ingest gives a recosting no registry verdict, + since we assessed AB2025's registry at policyengine-uk 2.89.2 and run + AB2026's counterparts at 2.151.0. +2. **Dispositions.** We decide the 66 metric names AB2025's tables don't + hold in ``DISPOSITIONS_AB2026`` and ``DROP_BY_NAME_AB2026`` (2 adoptions + and 64 drops). Table 6.2's ``financial_transaction_cash_impact`` lands on + ``cash_requirement_change``, the PSNCR metric ``models.py`` keeps apart + from PSNB. +3. **Shares of GDP.** We put a ``percent`` row with a GDP denominator (IFS's) + on the OBR's and TPA's ``percent_of_gdp``, which AB2025 drops as + macro-fiscal. +4. **HM Treasury figures staged twice.** HM Treasury repeats 408 Table 6.1 + cells in the costings and 24 in red book Table 6.3 and its prose. We keep + the Table 6.1 or 6.2 claim, list each repetition under + ``publication.also_printed_in`` and tally it. We match a repetition by + key, staged metric, unit, year and value. We also record nine reviewed red + book printings in ``REVIEWED_TWINS``, where HM Treasury repeats a cell with + the opposite sign, a rounding or another year. +5. **Row calls.** We move IFS row 46 to another metric in ``ROW_METRICS``, + give it a per-household unit in ``ROW_UNITS``, and tally 22 rows under six + reasons in ``ROW_DROPS``. With each entry we record the staged value we + expect on that row. +6. **Lanes.** We add three lanes: official, microsimulation, and + administrative data and other producers. This module ingests no + PolicyEngine counterparts and calls no ``advance_lanes``. + +Usage: + PYTHONPATH=. python -m scorecard_db.ingest_uk_ab2026 data/scorecard.db +""" + +from __future__ import annotations + +import gzip +import hashlib +import json +import math +import re +from pathlib import Path + +from . import ingest_uk_ab2025 as AB25 +from .db import DIAGNOSES_SQL, LANE_SQL, RESULTS_SQL, SCORES_SQL, ScorecardDB +from .harvest import REPO, finish, merge_republications, with_baseline_condition +from .models import ( + ComparisonStatus, + ExternalScore, + Metric, + PEResult, +) +from .relationships import uk_relationship +from .uk_aliases import canon, known + +HARVEST = REPO / "sources" / "harvest-uk-ab2026-2026-10-29" +REGISTRY_PATH = REPO / "data" / "uk" / "ab2026_measures.json" + +REGISTRY_MARK = "uk_ab2026" +FISCAL_EVENT = "autumn_budget_2026" +# The UK family's shared top-level feed literal (sync_lane_feed's contract: +# every caller in a build passes the same one). +FEED_UPDATED = AB25.FEED_UPDATED +LANE_UPDATED = "2026-11-05" +VERDICT_RUN_ID = "ab2026-verdicts-2026-11-05" +VERDICT_COMPUTED_AT = "2026-11-05T00:00:00+00:00" + +LANES = { + "uk-ab2026-official": { + "source": "HM Treasury and the OBR (Autumn Budget 2026)", + "area": "Tables 6.1, 6.2 and 6.4, the policy costings, the Budget document and the October 2026 EFO", + "mode": 2, + "country": "UK", + }, + "uk-ab2026-microsim": { + "source": "Resolution Foundation, IFS and IPPR (Autumn Budget 2026)", + "area": "independent microsimulation of the Budget's measures and options", + "mode": 2, + "country": "UK", + }, + "uk-ab2026-admin-other": { + "source": "CenTax, TPA, the devolved governments, Trussell and smaller producers (Autumn Budget 2026)", + "area": "administrative-data and own-computation scores of the Budget's measures", + "mode": 2, + "country": "UK", + }, +} + +# harvest family dir -> (lane, allowed source slugs) +FAMILIES: dict[str, tuple[str, frozenset[str]]] = { + # uk_hmt_tables first: its Table 6.1 and 6.2 claims are the ones the + # costings' and red book's twins attach to + "uk_hmt_tables": ("uk-ab2026-official", frozenset({"hm_treasury"})), + "uk_hmt_costings": ("uk-ab2026-official", frozenset({"hm_treasury"})), + "uk_hmt_redbook": ("uk-ab2026-official", frozenset({"hm_treasury"})), + "uk_obr_tables": ("uk-ab2026-official", frozenset({"obr_efo"})), + "uk_rf_ab2026": ("uk-ab2026-microsim", frozenset({"resolution_foundation"})), + "uk_ifs_ab2026": ("uk-ab2026-microsim", frozenset({"ifs"})), + "uk_ippr": ("uk-ab2026-microsim", frozenset({"ippr"})), + "uk_centax": ("uk-ab2026-admin-other", frozenset({"centax"})), + "uk_tpa": ("uk-ab2026-admin-other", frozenset({"tax_policy_associates"})), + "uk_devolved_govts": ( + "uk-ab2026-admin-other", + frozenset({"scottish_government", "welsh_government"}), + ), + "uk_thinktank_misc": ( + "uk-ab2026-admin-other", + frozenset( + { + "citizens_advice", + "cps", + "institute_for_government", + "learning_and_work_institute", + } + ), + ), + "uk_trussell_wpi": ("uk-ab2026-admin-other", frozenset({"trussell_wpi"})), +} + +CLAIMS_SHA256: dict[str, str] = { + fam: entry["claims_sha256"] + for fam, entry in json.loads((HARVEST / "COUNTS.json").read_text()).items() + if not fam.startswith("_") +} + +# --- dispositions ------------------------------------------------------------ +# The metric names AB2025's tables don't hold, decided here. Each maps to one +# Metric or one drop reason; an unlisted name raises. +DISPOSITIONS_AB2026: dict[str, Metric] = { + # Table 6.2 and the costings' financial transactions: a PSNCR effect + "financial_transaction_cash_impact": Metric.CASH_REQUIREMENT_CHANGE, + # the red book's 84% of income tax payers the property and savings + # rates leave unaffected + "unaffected_share": Metric.SHARE_NO_CHANGE, +} + +DROPS_AB2026: dict[str, str] = { + "hmt_figure_staged_twice": ( + "HM Treasury prints this figure in Table 6.1 or 6.2 and again in its " + "costings or Budget document, sometimes rounded or with the opposite " + "sign. We score the table figure and list this printing with it." + ), + "energy_bill_level_no_metric": ( + "The producer gives the level of a typical household's energy bill " + "under the price cap (RF's £2,210, for example), and we score changes " + "in bills, so a level has nothing to compare." + ), + "partial_year_household_support": ( + "IFS gives average support from the Budget's energy and fuel measures " + "over October 2026 to June 2027. We score annual income changes, so we " + "tally these partial-year figures." + ), + "restated_obr_forecast": ( + "Resolution Foundation computes the cost of continuing the fuel duty " + "freeze from two OBR forecasts, the constant-duty-rate receipts less " + "the central receipts. We keep only the OBR's own figure, which it " + "prints for 2029-30 as an effect on borrowing." + ), + "income_path_not_a_policy_effect": ( + "Resolution Foundation gives the change in real household incomes, per " + "person or for a typical household, over a period in pounds, with no " + "reform to compare against, and we score income paths only as " + "percentage growth." + ), + "earlier_estimate_restated": ( + "CenTax restates the revenue gain it estimated in 2024 from taxing " + "capital gains at income tax rates, an estimate of an earlier event " + "rather than of this Budget." + ), + "no_registered_metric": ( + "The producer publishes a quantity that fits no registered metric, " + "such as a gain summed over several years per driver or per business, " + "or a change in the supply of homes, and we tally it." + ), + "mtr_no_registered_metric": ( + "The producer gives a marginal tax rate, and we register a metric only " + "for average rates, average_tax_rate." + ), + "single_row_unregistered_world": ( + "The OBR compares this figure with a world it describes once: its " + "uprating rules over 1990-2025 outturn or its CPI bound against fuel " + "duty policy. We compare against worlds we can rebuild or current law." + ), +} + +M, R, A, S, P, U, N, X, E = ( + "macro_fiscal_or_out_of_scope", + "ratio_or_derived_quantity", + "assumption_or_base_not_a_score", + "share_level_no_registered_metric", + "parameter_or_threshold_level", + "unit_no_household_concept", + "no_registered_metric", + "mode3_specimen_household", + "energy_bill_level_no_metric", +) +DROP_BY_NAME_AB2026: dict[str, str] = { + # fiscal aggregates and their changes (#55) + "fiscal_balance_change": M, + "psnb_share_of_gdp": M, + "public_sector_net_borrowing": M, + "public_sector_net_debt": M, + "public_sector_net_debt_change": M, + "public_sector_net_financial_liabilities": M, + "public_debt_change": M, + "psnd_impact": M, + "psnfl_impact": M, + "psnfl_fair_value_impact": M, + "current_budget_balance": M, + "primary_balance": M, + "primary_balance_change": M, + "tax_revenue_change": M, + "tax_to_gdp_ratio": M, + "tax_to_gdp_ratio_change": M, + "absolute_policy_change": M, + "fiscal_consolidation_share": M, + "headroom_share_of_previous": M, + "share_of_headroom_change": M, + "current_budget_deficit_revision_risk": M, + "ten_year_bond_spread_other_g7": M, + "real_household_disposable_income_index": M, + "jobs_created_or_supported": M, + # departmental spending paths + "real_spending_growth": M, + "real_spending_growth_revision": M, + "real_spending_change": M, + "rdel_change": M, + "rdel_share_of_gdp": M, + "real_rdel_per_person_change": M, + "spending_pressure": M, + # funding between governments, and business outside the household model + "devolved_funding_real_terms_change": M, + "devolved_revenue": M, + "business_cost_saving": M, + "bill_change_percent": M, + # ratios of two published quantities + "effective_tax_rate_gap": R, + "income_change_gap": R, + "tax_gap_share_of_compliance_yield": R, + "share_of_energy_price_increase_offset": R, + "bill_rise_offset_share": R, + "share_of_total_policy_cost": R, + "revenue_share_by_fiscal_event": R, + # behavioural responses and pass-through shares: inputs to a costing + "parents_bunching": A, + "behavioural_response_share": A, + "workforce_exit_share": A, + "incidence_share": A, + # shares of a population at a level, with no registered metric + "partner_not_in_work_share": S, + "female_share": S, + "share_with_zero_liability": S, + "share_in_non_gaining_deciles": S, + "share_in_net_recipient_deciles": S, + "share_in_top_half_of_expenditure": S, + # design: the present value of a capital allowance + "capital_allowance_present_value": P, + # a business's bill + "business_rates_bill_change": U, + # sums over several years per driver or business + "average_cumulative_gain": N, + # IFS's maximum gain per beneficiary, a statistic with no registered + # metric + "taxpayer_gain": N, + # single-row quantities + "housing_supply_change": N, + "cash_receipts_change": N, + "unit_rate_change": N, + # single cases at a stated income + "marginal_tax_amount": X, + "marginal_take_home_pay": X, + "net_weekly_income": X, + # bill levels + "typical_energy_bill": E, + # IFS's support per household over October 2026 to June 2027, apart from + # row 46, which we adopt through ROW_METRICS + "average_household_support": "partial_year_household_support", +} + +DISPOSITIONS: dict[str, Metric] = {**AB25.DISPOSITIONS, **DISPOSITIONS_AB2026} +# AB2025's restatement reason says we stage the originator's rows in the same +# harvest. In AB2026 we don't always: in its costings, HM Treasury restates +# HMRC's tax gap (rows 233 and 234), and we stage no HMRC family. +_RESTATED_AB2026 = ( + "The producer repeats another body's figure (the OBR's, HM Treasury's, " + "HMRC's or another producer's), and we credit the estimate to that body " + "and tally this repetition." +) +DROPS: dict[str, str] = { + **AB25.DROPS, + "restated_official_figure": _RESTATED_AB2026, + **DROPS_AB2026, +} +_DROP_BY_NAME: dict[str, str] = {**AB25._DROP_BY_NAME, **DROP_BY_NAME_AB2026} +assert not (set(DISPOSITIONS_AB2026) & set(AB25._DROP_BY_NAME)) +assert not (set(DROP_BY_NAME_AB2026) & set(AB25.DISPOSITIONS)) +assert not (set(DISPOSITIONS) & set(_DROP_BY_NAME)), "adopted or dropped, never both" +assert set(_DROP_BY_NAME.values()) <= set(DROPS), "every drop key has a reason" + +# --- row calls --------------------------------------------------------------- +# (family, row number from 0) -> (staged metric, staged value_raw, Metric, +# why). The ingest raises if the staged row doesn't match, so a re-staged +# family can't move a call onto another row. +ROW_METRICS: dict[tuple[str, int], tuple[str, str, Metric, str]] = { + ("uk_ifs_ab2026", 46): ( + "average_household_support", + "£80", + Metric.AVERAGE_HOUSEHOLD_INCOME_CHANGE, + "IFS averages January 2027's one-off Household Energy Payment across " + "households in England. The whole payment falls in 2026-27, so the " + "figure needs no annualising.", + ), +} + +# (family, row) -> the unit the ingest stores in place of the staged one, for a +# row we reassign through ROW_METRICS. We stage IFS row 46 in gbp; we distinguish +# per-household averages from totals in models.py. +ROW_UNITS: dict[tuple[str, int], str] = {("uk_ifs_ab2026", 46): "gbp_per_household"} +assert set(ROW_UNITS) <= set(ROW_METRICS) + +# (family, row) -> (staged value_raw, drop reason) +ROW_DROPS: dict[tuple[str, int], tuple[str, str]] = { + ("uk_obr_tables", 2658): ( + "less than a 0.1 percentage point", + "single_row_unregistered_world", + ), + ("uk_obr_tables", 2743): ("1.4 per cent", "single_row_unregistered_world"), + ("uk_obr_tables", 2744): ("4.4 per cent", "single_row_unregistered_world"), + # RF computes its continued fuel duty freeze as the OBR's constant-duty- + # rate forecast less its central forecast (our notes to RF's rows 154 and + # 397-401, citing its footnote 27), so we keep only the OBR's row 2740 + ("uk_rf_ab2026", 154): ("£4.3 billion", "restated_obr_forecast"), + ("uk_rf_ab2026", 397): ("-2.3483484846542702", "restated_obr_forecast"), + ("uk_rf_ab2026", 398): ("-3.7389555211291317", "restated_obr_forecast"), + ("uk_rf_ab2026", 399): ("-4.2893363032056087", "restated_obr_forecast"), + ("uk_rf_ab2026", 400): ("-4.6757828023106249", "restated_obr_forecast"), + ("uk_rf_ab2026", 401): ("-4.8671109188223411", "restated_obr_forecast"), + # RF's income paths, with no reform and baseline + ("uk_rf_ab2026", 20): ("£420", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 22): ("£776", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 39): ("£600", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 40): ("£1,050", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 42): ("£1,000", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 50): ("£1,050", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 90): ("£400", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 199): ("£600", "income_path_not_a_policy_effect"), + ("uk_rf_ab2026", 202): ("£1,050", "income_path_not_a_policy_effect"), + # the red book's average gains per pub and per small business, outside + # the household model as business savings are + ("uk_hmt_redbook", 222): ("£3,000", "macro_fiscal_or_out_of_scope"), + ("uk_hmt_redbook", 233): ("£3,000", "macro_fiscal_or_out_of_scope"), + # CenTax's percentage revenue changes + ("uk_centax", 19): ("62%", "ratio_or_derived_quantity"), + ("uk_centax", 20): ("88%", "earlier_estimate_restated"), +} + +# A producer's own world, quoted as `proposed_baseline`, by its opening words +# (AB2025's method, ingest_uk_ab2025._PROPOSED_BASELINE_PREFIXES). +_PROPOSED_BASELINE_PREFIXES: dict[str, str] = { + **AB25._PROPOSED_BASELINE_PREFIXES, + "OBR pre-measures Autumn Budget 2026 policy parameters": "obr_pre_measures_autumn_budget_2026__policy_parameters", + # the AB2025 world, as the AB2026 OBR family words it + "Fuel duty rates increase in line with RPI inflation: stated policy since 2010-11": "obr_fuel_duty_rpi_uprated_since_2010_11", +} + +# The geography codes the harvest README allows for the UK and its parts. +# TPA also stages figures for the countries it compares the UK with; those +# claims stay in the DB and off the page (AB2025 held back TPA's +# constituency rows the same way, and AB2026 stages none). +UK_GEOGRAPHIES = frozenset( + { + "UK", + "GB", + "England", + "Wales", + "Scotland", + "Northern Ireland", + "England and Wales", + "UK_excl_scotland", + "Scotland, Wales and Northern Ireland", + "not stated", + } +) + + +def published(row: dict) -> bool: + """Whether a claim reaches the page before a counterpart lands.""" + geography = (row.get("conditions") or {}).get("geography") + return geography is None or geography in UK_GEOGRAPHIES + + +# The HM Treasury families whose rows can repeat a Table 6.1 or 6.2 cell. +_TWIN_FAMILIES = frozenset({"uk_hmt_costings", "uk_hmt_redbook"}) + +# Red book rows that repeat a Table 6.1 cell with another sign, a rounding or +# another period, so the exact match in _twin_key can't find them. Each entry +# maps (family, row) to the uk_hmt_tables row it repeats, with the reading +# that decides it. The ingest raises if the two rows' keys differ, if their +# magnitudes differ by more than half the red book's last printed digit, or if +# their years differ anywhere but Ukraine's three rows (_ANNOUNCEMENT_YEARS). +_HEP = ( + "HM Treasury prints the Household Energy Payment's 2026-27 cost in the red " + "book as £2.6 billion, a positive cost, and in Table 6.1 line 1 as -2,625 " + "(£ million). £2.6 billion rounds -2,625 once we normalise the sign." +) +_SPR = ( + "HM Treasury prints Small Producer Relief's support in the red book as £10 " + "million a year, a positive cost, and in Table 6.1 line 19 as -10 (£ million) " + "for 2027-28, the year we stage on both rows." +) +_BOOKS = ( + "HM Treasury prints up to £5 million a year for books for young children " + "in the red book, a positive cost, and -5 (£ million) in Table 6.1 line 9 " + "for 2027-28, the year we stage on both rows. HM Treasury dates the prose " + "support's three years from 2027-28 and the table's from 2026-27; the " + "2027-28 amount agrees." +) +_UKRAINE = ( + "HM Treasury prints £500 million of military support for Ukraine's air " + 'defences "this winter" in the red book, a positive cost, and -500 ' + "(£ million) in Table 6.1 line 43 in 2026-27. HM Treasury names no fiscal " + "year in the red book, so we stage the 2026 announcement year on the row " + "and match the figure to the table's 2026-27 cell." +) +REVIEWED_TWINS: dict[tuple[str, int], tuple[int, str]] = { + ("uk_hmt_redbook", 6): (0, _HEP), + ("uk_hmt_redbook", 179): (0, _HEP), + ("uk_hmt_redbook", 11): (109, _SPR), + ("uk_hmt_redbook", 236): (109, _SPR), + ("uk_hmt_redbook", 220): (49, _BOOKS), + ("uk_hmt_redbook", 270): (49, _BOOKS), + ("uk_hmt_redbook", 263): (252, _UKRAINE), + ("uk_hmt_redbook", 271): (252, _UKRAINE), + ("uk_hmt_redbook", 272): (252, _UKRAINE), +} +# (family, row) -> (the row's period, its uk_hmt_tables row, that row's period) +# for the rows on which we stage an announcement year. +_ANNOUNCEMENT_YEARS: dict[tuple[str, int], tuple[int, int, int]] = { + ("uk_hmt_redbook", i): (2026, 252, 2027) for i in (263, 271, 272) +} + + +def _is_component(row: dict) -> bool: + """A part of a measure (rule 9), which is never a twin of the whole.""" + c = row.get("conditions") or {} + return bool(c.get("component")) or c.get("row_type") == "measure_component" + + +def _registry() -> dict[str, dict]: + reg = json.loads(REGISTRY_PATH.read_text()) + return {m["measure_key"]: m for m in reg["measures"]} + + +REGISTRY_DOC = json.loads(REGISTRY_PATH.read_text()) +REGISTRY = _registry() +ENGINE_PIN = REGISTRY_DOC["engine_pin"]["policyengine_uk"] +DATA_REVISION = REGISTRY_DOC["engine_pin"]["budget_day_runs"]["dataset_revision"] + + +def _load(family: str) -> list[dict]: + path = HARVEST / family / "claims_staged.jsonl.gz" + if not path.exists(): + raise FileNotFoundError(f"{path} missing — the harvest family is not vendored") + digest = hashlib.sha256(path.read_bytes()).hexdigest() + if digest != CLAIMS_SHA256[family]: + raise ValueError( + f"{family}: claims_staged.jsonl.gz sha256 {digest[:12]} != pinned " + f"{CLAIMS_SHA256[family][:12]} — re-pin COUNTS.json deliberately" + ) + rows = [] + with gzip.open(path, "rt", encoding="utf-8") as fh: + for line in fh: + row = json.loads(line) + unknown = sorted(set(row) - AB25._KNOWN_FIELDS) + if unknown: + raise ValueError(f"{family}: unhandled staged fields {unknown}") + rows.append(row) + return rows + + +def unit_label(row: dict) -> str | None: + """The staged unit, with a share of GDP on percent_of_gdp: IFS stages + its shares as `percent` with `conditions.denominator: GDP`, and the OBR + and TPA propose `percent_of_gdp`.""" + label = row.get("unit_concept") or row.get("proposed_unit") + denominator = str((row.get("conditions") or {}).get("denominator", "")) + if label == "percent" and denominator.strip().lower() == "gdp": + return "percent_of_gdp" + return label + + +def _baseline(row: dict, source: str) -> dict | None: + label = row.get("baseline_policy") + proposed = row.get("proposed_baseline") + if label and proposed: + raise ValueError(f"{source}: both baseline_policy and proposed_baseline set") + if proposed: + text = AB25._normalise_quotes(proposed) + label = next( + ( + lab + for prefix, lab in _PROPOSED_BASELINE_PREFIXES.items() + if text.startswith(AB25._normalise_quotes(prefix)) + ), + None, + ) + if label is None: + raise ValueError( + f"{source}: proposed_baseline is not a registered world: " + f"{proposed[:100]!r} — register it in baselines.py (#13)" + ) + if not label: + return None + if label not in AB25._BASELINE_BY_LABEL: + raise ValueError(f"{source}: baseline label {label!r} is not registered") + return AB25._BASELINE_BY_LABEL[label] + + +def _verdict_conditions(row: dict, cond: dict, metric: Metric) -> None: + key = row.get("measure_key") + if key: + cond["measure_key"] = key + # a recosting's key is an earlier event's (README rule 2); its + # verdict at that event's engine says nothing about 2.151.0 + if key in REGISTRY and "recosting_of" not in cond: + m = REGISTRY[key] + cond["pe_expressibility"] = m["computability"] + gap = m.get("missing") or m.get("why") + if gap: + cond["pe_missing"] = gap + if m.get("action_link"): + cond["action_link"] = m["action_link"] + if metric in AB25.MACRO_METRICS: + cond["pe_expressibility"] = "not_expressible" + cond["pe_missing"] = AB25.MACRO_MISSING + cond["action_link"] = AB25.MACRO_LINK + + +def _score(row: dict, family: str, source: str, metric: Metric) -> ExternalScore: + label = unit_label(row) + if label not in AB25.UNITS: + raise ValueError(f"{source}: unregistered unit {label!r}") + unit = AB25.UNITS[label] + + cond: dict[str, str] = {"country": "UK"} + for key, value in (row.get("conditions") or {}).items(): + if key in AB25._CANONICALISED: + cond[key] = canon(source, key, value) + if cond[key] != value: + cond[f"{key}_verbatim"] = value + elif key == "program": + if value in known(source, "program"): + cond["program"] = canon(source, "program", value) + if cond.get("program") != value: + cond["program_verbatim"] = value + else: + cond[key] = value + if cond.get("fiscal_event") != FISCAL_EVENT: + raise ValueError(f"{source}: fiscal_event {cond.get('fiscal_event')!r}") + cond["value_verbatim"] = str(row["value_raw"]) + cond["benchmark_class"] = row["benchmark_class"] + if row.get("value_kind") and row["value_kind"] != "point": + cond["estimate_kind"] = row["value_kind"] + staged_metric = row.get("metric") or row.get("proposed_metric") + if staged_metric != metric.value: + # the name the producer's figure was staged under, where the ingest + # decided another (a proposal, or a ROW_METRICS call) + cond["staged_metric"] = staged_metric + if row.get("proposed_metric") == "exchequer_impact_static": + cond.setdefault("scoring_method", "static") + if row.get("reform_hint"): + cond["reform_hint"] = row["reform_hint"] + if row.get("proposed_baseline"): + cond["counterfactual"] = row["proposed_baseline"] + _verdict_conditions(row, cond, metric) + + basis = AB25.TIME_BASES.get(row.get("time_basis")) + if basis is None: + raise ValueError(f"{source}: unregistered time_basis {row.get('time_basis')!r}") + + baseline = _baseline(row, source) + reform = AB25._reform(row, source, baseline) + with_baseline_condition(cond, reform) + + pub = dict(row.get("publication") or {}) + pub.update( + { + "registry": REGISTRY_MARK, + "family": family, + "table": row.get("source_table"), + "quote": row.get("quote"), + "attribution": row["attribution"], + "publish_without_result": published(row), + } + ) + if row.get("note"): + pub["note"] = row["note"] + if row.get("parse_confidence") and row["parse_confidence"] != "high": + pub["parse_confidence"] = row["parse_confidence"] + + return ExternalScore( + source=source, + metric=metric, + unit_concept=unit, + period=int(row["period"]), + time_basis=basis, + value=float(row["value"]), + conditions=cond, + reform=reform, + calibration_relationship=uk_relationship(source, metric)[0], + source_model=AB25._source_model(source, row), + source_column=row.get("source_column") or "", + publication=pub, + value_kind=row.get("value_kind") or unit.value, + status="ok", + ) + + +def _twin_key(row: dict, name: str) -> tuple | None: + """The identity of one HM Treasury figure across its documents: key, + staged metric, unit, year and value. A part of a measure (rule 9) is + never a twin of the whole.""" + if row["source"] != "hm_treasury" or _is_component(row): + return None + return (row.get("measure_key"), name, unit_label(row), row["period"], row["value"]) + + +def _precision(s: ExternalScore) -> tuple: + """merge_republications keeps the higher of two printings: more printed + digits first, then the printing's provenance, so row order never decides + which printing a claim cites.""" + pub = s.publication + rest = {k: v for k, v in pub.items() if k != "also_printed_in"} + return ( + len(s.conditions.get("value_verbatim", "")), + json.dumps( + [ + pub.get("table"), + pub.get("locator"), + s.source_column, + pub.get("quote"), + rest, + ], + sort_keys=True, + default=str, + ), + ) + + +def _drop(acct: dict, fam: dict, reason_key: str) -> None: + entry = acct["drops"].setdefault( + reason_key, {"rows": 0, "reason": DROPS[reason_key]} + ) + entry["rows"] += 1 + fam["dropped"] += 1 + fam.setdefault("drops", {}) + fam["drops"][reason_key] = fam["drops"].get(reason_key, 0) + 1 + + +_PRINTED_AMOUNT = re.compile(r"£(\d+|\d{1,3}(?:,\d{3})+)(?:\.(\d+))? (million|billion)") +_MULTIPLIERS = {"million": 1e6, "billion": 1e9} + + +def _printed_unit(row: dict) -> float: + """Return the place value of the last printed digit: £100m for "£2.6 billion". + + We raise if someone uses another printed form or stores a value that differs + from the printed amount.""" + printed = _PRINTED_AMOUNT.fullmatch(row["value_raw"]) + if printed is None: + raise ValueError(f"no printed amount in {row['value_raw']!r}") + places = printed[2] or "" + multiplier = _MULTIPLIERS[printed[3]] + number = float(printed[1].replace(",", "") + "." + (places or "0")) + if not math.isclose(number * multiplier, abs(row["value"]), rel_tol=1e-9): + raise ValueError(f"{row['value']} doesn't match printed amount {printed[0]!r}") + return multiplier / 10 ** len(places) + + +def _check_row_calls(family: str, rows: list[dict]) -> None: + for (fam, i), (metric, raw, _, _) in ROW_METRICS.items(): + if fam == family: + r = rows[i] + if (r.get("metric") or r.get("proposed_metric"), r["value_raw"]) != ( + metric, + raw, + ): + raise ValueError(f"ROW_METRICS {fam} row {i} no longer matches") + for (fam, i), (raw, _) in ROW_DROPS.items(): + if fam == family and rows[i]["value_raw"] != raw: + raise ValueError(f"ROW_DROPS {fam} row {i} no longer matches") + reviewed = {i: v for (fam, i), v in REVIEWED_TWINS.items() if fam == family} + if reviewed: + table = _load("uk_hmt_tables") + for i, (t, _) in reviewed.items(): + r = rows[i] + if _is_component(r) or _is_component(table[t]): + raise ValueError(f"REVIEWED_TWINS {family} row {i} is a component") + a, b = abs(r["value"]), abs(table[t]["value"]) + announced = _ANNOUNCEMENT_YEARS.get((family, i)) + if ( + r.get("measure_key") != table[t].get("measure_key") + or abs(a - b) > _printed_unit(r) / 2 + or ( + r["period"] != table[t]["period"] + and announced != (r["period"], t, table[t]["period"]) + ) + ): + raise ValueError(f"REVIEWED_TWINS {family} row {i} no longer matches") + + +def stage(families: dict | None = None) -> tuple[list[ExternalScore], dict]: + """Stage every ingestible row; nothing touches the DB here. + + Returns (scores, accounting): read = ingested + dropped, by family and + by reason. ``families`` maps a family to (row number, row) pairs, so a + test can stage a sample and the row calls still find their rows; by + default each family's pinned claims file, whole.""" + scores: list[ExternalScore] = [] + acct = {"read": 0, "ingested": 0, "dropped": 0, "by_family": {}, "drops": {}} + canonical: dict[tuple, ExternalScore] = {} + table_claims: dict[int, ExternalScore] = {} + for family, (lane, sources) in FAMILIES.items(): + if families is None: + loaded = _load(family) + _check_row_calls(family, loaded) + numbered = list(enumerate(loaded)) + else: + numbered = list(families.get(family, [])) + fam = {"read": len(numbered), "ingested": 0, "dropped": 0, "lane": lane} + acct["read"] += len(numbered) + for i, row in numbered: + source = row["source"] + if source not in sources: + raise ValueError( + f"{family}: row source {source!r} not in {sorted(sources)}" + ) + name = AB25._metric_name(row) + if row["attribution"] == "restated": + _drop(acct, fam, "restated_official_figure") + continue + if row.get("value_kind") == "categorical": + _drop(acct, fam, "categorical_rating_not_a_value") + continue + if (family, i) in ROW_DROPS: + _drop(acct, fam, ROW_DROPS[(family, i)][1]) + continue + if AB25._is_specimen(row, name): + _drop(acct, fam, "mode3_specimen_household") + continue + if name in _DROP_BY_NAME and (family, i) not in ROW_METRICS: + _drop(acct, fam, _DROP_BY_NAME[name]) + continue + label = unit_label(row) + if label in AB25._UNIT_DROPS: + _drop(acct, fam, AB25._UNIT_DROPS[label]) + continue + if (family, i) in ROW_METRICS: + metric = ROW_METRICS[(family, i)][2] + elif name in DISPOSITIONS: + metric = DISPOSITIONS[name] + else: + raise ValueError( + f"{family}: metric {name!r} has no disposition — decide it " + "in DISPOSITIONS_AB2026 or DROP_BY_NAME_AB2026" + ) + if (family, i) in ROW_UNITS: + row = {**row, "unit_concept": ROW_UNITS[(family, i)]} + twin = _twin_key(row, name) + kept = None + if family in _TWIN_FAMILIES and (family, i) in REVIEWED_TWINS: + kept = table_claims.get(REVIEWED_TWINS[(family, i)][0]) + elif family in _TWIN_FAMILIES and twin in canonical: + kept = canonical[twin] + if kept is not None: + kept.publication.setdefault("also_printed_in", []).append( + { + "family": family, + "table": row.get("source_table"), + "locator": (row.get("publication") or {}).get("locator"), + "source_column": row.get("source_column"), + } + ) + _drop(acct, fam, "hmt_figure_staged_twice") + continue + score = _score(row, family, source, metric) + if family == "uk_hmt_tables": + table_claims[i] = score + if twin is not None: + canonical[twin] = score + scores.append(score) + fam["ingested"] += 1 + acct["ingested"] += 1 + acct["by_family"][family] = fam + # One producer's twin printings within a family (AB2025's merge). + merged: list[ExternalScore] = [] + for source in sorted({s.source for s in scores}): + mine = [s for s in scores if s.source == source] + kept = merge_republications( + mine, + source, + precision=_precision, + tolerance=lambda s: max(abs(s.value) * 0.005, 1e-9), + ) + kept_by_id = {k.claim_id(): k for k in kept} + kept_ids = {id(k) for k in kept} + for s in mine: + if id(s) not in kept_ids: + fam = acct["by_family"][s.publication["family"]] + _drop(acct, fam, "republished_twin_merged") + acct["ingested"] -= 1 + fam["ingested"] -= 1 + # the merged-away claim's twin printings stay with its figure + twins = s.publication.get("also_printed_in") + if twins: + keep = kept_by_id[s.claim_id()].publication + keep.setdefault("also_printed_in", []).extend(twins) + merged.extend(kept) + for s in merged: + if "also_printed_in" in s.publication: + s.publication["also_printed_in"].sort( + key=lambda t: json.dumps(t, sort_keys=True) + ) + acct["dropped"] = acct["read"] - acct["ingested"] + for fam in acct["by_family"].values(): + if fam["read"] != fam["ingested"] + fam["dropped"]: # pragma: no cover + raise ValueError("a family's accounting does not close") + return finish(merged, REGISTRY_MARK), acct + + +_EXPECTED_PATH = Path(__file__).parent / "ingest_uk_ab2026_expected.json" + + +def expected() -> dict: + return json.loads(_EXPECTED_PATH.read_text()) + + +def summarise(acct: dict) -> dict: + return { + "read": acct["read"], + "ingested": acct["ingested"], + "dropped": acct["dropped"], + "by_family": { + fam: {"read": v["read"], "ingested": v["ingested"], "dropped": v["dropped"]} + for fam, v in acct["by_family"].items() + }, + "drops": {k: v["rows"] for k, v in sorted(acct["drops"].items())}, + } + + +def check_accounting(acct: dict) -> None: + got, want = summarise(acct), expected() + if got != want: + raise ValueError(f"claim accounting drifted: {got} != {want}") + pinned = sum( + v["rows"] + for k, v in json.loads((HARVEST / "COUNTS.json").read_text()).items() + if not k.startswith("_") + ) + if got["read"] != pinned: + raise ValueError(f"read {got['read']} rows, COUNTS.json pins {pinned}") + + +ALL_SOURCES = frozenset(s for _, srcs in FAMILIES.values() for s in srcs) + + +def ingest(db_path: Path, feed_path: Path | None = None) -> dict: + """Stage and check first; then one transaction replaces every AB2026 + claim by registry mark (hm_treasury, obr_efo, ifs and others also mark other + lanes' rows) and runs the baseline-registration gate inside it.""" + scores, acct = stage() + check_accounting(acct) + db = ScorecardDB(db_path) + rows = [ScorecardDB.score_row(s) for s in scores] + + from .baselines import register_baselines_txn + from .ingest_harvest import sync_lane_feed + + with db.conn: + db.conn.execute( + "DELETE FROM external_scores WHERE" + " json_extract(publication, '$.registry') = ?", + (REGISTRY_MARK,), + ) + db.conn.executemany(SCORES_SQL, rows) + register_baselines_txn(db) + for lane in LANES: + fams = [f for f, (l, _) in FAMILIES.items() if l == lane] + read = sum(acct["by_family"][f]["read"] for f in fams) + ing = sum(acct["by_family"][f]["ingested"] for f in fams) + detail = ( + f"{ing} claims from {len(fams)} families ({read} staged rows = " + f"{ing} ingested + {read - ing} tallied drops)" + ) + db.conn.execute( + LANE_SQL, + (lane, "ingested" if ing else "cataloged", detail, LANE_UPDATED), + ) + sync_lane_feed( + db, feed_path or REPO / "data" / "lanes.json", FEED_UPDATED, lanes=LANES + ) + db.close() + return { + "claims": len(rows), + "read": acct["read"], + "ingested": acct["ingested"], + "dropped": acct["dropped"], + "drops": {k: v["rows"] for k, v in sorted(acct["drops"].items())}, + } + + +# --- pe_gap verdicts ---------------------------------------------------------- + + +def verdict_rows(db: ScorecardDB) -> tuple[list[tuple], list[tuple]]: + """One pe_gap result and one pe_gap diagnosis per AB2026 claim whose + measure the pinned engine can't express, from the registry.""" + claims = db.conn.execute( + "SELECT claim_id, baseline_key, metric," + " json_extract(conditions, '$.measure_key') AS measure_key," + " json_extract(conditions, '$.pe_missing') AS pe_missing," + " json_extract(conditions, '$.action_link') AS action_link" + " FROM external_scores" + " WHERE json_extract(publication, '$.registry') = ?" + " AND json_extract(conditions, '$.pe_expressibility') = 'not_expressible'" + " ORDER BY claim_id", + (REGISTRY_MARK,), + ).fetchall() + results, diagnoses = [], [] + for c in claims: + if c["metric"] in {m.value for m in AB25.MACRO_METRICS}: + m = { + "why": c["pe_missing"], + "name_search": "Parameters: none searched — a macro-fiscal aggregate names no engine lever; the Macro entry point (#55) answers it", + "action_link": c["action_link"], + } + gap_key = c["measure_key"] or "macro" + else: + m = REGISTRY[c["measure_key"]] + gap_key = c["measure_key"] + if m["computability"] != "not_expressible": + raise ValueError( + f"{c['claim_id']}: not_expressible on the claim but " + f"{m['computability']} in the registry" + ) + results.append( + ScorecardDB.result_row( + PEResult( + claim_id=c["claim_id"], + computed_value=None, + status=ComparisonStatus.PE_GAP, + engine_version=ENGINE_PIN, + data_bundle=DATA_REVISION, + pe_construction=f"pe_gap:not_expressible:{gap_key}", + run_id=VERDICT_RUN_ID, + computed_at=VERDICT_COMPUTED_AT, + annotations=[ + m["why"], + m["name_search"], + "no run executed: the verdict is the registry's, stated " + f"against the Budget-day engine {ENGINE_PIN}", + ], + baseline_key=c["baseline_key"], + policyengine_variables=[], + ) + ) + ) + diagnoses.append( + ScorecardDB.diagnosis_row( + c["claim_id"], "pe_gap", m["why"], m["action_link"] + ) + ) + return results, diagnoses + + +def ingest_verdicts(db_path: Path) -> dict: + """Second build step: replace this run's verdict rows wholesale.""" + db = ScorecardDB(db_path) + results, diagnoses = verdict_rows(db) + with db.conn: + db.conn.execute("DELETE FROM pe_results WHERE run_id = ?", (VERDICT_RUN_ID,)) + db.conn.execute( + "DELETE FROM diagnoses WHERE claim_id IN (" + " SELECT claim_id FROM external_scores" + " WHERE json_extract(publication, '$.registry') = ?)", + (REGISTRY_MARK,), + ) + db.conn.executemany(RESULTS_SQL, results) + db.conn.executemany(DIAGNOSES_SQL, diagnoses) + db.close() + return {"pe_gap_results": len(results), "pe_gap_diagnoses": len(diagnoses)} + + +if __name__ == "__main__": + import sys + + path = Path(sys.argv[1] if len(sys.argv) > 1 else "data/scorecard.db") + print(json.dumps(ingest(path), indent=1)) + print(json.dumps(ingest_verdicts(path), indent=1)) diff --git a/scorecard_db/ingest_uk_ab2026_expected.json b/scorecard_db/ingest_uk_ab2026_expected.json new file mode 100644 index 000000000..e52ea4662 --- /dev/null +++ b/scorecard_db/ingest_uk_ab2026_expected.json @@ -0,0 +1,88 @@ +{ + "read": 5952, + "ingested": 4687, + "dropped": 1265, + "by_family": { + "uk_hmt_tables": { + "read": 768, + "ingested": 768, + "dropped": 0 + }, + "uk_hmt_costings": { + "read": 597, + "ingested": 172, + "dropped": 425 + }, + "uk_hmt_redbook": { + "read": 425, + "ingested": 177, + "dropped": 248 + }, + "uk_obr_tables": { + "read": 2800, + "ingested": 2711, + "dropped": 89 + }, + "uk_rf_ab2026": { + "read": 766, + "ingested": 574, + "dropped": 192 + }, + "uk_ifs_ab2026": { + "read": 144, + "ingested": 12, + "dropped": 132 + }, + "uk_ippr": { + "read": 3, + "ingested": 0, + "dropped": 3 + }, + "uk_centax": { + "read": 112, + "ingested": 82, + "dropped": 30 + }, + "uk_tpa": { + "read": 305, + "ingested": 189, + "dropped": 116 + }, + "uk_devolved_govts": { + "read": 19, + "ingested": 0, + "dropped": 19 + }, + "uk_thinktank_misc": { + "read": 12, + "ingested": 1, + "dropped": 11 + }, + "uk_trussell_wpi": { + "read": 1, + "ingested": 1, + "dropped": 0 + } + }, + "drops": { + "assumption_or_base_not_a_score": 14, + "categorical_rating_not_a_value": 7, + "earlier_estimate_restated": 1, + "energy_bill_level_no_metric": 35, + "hmt_figure_staged_twice": 432, + "income_path_not_a_policy_effect": 9, + "macro_fiscal_or_out_of_scope": 206, + "mode3_specimen_household": 10, + "mtr_no_registered_metric": 4, + "no_registered_metric": 9, + "parameter_or_threshold_level": 17, + "partial_year_household_support": 3, + "ratio_or_derived_quantity": 15, + "republished_twin_merged": 6, + "restated_obr_forecast": 6, + "restated_official_figure": 450, + "share_level_no_registered_metric": 17, + "single_row_unregistered_world": 3, + "unit_no_household_concept": 21 + } +} diff --git a/scorecard_db/relationships.py b/scorecard_db/relationships.py index ee6e49f08..33a20cf1b 100644 --- a/scorecard_db/relationships.py +++ b/scorecard_db/relationships.py @@ -619,6 +619,19 @@ def us_source_relationship(source, program, metric, period=None): } +# Autumn Budget 2026 port (#230, tranche 2): the producers whose AB2026 +# claims reach the DB and that AB2025 didn't have. Held out: +# policyengine-uk 2.151.0, the Budget-day engine, names Citizens Advice +# nowhere in its parameters or variables (searched 2026-11-05). +_AB2026_HELD: dict[str, tuple] = { + "citizens_advice": ( + CR.HELD_OUT, + "Citizens Advice's Budget figures are scored, never consumed " + "(policyengine-uk 2.151.0's parameters and variables searched " + "2026-11-05).", + ), +} + # Centre for British Progress, "Rates and wrongs" technical appendix (lane # uk-childcare-100k), read 2026-10-21: the certified populace-uk build's 149 # calibration targets (microcosm fixture packages/microcosm-data/tests/ @@ -729,6 +742,8 @@ def uk_relationship(source, metric, program=None, kind=None): ) if source in _AB2025_HELD: return _AB2025_HELD[source] + if source in _AB2026_HELD: + return _AB2026_HELD[source] if source == "centre_for_british_progress": return _CBP_HELD if source == "dwp": diff --git a/scorecard_db/signs.py b/scorecard_db/signs.py index d2b1a4a54..5270f3914 100644 --- a/scorecard_db/signs.py +++ b/scorecard_db/signs.py @@ -80,6 +80,12 @@ "than in the march 2025 forecast", "improvement in the fiscal outlook", "british racing", + # the OBR's prose on one behavioural part of a measure's yield + # (paragraph 3.16's banks moving profits abroad), as "reduction + # in yield" above + "behavioural erosion of yield", + # a transfer of business rates within the public sector + "flowing to local government", ), ( "positive = cost", @@ -88,6 +94,13 @@ "positive = higher spending", "positive = receipts lost", "positive = revenue forgone", + # the OBR's prose costings in the October 2026 EFO + "positive = net cost", + "positive = reduction in receipts", + "positive = spending cost", + "positive = additional spending", + "positive = ame increase", + "positive = pension spending increase", ), ( "positive_gain_to_exchequer", @@ -112,6 +125,11 @@ "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", + # the OBR's prose savings in the October 2026 EFO + "positive = reduction in spending", + "positive = reduction in resource spending", + "positive = spending reduction", + "positive = welfare spending reduction", ), ), "spending": ( @@ -135,26 +153,37 @@ "a negative sign implies a loss to the exchequer", "positive = increase in net tax", "positive = additional investment income", + # HM Treasury's Table 6.2 cash effects, which the AB2026 ingest + # keeps on cash_requirement_change + "positive = cash inflow", + "improves the public sector's cash position", ), ( "increase in borrowing", "borrowing increase", "positive = increase in psnb", "positive = cost", + # OBR paragraph 3.20's rise in the financing requirement, on + # cash_requirement_change + "increase in the financing requirement", ), ), "household_gain": ( ("reduction in benefit entitlement from the two-child limit",), - ("loss to households",), + ("loss to households", "positive = decrease in real"), ( "positive = gain to", "higher mean household income", "positive = growth", + "positive = real income growth", + "positive = higher real", ), ), "tax_increase": ( (), - (), + # the red book's per-person savings, which the AB2026 ingest keeps + # on average_tax_change + ("positive = saving or gain",), ( "positive = increase in", "positive = tax increase", @@ -165,7 +194,9 @@ "bill_increase": ( (), ("positive = reduction in", "positive = saving", "positive = gain to"), - ("positive = higher", "positive = increase"), + # RF prints only the negative side: "negative = reduction in the + # typical household's annual bill" + ("positive = higher", "positive = increase", "negative = reduction in"), ), "more_poverty": ( ( @@ -195,10 +226,11 @@ "higher_output": ( ("claimants moved into work",), ("positive = reduction",), - ("higher gdp", "higher real gdp", "addition to gdp"), + ("higher gdp", "higher real gdp", "addition to gdp", "real gdp increase"), ), "higher_inflation": ( - (), + # a bound on the effect's size with no direction (OBR paragraph 3.6) + ("no direction given",), ("reduction in cpi inflation",), ("increase in cpi inflation", "higher inflation"), ), diff --git a/scorecard_db/uk_aliases.py b/scorecard_db/uk_aliases.py index 66322d674..fc2f499aa 100644 --- a/scorecard_db/uk_aliases.py +++ b/scorecard_db/uk_aliases.py @@ -1079,6 +1079,56 @@ def known(source: str, axis: str) -> frozenset[str]: # IPPR prints one region two ways (Table 1 vs Table 2 of Restoring security); one identity. _alias("ippr", "geography", "Yorkshire & Humber", "Yorkshire and The Humber") +# --- Autumn Budget 2026 port (#230, tranche 2) ------------------------------- +# The values the AB2026 harvest (sources/harvest-uk-ab2026-2026-10-29/) stages +# that the AB2025 block above doesn't register, read from the rows the ingest +# scores. "not stated" is the harvest README's code for a producer that names +# no geography; TPA compares the UK with the countries it names. +_identity("centax", "geography", ["England"]) +_identity( + "centax", + "income_group", + [ + "median", + "p50_p60", + "p60_p70", + "p70_p80", + "p80_p90", + "p90_p99", + "p99", + "p99_p99.5", + "p99.5_p99.9", + "p99.99", + "top_0.01pct", + "top_10pct", + "top_1pct", + ], +) +_identity("citizens_advice", "geography", ["not stated"]) +_identity("hm_treasury", "geography", ["England and Wales"]) +# HM Treasury's Impact on households deciles (Tables 2.B and 2.C) +_identity( + "hm_treasury", + "income_group", + [f"decile_{_i}" for _i in range(1, 11)] + ["decile_1 to decile_3"], +) +_identity("ifs", "geography", ["not stated"]) +_identity("ifs", "income_group", ["poorest_30_percent"]) +_identity( + "tax_policy_associates", + "geography", + [ + "France", + "Germany", + "Ireland", + "Italy", + "Netherlands", + "Singapore", + "Spain", + "US", + ], +) + # Pairs that look unifiable across the AB2025 producers and must never be. # Every side is registered above or earlier in this module (the ledger test # checks); the reasons are the distributions' own definitions. diff --git a/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json b/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json index 313b84e9a..db6d73841 100644 --- a/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json +++ b/sources/harvest-uk-ab2026-2026-10-29/COUNTS.json @@ -2,7 +2,7 @@ "uk_centax": { "rows": 112, "primaries": 6, - "claims_sha256": "2529e86fc898493e4e045072f6aebff2c757470cd9d578acbce8ca0790ce348c", + "claims_sha256": "eaf72518db419c0b21d736a1750da5594355e37fca2075a56b8fce24e79aa927", "sources": [ "centax" ] @@ -10,7 +10,7 @@ "uk_devolved_govts": { "rows": 19, "primaries": 2, - "claims_sha256": "8f47eb3c1d0d67c76b19cdb02c09eb7211e2ad26e8957215b755009a64ba5dfa", + "claims_sha256": "8bd50e83718cee7b59a1c83fc590136b71119542b86cdd8eedf66aec94e6d0b5", "sources": [ "scottish_government", "welsh_government" @@ -19,7 +19,7 @@ "uk_hmt_costings": { "rows": 597, "primaries": 1, - "claims_sha256": "4769087faa0876ca168f1976ac16ce23129617cd7f1ae35c406f75761fc9ea32", + "claims_sha256": "a70222abcd2c56a496f2aabbc4db339a018d87cb1261c352e0b4e20d1d224439", "sources": [ "hm_treasury" ] @@ -27,7 +27,7 @@ "uk_hmt_redbook": { "rows": 425, "primaries": 6, - "claims_sha256": "04e5a88f9d20f8761049040460eef001880f471f74018e9d16c23e9b8c4a485d", + "claims_sha256": "9da61ba3c1d653c0833e59dd1d7f517c67d9ecd2d1d80d89676702e2169cae21", "sources": [ "hm_treasury" ] @@ -35,7 +35,7 @@ "uk_hmt_tables": { "rows": 768, "primaries": 2, - "claims_sha256": "e44ba6ae818aa4f4c759ba135ea5a33a3dbbe0753f81e64759a8b0d25cc02819", + "claims_sha256": "220f98c5e5d55055bc47c971062ee1302ef88aa8cee43f26586eae126f3da83a", "sources": [ "hm_treasury" ] @@ -43,7 +43,7 @@ "uk_ifs_ab2026": { "rows": 144, "primaries": 14, - "claims_sha256": "b76375ec9ccba03011181edcb47601e81f281636fda880f09688446bb582363d", + "claims_sha256": "c6a458ad4ea769aef0cf48459bec035ebd85d92c5ba73c450b6e3eef5dcda967", "sources": [ "ifs" ] @@ -51,7 +51,7 @@ "uk_ippr": { "rows": 3, "primaries": 3, - "claims_sha256": "dcabaf8fb3157e4fa6d18c410add5a430eadbdc02784dd9d7831b2cea1bc2ab9", + "claims_sha256": "ffcaf34e1871e8feadd1adcbcba6a076b952482af8a9800bb935c3cd983c4877", "sources": [ "ippr" ] @@ -59,7 +59,7 @@ "uk_obr_tables": { "rows": 2800, "primaries": 4, - "claims_sha256": "ceae9897d7c680f5c1be6e04a7dba3eb7114e1f542fcb5ae2236cd775d9fa199", + "claims_sha256": "886f3c915b58fe91775e33dcbecc81e369c445ba4e1820a7e61bfbafe243872b", "sources": [ "obr_efo" ] @@ -67,7 +67,7 @@ "uk_rf_ab2026": { "rows": 766, "primaries": 8, - "claims_sha256": "e8f75767a7f871c0f2030aaf2d47348e35f6caa3418ab773e53b77205a682325", + "claims_sha256": "84f2ad7911917be492771e9662b7bed9ed2d0ce6855c336dd4e30ce290f4e60e", "sources": [ "resolution_foundation" ] @@ -86,7 +86,7 @@ "uk_tpa": { "rows": 305, "primaries": 10, - "claims_sha256": "241f625fb725640835bde53dd5a2d1217ddd758f9df260abf778ac4bf96ba7cc", + "claims_sha256": "388617287bc82eb3253641e6531b2079783a6747acce6a4e6d4ad8d080461037", "sources": [ "tax_policy_associates" ] @@ -103,6 +103,6 @@ "rows": 5952, "restated": 450, "families": 12, - "pinned_on": "2026-10-29" + "pinned_on": "2026-11-05" } } diff --git a/sources/harvest-uk-ab2026-2026-10-29/KEY_DECISIONS.md b/sources/harvest-uk-ab2026-2026-10-29/KEY_DECISIONS.md new file mode 100644 index 000000000..94ed11ece --- /dev/null +++ b/sources/harvest-uk-ab2026-2026-10-29/KEY_DECISIONS.md @@ -0,0 +1,94 @@ +# Key decisions for the AB2026 harvest (#230) + +Generated by `pipeline/apply_ab2026_key_decisions.py` from `pipeline/ab2026_key_decisions.py` and the staged families; don't edit by hand. + +We register 86 AB2026 keys (15 measures, 58 packages and 13 options) for 973 staged figures. We give two producers' packages one key only when they identify the same legs (rule 3). For 1 key, we retain the proposed name in `proposed_as`. We store registered keys in `measure_key` and copy each producer's scope from NOTES.md into `source_note`. We number each family's rows from 0, in the order of its `claims_staged.jsonl.gz`, and register the keys in `data/uk/ab2026_measures.json`. + +| proposed key | decision | registered key | verdict | why | rows | +|---|---|---|---|---|---| +| `ab2026__british_business_bank_defence_commitments_accelerated` | registered | `ab2026__british_business_bank_defence_commitments_accelerated` | not_expressible | We can't estimate this quantity within the household model. Scope: HM Treasury's policy costing with no identifiable Table 6.1 line; by Table 6.1's footnote 2 and £10m bar, probably inside line 41, so we never add it to Table 6.1's lines or totals. | 9: uk_hmt_costings 176–184 | +| `ab2026__departmental_spending_growth_2031_32` | registered | `ab2026__departmental_spending_growth_2031_32` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's change to the 2031-32 pre-measures RDEL assumption (a £5.5bn reduction); no Table 6.1 line. | 13: uk_obr_tables 2160–2171, 2526 | +| `ab2026__energy_debt_circuit_breaker` | registered | `ab2026__energy_debt_circuit_breaker` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: Red book paragraph 3.8's debt strategy, which HM Treasury says saves all billpayers around £30; no Table 6.1 line. | 3: uk_hmt_redbook 9, 194, 201 | +| `ab2026__gas_standing_charge_moved_to_unit_rates` | registered | `ab2026__gas_standing_charge_moved_to_unit_rates` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: The announced move of the typical household's gas standing charge onto unit rates, which costs the Exchequer nothing and has no Table 6.1 line (RF and IFS families). | 34: uk_ifs_ab2026 50–52; uk_rf_ab2026 114–125, 445, 455, 465, 475, 485, 495, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 605, 615, 625 | +| `ab2026__gas_supplier_levy_funded_from_general_taxation` | registered | `ab2026__gas_supplier_levy_funded_from_general_taxation` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: RF's footnote 12 figure for moving the levy off household bills; we found no Table 6.1 line. | 1: uk_rf_ab2026 111 | +| `ab2026__minimum_wage_uprating_april_2027` | registered | `ab2026__minimum_wage_uprating_april_2027` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: The April 2027 minimum wage rates the Chancellor confirmed (red book paragraph 3.18), a regulation with no Table 6.1 line. | 4: uk_hmt_redbook 217–218; uk_rf_ab2026 88, 211 | +| `ab2026__mod_counter_fraud_strategy` | registered | `ab2026__mod_counter_fraud_strategy` | not_expressible | We can't estimate this quantity within the household model. Scope: Red book paragraph 5.32's strategy, set to deliver £250 million of benefits; no Table 6.1 line. | 1: uk_hmt_redbook 261 | +| `ab2026__package_barnett_consequentials` | registered | `ab2026__package_barnett_consequentials` | not_expressible | We can't estimate this quantity within the household model. Scope: Red book paragraph 4.150: the consequentials for the Scottish, Welsh and Northern Ireland governments, 2026-27 to 2029-30, without the technical reduction from lower employer pension contributions; each government's figure is a component, and conditions.geography names the nation. | 16: uk_devolved_govts 0–11; uk_hmt_redbook 252–255 | +| `ab2026__package_breathing_space_for_households` | registered | `ab2026__package_breathing_space_for_households` | partial | Its producer gives the scope in words: HM Treasury lists no Table 6.1 lines for the figure, and three readings (lines 1 and 2, lines 2 and 3, lines 1 to 11) are open. Scope: Red book paragraph 3.2's action, whose CPI effect the OBR expects at 0.1 percentage points in 2027. The red book lists no lines for the figure, Box 3.A's breathing space covers lines 1 and 2, and Table 6.1's heading groups lines 1 to 11, so we keep HM Treasury's words. | 1: uk_hmt_redbook 185 | +| `ab2026__package_business_rates_rhl_sbrr_and_transitional_support` | registered | `ab2026__package_business_rates_rhl_sbrr_and_transitional_support` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 13 and 14, the three bullets of red book paragraph 3.22; the red book doesn't say whether line 12's pubs relief also counts, so we leave it out. | 2: uk_hmt_redbook 234–235 | +| `ab2026__package_carbon_price_support_and_cfd_levies` | registered | `ab2026__package_carbon_price_support_and_cfd_levies` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 70 and 71 (OBR family). | 2: uk_obr_tables 2675, 2679 | +| `ab2026__package_civil_service_transformation_programme` | registered | `ab2026__package_civil_service_transformation_programme` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's programme to reduce resource spending; the OBR names no lines, though lines 63 and 64 probably belong. | 1: uk_obr_tables 2525 | +| `ab2026__package_compliance_measures_announced` | registered | `ab2026__package_compliance_measures_announced` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR doesn't list them; they are probably line 45's items and line 46, but the OBR doesn't say so. | 1: uk_obr_tables 2662 | +| `ab2026__package_corporation_and_bank_tax_changes` | registered | `ab2026__package_corporation_and_bank_tax_changes` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's group; paragraph 3.16 discusses lines 54, 55 and 58, and the OBR publishes no full decomposition. | 7: uk_obr_tables 2529, 2600–2605 | +| `ab2026__package_defence_investment_plan` | registered | `ab2026__package_defence_investment_plan` | not_expressible | We can't estimate this quantity within the household model. Scope: The plan published in June 2026, which no single line covers; Table 6.1 prints its savings and funding on lines 40 to 42, and the OBR's £1.8 billion a year, its RDEL part, is a component. | 2: uk_hmt_redbook 262; uk_obr_tables 2522 | +| `ab2026__package_dividend_and_capital_gains_tax_changes` | registered | `ab2026__package_dividend_and_capital_gains_tax_changes` | partial | We combine the named registry measures. Scope: Table 6.1 lines 26, 49 and 60, as the OBR family's NOTES gives them. | 6: uk_obr_tables 2612–2617 | +| `ab2026__package_dwp_fraud_and_error_measures` | registered | `ab2026__package_dwp_fraud_and_error_measures` | not_expressible | We can't estimate this quantity within the household model. Scope: Red book paragraph 5.17's new measures, expected to save an additional £1.4 billion over the forecast; the red book doesn't list them, and the figure reconciles with no printed basis for line 47. | 1: uk_hmt_redbook 259 | +| `ab2026__package_fuel_duty_and_electricity_vat` | registered | `ab2026__package_fuel_duty_and_electricity_vat` | partial | We register it as the receipts of the named Table 6.1 measures. Scope: The receipts of Table 6.1 lines 2 and 3 only (the OBR groups Table 3.1 by receipts head); line 1 doesn't count. | 11: uk_obr_tables 2618–2623, 2650–2654 | +| `ab2026__package_fuel_duty_freezes_since_2010_11` | registered | `ab2026__package_fuel_duty_freezes_since_2010_11` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's cumulative cost against RPI uprating, which includes line 3 and every freeze since 2010-11; RF's ab2026_option__fuel_duty_rpi_uprating_since_2011 sees the same pair of paths from the other side. | 1: uk_obr_tables 2741 | +| `ab2026__package_government_decisions_since_march_2026` | registered | `ab2026__package_government_decisions_since_march_2026` | partial | Its producer gives the scope in words: the OBR adds its indirect effects and two non-scorecard decisions to Table 6.1's lines. Scope: The OBR's total effect of decisions on PSNB: Table 6.1 lines 1 to 98, the three fiscally neutral measures with no line (PWLB debt relief, Scottish APD devolution and the landlord registration fee) and the two non-scorecard decisions, with direct and indirect effects; the red book's Table 1.3 and RF restate it. | 368: uk_hmt_redbook 24, 143–166; uk_obr_tables 2190–2351, 2358–2501, 2514–2520, 2533–2539, 2552–2563, 2642–2649; uk_rf_ab2026 13, 177, 181 | +| `ab2026__package_hmrc_tax_gap_and_online_marketplace` | registered | `ab2026__package_hmrc_tax_gap_and_online_marketplace` | not_expressible | We combine the named registry measures. Scope: Exactly Table 6.1 lines 45 and 46: red book Table 6.3's subtotal including memo, and footnote 73. | 7: uk_hmt_redbook 181, 351–356 | +| `ab2026__package_hmt_distributional_budget_2026` | registered | `ab2026__package_hmt_distributional_budget_2026` | partial | We combine the named registry measures. Scope: 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, and the private landlord registration fee, without line 1. | 1: uk_hmt_redbook 357 | +| `ab2026__package_hmt_distributional_since_ab2024` | registered | `ab2026__package_hmt_distributional_since_ab2024` | partial | Its producer gives the scope in words: HM Treasury adds earlier events' measures, which this registry doesn't hold. Scope: Impact on households paragraph 1.8: the Budget 2026 policies above plus earlier events' measures, which aren't Table 6.1 lines. | 1: uk_hmt_redbook 358 | +| `ab2026__package_household_energy_payment_and_electricity_vat` | registered | `ab2026__package_household_energy_payment_and_electricity_vat` | expressible | We combine the named registry measures. Scope: Table 6.1 lines 1 and 2; RF's sums show its VAT figure covers the whole cut, as line 2 does. | 5: uk_rf_ab2026 47, 93, 100–101, 103 | +| `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty` | registered | `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty` | partial | Its producer gives the scope in words: RF counts only the household-incidence share of line 3, which no registry measure holds. Scope: Table 6.1 lines 1 and 2 plus the share of line 3 that accrues directly to households (RF footnote 19), a two-year total; not lines 1 to 3 exactly (rule 3). | 3: uk_rf_ab2026 34, 54, 127 | +| `ab2026__package_ifs_announced_tax_changes` | registered | `ab2026__package_ifs_announced_tax_changes` | partial | Its producer gives the scope in words: IFS lists no Table 6.1 lines and names no OBR grouping. Scope: IFS's estimate as a share of GDP; the chart lists no Table 6.1 line and names no OBR grouping. | 1: uk_ifs_ab2026 128 | +| `ab2026__package_ifs_new_giveaways` | registered | `ab2026__package_ifs_new_giveaways` | partial | Its producer gives the scope in words: IFS names no lines and doesn't say which decisions its giveaways cover. Scope: IFS's new giveaways that push up borrowing this year and next; IFS names no OBR line, and doesn't say they cover every decision since March. | 2: uk_ifs_ab2026 89–90 | +| `ab2026__package_national_wealth_fund_and_british_business_bank` | registered | `ab2026__package_national_wealth_fund_and_british_business_bank` | not_expressible | We can't estimate this quantity within the household model. Scope: Table 6.1 lines 29 and 30 and their Table 6.2 financial transactions: OBR paragraph 3.20's financing requirement, net debt and borrowing effects, with gross debt and additional income as parts. | 5: uk_obr_tables 2684–2688 | +| `ab2026__package_non_scorecard_decisions` | registered | `ab2026__package_non_scorecard_decisions` | not_expressible | We combine the named registry measures. Scope: Exactly the departmental spending assumption change and the public pension valuations, which have no Table 6.1 lines. | 12: uk_obr_tables 2508–2513, 2636–2641 | +| `ab2026__package_obr_other_ame_spending_decisions` | registered | `ab2026__package_obr_other_ame_spending_decisions` | partial | Its producer gives the scope in words: the OBR publishes no Table 6.1 line decomposition of its group. Scope: The OBR's residual AME group, without the pension valuations and net of line 1's council tax rebate; the OBR publishes no line decomposition. | 6: uk_obr_tables 2582–2587 | +| `ab2026__package_obr_other_departmental_spending_changes` | registered | `ab2026__package_obr_other_departmental_spending_changes` | not_expressible | We can't estimate this quantity within the household model. Scope: Departmental spending changes without the pension valuations, including line 1's DEL funding, defence, capital spending and the £5.5bn 2031-32 RDEL reduction. | 7: uk_obr_tables 2570–2575, 2655 | +| `ab2026__package_obr_other_hmrc_compliance_and_debt` | registered | `ab2026__package_obr_other_hmrc_compliance_and_debt` | not_expressible | We can't estimate this quantity within the household model. Scope: Direct debt recovery, e-invoicing and debt collection agencies (parts of line 45) and online marketplace liability (line 46). | 1: uk_obr_tables 2661 | +| `ab2026__package_obr_other_tax_measures` | registered | `ab2026__package_obr_other_tax_measures` | partial | Its producer gives the scope in words: the OBR enumerates no lines for its residual group. Scope: The OBR's residual of Table 6.1's tax measures after its five named groups; the OBR enumerates no lines. | 6: uk_obr_tables 2624–2629 | +| `ab2026__package_parliament_fuel_duty_decisions` | registered | `ab2026__package_parliament_fuel_duty_decisions` | partial | Its producer gives the scope in words: HM Treasury adds earlier events' fuel duty decisions, which this registry doesn't hold. Scope: Red book paragraph 3.13: line 3 plus earlier events' fuel duty decisions, against the previous government's plans (footnote 98). | 3: uk_hmt_redbook 203–205 | +| `ab2026__package_parliament_tax_gap_measures` | registered | `ab2026__package_parliament_tax_gap_measures` | not_expressible | We can't estimate this quantity within the household model. Scope: Red book paragraph 2.46: lines 45 and 46 plus the tax gap measures of Autumn Budget 2024, Spring Statement 2025 and Budget 2025 (footnote 73). | 1: uk_hmt_redbook 178 | +| `ab2026__package_parliament_welfare_fraud_and_error_savings` | registered, renamed | `ab2026__package_welfare_fraud_and_error_savings_in_forecast` | not_expressible | We can't estimate this quantity within the household model. Scope: Red book paragraph 5.17: this Budget's new fraud and error measures plus those already in the forecast; the red book doesn't say which earlier measures count. | 1: uk_hmt_redbook 260 | +| `ab2026__package_planned_capital_spending_reductions` | registered | `ab2026__package_planned_capital_spending_reductions` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's changes to departmental capital spending; it enumerates no lines. | 1: uk_obr_tables 2524 | +| `ab2026__package_property_and_savings_income_rates` | registered | `ab2026__package_property_and_savings_income_rates` | expressible | We combine the named registry measures. Scope: Exactly Table 6.1 lines 61 and 62 (red book, IFS, RF and TPA families). | 33: uk_hmt_redbook 182–183; uk_ifs_ab2026 78; uk_rf_ab2026 414–419, 442, 452, 462, 472, 482, 492, 502, 512, 522, 532, 542, 552, 562, 572, 582, 592, 602, 612, 622; uk_tpa 5–6, 8–9, 243 | +| `ab2026__package_property_and_savings_income_rates_receipts` | registered | `ab2026__package_property_and_savings_income_rates_receipts` | partial | We register it as the receipts of the named Table 6.1 measures. Scope: The receipts of Table 6.1 lines 61 and 62, which differ from the lines' totals, so not ab2026__package_property_and_savings_income_rates. | 7: uk_obr_tables 2532, 2606–2611 | +| `ab2026__package_pubs_relief_35pc_total` | registered | `ab2026__package_pubs_relief_35pc_total` | not_expressible | We can't estimate this quantity within the household model. Scope: The 15% announced in January 2026 (red book paragraph 6.189, no AB2026 line) plus line 12's further 20ppt. | 1: uk_hmt_redbook 222 | +| `ab2026__package_rdel_decisions_excluding_household_energy_payment` | registered | `ab2026__package_rdel_decisions_excluding_household_energy_payment` | not_expressible | We can't estimate this quantity within the household model. Scope: RF's fiscal aggregate of resource spending decisions, not a programme allocation. | 3: uk_rf_ab2026 33, 162, 210 | +| `ab2026__package_regulation_tariff_and_sandbox_business_savings` | registered | `ab2026__package_regulation_tariff_and_sandbox_business_savings` | not_expressible | We can't estimate this quantity within the household model. Scope: The executive summary's savings for business, across line 16 (tariff suspensions) and measures with no Table 6.1 line. | 1: uk_hmt_redbook 13 | +| `ab2026__package_rf_ab26_permanent_personal_measures` | registered | `ab2026__package_rf_ab26_permanent_personal_measures` | partial | We combine the named registry measures. Scope: Table 6.1 lines 52, 56, 61 and 62 and the gas standing charge change (RF's workbook column K equals columns F, G, I and J). | 19: uk_rf_ab2026 446, 456, 466, 476, 486, 496, 506, 516, 526, 536, 546, 556, 566, 576, 586, 596, 606, 616, 626 | +| `ab2026__package_rf_absolute_policy_changes` | registered | `ab2026__package_rf_absolute_policy_changes` | partial | Its producer gives the scope in words: RF lists no lines, and sums each decision's absolute value, which no package of signed legs gives. Scope: RF's fiscal-event size measure; RF lists no lines. | 2: uk_rf_ab2026 1, 64 | +| `ab2026__package_rf_energy_bill_support_announced_at_budget` | registered | `ab2026__package_rf_energy_bill_support_announced_at_budget` | partial | Its producer gives the scope in words: RF doesn't itemise the support beyond line 1. Scope: RF's support of up to £116, which includes line 1's £100 Household Energy Payment; RF doesn't itemise the rest. | 2: uk_rf_ab2026 10–11 | +| `ab2026__package_rf_other_tax_measures` | registered | `ab2026__package_rf_other_tax_measures` | partial | Its producer gives the scope in words: RF defines a residual of the OBR's groups, not a list of lines. Scope: RF's residual: the OBR's net direct effects less fuel duty, the bank surcharge, capital allowances, savings and property, and tax administration. | 6: uk_rf_ab2026 426–431 | +| `ab2026__package_rf_parliament_permanent_tax_and_benefit_measures` | registered | `ab2026__package_rf_parliament_permanent_tax_and_benefit_measures` | partial | Its producer gives the scope in words: RF spans several events, whose measures this registry doesn't hold. Scope: RF compares every permanent personal tax and benefit change from the 2024 election through AB26 with the policy the Government inherited. From AB26, RF includes lines 52, 56, 61 and 62 and the gas standing charge. | 42: uk_rf_ab2026 191–194, 447–448, 457–458, 467–468, 477–478, 487–488, 497–498, 507–508, 517–518, 527–528, 537–538, 547–548, 557–558, 567–568, 577–578, 587–588, 597–598, 607–608, 617–618, 627–628 | +| `ab2026__package_spending_decisions_since_march_2026` | registered | `ab2026__package_spending_decisions_since_march_2026` | partial | Its producer gives the scope in words: the OBR includes non-scorecard decisions and publishes no line decomposition. Scope: The OBR's expenditure-side effects of decisions since March, including the pension valuations and the 2031-32 RDEL assumption; not HM Treasury's spending total. | 13: uk_obr_tables 2352–2357, 2521, 2540–2545 | +| `ab2026__package_tax_administration_compliance_and_debt_collection_receipts` | registered | `ab2026__package_tax_administration_compliance_and_debt_collection_receipts` | not_expressible | We register it as the receipts of the named Table 6.1 measures. Scope: The receipts of Table 6.1 lines 45 and 46, equal in all six years, whose totals round differently; RF restates the OBR's group. | 13: uk_obr_tables 2588–2593; uk_rf_ab2026 67, 420–425 | +| `ab2026__package_tax_decisions_since_march_2026` | registered | `ab2026__package_tax_decisions_since_march_2026` | partial | Its producer gives the scope in words: the OBR classifies decisions as tax measures by their receipts effects, not by Table 6.1's heads. Scope: The OBR's Table 3.1 line, a receipts grouping as the OBR classifies decisions, which differs from Table 6.1's tax total (−£1,749m against −£1,645m in 2026-27); RF restates it. | 20: uk_obr_tables 2527, 2546–2551; uk_rf_ab2026 66, 141–146, 385–390 | +| `ab2026__package_temporary_business_rates_reliefs_receipts` | registered | `ab2026__package_temporary_business_rates_reliefs_receipts` | not_expressible | We register it as the receipts of the named Table 6.1 measures. Scope: The receipts of Table 6.1 lines 12, 13 and 14: OBR paragraph 3.19's net cost of around £0.5 billion in 2028-29 matches their receipts, not their totals. | 1: uk_obr_tables 2682 | +| `ab2026__package_total_financial_transactions` | registered | `ab2026__package_total_financial_transactions` | not_expressible | We can't estimate this quantity within the household model. Scope: Exactly Table 6.2 lines 1 to 9 (footnote 1: totals may not sum due to rounding). | 6: uk_hmt_tables 762–767 | +| `ab2026__package_tpa_business_rates` | registered | `ab2026__package_tpa_business_rates` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 12, 13, 14, 57, 76 and 80 (TPA's three charts); on the by-tax bar, TPA's NOTES places line 76, zero in 2027-28, by assumption. | 8: uk_tpa 166, 175–180, 259 | +| `ab2026__package_tpa_cgt_founders_relief_and_badr` | registered | `ab2026__package_tpa_cgt_founders_relief_and_badr` | partial | We combine the named registry measures. Scope: Table 6.1 lines 26 and 60 (TPA's by-tax chart). | 1: uk_tpa 162 | +| `ab2026__package_tpa_energy_and_environment` | registered | `ab2026__package_tpa_energy_and_environment` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 17, 69, 71, 90 and 96 (TPA's by-year chart). | 6: uk_tpa 187–192 | +| `ab2026__package_tpa_fuel_duty_red_diesel_and_hgv_ved` | registered | `ab2026__package_tpa_fuel_duty_red_diesel_and_hgv_ved` | partial | We combine the named registry measures. Scope: Table 6.1 lines 3, 18 and 65 (TPA's by-tax chart). | 1: uk_tpa 167 | +| `ab2026__package_tpa_other_by_measure` | registered | `ab2026__package_tpa_other_by_measure` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 11, 17, 18, 19, 28, 36, 50, 51, 53, 65, 66, 69, 71, 79, 88, 89, 90, 93, 94, 97 and 98. | 1: uk_tpa 260 | +| `ab2026__package_tpa_other_by_tax_2027_28` | registered | `ab2026__package_tpa_other_by_tax_2027_28` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 17, 19, 44, 56, 69, 71, 79, 90, 93, 96 and 98; TPA's NOTES places the lines that are zero in 2027-28 by assumption and leaves line 66 undetermined, so we leave line 66 out. | 1: uk_tpa 159 | +| `ab2026__package_tpa_other_by_year` | registered | `ab2026__package_tpa_other_by_year` | partial | We combine the named registry measures. Scope: Table 6.1 lines 10, 16, 19, 26, 44, 56, 60, 77, 78, 79, 93, 95 and 98. | 6: uk_tpa 169–174 | +| `ab2026__package_tpa_other_corporate_tax` | registered | `ab2026__package_tpa_other_corporate_tax` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 49, 50, 54, 68 and 97; on the by-tax bar, TPA's NOTES places lines 49 and 50, zero in 2027-28, by assumption. | 7: uk_tpa 157, 223–228 | +| `ab2026__package_tpa_other_income_tax` | registered | `ab2026__package_tpa_other_income_tax` | partial | We combine the named registry measures. Scope: Table 6.1 lines 5, 15, 28, 52, 53, 86 and 94; on the by-tax bar, TPA's NOTES places lines 15 and 86, zero in 2027-28, by assumption. | 7: uk_tpa 163, 193–198 | +| `ab2026__package_tpa_other_vat` | registered | `ab2026__package_tpa_other_vat` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 36, 46, 51, 59, 88 and 89; TPA's NOTES says the by-tax bar may also hold line 66, zero in 2027-28, which we leave out. | 7: uk_tpa 158, 205–210 | +| `ab2026__package_tpa_savings_property_income_and_cash_isa` | registered | `ab2026__package_tpa_savings_property_income_and_cash_isa` | partial | We combine the named registry measures. Scope: Table 6.1 lines 11, 61 and 62; the group includes line 11, the cash ISA limit, which TPA doesn't mention. | 7: uk_tpa 160, 211–216 | +| `ab2026__package_tpa_tariffs` | registered | `ab2026__package_tpa_tariffs` | not_expressible | We combine the named registry measures. Scope: Table 6.1 lines 10, 16, 77, 78 and 95; on the by-tax bar, TPA's NOTES places line 95, zero in 2027-28, by assumption. | 2: uk_tpa 165, 263 | +| `ab2026__package_tpa_temporary_vat_and_fuel_cuts` | registered | `ab2026__package_tpa_temporary_vat_and_fuel_cuts` | partial | We combine the named registry measures. Scope: Table 6.1 lines 2, 3, 18, 65 and 66 (TPA's by-year chart). | 6: uk_tpa 199–204 | +| `ab2026__private_landlord_register_fee_65` | registered | `ab2026__private_landlord_register_fee_65` | not_expressible | We can't estimate this quantity within the household model. Scope: HM Treasury's costing of the fee (not on Table 6.1, footnote 2), offset by DEL spending and so fiscally neutral; the OBR stages its receipts, current DEL and total. | 25: uk_hmt_costings 584–590; uk_obr_tables 2142–2159 | +| `ab2026__public_sector_pensions_2024_valuations` | registered | `ab2026__public_sector_pensions_2024_valuations` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's departmental reductions, net public service pension payments and their net total from the 2024 valuations of the unfunded schemes; no Table 6.1 line. | 27: uk_obr_tables 2172–2189, 2523, 2576–2581, 2656–2657 | +| `ab2026__pwlb_debt_relief_councils_severe_distress` | registered | `ab2026__pwlb_debt_relief_councils_severe_distress` | not_expressible | We can't estimate this quantity within the household model. Scope: HM Treasury's costing (not on Table 6.1, footnote 2) and the OBR's capital AME and total. | 18: uk_hmt_costings 591–596; uk_obr_tables 2112–2123 | +| `ab2026__regulatory_administrative_savings` | registered | `ab2026__regulatory_administrative_savings` | not_expressible | We can't estimate this quantity within the household model. Scope: The red book's chapter 6 decision (paragraph 6.36) and paragraph 4.52's estimated gross administrative savings for business, with its parts as components; no Table 6.1 line. | 5: uk_hmt_redbook 243–246, 267 | +| `ab2026__rolls_royce_gas_turbine_programme` | registered | `ab2026__rolls_royce_gas_turbine_programme` | not_expressible | We can't estimate this quantity within the household model. Scope: Red book paragraph 4.80's programme for civil and defence aerospace, not yet contracted (paragraph 4.83); no Table 6.1 line named. | 1: uk_hmt_redbook 247 | +| `ab2026__scottish_air_passenger_duty_devolution` | registered | `ab2026__scottish_air_passenger_duty_devolution` | not_expressible | We can't estimate this quantity within the household model. Scope: The OBR's Scottish block grant adjustment, self-financed expenditure and total; no Table 6.1 line. | 18: uk_obr_tables 2124–2141 | +| `ab2026__state_pension_triple_lock_adjustment` | registered | `ab2026__state_pension_triple_lock_adjustment` | expressible | We represent this change with parameter deltas on current law. Scope: Red book paragraph 5.23 and OBR paragraph 3.49: from April 2030, rises of the highest of 2.5%, inflation, or the rise that keeps the pension's April 2029 ratio to earnings; no Table 6.1 line, since its savings fall after the forecast. | 4: uk_hmt_redbook 41–42; uk_obr_tables 2743–2744 | +| `ab2026__your_first_home_ft_reprioritisation` | registered | `ab2026__your_first_home_ft_reprioritisation` | not_expressible | We can't estimate this quantity within the household model. Scope: Table 6.2 line 6, with no Table 6.1 line; line 5 is the scheme itself and keeps ab2026__your_first_home_equity_loan. | 6: uk_hmt_tables 636–641 | +| `ab2026_option__cgt_reform_package` | registered | `ab2026_option__cgt_reform_package` | partial | We can estimate part of this change. Scope: CenTax's package: CGT rates equal to income tax rates, an investment allowance for the risk-free rate, no uplift at death, and rebasing on arrival with deemed disposal on departure; CenTax doesn't cost its fifth element, more generous loss relief. | 10: uk_centax 19–21, 58–60, 107–109, 111 | +| `ab2026_option__childcare_100k_entitlement_taper` | registered | `ab2026_option__childcare_100k_entitlement_taper` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: CenTax's taper of 8p, 18p or 28p per £1 over £100,000 (conditions.taper_rate). | 3: uk_centax 104–106 | +| `ab2026_option__childcare_100k_threshold_raised` | registered | `ab2026_option__childcare_100k_threshold_raised` | expressible | We represent this change with parameter deltas on current law. Scope: CenTax's options to raise the limit to £125,000 or £150,000 (conditions.threshold). | 2: uk_centax 102–103 | +| `ab2026_option__childcare_100k_threshold_removed` | registered | `ab2026_option__childcare_100k_threshold_removed` | expressible | We represent this change with parameter deltas on current law. Scope: CenTax's option to make the free childcare entitlement in England available to parents with incomes over £100,000. | 3: uk_centax 1, 25, 99 | +| `ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s` | registered | `ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: CenTax's narrower option, for the first 15 hours only and children under 3. | 1: uk_centax 101 | +| `ab2026_option__fuel_duty_continued_freeze` | registered | `ab2026_option__fuel_duty_continued_freeze` | partial | We can estimate part of this change. Scope: Rates held at 52.95p a litre to 2029-30 against the announced policy, which extends line 3: OBR paragraph 3.43's alternative and RF's series for the OBR's constant-duty-rate forecast. | 7: uk_obr_tables 2740; uk_rf_ab2026 154, 397–401 | +| `ab2026_option__fuel_duty_rpi_uprating_since_2011` | registered | `ab2026_option__fuel_duty_rpi_uprating_since_2011` | not_expressible | We can't estimate this quantity within the household model. Scope: RF's revenue that the freezes forgo against RPI uprating since January 2011; it mirrors the OBR's ab2026__package_fuel_duty_freezes_since_2010_11. | 2: uk_rf_ab2026 12, 153 | +| `ab2026_option__health_foundation_social_care_reforms` | registered | `ab2026_option__health_foundation_social_care_reforms` | not_expressible | We can't estimate this quantity within the household model. Scope: OBR paragraph 3.41's citation of the Health Foundation's costs, from limited home-care reform to wider schemes, in 2035-36 (footnote 13); not a settled AB2026 policy. | 2: uk_obr_tables 2738–2739 | +| `ab2026_option__income_tax_5pc_share_devolved_to_mayors` | registered | `ab2026_option__income_tax_5pc_share_devolved_to_mayors` | not_expressible | We can't estimate this quantity within the household model. Scope: IPPR North's option beyond the Budget's commitment on income tax devolution; no Table 6.1 line sets a 5% share. | 1: uk_ippr 2 | +| `ab2026_option__lha_unfreeze_2027_28` | registered | `ab2026_option__lha_unfreeze_2027_28` | expressible | We represent this change with parameter deltas on current law. Scope: RF's option of unfreezing LHA in 2027-28 instead of prolonging the freeze; no Table 6.1 line. | 17: uk_rf_ab2026 58–59, 137–138, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, 383 | +| `ab2026_option__nics_on_investment_income` | registered | `ab2026_option__nics_on_investment_income` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: CenTax's option for rental income, savings income outside ISAs and other non-dividend investment income (conditions.income_type). | 10: uk_centax 24, 84–92 | +| `ab2026_option__nics_on_partnership_income` | registered | `ab2026_option__nics_on_partnership_income` | not_expressible | We need further policyengine-uk development to estimate this quantity. Scope: CenTax's top-up rates on partnership profits by income tax band, with a partnership allowance and an annual exempt amount per partner. | 24: uk_centax 22–23, 62–83 | +| `ab2026_option__tax_decisions_with_continued_fuel_duty_freeze` | registered | `ab2026_option__tax_decisions_with_continued_fuel_duty_freeze` | partial | Its producer gives the scope in words: RF adds an option the Government didn't adopt to the OBR's tax grouping, which lists no lines. Scope: RF Figure 10's net effect if fuel duty stayed frozen: the OBR's direct effect of tax measures plus the continued freeze's receipts effect. | 11: uk_rf_ab2026 147–151, 432–437 | diff --git a/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md b/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md index ef940b7c4..2c519bfcb 100644 --- a/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md +++ b/sources/harvest-uk-ab2026-2026-10-29/PROPOSED_KEYS.md @@ -4,93 +4,4 @@ Generated by `pipeline/ab2026_proposed_keys.py` from the staged families; don't 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 | +0 proposed keys (0 measures, 0 packages, 0 options) on 0 rows. diff --git a/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md b/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md index b94ca9454..a5bcdd4e1 100644 --- a/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md +++ b/sources/harvest-uk-ab2026-2026-10-29/REGISTRY_KEYS.md @@ -110,3 +110,89 @@ earlier event's registry named in `conditions.recosting_of`. | `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 | +| `ab2026__british_business_bank_defence_commitments_accelerated` | | not_expressible | British Business Bank: accelerate £450m of commitments to defence-related and dual-use businesses | +| `ab2026__departmental_spending_growth_2031_32` | | not_expressible | Departmental spending: grow day-to-day spending by 0.7% in real terms in 2031-32 | +| `ab2026__energy_debt_circuit_breaker` | | not_expressible | Energy Debt Circuit Breaker: a debt strategy and a one-off targeted energy debt relief scheme | +| `ab2026__gas_standing_charge_moved_to_unit_rates` | | not_expressible | Abolish the gas standing charge and recover it through unit rates | +| `ab2026__gas_supplier_levy_funded_from_general_taxation` | | not_expressible | Fund the Gas Supplier Levy from general taxation | +| `ab2026__minimum_wage_uprating_april_2027` | | not_expressible | Raise the National Living Wage and National Minimum Wage rates from 1 April 2027 | +| `ab2026__mod_counter_fraud_strategy` | | not_expressible | Ministry of Defence Counter Fraud Strategy | +| `ab2026__private_landlord_register_fee_65` | | not_expressible | Renters' Rights: a £65 fee for the 'Register your rental property' service from 15 December 2026 | +| `ab2026__public_sector_pensions_2024_valuations` | | not_expressible | Public sector pensions: net impact of the 2024 valuations | +| `ab2026__pwlb_debt_relief_councils_severe_distress` | | not_expressible | Public Works Loan Board debt relief for councils in severe financial distress | +| `ab2026__regulatory_administrative_savings` | | not_expressible | Regulatory administrative savings for business | +| `ab2026__rolls_royce_gas_turbine_programme` | | not_expressible | Co-investment in a 10-year £2.5 billion next-generation gas turbine programme | +| `ab2026__scottish_air_passenger_duty_devolution` | | not_expressible | Devolve Air Passenger Duty to the Scottish Government in April 2027 | +| `ab2026__state_pension_triple_lock_adjustment` | | expressible | Adjust the State Pension triple lock from April 2030 to hold the pension's value relative to earnings as reached in April 2029 | +| `ab2026__your_first_home_ft_reprioritisation` | 6.2/6 | not_expressible | Reprioritise financial transactions budgets to fund the new equity loan scheme | +| `ab2026__package_business_rates_rhl_sbrr_and_transitional_support` | | not_expressible | Business rates: the SBRR thresholds, the real-terms freeze and the transitional support extension, together | +| `ab2026__package_carbon_price_support_and_cfd_levies` | | not_expressible | Abolish carbon price support and fund the LCCC to reduce CfD levies, together | +| `ab2026__package_dividend_and_capital_gains_tax_changes` | | partial | OBR Table 3.1: changes to dividend and capital gains taxation | +| `ab2026__package_hmrc_tax_gap_and_online_marketplace` | | not_expressible | HMRC's tax gap measures and online marketplace liability, together | +| `ab2026__package_household_energy_payment_and_electricity_vat` | | expressible | The Household Energy Payment and zero VAT on domestic electricity, together | +| `ab2026__package_property_and_savings_income_rates` | | expressible | Property and savings income tax rates up 2ppts, together | +| `ab2026__package_hmt_distributional_budget_2026` | | partial | HM Treasury's Impact on households: the Budget 2026 policies it models | +| `ab2026__package_rf_ab26_permanent_personal_measures` | | partial | RF Figure 20's AB26 changes: permanent personal tax and benefit measures | +| `ab2026__package_non_scorecard_decisions` | | not_expressible | OBR: direct effect of non-scorecard decisions | +| `ab2026__package_tpa_business_rates` | | not_expressible | TPA: business rates | +| `ab2026__package_tpa_cgt_founders_relief_and_badr` | | partial | TPA: CGT (Founders' Relief and BADR) | +| `ab2026__package_tpa_energy_and_environment` | | not_expressible | TPA: energy and environment | +| `ab2026__package_tpa_fuel_duty_red_diesel_and_hgv_ved` | | partial | TPA: fuel duty cut, red diesel and HGV VED | +| `ab2026__package_tpa_other_by_measure` | | not_expressible | TPA: other (by-measure chart) | +| `ab2026__package_tpa_other_by_tax_2027_28` | | not_expressible | TPA: other (by-tax chart, 2027-28) | +| `ab2026__package_tpa_other_by_year` | | partial | TPA: other (by-year chart) | +| `ab2026__package_tpa_other_corporate_tax` | | not_expressible | TPA: other corporate tax | +| `ab2026__package_tpa_other_income_tax` | | partial | TPA: other income tax | +| `ab2026__package_tpa_other_vat` | | not_expressible | TPA: other VAT | +| `ab2026__package_tpa_savings_property_income_and_cash_isa` | | partial | TPA: savings and property income tax | +| `ab2026__package_tpa_tariffs` | | not_expressible | TPA: tariffs (including UK-India) | +| `ab2026__package_tpa_temporary_vat_and_fuel_cuts` | | partial | TPA: temporary VAT and fuel cuts | +| `ab2026__package_fuel_duty_and_electricity_vat` | | partial | OBR Table 3.1: fuel duty freeze and VAT off domestic energy bills (receipts) | +| `ab2026__package_property_and_savings_income_rates_receipts` | | partial | OBR Table 3.1: changes to savings and property income tax rates (receipts) | +| `ab2026__package_tax_administration_compliance_and_debt_collection_receipts` | | not_expressible | OBR Table 3.1: tax administration, compliance and debt collection measures (receipts) | +| `ab2026__package_temporary_business_rates_reliefs_receipts` | | not_expressible | OBR: the package of temporary business rates measures (receipts) | +| `ab2026__package_barnett_consequentials` | | not_expressible | Barnett consequentials of decisions confirmed at Budget for the devolved governments | +| `ab2026__package_breathing_space_for_households` | | partial | Government action at this Budget to provide breathing space for households | +| `ab2026__package_civil_service_transformation_programme` | | not_expressible | OBR: the civil service transformation programme | +| `ab2026__package_compliance_measures_announced` | | not_expressible | OBR Box 3.1: the compliance measures announced in this Budget | +| `ab2026__package_corporation_and_bank_tax_changes` | | not_expressible | OBR Table 3.1: changes to corporation and bank taxation | +| `ab2026__package_defence_investment_plan` | | not_expressible | The Defence Investment Plan | +| `ab2026__package_dwp_fraud_and_error_measures` | | not_expressible | DWP: this Budget's new fraud and error measures | +| `ab2026__package_fuel_duty_freezes_since_2010_11` | | not_expressible | OBR: cumulative fuel duty freezes from 2010-11 to 2027-28 and the 5p cut | +| `ab2026__package_government_decisions_since_march_2026` | | partial | The total effect of Government decisions since March 2026 | +| `ab2026__package_hmt_distributional_since_ab2024` | | partial | HM Treasury's Impact on households: modelled policies from Autumn Budget 2024 to Budget 2026 | +| `ab2026__package_household_energy_vat_and_household_share_of_fuel_duty` | | partial | RF's cost-of-living package: lines 1 and 2 and the household share of the fuel duty cut | +| `ab2026__package_ifs_announced_tax_changes` | | partial | IFS: the tax change Budget 2026 announced, at the forecast horizon | +| `ab2026__package_ifs_new_giveaways` | | partial | IFS: the Budget's new giveaways | +| `ab2026__package_national_wealth_fund_and_british_business_bank` | | not_expressible | OBR: the National Wealth Fund and British Business Bank's additional investment | +| `ab2026__package_obr_other_ame_spending_decisions` | | partial | OBR Table 3.1: other AME spending decisions | +| `ab2026__package_obr_other_departmental_spending_changes` | | not_expressible | OBR Table 3.1: other departmental spending changes | +| `ab2026__package_obr_other_hmrc_compliance_and_debt` | | not_expressible | OBR paragraph 3.13: other HMRC compliance and debt measures | +| `ab2026__package_obr_other_tax_measures` | | partial | OBR Table 3.1: other tax measures | +| `ab2026__package_parliament_fuel_duty_decisions` | | partial | The Government's fuel duty decisions across this Parliament | +| `ab2026__package_parliament_tax_gap_measures` | | not_expressible | Measures to close the tax gap announced during this Parliament | +| `ab2026__package_welfare_fraud_and_error_savings_in_forecast` | | not_expressible | Total savings from welfare fraud and error measures over the forecast | +| `ab2026__package_planned_capital_spending_reductions` | | not_expressible | OBR: reductions in planned capital spending | +| `ab2026__package_pubs_relief_35pc_total` | | not_expressible | The whole 35% business rates relief for pubs, social clubs and live music venues in England | +| `ab2026__package_rdel_decisions_excluding_household_energy_payment` | | not_expressible | RF: the Budget's RDEL decisions over the Spending Review period except the Household Energy Payment | +| `ab2026__package_regulation_tariff_and_sandbox_business_savings` | | not_expressible | Business savings from regulation cuts, tariff suspensions and testing powers | +| `ab2026__package_rf_absolute_policy_changes` | | partial | RF: every policy decision counted at its absolute value | +| `ab2026__package_rf_energy_bill_support_announced_at_budget` | | partial | RF: the energy bill support announced at the Budget | +| `ab2026__package_rf_other_tax_measures` | | partial | RF Figure 10: other tax measures | +| `ab2026__package_rf_parliament_permanent_tax_and_benefit_measures` | | partial | RF: permanent personal tax and benefit changes announced this Parliament | +| `ab2026__package_spending_decisions_since_march_2026` | | partial | OBR: direct effect of spending measures since March 2026 | +| `ab2026__package_tax_decisions_since_march_2026` | | partial | OBR: direct effect of tax measures since March 2026 | +| `ab2026__package_total_financial_transactions` | | not_expressible | Table 6.2: total cash impacts of financial transactions | +| `ab2026_option__cgt_reform_package` | | partial | CenTax: structural reform of CGT, with rates equal to income tax rates | +| `ab2026_option__childcare_100k_entitlement_taper` | | not_expressible | CenTax: taper the withdrawal of free childcare above £100,000 | +| `ab2026_option__childcare_100k_threshold_raised` | | expressible | CenTax: raise the free childcare income limit from £100,000 | +| `ab2026_option__childcare_100k_threshold_removed` | | expressible | CenTax: remove the £100,000 free childcare income limit | +| `ab2026_option__childcare_100k_threshold_removed_first_15_hours_under_3s` | | not_expressible | CenTax: remove the income limit for the first 15 hours of childcare for under-3s | +| `ab2026_option__fuel_duty_continued_freeze` | | partial | Keep fuel duty frozen until 2029-30 instead of the rise in July 2027 | +| `ab2026_option__fuel_duty_rpi_uprating_since_2011` | | not_expressible | Fuel duty uprated by RPI since January 2011 | +| `ab2026_option__health_foundation_social_care_reforms` | | not_expressible | Health Foundation's illustrative social care reforms | +| `ab2026_option__income_tax_5pc_share_devolved_to_mayors` | | not_expressible | IPPR North: devolve 5% of income tax to mayors | +| `ab2026_option__lha_unfreeze_2027_28` | | expressible | Unfreeze Local Housing Allowance in 2027-28 | +| `ab2026_option__nics_on_investment_income` | | not_expressible | CenTax: an equivalent of Class 1 NICs on investment income | +| `ab2026_option__nics_on_partnership_income` | | not_expressible | CenTax: an equivalent of employer NICs on partnership profits | +| `ab2026_option__tax_decisions_with_continued_fuel_duty_freeze` | | partial | RF: the OBR's direct effect of tax measures with fuel duty kept frozen | 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 index eca254b96..a22987e07 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_centax/claims_staged.jsonl.gz 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_devolved_govts/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/claims_staged.jsonl.gz index 5618000aa..3e1df6f72 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_devolved_govts/claims_staged.jsonl.gz 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_hmt_costings/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/claims_staged.jsonl.gz index 2bd03d8b0..aa5bdf3a9 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_costings/claims_staged.jsonl.gz 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_redbook/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/claims_staged.jsonl.gz index 6a9d6e262..7a5855ee8 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_redbook/claims_staged.jsonl.gz 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_tables/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz index 5f1f6d709..47d2a914a 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_hmt_tables/claims_staged.jsonl.gz 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_ifs_ab2026/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/claims_staged.jsonl.gz index ba5746a19..13705d557 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_ifs_ab2026/claims_staged.jsonl.gz 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_ippr/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/claims_staged.jsonl.gz index 0e1df28c1..4ca9e5504 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_ippr/claims_staged.jsonl.gz 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_obr_tables/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/claims_staged.jsonl.gz index 2c09e17b9..e5a81c149 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_obr_tables/claims_staged.jsonl.gz 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_rf_ab2026/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/claims_staged.jsonl.gz index fafd85c23..9480d5890 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_rf_ab2026/claims_staged.jsonl.gz 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_tpa/claims_staged.jsonl.gz b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/claims_staged.jsonl.gz index 064e102ec..8ec5bd7e9 100644 Binary files a/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/claims_staged.jsonl.gz and b/sources/harvest-uk-ab2026-2026-10-29/uk_tpa/claims_staged.jsonl.gz differ diff --git a/tests/fixtures/ab2026_ingest_sign_readings.json b/tests/fixtures/ab2026_ingest_sign_readings.json new file mode 100644 index 000000000..904cf7e79 --- /dev/null +++ b/tests/fixtures/ab2026_ingest_sign_readings.json @@ -0,0 +1,32 @@ +[ + { + "metric": "average_household_income_change", + "sign_convention": "positive = gain to households", + "relation": "same" + }, + { + "metric": "average_tax_change", + "sign_convention": "positive = saving or gain as printed", + "relation": "opposite" + }, + { + "metric": "cash_requirement_change", + "sign_convention": "as printed (positive = cash inflow to the public sector, as in Table 6.2)", + "relation": "opposite" + }, + { + "metric": "cash_requirement_change", + "sign_convention": "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 +)", + "relation": "opposite" + }, + { + "metric": "energy_bill_change", + "sign_convention": "positive = higher bills", + "relation": "same" + }, + { + "metric": "energy_bill_change", + "sign_convention": "positive = increase in household energy bills", + "relation": "same" + } +] diff --git a/tests/fixtures/ab2026_sign_readings.json b/tests/fixtures/ab2026_sign_readings.json index a0bd6c717..620f35279 100644 --- a/tests/fixtures/ab2026_sign_readings.json +++ b/tests/fixtures/ab2026_sign_readings.json @@ -42,7 +42,7 @@ { "metric": "cash_requirement_change", "sign_convention": "as worded: positive = increase in the financing requirement", - "relation": "unknown" + "relation": "same" }, { "metric": "cpi_inflation_effect", @@ -152,7 +152,7 @@ { "metric": "energy_bill_change", "sign_convention": "negative = reduction in the typical household's annual bill", - "relation": "unknown" + "relation": "same" }, { "metric": "energy_bill_change", @@ -177,7 +177,7 @@ { "metric": "gdp_level_effect", "sign_convention": "as worded: positive = real GDP increase", - "relation": "unknown" + "relation": "same" }, { "metric": "gdp_level_effect", @@ -197,7 +197,7 @@ { "metric": "real_income_growth", "sign_convention": "positive = decrease in real household disposable income per person", - "relation": "unknown" + "relation": "opposite" }, { "metric": "real_income_growth", @@ -212,12 +212,12 @@ { "metric": "real_income_growth", "sign_convention": "positive = higher real household disposable incomes", - "relation": "unknown" + "relation": "same" }, { "metric": "real_income_growth", "sign_convention": "positive = real income growth", - "relation": "unknown" + "relation": "same" }, { "metric": "revenue_change", @@ -232,12 +232,12 @@ { "metric": "revenue_change", "sign_convention": "as worded: positive = AME increase", - "relation": "unknown" + "relation": "opposite" }, { "metric": "revenue_change", "sign_convention": "as worded: positive = additional spending", - "relation": "unknown" + "relation": "opposite" }, { "metric": "revenue_change", @@ -257,17 +257,17 @@ { "metric": "revenue_change", "sign_convention": "as worded: positive = net cost", - "relation": "unknown" + "relation": "opposite" }, { "metric": "revenue_change", "sign_convention": "as worded: positive = pension spending increase", - "relation": "unknown" + "relation": "opposite" }, { "metric": "revenue_change", "sign_convention": "as worded: positive = reduction in receipts", - "relation": "unknown" + "relation": "opposite" }, { "metric": "revenue_change", @@ -277,12 +277,12 @@ { "metric": "revenue_change", "sign_convention": "as worded: positive = reduction in resource spending", - "relation": "unknown" + "relation": "same" }, { "metric": "revenue_change", "sign_convention": "as worded: positive = reduction in spending", - "relation": "unknown" + "relation": "same" }, { "metric": "revenue_change", @@ -292,17 +292,17 @@ { "metric": "revenue_change", "sign_convention": "as worded: positive = spending cost", - "relation": "unknown" + "relation": "opposite" }, { "metric": "revenue_change", "sign_convention": "as worded: positive = spending reduction", - "relation": "unknown" + "relation": "same" }, { "metric": "revenue_change", "sign_convention": "as worded: positive = welfare spending reduction", - "relation": "unknown" + "relation": "same" }, { "metric": "revenue_change", diff --git a/tests/test_ab2026_key_decisions.py b/tests/test_ab2026_key_decisions.py new file mode 100644 index 000000000..f7af13250 --- /dev/null +++ b/tests/test_ab2026_key_decisions.py @@ -0,0 +1,145 @@ +"""Tranche 2 of #230: every key tranche 1 proposed is registered or folded. + +pipeline/ab2026_key_decisions.py records a decision for each of the 86 +proposed keys, pipeline/build_ab2026_registry.py registers them, and +pipeline/apply_ab2026_key_decisions.py moves each staged row's key into +measure_key, where AB2025's rows name theirs. These tests check that the three +agree: no row still proposes a key, the registry lists every decision's +key, each decision covers the rows tranche 1 counted, and +KEY_DECISIONS.md is what the script renders. +""" + +import json +from pathlib import Path + +from pipeline import ab2026_key_decisions as D +from pipeline import ab2026_measure_keys as K +from pipeline.apply_ab2026_key_decisions import HARVEST, problems, read, rekey, render + +ROOT = Path(__file__).resolve().parent.parent +REG = { + m["measure_key"]: m + for m in json.loads((ROOT / "data/uk/ab2026_measures.json").read_text())["measures"] +} + + +def test_the_rewrite_leaves_nothing_to_do(): + assert problems() == [] + + +def test_key_decisions_md_is_rendered_from_the_rows(): + assert (HARVEST / "KEY_DECISIONS.md").read_text() == render() + + +def test_tranche_one_proposed_86_keys_on_973_rows(): + kinds = [d["kind"] for d in D.DECISIONS.values()] + assert (kinds.count("measure"), kinds.count("package"), kinds.count("option")) == ( + 15, + 58, + 13, + ) + assert sum(d["rows"] for d in D.DECISIONS.values()) == 973 + + +def test_each_registered_key_carries_its_kind_and_producers(): + for pk, d in D.DECISIONS.items(): + m = REG[D.registered_key(pk)] + assert m["producers"] == list(d["producers"]), pk + want = "option_costed_by_others" if d["kind"] == "option" else "announced" + assert m["reported_status"] == want, pk + assert m.get("proposed_as", m["measure_key"]) == pk, pk + assert d["scope"] in m["source_note"], pk + + +def test_a_package_of_legs_names_exactly_its_lines(): + for pk, d in D.DECISIONS.items(): + if d["verdict"][0] != "legs": + continue + want = [K.key(x) if isinstance(x, int) else x for x in d["legs"]] + assert REG[D.registered_key(pk)]["package_of"] == want, pk + + +def test_no_two_registered_packages_share_a_list_of_legs(): + """Rule 3: one scope, one key. Two packages with the same legs would be + one scope under two keys, and we should have folded one into the other.""" + seen = {} + for k, m in REG.items(): + legs = m.get("package_of") or m.get("receipts_of") + if not isinstance(legs, list): + continue + sig = (m.get("construction"), tuple(sorted(legs))) + assert sig not in seen, (k, seen.get(sig)) + seen[sig] = k + + +def test_rekey_moves_the_key_and_changes_nothing_else(): + row = { + "measure_key": None, + "value": 1.0, + "conditions": {"proposed_measure_key": next(iter(D.RENAMED)), "fy": "2026-27"}, + } + out = rekey(row) + assert out["measure_key"] == next(iter(D.RENAMED.values())) + assert out["conditions"] == {"fy": "2026-27"} + assert {k: v for k, v in out.items() if k not in ("measure_key", "conditions")} == { + "value": 1.0 + } + keyed = {"measure_key": "ab2026__x", "conditions": {}} + assert rekey(keyed) is keyed + + +def test_no_staged_row_names_a_key_outside_the_registry(): + earlier = {"autumn_budget_2025", "autumn_budget_2024", "spring_budget_2024"} + for fam in sorted(p.name for p in HARVEST.iterdir() if p.is_dir()): + path = HARVEST / fam / "claims_staged.jsonl.gz" + if not path.exists(): + continue + for r in read(path): + k = r["measure_key"] + if k is None or r["conditions"].get("recosting_of") in earlier: + continue + assert k in REG, (fam, k) + + +def _scope_lines(scope): + """The Table 6.1 lines a scope names first, from the NOTES wording.""" + import re + + m = re.search(r"Table 6\.1 lines ((?:\d+(?:, | and )?)+)", scope) + return [int(x) for x in re.findall(r"\d+", m.group(1))] if m else [] + + +def test_a_package_of_legs_takes_the_lines_its_scope_names(): + """The legs table and the registry come from one authored list; the + scope's own words give the lines independently.""" + for pk, d in D.DECISIONS.items(): + if d["verdict"][0] != "legs": + continue + lines = [x for x in d["legs"] if isinstance(x, int)] + assert lines == _scope_lines(d["scope"]), pk + reg_lines = [ + REG[k]["table_61_line"] + for k in REG[D.registered_key(pk)]["package_of"] + if "table_61_line" in REG[k] + ] + assert reg_lines == lines, pk + + +def test_a_producer_scope_is_its_producers_words_once(): + """A producer scope keeps its words as a string, never a list a reader + could take for keys, and no two entries share the words.""" + seen = {} + for k, m in REG.items(): + if m.get("construction") != "producer_scope": + continue + assert isinstance(m["package_of"], str) and m["package_of"].strip(), k + assert m["package_of"] not in seen, (k, seen.get(m["package_of"])) + seen[m["package_of"]] = k + + +def test_every_list_of_legs_names_registered_keys(): + for k, m in REG.items(): + for field in ("package_of", "receipts_of"): + legs = m.get(field) + if isinstance(legs, list): + assert legs and set(legs) <= set(REG), (k, field) diff --git a/tests/test_ab2026_registry.py b/tests/test_ab2026_registry.py index 223996351..666ea9d95 100644 --- a/tests/test_ab2026_registry.py +++ b/tests/test_ab2026_registry.py @@ -60,9 +60,11 @@ def test_every_table_61_line_is_registered_once_under_its_written_out_key(): 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.""" + line 4 (Sovereign AI) and line 6 (the reprioritisation that funds line 5's + equity loan scheme, registered in tranche 2) have no Table 6.1 line, so + each 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] + assert [m["table_62_line"] for m in own] == [4, 6] for line, slug in K.TABLE_62.items(): assert K.PREFIX + slug in BY_KEY, (line, slug) @@ -190,6 +192,9 @@ def test_a_package_is_expressible_only_when_every_leg_is(): ] if m["computability"] == "expressible": assert len(expressible) == len(legs), m["measure_key"] + elif all(leg["computability"] == "not_expressible" for leg in legs): + assert m["computability"] == "not_expressible", m["measure_key"] + assert "expressible_legs" not in m, m["measure_key"] else: assert m["computability"] == "partial", m["measure_key"] assert sorted(m["expressible_legs"]) == sorted(expressible), m[ @@ -262,3 +267,17 @@ def test_each_receipt_matches_the_dashboard_commit(key): assert ex["data"]["dataset_revision"] == rc["dataset_revision"] assert ex["data"]["dataset_sha256"] == rc["dataset_sha256"] assert ex["wrapper"] == {"name": "policyengine", "version": rc["policyengine"]} + + +def test_a_partial_package_names_an_expressible_or_partial_leg(): + """A package or receipts group whose every leg is not_expressible takes + not_expressible, so its claims get a pe_gap verdict.""" + for m in REG["measures"]: + legs = m.get("receipts_of") or m.get("package_of") + if not isinstance(legs, list): + continue + comp = {BY_KEY[k]["computability"] for k in legs} + if m["computability"] == "partial": + assert comp & {"expressible", "partial"}, m["measure_key"] + if comp == {"not_expressible"}: + assert m["computability"] == "not_expressible", m["measure_key"] diff --git a/tests/test_uk_ab2026_harvest.py b/tests/test_uk_ab2026_harvest.py index 3818f4e1f..35b93f791 100644 --- a/tests/test_uk_ab2026_harvest.py +++ b/tests/test_uk_ab2026_harvest.py @@ -181,8 +181,8 @@ def test_table_64_recostings_name_their_event(): # 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"} +# T-2), so each takes a key of its own, which tranche 2 registers. +T62_OWN = {"6": "ab2026__your_first_home_ft_reprioritisation"} T62_TOTAL = "ab2026__package_total_financial_transactions" @@ -196,14 +196,14 @@ def test_table_62_rows_are_financial_transactions_not_revenue(): 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] + assert "proposed_measure_key" not in r["conditions"] + if line in T62_OWN: + assert r["measure_key"] == T62_OWN[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 + assert r["measure_key"] == T62_TOTAL + assert "proposed_measure_key" not in r["conditions"] # 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) diff --git a/tests/test_uk_ab2026_ingest.py b/tests/test_uk_ab2026_ingest.py new file mode 100644 index 000000000..a077f5335 --- /dev/null +++ b/tests/test_uk_ab2026_ingest.py @@ -0,0 +1,1194 @@ +"""The Autumn Budget 2026 ingest (#230, tranche 2). + +Every one of the 5,952 staged rows becomes a claim or a tallied drop. These +tests pin the ingest's invariants: + +1. read = ingested + dropped, per family and in total, against COUNTS.json + and ingest_uk_ab2026_expected.json, with a written reason for each drop; +2. the AB2026 registry lists every claim's key, or for a Table 6.4 recosting + the earlier event's does, and each claim takes that registry's verdict; +3. one claim per claim identity, and each HM Treasury figure counted once; +4. each claim's sign reads as signs.py reads it, pinned for every staged + (metric, convention) pair and every pair the ingest's metric calls make; +5. the same claims from the same rows, run after run and in any row order; +6. AB2025's ingest gives the same output here as on origin/main. + +Hypothesis checks the accounting on samples of the harvest, the order +independence, the twin rule and the share-of-GDP rule. +""" + +import copy +import gzip +import json +import os +import random +import shutil +import sqlite3 +import subprocess +import sys +from collections import Counter +from pathlib import Path +from types import SimpleNamespace + +import pytest +from hypothesis import HealthCheck, given, settings +from hypothesis import strategies as st + +from scorecard_db import ScorecardDB, signs +from scorecard_db import ingest_uk_ab2026 as I +from scorecard_db.models import Metric +from scorecard_db.uk_aliases import canon, known + +ROOT = Path(__file__).resolve().parent.parent +COUNTS = json.loads((I.HARVEST / "COUNTS.json").read_text()) +EARLIER = { + p.name.removesuffix("_measures.json"): { + m["measure_key"] for m in json.loads(p.read_text())["measures"] + } + for p in (ROOT / "data" / "uk" / "events").glob("*_measures.json") +} +EARLIER.setdefault("autumn_budget_2025", set()).update( + m["measure_key"] + for m in json.loads((ROOT / "data/uk/ab2025_measures.json").read_text())["measures"] +) + + +def _raw(family): + path = I.HARVEST / family / "claims_staged.jsonl.gz" + with gzip.open(path, "rt", encoding="utf-8") as fh: + return [json.loads(line) for line in fh] + + +RAW = {fam: _raw(fam) for fam in I.FAMILIES} + + +@pytest.fixture(scope="module") +def staged(): + return I.stage() + + +def _numbered(sample=None): + return { + fam: [ + (i, r) for i, r in enumerate(rows) if sample is None or (fam, i) in sample + ] + for fam, rows in RAW.items() + } + + +def _rows(scores): + return sorted(json.dumps(ScorecardDB.score_row(s), default=str) for s in scores) + + +# --- 1. the accounting ------------------------------------------------------- + + +def test_every_staged_row_is_ingested_or_tallied(staged): + scores, acct = staged + exp = I.expected() + assert acct["read"] == exp["read"] == COUNTS["_totals"]["rows"] == 5952 + assert acct["ingested"] == len(scores) == exp["ingested"] + assert acct["ingested"] + acct["dropped"] == acct["read"] + assert set(acct["by_family"]) == {k for k in COUNTS if not k.startswith("_")} + for fam, v in acct["by_family"].items(): + assert v["read"] == COUNTS[fam]["rows"], fam + assert v["ingested"] + v["dropped"] == v["read"], fam + I.check_accounting(acct) + + +def test_every_drop_states_a_reason(staged): + _, acct = staged + for key, entry in acct["drops"].items(): + assert entry["rows"] > 0, key + assert len(entry["reason"]) > 80, key + assert sum(e["rows"] for e in acct["drops"].values()) == acct["dropped"] + + +def test_restated_rows_are_tallied_not_carried(staged): + _, acct = staged + assert ( + acct["drops"]["restated_official_figure"]["rows"] + == COUNTS["_totals"]["restated"] + == 450 + ) + + +def test_every_staged_metric_name_is_decided(): + """Every metric name on a row that reaches a metric decision is adopted + or dropped, never both; restated and categorical rows drop first.""" + for fam, rows in RAW.items(): + for r in rows: + if r["attribution"] == "restated" or r.get("value_kind") == "categorical": + continue + name = r.get("metric") or r.get("proposed_metric") + assert (name in I.DISPOSITIONS) != (name in I._DROP_BY_NAME), (fam, name) + + +def test_accounting_drift_raises(staged): + _, acct = staged + bad = json.loads(json.dumps(acct)) + bad["ingested"] -= 1 + bad["dropped"] += 1 + with pytest.raises(ValueError, match="accounting drifted"): + I.check_accounting(bad) + + +def test_an_undecided_metric_raises(monkeypatch): + row = copy.deepcopy(RAW["uk_tpa"][0]) + row["attribution"] = "own" + row["metric"] = None + row["proposed_metric"] = "a_metric_nobody_decided" + with pytest.raises(ValueError, match="no disposition"): + I.stage({"uk_tpa": [(10_000, row)]}) + + +def test_a_moved_row_call_raises(monkeypatch): + monkeypatch.setitem( + I.ROW_DROPS, ("uk_obr_tables", 0), ("not this value", "no_registered_metric") + ) + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_obr_tables", RAW["uk_obr_tables"]) + + +# --- 2. keys and verdicts ---------------------------------------------------- + + +def test_every_claim_key_is_registered_with_its_verdict(staged): + scores, _ = staged + for s in scores: + c = s.conditions + assert "proposed_measure_key" not in c + key = c.get("measure_key") + if key is None: + continue + if "recosting_of" in c: + assert key in EARLIER[c["recosting_of"]], key + if s.metric not in I.AB25.MACRO_METRICS: + assert "pe_expressibility" not in c, key + continue + assert key in I.REGISTRY, key + if s.metric in I.AB25.MACRO_METRICS: + assert c["pe_expressibility"] == "not_expressible" + else: + assert c["pe_expressibility"] == I.REGISTRY[key]["computability"], key + + +def test_every_claim_names_its_producer_measure_and_event(staged): + scores, _ = staged + for s in scores: + assert s.source in I.ALL_SOURCES + assert s.conditions["fiscal_event"] == "autumn_budget_2026" + assert s.publication["registry"] == I.REGISTRY_MARK + geography = s.conditions.get("geography") + assert s.publication["publish_without_result"] is ( + geography is None or geography in I.UK_GEOGRAPHIES + ), geography + + +# --- 3. one claim per identity, each HM Treasury figure once ----------------- + + +def test_claim_ids_are_unique(staged): + scores, _ = staged + ids = [s.claim_id() for s in scores] + assert len(ids) == len(set(ids)) + + +def test_each_hm_treasury_figure_is_counted_once(staged): + """HM Treasury repeats 408 Table 6.1 cells in the costings and 24 in the + red book; the ingest keeps each Table 6.1 claim and records its twins on + it.""" + scores, acct = staged + assert acct["drops"]["hmt_figure_staged_twice"]["rows"] == 432 + assert ( + acct["by_family"]["uk_hmt_costings"]["drops"]["hmt_figure_staged_twice"] == 408 + ) + assert acct["by_family"]["uk_hmt_redbook"]["drops"]["hmt_figure_staged_twice"] == 24 + printed = [s for s in scores if "also_printed_in" in s.publication] + assert sum(len(s.publication["also_printed_in"]) for s in printed) == 432 + for s in printed: + assert s.publication["family"] == "uk_hmt_tables" + assert { + t["family"] for t in s.publication["also_printed_in"] + } <= I._TWIN_FAMILIES + by_locator = { + s.publication.get("locator"): s + for s in scores + if s.publication["family"] == "uk_hmt_tables" + } + for (fam, i), (t, reason) in I.REVIEWED_TWINS.items(): + assert len(reason) > 80 + kept = by_locator[RAW["uk_hmt_tables"][t]["publication"]["locator"]] + assert RAW[fam][i]["publication"]["locator"] in { + p["locator"] for p in kept.publication["also_printed_in"] + }, (fam, i) + + +# Each reviewed red book row, the Table 6.1 row it repeats and both printings, +# read from the documents apart from I.REVIEWED_TWINS: +# red book row -> (table row, red book print, table cell, table value, table year) +REVIEWED_PINS = { + 6: (0, "£2.6 billion", "-2625", -2_625_000_000, 2027), + 179: (0, "£2.6 billion", "-2625", -2_625_000_000, 2027), + 11: (109, "£10 million", "-10", -10_000_000, 2028), + 236: (109, "£10 million", "-10", -10_000_000, 2028), + 220: (49, "£5 million", "-5", -5_000_000, 2028), + 270: (49, "£5 million", "-5", -5_000_000, 2028), + 263: (252, "£500 million", "-500", -500_000_000, 2027), + 271: (252, "£500 million", "-500", -500_000_000, 2027), + 272: (252, "£500 million", "-500", -500_000_000, 2027), +} + + +def test_each_reviewed_twin_repeats_the_cell_we_read(): + assert set(I.REVIEWED_TWINS) == {("uk_hmt_redbook", i) for i in REVIEWED_PINS} + for i, (t, printed, cell, value, year) in REVIEWED_PINS.items(): + assert I.REVIEWED_TWINS[("uk_hmt_redbook", i)][0] == t, i + assert RAW["uk_hmt_redbook"][i]["value_raw"] == printed, i + table = RAW["uk_hmt_tables"][t] + assert (table["value_raw"], table["value"], table["period"]) == ( + cell, + value, + year, + ), i + + +# A costings or red book claim within 5% of a Table 6.1 or 6.2 claim on the +# same key and metric, once both read in PolicyEngine's orientation, that the +# reviewed twin table doesn't hold: (family, locator, period) -> why it stays +# a claim. A horizon difference (a multi-year total against one year) never +# comes within 5%, so none needs listing here. +NOT_TWINS: dict[tuple[str, str, int], str] = {} + + +def _pe_signed(s): + relation, _ = signs.classify( + {"metric": s.metric.value, "conditions": s.conditions, "country": "UK"} + ) + return signs.external_value_pe_sign(s.value, relation) + + +def test_no_costings_or_red_book_claim_repeats_a_table_figure(staged): + """A scan independent of _twin_key: it reads signs through signs.classify, + allows rounding to 5% and ignores the period, so a repetition with + another sign, rounding or year shows up unless the reviewed twin table + drops it or NOT_TWINS gives a reason.""" + scores, _ = staged + tables = [ + s + for s in scores + if s.publication["family"] == "uk_hmt_tables" + and s.conditions.get("table") in ("6.1", "6.2") + ] + hits = set() + for s in scores: + if ( + s.publication["family"] not in I._TWIN_FAMILIES + or s.conditions.get("component") + or s.conditions.get("row_type") == "measure_component" + ): + continue + v = _pe_signed(s) + if not v: + continue + for t in tables: + if t.metric != s.metric or t.conditions.get( + "measure_key" + ) != s.conditions.get("measure_key"): + continue + w = _pe_signed(t) + if w and abs(v - w) <= 0.05 * abs(w): + hits.add( + (s.publication["family"], s.publication.get("locator"), s.period) + ) + assert hits <= set(NOT_TWINS), sorted(hits - set(NOT_TWINS)) + assert all(len(why) > 40 for why in NOT_TWINS.values()) + + +# --- the metric calls ---------------------------------------------------------- + + +def test_table_6_2_and_the_obr_financing_requirement_share_one_metric(staged): + scores, _ = staged + t62 = [s for s in scores if s.conditions.get("table") == "6.2"] + assert len(t62) == 60 + assert {s.metric for s in t62} == {Metric.CASH_REQUIREMENT_CHANGE} + obr = [ + s + for s in scores + if s.source == "obr_efo" + and s.conditions.get("value_verbatim") == "£1.9 billion" + and s.conditions.get("measure_key") + == "ab2026__package_national_wealth_fund_and_british_business_bank" + ] + assert [s.metric for s in obr] == [Metric.CASH_REQUIREMENT_CHANGE] + + +def test_the_continued_fuel_duty_freeze_stays_on_borrowing(staged): + """The OBR states the option's effect on public sector net borrowing, so we + retain that metric and apply #55's macro verdict.""" + scores, _ = staged + freeze = [ + s + for s in scores + if s.conditions.get("measure_key") + == "ab2026_option__fuel_duty_continued_freeze" + ] + # RF derives its figure from the OBR's forecasts, so only the OBR's stays + [obr] = freeze + assert obr.source == "obr_efo" + assert obr.metric == Metric.DECISIONS_EFFECT_ON_BORROWING + assert "staged_metric" not in obr.conditions + assert obr.conditions["pe_expressibility"] == "not_expressible" + assert obr.conditions["pe_missing"] == I.AB25.MACRO_MISSING + assert obr.conditions["action_link"] == I.AB25.MACRO_LINK + + +def test_ifs_keeps_the_one_off_payment_and_tallies_the_partial_year_support(): + """IFS averages January 2027's Household Energy Payment across households in + England, and the whole payment falls in one fiscal year. Its other three + averages cover part of a year.""" + rows = RAW["uk_ifs_ab2026"] + scores, acct = I.stage({"uk_ifs_ab2026": [(i, rows[i]) for i in (43, 44, 45, 46)]}) + [claim] = scores + assert claim.metric == Metric.AVERAGE_HOUSEHOLD_INCOME_CHANGE + assert claim.unit_concept.value == "gbp_per_household" + assert (claim.value, claim.period) == (80, 2027) + c = claim.conditions + assert c["measure_key"] == "ab2026__household_energy_payment_100_bands_a_to_d" + assert c["staged_metric"] == "average_household_support" + assert (c["geography"], c["payment_date"], c["price_basis"], c["horizon"]) == ( + "England", + "January 2027", + "2026-27 prices", + "October 2026 to June 2027", + ) + assert acct["drops"]["partial_year_household_support"]["rows"] == 3 + + +def test_a_row_metric_on_another_row_raises(monkeypatch): + """A re-staged family can't move a metric call onto another row.""" + monkeypatch.setitem( + I.ROW_METRICS, + ("uk_ifs_ab2026", 45), + ( + "average_household_support", + "£80", + Metric.AVERAGE_HOUSEHOLD_INCOME_CHANGE, + "x", + ), + ) + with pytest.raises(ValueError, match="ROW_METRICS uk_ifs_ab2026 row 45"): + I.stage() + + +def test_the_obr_receipts_total_lands_on_revenue_and_its_restatement_drops(staged): + obr, rf = RAW["uk_obr_tables"], RAW["uk_rf_ab2026"] + assert {obr[i]["metric"] for i in range(2190, 2196)} == {"revenue_change"} + assert {rf[i]["attribution"] for i in range(385, 391)} == {"restated"} + scores, _ = staged + totals = [ + s + for s in scores + if s.source == "obr_efo" + and s.conditions.get("value_verbatim") + in {obr[i]["value_raw"] for i in range(2190, 2196)} + and s.conditions.get("component") == obr[2190]["conditions"].get("component") + ] + assert len(totals) == 6 + assert {s.metric for s in totals} == {Metric.REVENUE_CHANGE} + restatement = {rf[i]["value_raw"] for i in range(385, 391)} + assert not [ + s + for s in scores + if s.source == "resolution_foundation" + and s.conditions["value_verbatim"] in restatement + ] + + +def test_ifs_shares_of_gdp_take_percent_of_gdp(): + ifs = RAW["uk_ifs_ab2026"] + gdp = [ + r + for r in ifs + if r.get("unit_concept") == "percent" + and str(r["conditions"].get("denominator", "")).lower() == "gdp" + ] + assert len(gdp) == 33 + assert {I.unit_label(r) for r in gdp} == {"percent_of_gdp"} + own = [r for r in gdp if r["attribution"] == "own"] + assert len(own) == 1 and own[0]["value_raw"] == "0.2" + assert I.AB25._UNIT_DROPS["percent_of_gdp"] == "macro_fiscal_or_out_of_scope" + + +# --- 4. signs ------------------------------------------------------------------- + +STAGED_READINGS = { + (p["metric"], p["sign_convention"]): p["relation"] + for p in json.loads((ROOT / "tests/fixtures/ab2026_sign_readings.json").read_text()) +} +INGEST_READINGS = { + (p["metric"], p["sign_convention"]): p["relation"] + for p in json.loads( + (ROOT / "tests/fixtures/ab2026_ingest_sign_readings.json").read_text() + ) +} + + +def test_every_claim_sign_reads_as_reviewed(staged): + """A claim on its staged metric reads as the harvest fixture pins; a + claim on a metric the ingest decided reads as the ingest fixture pins + (reviewed 5 November 2026). A new pair fails until someone reviews it.""" + scores, _ = staged + seen = set() + for s in scores: + if s.metric.value not in signs.ORIENTATION: + continue + pair = (s.metric.value, s.conditions.get("sign_convention")) + fixture = ( + INGEST_READINGS if "staged_metric" in s.conditions else STAGED_READINGS + ) + assert pair in fixture, pair + relation, _ = signs.classify( + {"metric": s.metric.value, "conditions": s.conditions, "country": "UK"} + ) + assert relation == fixture[pair], pair + if "staged_metric" in s.conditions: + seen.add(pair) + assert seen == set(INGEST_READINGS) + + +def test_only_unsigned_claims_lack_a_direction(staged): + """Every oriented claim reads same or opposite, or states why no sign + applies.""" + scores, _ = staged + bases = Counter() + for s in scores: + if s.metric.value not in signs.ORIENTATION: + continue + relation, basis = signs.classify( + {"metric": s.metric.value, "conditions": s.conditions, "country": "UK"} + ) + if relation == "unknown": + bases[basis] += 1 + assert set(bases) <= { + "stated:exchequer:not_this_quantity", + "stated:borrowing:not_this_quantity", + } + + +# --- 5. determinism --------------------------------------------------------- + + +def test_the_stage_is_deterministic(staged): + again, acct = I.stage() + assert _rows(staged[0]) == _rows(again) + assert I.summarise(acct) == I.summarise(staged[1]) + + +@settings(max_examples=25, deadline=None, suppress_health_check=[HealthCheck.too_slow]) +@given(seed=st.integers(min_value=0, max_value=2**32 - 1)) +def test_row_order_never_changes_the_claims_or_the_tally(seed): + rng = random.Random(seed) + numbered = _numbered() + for fam in numbered: + rng.shuffle(numbered[fam]) + scores, acct = I.stage(numbered) + base_scores, base_acct = BASE + # whole serialized claims, publication and twin printings included, so a + # row order can't change which printing a claim cites + assert _rows(scores) == BASE_ROWS + assert I.summarise(acct) == I.summarise(base_acct) + + +BASE = I.stage() +BASE_ROWS = _rows(BASE[0]) + + +@settings(max_examples=40, deadline=None, suppress_health_check=[HealthCheck.too_slow]) +@given( + seed=st.integers(min_value=0, max_value=2**32 - 1), + share=st.floats(min_value=0.0, max_value=1.0), +) +def test_any_sample_of_the_harvest_closes_its_accounting(seed, share): + """read = ingested + dropped holds for every sample of rows, by family + and by reason, and no sample makes the ingest raise.""" + rng = random.Random(seed) + sample = { + (fam, i) + for fam, rows in RAW.items() + for i in range(len(rows)) + if rng.random() < share + } + scores, acct = I.stage(_numbered(sample)) + assert acct["read"] == len(sample) + assert acct["ingested"] == len(scores) + assert acct["ingested"] + acct["dropped"] == acct["read"] + assert sum(e["rows"] for e in acct["drops"].values()) == acct["dropped"] + for fam, v in acct["by_family"].items(): + assert v["ingested"] + v["dropped"] == v["read"] + assert v["read"] == sum(1 for f, _ in sample if f == fam) + base_ids = {s.claim_id() for s in BASE[0]} + assert {s.claim_id() for s in scores} <= base_ids | { + # a sample can keep a twin whose Table 6.1 row it left out + s.claim_id() + for s in scores + if s.publication["family"] in I._TWIN_FAMILIES + } + + +T61 = [ + (i, r) + for i, r in enumerate(RAW["uk_hmt_tables"]) + if r["conditions"].get("table") == "6.1" + and r["conditions"].get("row_type") == "measure" +] + + +@settings(max_examples=60, deadline=None) +@given( + pick=st.integers(min_value=0, max_value=len(T61) - 1), + family=st.sampled_from(sorted(I._TWIN_FAMILIES)), + nudge=st.one_of(st.just(0.0), st.floats(min_value=1.0, max_value=1e9)), +) +def test_a_copy_of_a_table_6_1_cell_is_a_twin_only_at_the_same_value( + pick, family, nudge +): + i, row = T61[pick] + twin = copy.deepcopy(row) + # a costings row prints the cell under its own conditions; a copy with + # the table row's conditions and another value would be one claim + # printed twice, which merge_republications refuses + twin["conditions"]["costing_leg_heading"] = "Exchequer impact (£m)" + twin["value"] = row["value"] + nudge + scores, acct = I.stage({"uk_hmt_tables": [(i, row)], family: [(99_999, twin)]}) + if nudge == 0.0: + assert acct["drops"]["hmt_figure_staged_twice"]["rows"] == 1 + assert len(scores) == 1 + assert scores[0].publication["also_printed_in"][0]["family"] == family + else: + assert "hmt_figure_staged_twice" not in acct["drops"] + assert acct["read"] == acct["ingested"] + acct["dropped"] == 2 + + +@given( + unit=st.sampled_from(["percent", "share", "gbp", "percentage_points", None]), + denominator=st.sampled_from(["GDP", "gdp", " GDP ", "Gdp", "GNI", "", None]), +) +def test_only_a_percent_of_gdp_moves_unit(unit, denominator): + row = {"unit_concept": unit, "proposed_unit": None, "conditions": {}} + if denominator is not None: + row["conditions"]["denominator"] = denominator + moved = I.unit_label(row) + is_gdp = unit == "percent" and (denominator or "").strip().lower() == "gdp" + assert moved == ("percent_of_gdp" if is_gdp else unit) + + +# --- the database -------------------------------------------------------------- + + +def test_round_trip_lanes_and_verdicts(tmp_path): + db_path = tmp_path / "t.db" + ScorecardDB(db_path).close() + feed = tmp_path / "lanes.json" # a copy: never the committed feed + shutil.copy(ROOT / "data" / "lanes.json", feed) + summary = I.ingest(db_path, feed) + I.ingest(db_path, feed) # idempotent + verdicts = I.ingest_verdicts(db_path) + conn = sqlite3.connect(db_path) + n = conn.execute( + "SELECT COUNT(*) FROM external_scores" + " WHERE json_extract(publication, '$.registry') = ?", + (I.REGISTRY_MARK,), + ).fetchone()[0] + assert n == summary["claims"] == I.expected()["ingested"] + gaps = conn.execute( + "SELECT COUNT(*) FROM external_scores" + " WHERE json_extract(conditions, '$.pe_expressibility') = 'not_expressible'" + ).fetchone()[0] + assert verdicts == {"pe_gap_results": gaps, "pe_gap_diagnoses": gaps} + lanes = dict( + conn.execute("SELECT lane, stage FROM lanes WHERE lane LIKE 'uk-ab2026-%'") + ) + assert lanes == {lane: "ingested" for lane in I.LANES} + conn.close() + fed = {lane["id"]: lane for lane in json.loads(feed.read_text())["lanes"]} + for lane in I.LANES: + assert fed[lane]["country"] == "UK" + + +# --- 6. AB2025 unchanged ------------------------------------------------------- + +_AB2025_DUMP = r""" +import json, shutil, sqlite3, sys, tempfile +from pathlib import Path +from scorecard_db import ScorecardDB +from scorecard_db import ingest_uk_ab2025 as A +out = Path(sys.argv[1]) +tmp = Path(tempfile.mkdtemp()) +db = tmp / "t.db"; ScorecardDB(db).close() +feed = tmp / "lanes.json"; shutil.copy(A.REPO / "data" / "lanes.json", feed) +A.ingest(db, feed); A.ingest_verdicts(db) +conn = sqlite3.connect(db) +def dump(sql): + return sorted(json.dumps(list(r), default=str) for r in conn.execute(sql)) +out.write_text(json.dumps({ + "claims": dump("SELECT claim_id, source, metric, period, value, conditions, publication, baseline_key FROM external_scores"), + "results": dump("SELECT claim_id, status, engine_version, pe_construction, annotations FROM pe_results"), + "diagnoses": dump("SELECT * FROM diagnoses"), + "lanes": dump("SELECT lane, stage, detail FROM lanes"), +})) +""" + + +def _ab2025_dump(tree: Path, out: Path): + subprocess.run( + [sys.executable, "-c", _AB2025_DUMP, str(out)], + cwd=tree, + env={**os.environ, "PYTHONPATH": str(tree)}, + check=True, + capture_output=True, + text=True, + ) + return json.loads(out.read_text()) + + +def _main_ref(): + for ref in ("origin/main", "main"): + ok = subprocess.run( + ["git", "rev-parse", "--verify", "--quiet", ref], + cwd=ROOT, + capture_output=True, + ) + if ok.returncode == 0: + return ref + return None + + +def test_ab2025_ingest_matches_main(tmp_path): + """AB2025's claims, pe_gap results, diagnoses and lanes come out byte + for byte as on main. CI fetches origin/main, so there a missing ref + fails; a local checkout without one skips.""" + if _main_ref() is None: + if os.environ.get("GITHUB_ACTIONS"): + pytest.fail("CI must fetch origin/main for the AB2025 differential") + pytest.skip("no main ref in this checkout") + main = tmp_path / "main" + main.mkdir() + archive = subprocess.run( + [ + "git", + "archive", + _main_ref(), + "scorecard_db", + "be", + "nz", + "data/uk", + "data/lanes.json", + "sources/harvest-uk-ab2025-2026-09-24", + ], + cwd=ROOT, + capture_output=True, + check=True, + ).stdout + subprocess.run(["tar", "-x", "-C", str(main)], input=archive, check=True) + theirs = _ab2025_dump(main, tmp_path / "main.json") + ours = _ab2025_dump(ROOT, tmp_path / "ours.json") + for table in ("claims", "results", "diagnoses", "lanes"): + assert ours[table] == theirs[table], table + + +# --- value preservation --------------------------------------------------------- + + +def _staged_unit(row): + unit = row.get("unit_concept") or row.get("proposed_unit") + denominator = str((row.get("conditions") or {}).get("denominator", "")) + if unit == "percent" and denominator.strip().lower() == "gdp": + return "percent_of_gdp" + return {"dwellings": "properties"}.get(unit, unit) + + +# The one row whose stored unit the ingest overrides, apart from I.ROW_UNITS: +# (family, locator, printed value) -> unit +STORED_UNITS = {("uk_ifs_ab2026", "slide 4", "£80"): "gbp_per_household"} + + +def _keeps_conditions(row, score): + """Require each staged condition on the claim as staged. For a condition the + ingest canonicalises, require the registered name and the staged text beside + any name that differs. For a program we haven't registered, require the staged + text alone.""" + for key, value in (row.get("conditions") or {}).items(): + stored = score.conditions.get(key) + verbatim = score.conditions.get(f"{key}_verbatim") + if key == "program" and value not in known(row["source"], key): + kept = stored is None and verbatim == value + elif key == "program" or key in I.AB25._CANONICALISED: + name = canon(row["source"], key, value) + kept = stored == name and verbatim == (None if name == value else value) + else: + kept = stored == value + if not kept: + return False + return True + + +_CHILDCARE = "free childcare entitlement (claimed and received some)" + + +@pytest.mark.parametrize( + "row, stored", + [ + ( + {"source": "centax", "conditions": {"program": _CHILDCARE}}, + {"program": "winter_fuel_payment"}, + ), + ( + {"source": "centax", "conditions": {"program": _CHILDCARE}}, + {"program": "winter_fuel_payment", "program_verbatim": _CHILDCARE}, + ), + ( + {"source": "centax", "conditions": {"program": _CHILDCARE}}, + {}, + ), + ( + {"source": "ukmod", "conditions": {"program": "winter_fuel_allowance"}}, + {"program": "winter_fuel_payment"}, + ), + ( + {"source": "ukmod", "conditions": {"program": "winter_fuel_allowance"}}, + {"program": "fuel", "program_verbatim": "winter_fuel_allowance"}, + ), + ( + {"source": "centax", "conditions": {"basis": "forecast"}}, + {"basis": "outturn", "basis_verbatim": "forecast"}, + ), + ( + {"source": "centax", "conditions": {"housing_costs": "BHC"}}, + {"housing_costs": "AHC", "housing_costs_verbatim": "BHC"}, + ), + ( + {"source": "centax", "conditions": {"geography": "England"}}, + {"geography": "UK", "geography_verbatim": "England"}, + ), + ( + {"source": "obr", "conditions": {"geography": "NI"}}, + {"geography": "Northern Ireland"}, + ), + ], +) +def test_preservation_rejects_a_lost_condition(row, stored): + assert not _keeps_conditions(row, SimpleNamespace(conditions=stored)) + + +@pytest.mark.parametrize( + "row, stored", + [ + ( + {"source": "centax", "conditions": {"program": _CHILDCARE}}, + {"program_verbatim": _CHILDCARE}, + ), + ( + {"source": "ukmod", "conditions": {"program": "winter_fuel_allowance"}}, + { + "program": "winter_fuel_payment", + "program_verbatim": "winter_fuel_allowance", + }, + ), + ( + {"source": "centax", "conditions": {"basis": "forecast"}}, + {"basis": "forecast"}, + ), + ( + {"source": "centax", "conditions": {"geography": "England"}}, + {"geography": "England"}, + ), + ( + {"source": "obr", "conditions": {"geography": "NI"}}, + {"geography": "Northern Ireland", "geography_verbatim": "NI"}, + ), + ], +) +def test_preservation_accepts_what_the_ingest_keeps(row, stored): + assert _keeps_conditions(row, SimpleNamespace(conditions=stored)) + + +@pytest.mark.parametrize( + "name, verbatim", + [("childcare", _CHILDCARE), (_CHILDCARE, None)], +) +def test_a_registered_program_keeps_its_text_beside_a_new_name( + monkeypatch, name, verbatim +): + """No staged program takes this path, so we register CenTax row 100's text.""" + registered = canon + + def canonical(source, axis, value): + return name if axis == "program" else registered(source, axis, value) + + monkeypatch.setattr(I, "known", lambda source, axis: {_CHILDCARE}) + monkeypatch.setattr(I, "canon", canonical) + row = RAW["uk_centax"][100] + assert row["conditions"]["program"] == _CHILDCARE + score = I._score(row, "uk_centax", row["source"], Metric.AFFECTED_SHARE) + assert score.conditions["program"] == name + assert score.conditions.get("program_verbatim") == verbatim + + +def test_every_claim_preserves_its_staged_row(staged): + """Read each family's claims file directly, find the row behind each + claim by its printed place and printed value, and require the claim to + keep the producer's value, unit, conditions and provenance. + Sign rule: the ingest stores the value as staged, in the producer's own + orientation, and signs.py reads the orientation at comparison.""" + index = {} + for fam, rows in RAW.items(): + for r in rows: + loc = (r.get("publication") or {}).get("locator") + index.setdefault( + (fam, loc, r.get("source_column") or "", str(r["value_raw"])), [] + ).append(r) + scores, _ = staged + for s in scores: + fam = s.publication["family"] + stored_unit = STORED_UNITS.get( + (fam, s.publication.get("locator"), s.conditions["value_verbatim"]) + ) + found = index.get( + ( + fam, + s.publication.get("locator"), + s.source_column, + s.conditions["value_verbatim"], + ) + ) + assert found, (fam, s.publication.get("locator")) + assert any( + float(r["value"]) == s.value + and (stored_unit or _staged_unit(r)) == s.unit_concept.value + and (r.get("value_kind") or s.unit_concept.value) == s.value_kind + and s.conditions.get("estimate_kind") + == (r.get("value_kind") if r.get("value_kind") != "point" else None) + and int(r["period"]) == s.period + and r["time_basis"] == s.time_basis.value + and r.get("quote") == s.publication.get("quote") + and r.get("source_table") == s.publication.get("table") + and r["attribution"] == s.publication.get("attribution") + and _keeps_conditions(r, s) + for r in found + ), (fam, s.publication.get("locator"), s.value) + + +# --- guards the mutation runs found untested ---------------------------------- + + +def test_each_ab2026_disposition_lands_on_its_metric(staged): + """Every AB2026 adoption emits claims on its assigned metric.""" + scores, _ = staged + pins = { + "financial_transaction_cash_impact": Metric.CASH_REQUIREMENT_CHANGE, + "unaffected_share": Metric.SHARE_NO_CHANGE, + } + assert set(pins) == set(I.DISPOSITIONS_AB2026) + for name, metric in pins.items(): + got = {s.metric for s in scores if s.conditions.get("staged_metric") == name} + assert got == {metric}, name + + +def test_ingest_checks_the_accounting_before_writing(tmp_path, monkeypatch): + db_path = tmp_path / "t.db" + ScorecardDB(db_path).close() + monkeypatch.setattr(I, "expected", lambda: {"read": -1}) + with pytest.raises(ValueError, match="accounting drifted"): + I.ingest(db_path, tmp_path / "lanes.json") + conn = sqlite3.connect(db_path) + assert conn.execute("SELECT COUNT(*) FROM external_scores").fetchone()[0] == 0 + + +def test_verdict_rows_refuses_a_claim_the_registry_contradicts(tmp_path): + db_path = tmp_path / "t.db" + ScorecardDB(db_path).close() + feed = tmp_path / "lanes.json" + shutil.copy(ROOT / "data" / "lanes.json", feed) + I.ingest(db_path, feed) + key = next( + k + for k, m in I.REGISTRY.items() + if m["computability"] == "partial" + and k + in { + s.conditions.get("measure_key") + for s in BASE[0] + if s.metric not in I.AB25.MACRO_METRICS + } + ) + conn = sqlite3.connect(db_path) + conn.execute( + "UPDATE external_scores SET conditions = json_set(conditions," + " '$.pe_expressibility', 'not_expressible')" + " WHERE json_extract(conditions, '$.measure_key') = ?", + (key,), + ) + conn.commit() + conn.close() + db = ScorecardDB(db_path) + with pytest.raises(ValueError, match="in the registry"): + I.verdict_rows(db) + db.close() + + +@pytest.mark.parametrize( + "mark", [{"component": "rate rise"}, {"row_type": "measure_component"}] +) +def test_a_part_of_a_measure_is_never_a_twin_of_the_whole(mark): + """Rule 9: a component that equals its line's cell stays a claim.""" + i, row = T61[0] + part = copy.deepcopy(row) + part["conditions"].update(mark) + part["conditions"]["costing_leg_heading"] = "Exchequer impact (£m)" + scores, acct = I.stage( + {"uk_hmt_tables": [(i, row)], "uk_hmt_costings": [(99_999, part)]} + ) + assert "hmt_figure_staged_twice" not in acct["drops"] + assert len(scores) == 2 + + +def test_a_reviewed_twin_that_is_a_component_raises(monkeypatch): + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[6]["conditions"]["row_type"] = "measure_component" + with pytest.raises(ValueError, match="REVIEWED_TWINS"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def _point_twin(monkeypatch, row, table_row): + key = ("uk_hmt_redbook", row) + monkeypatch.setitem(I.REVIEWED_TWINS, key, (table_row, I.REVIEWED_TWINS[key][1])) + + +def test_a_reviewed_twin_on_another_key_raises(monkeypatch): + red_book = RAW["uk_hmt_redbook"][11] + other = next( + i + for i, r in enumerate(RAW["uk_hmt_tables"]) + if abs(r["value"]) == abs(red_book["value"]) + and r["period"] == red_book["period"] + and r.get("measure_key") != red_book.get("measure_key") + ) + _point_twin(monkeypatch, 11, other) + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", RAW["uk_hmt_redbook"]) + + +def test_a_reviewed_twin_of_a_zero_cell_raises(monkeypatch): + """We give red book row 11 table row 108's year; their keys already match, + so only the ingest's magnitude check can raise.""" + assert RAW["uk_hmt_tables"][108]["value"] == 0 + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[11]["period"] = RAW["uk_hmt_tables"][108]["period"] + _point_twin(monkeypatch, 11, 108) + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def test_a_reviewed_twin_of_another_year_raises(monkeypatch): + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[11]["period"] += 1 + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def test_ukraine_s_explanation_grants_another_row_no_year_exception(monkeypatch): + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[11]["period"] += 1 + monkeypatch.setitem(I.REVIEWED_TWINS, ("uk_hmt_redbook", 11), (109, I._UKRAINE)) + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", rows) + + +@pytest.mark.parametrize("period", [2025, 2028, 2031]) +def test_a_ukraine_row_in_any_other_year_raises(period): + """We stage 2026, the announcement year, on these rows, and the table's cell + for 2026-27 has period 2027, the only other year that matches.""" + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[263]["period"] = period + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def test_a_ukraine_row_keeps_its_table_cell_for_the_year_exception(monkeypatch): + """We grant the year exception for table row 252 alone and reject another + row with the same key, magnitude and year.""" + table = copy.deepcopy(RAW["uk_hmt_tables"]) + table.append(copy.deepcopy(table[252])) + monkeypatch.setattr(I, "_load", lambda family: table) + _point_twin(monkeypatch, 263, len(table) - 1) + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", RAW["uk_hmt_redbook"]) + + +@pytest.mark.parametrize( + "raw", + [ + "in 2026-27, £2.6 billion", + "£2.6bn", + "2,600 million", + "around £2.6 billion", + "£2, million", + "£2,6 billion", + "£26,00 million", + "£2600, million", + "£1,2345 million", + ], +) +def test_a_reviewed_twin_printed_in_another_form_raises(raw): + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[6]["value_raw"] = raw + with pytest.raises(ValueError, match="no printed amount"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def test_a_reviewed_twin_whose_value_leaves_its_print_raises(): + """We cannot widen the ingest's tolerance by storing a value that differs + from the printed amount.""" + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[6]["value"] = 2.675e9 + with pytest.raises(ValueError, match="printed amount"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def test_a_reviewed_twin_printed_as_zero_raises(): + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[6].update(value=0, value_raw="£0 million") + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", rows) + + +def test_a_reviewed_twin_outside_the_printed_rounding_raises(monkeypatch): + rows = copy.deepcopy(RAW["uk_hmt_redbook"]) + rows[6].update(value=2.7e9, value_raw="£2.7 billion") + with pytest.raises(ValueError, match="no longer matches"): + I._check_row_calls("uk_hmt_redbook", rows) + + +@given(st.integers(1, 99_999), st.integers(0, 3), st.booleans()) +def test_the_printed_unit_follows_the_last_printed_digit(digits, places, billions): + number = digits / 10**places + word, scale = ("billion", 1e9) if billions else ("million", 1e6) + raw = f"£{number:,.{places}f} {word}" + unit = I._printed_unit({"value": number * scale, "value_raw": raw}) + assert unit == pytest.approx(scale / 10**places) + + +def test_the_stage_checks_its_row_calls(monkeypatch): + monkeypatch.setitem( + I.ROW_DROPS, ("uk_obr_tables", 0), ("not this value", "no_registered_metric") + ) + with pytest.raises(ValueError, match="no longer matches"): + I.stage() + + +def test_a_recosting_takes_no_registry_verdict(): + key = next(k for k, m in I.REGISTRY.items() if m["computability"] == "partial") + cond = {"recosting_of": "autumn_budget_2025"} + I._verdict_conditions({"measure_key": key}, cond, Metric.REVENUE_CHANGE) + assert cond["measure_key"] == key + assert "pe_expressibility" not in cond + + +@pytest.mark.parametrize("attached", [False, True]) +@pytest.mark.parametrize( + "field", + ["access", "date", "locator", "primary_sha256", "publisher", "title", "url"], +) +def test_row_order_never_decides_a_printing_that_differs_in_one_field(field, attached): + """We choose the same primary printing after changing any harvested + publication field and reversing the rows.""" + i, row = T61[0] + assert field in row["publication"] + a, b = copy.deepcopy(row), copy.deepcopy(row) + a["publication"][field] = "a" + b["publication"][field] = "b" + twin = copy.deepcopy(row) + twin["conditions"]["costing_leg_heading"] = "Exchequer impact (£m)" + twin["publication"]["locator"] = "costings" + + def kept(first, second): + families = {"uk_hmt_tables": [(i, first), (i + 10_000, second)]} + if attached: + families["uk_hmt_costings"] = [(1, twin)] + [claim], _ = I.stage(families) + return claim.publication + + forward, backward = kept(a, b), kept(b, a) + assert forward[field] == backward[field] == "b" + if attached: + assert forward["also_printed_in"] == backward["also_printed_in"] + assert len(forward["also_printed_in"]) == 1 + + +def test_a_printing_s_twins_never_move_the_tie_breaker(): + """We omit ``also_printed_in`` from the tie-breaker because we attach a + costings repetition to the table printing we encounter last.""" + i, row = T61[0] + a, b = copy.deepcopy(row), copy.deepcopy(row) + a["publication"]["url"] = "https://example.org/a" + b["publication"]["url"] = "https://example.org/b" + twin = copy.deepcopy(row) + twin["conditions"]["costing_leg_heading"] = "Exchequer impact (£m)" + twin["publication"]["locator"] = "costings" + for first, second in ((a, b), (b, a)): + [kept], _ = I.stage( + { + "uk_hmt_tables": [(i, first), (i + 10_000, second)], + "uk_hmt_costings": [(1, twin)], + } + ) + assert kept.publication["url"] == "https://example.org/b" + assert [t["locator"] for t in kept.publication["also_printed_in"]] == [ + "costings" + ] + + +def test_a_merged_printing_keeps_its_twins(): + """Two printings of one Table 6.1 claim merge; a costings repetition + attached to the printing the merge drops moves to the one it keeps.""" + i, row = T61[0] + a, b = copy.deepcopy(row), copy.deepcopy(row) + a["publication"]["locator"] = "z" # sorts above b, so the merge keeps a + b["publication"]["locator"] = "a" + twin = copy.deepcopy(row) + twin["conditions"]["costing_leg_heading"] = "Exchequer impact (£m)" + twin["publication"]["locator"] = "costings" + scores, acct = I.stage( + {"uk_hmt_tables": [(i, a), (i + 10_000, b)], "uk_hmt_costings": [(1, twin)]} + ) + assert acct["drops"]["republished_twin_merged"]["rows"] == 1 + assert acct["drops"]["hmt_figure_staged_twice"]["rows"] == 1 + [kept] = scores + assert kept.publication["locator"] == "z" + assert [t["locator"] for t in kept.publication["also_printed_in"]] == ["costings"] + + +@pytest.mark.parametrize( + "family, row, reading", + [ + # phrases on rows the ingest drops before any claim forms + ("uk_obr_tables", 2738, ("opposite", "stated:exchequer:opposite")), + ("uk_ifs_ab2026", 53, ("opposite", "stated:household_gain:opposite")), + ("uk_thinktank_misc", 9, ("same", "stated:household_gain:same")), + ("uk_obr_tables", 2742, ("same", "stated:higher_output:same")), + ( + "uk_obr_tables", + 2658, + ("unknown", "stated:higher_inflation:not_this_quantity"), + ), + ], +) +def test_sign_phrases_on_dropped_rows_read_as_reviewed(family, row, reading): + r = RAW[family][row] + metric = r.get("metric") or r.get("proposed_metric") + got = signs.classify( + {"metric": metric, "conditions": r["conditions"], "country": "UK"} + ) + assert got == reading