Skip to content

Ingest the Autumn Budget 2026 harvest (tranche 2 of #230) - #247

Merged
MaxGhenis merged 27 commits into
mainfrom
uk/ab2026-tranche2
Nov 5, 2026
Merged

MaxGhenis merged 27 commits into
mainfrom
uk/ab2026-tranche2

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

In tranche 2 of #230, we register the 86 keys we proposed in tranche 1, settle #231's pre-ingest items and ingest the Autumn Budget 2026 harvest. We branched from #231, which merged as f6edbdf6, and retargeted this PR to main. In tranche 3 we add PolicyEngine counterparts to these claims.

Changes

Keys

  • pipeline/ab2026_key_decisions.py records a decision for each proposed key: its scope from the family's NOTES.md, its kind and its registry verdict.
  • We register all 86 keys and fold none, because no proposed scope matches a registered key, or another proposed key, line for line (rule 3). We expand the registry from 104 to 190 measures: 17 expressible, 33 partial and 140 not expressible.
    • Packages of exact legs (22). We register a package as package_of those keys when we record every leg in NOTES, and the builder computes its verdict from them. We build 21 of them from Table 6.1 lines and package_non_scorecard_decisions from two measures with no line. The builder assigns two expressible, nine partial and the other 11 not_expressible, because the engine expresses none of their legs.
    • Receipts of lines (4). We register the OBR's Table 3.1 tax groups as receipts_of their lines. A run gives each leg's whole effect and not its receipts head, so the builder assigns partial to the two groups with an expressible leg and not_expressible to the other two.
    • Producer scopes (33). We register 32 other packages and one option, RF's tax decisions with a continued fuel duty freeze, with the producer's words in package_of under the producer_scope construction. The builder assigns partial to the 16 that contain registered measures and not_expressible to the other 17, which fall outside the household model.
    • Measures and options with their own verdicts (27). The builder gives the 15 measures with no Table 6.1 line and 12 options their own verdicts at policyengine-uk 2.151.0: four deltas on current law, two partial and 21 not expressible. The builder gives each partial or not-expressible entry a computed name search, and it gives the triple lock change, LHA unfreezing and both childcare limit options a delta and their baseline parameters instead.
  • We register ab2026__package_parliament_welfare_fraud_and_error_savings as ab2026__package_welfare_fraud_and_error_savings_in_forecast (review A's RB-8). In red book paragraph 5.17, HM Treasury counts this Budget's measures with those already in the forecast and names no Parliament, and we keep the old name in the entry's proposed_as.
  • Staged rows. Add the Autumn Budget 2026 registry and harvest (tranche 1 of #230) #231's contract checker rejects a registered key left in proposed_measure_key, so pipeline/apply_ab2026_key_decisions.py moves the key into measure_key on 973 rows in ten families and drops the condition. It changes nothing else in a row, and it writes each file in the stagers' format.
    • We re-pinned COUNTS.json with pipeline/harvest_counts.py and regenerated PROPOSED_KEYS.md with no keys.
    • The same script writes KEY_DECISIONS.md from the rewritten rows, with every key's decision, verdict, reason, scope and rows by family and row number.
    • The Table 6.2 stager now writes the registered keys for line 6 and the table's total.

Pre-ingest items from #231's plan

  • Signs. Tranche 1's signs.py left 26 staged rows, under 19 conventions, unrecognised. This version reads 23 of those rows, under 16 conventions, as same or opposite. It reads the other three conventions as stating that no sign applies: the OBR's behavioural erosion of the bank surcharge's yield, business rates flowing to local government, and a CPI bound with no direction.
    • signs.py also reads the phrases on rows whose metric the ingest decides: Table 6.2's cash inflow and the red book's "saving or gain".
    • We pin 16 more pairs in the harvest fixture, and the six pairs the ingest's metric calls make in tests/fixtures/ab2026_ingest_sign_readings.json.
    • Main's and tranche 1's signs.py read all 29,894 of main's exported rows (data/populations.json and data/populations-pmd/) as this version does.
  • Shares of GDP. The ingest puts a percent row with a GDP denominator on percent_of_gdp, the unit the OBR and TPA use. We stage 33 such rows from IFS, and the ingest drops the 32 that restate the OBR before any metric applies. It drops IFS's own 0.2% tax change, with the OBR's and TPA's shares, as macro-fiscal.
  • HM Treasury figures staged twice. HM Treasury repeats 408 Table 6.1 cells in the costings, covering six annual exchequer impacts for 68 lines, and repeats 24 cells in the red book. The ingest keeps the Table 6.1 or 6.2 claim, lists each repetition under publication.also_printed_in, and tallies the 432 repetitions as hmt_figure_staged_twice.
    • HM Treasury repeats 15 cells exactly in the red book, and the ingest finds them by key, staged metric, unit, year and value.
    • In nine more red book rows HM Treasury repeats a cell with the opposite sign, a rounding or another year: rows 6, 179, 11, 236, 220, 270, 263, 271 and 272. We map each to its Table 6.1 row and record the reason in REVIEWED_TWINS. In Ukraine's entry, we preserve the red book's "this winter" while identifying the matching Table 6.1 cell as 2026-27.
    • The ingest never treats a part of a measure (rule 9) as a repetition of the whole. It raises if a reviewed row turns into a component or stops matching its Table 6.1 row: a different key, a magnitude more than half the red book's last printed digit away, or a different year anywhere but Ukraine's entry.
  • Financial transactions. The ingest puts financial_transaction_cash_impact (60 Table 6.2 rows and one costings row) on cash_requirement_change, the metric we stage for the OBR on row 2684.
  • The continued fuel duty freeze. We retain OBR row 2740 on decisions_effect_on_borrowing, because the OBR states the option's effect on public sector net borrowing. We apply the macro verdict under OBR published economic + behavioural effects of policy: the Scorecard entry point for PolicyEngine Macro members #55.
  • The OBR workbook's receipts total. The ingest keeps OBR rows 2190–2195 on revenue_change, and drops RF's restatement of them in rows 385–390 under Ingest the two harvested-but-unused UK think-tank families: IFS (268) + Resolution Foundation (71) #86 before any metric applies.
  • AB2025's name search (640bdd3, reverted in 070113e). We sorted build_ab2025_registry.py's variables, as we did for AB2026 in Add the Autumn Budget 2026 registry and harvest (tranche 1 of #230) #231, and regenerated the registry at 2.89.2. In the registry we changed only the variable lists of 37 name searches. We recorded in 640bdd3's message that build_ab2025_registry.py --check and a --resolve run passed, but not which registry that run resolved. We also reordered the annotations of 212 AB2025 pe_gap rows in data/populations.json and broke the registry's byte pin in tests/test_uk_replay_legacy.py. We reverted the sort here, and in Sort the AB2025 registry's name searches #251 we sorted the variables on main, with the regenerated feed and a new pin.

The ingest

scorecard_db/ingest_uk_ab2026.py turns 5,952 rows into 4,687 claims and 1,265 tallied drops. We pin the counts per family in ingest_uk_ab2026_expected.json, and ingest_verdicts writes 3,172 pe_gap results and diagnoses.

reason rows
restated figure (#86) 450
HM Treasury figure staged twice 432
macro-fiscal or out of scope 206
energy bill level 35
unit with no household concept 21
parameter or threshold level 17
share at a level with no registered metric 17
ratio or derived quantity 15
behavioural input or tax base 14
single-household case 10
no registered metric 9
income path with no reform 9
categorical rating 7
one producer's twin printing 6
RF's restatement of the OBR's fuel duty forecast 6
marginal rate with no registered metric 4
IFS's partial-year household support 3
world named once 3
CenTax's 2024 estimate restated 1

The ingest reuses ingest_uk_ab2025's helpers for its order of drops, its dispositions, drop reasons, units and conditions, its engine and world checks, the macro verdict (#55), the claim-id gate and the pe_gap verdict rows. Dropping restated rows first stops a restated figure from landing on a registered metric.

The AB2026 ingest adds these steps:

  • We decide the 66 metric names that AB2025's tables don't cover through DISPOSITIONS_AB2026 and DROP_BY_NAME_AB2026: two adoptions and 64 drops.
  • We record each row call and its expected staged value in ROW_METRICS or ROW_DROPS, and the ingest raises if a stager moves the row. We assign IFS row 46 its per-household unit through ROW_UNITS.
  • We assign no registry verdict to a recosting: we assessed AB2025 at 2.89.2, and we use 2.151.0 for AB2026 counterparts in tranche 3.
  • merge_republications merges two printings of one claim by one producer, as in AB2025, and here it merges six pairs: one red book count and five RF figures. It keeps the printing with more digits and breaks a tie on the printing's provenance, so row order never decides which printing a claim cites.
  • The ingest holds back from the page TPA's 26 rows on the countries TPA compares the UK with, as AB2025's ingest held back TPA's constituency rows.
  • We add three lanes here, and advance_lanes with the counterparts in tranche 3.

We register the OBR's pre-measures October 2026 world in baselines.py, as AB2025 registered November 2025's. We also add the aliases the claims use and a held-out relationship for Citizens Advice, the one new producer whose claim reaches the DB.

Invariants (tested)

  1. Accounting. read = ingested + dropped holds per family and in total, against the 5,952 rows COUNTS.json pins, with a reason of over 80 characters for each drop. Hypothesis samples the harvest at any share and requires the identity for every sample, by family and by reason.
  2. Keys. Each keyed claim names an AB2026 registry entry, or for a recosting an entry in the earlier event's registry, and no claim names a proposed key. We copy the AB2026 verdict for non-macro claims, omit it for recostings, and assign every macro claim not_expressible under OBR published economic + behavioural effects of policy: the Scorecard entry point for PolicyEngine Macro members #55. We give 408 claims no key: income levels and growth paths, earlier policies, and other quantities no producer ties to one measure, plus eight macro-fiscal claims, which take the macro verdict.
  3. One claim per id, and one for each HM Treasury figure. No two claims share an id, and a scan independent of the twin matcher reads every costings and red book claim outside a component through signs.classify. It flags any claim within 5% of a Table 6.1 or 6.2 claim on its key and metric, in any year. The test requires each hit to appear in the reviewed twin table or a reasoned allow-list, and we allow none.
  4. Signs. We compare each claim's sign with the reading we recorded in one of two fixtures, and require an explanation whenever an oriented claim lacks a direction.
  5. Values. A test reads the staged files directly and checks each claim's value, unit, value_kind, estimate kind, every staged condition, period, time basis, quote, table and attribution, and it pins the one unit the ingest overrides, on IFS row 46. The ingest stores each value in the producer's orientation, and signs.py reads that orientation at comparison.
  6. Determinism. Two runs give the same claims, and Hypothesis shuffles every family's rows and requires the same serialized claims, publication included.
  7. AB2025 unchanged. A differential test runs AB2025's ingest and verdicts on this branch and on git archive origin/main, and requires the claims, pe_gap results, diagnoses and lanes to match byte for byte. CI's python job fetches origin/main, and under GITHUB_ACTIONS the test fails if it finds no main ref.

Judgment calls

  • No folds. We kept RF's lines 1 and 2, and the OBR's receipts groups, apart from the line-total packages, since their scopes differ.
  • Rewriting staged rows. We moved the keys into the rows rather than resolve them at ingest, because Add the Autumn Budget 2026 registry and harvest (tranche 1 of #230) #231's checker would otherwise reject every row whose proposed key we register.
  • Producer scopes. We kept a producer's words out of package_of_registry_measures, since the tests read that list as keys.
  • Packages with no expressible leg. The builders give such a package not_expressible, with each leg's gap and name search, so its claims get a pe_gap verdict.
  • Verdicts.
    • We register the triple lock change as expressible, since the engine documents include_earnings false and earnings_path_guarantee true from 2030 for it.
    • We list the minimum wage rise as a development item, since the engine takes employment_income as an input.
    • We express LHA unfreezing and both childcare limit options as deltas on current law.
    • We give CenTax's CGT package and the continued fuel duty freeze partial, and we didn't write a delta for the freeze because its baseline rests on line 3's dashboard modifier.
  • Financial transactions on cash_requirement_change. models.py defines that metric as the PSNCR effect, so we didn't mint a metric for the costings' name.
  • The fuel duty freeze. We retain OBR row 2740 on decisions_effect_on_borrowing, because the OBR states the option's effect on public sector net borrowing. We apply the macro verdict under OBR published economic + behavioural effects of policy: the Scorecard entry point for PolicyEngine Macro members #55. RF derives its figure from the OBR's constant-duty-rate receipts less the OBR's central forecast (its footnote 27), so the ingest tallies RF's rows 154 and 397–401 as a restatement and keeps the OBR's estimate alone.
  • IFS household averages. IFS gives £80 average support from January 2027's one-off Household Energy Payment, which we retain on average_household_income_change in gbp_per_household. We tally its other three household-support rows because their partial-year periods don't match an annual comparison.
  • RF's income paths. In nine real_income_change rows, RF gives outturns or forecast paths for real incomes without estimating a reform's effect. We tally those pound amounts because we use real_income_growth for percentages and average_household_income_change for policy effects.
  • CenTax's percentages. The ingest tallies the 62% as a ratio and the 88%, CenTax's 2024 estimate, as an earlier estimate restated.
  • Business gains and maximum gains. The ingest drops the red book's average gains per pub and per small business (rows 222 and 233) as it drops business savings. It drops IFS's maximum gain per beneficiary as a statistic with no registered metric.
  • RF's bill cells. We stage −26.774190681839883 and −12.801764200129682 on RF's energy_bill_change rows 237 and 242. RF stores those values in cells H11 and H12 of sheet F7 in the chart-data workbook it links from its report, and prints no label on the chart, so the ingest keeps the workbook's values.
  • The receipts total on revenue_change. Moving the OBR's total to the borrowing metric would repeat Table 3.1's direct effect of tax measures, and the ingest drops RF's restatement without restaging it.
  • Worlds. We registered the OBR's AB2026 pre-measures world rather than leave the rows with no baseline.
  • Signs. We read business rates flowing to local government and the behavioural erosion of a yield as quantities with no sign for the claim, not as yields.
  • AB2025's name search. We reverted the sort here, since regenerating data/populations.json and re-pinning the legacy hash belong in their own PR, Sort the AB2025 registry's name searches #251.

The public site

Merging changes nothing the site shows, since scorecard_db/build_db.py doesn't call ingest_uk_ab2026, and build_db.py doesn't regenerate data/populations.json either. Wiring the ingest in would add three lanes, 4,687 claims (4,661 of them on the page before any counterpart) and 3,172 pe_gap verdicts, and Max decides that step with tranche 3.

Checks

  • At 3812ce4d, the coordinator ran pipeline/stage_ab2026_hmt_tables.py against the two pinned gov.uk workbooks and matched the committed rows byte for byte, 768 rows, and the dashboard receipt tests passed locally, 10 of 10.
  • At 8a3e4982, build_ab2026_registry.py --check reports byte-identical at policyengine-uk 2.151.0, validate_budget_2026_registry.py --registry data/uk/ab2026_measures.json --resolve resolves 30 paths, and render() reproduces KEY_DECISIONS.md. Between that commit and a28223f2 we changed no registry file, builder or generated text.
  • The contract checker finds no problem in any of the 12 families.

Review fixes

GPT-6.1 Sol and a cloud session reviewed 3812ce4d, and both requested changes. We answered them in commits dccb4f7 to 589f8229.

  • Treasury repetitions (Sol 1, cloud F1). We added the reviewed twin table, which drops nine red book claims, and the scan in invariant 3.
  • Packages with no expressible leg (Sol 2, cloud F2). We moved thirteen registry entries from partial to not_expressible, which gave 50 claims a pe_gap verdict.
  • Household averages, income paths, percentages and the fuel duty freeze (Sol 3, cloud F3–F5). We tallied the 4 IFS, 9 RF income, 2 CenTax and 6 RF fuel duty rows, and in b8af2152 we restored one of the IFS rows.
  • Provenance order (Sol 4, cloud F8). We gave merge_republications a stable tie-breaker, and it moves also_printed_in to the kept claim.
  • Value preservation (Sol 5). We added invariant 5's test, which fails when the ingest multiplies IFS values by 1,000 or drops quotes.
  • The AB2025 differential (Sol 6). CI now fetches origin/main for the differential test. An earlier version of this description said build_db.py regenerates data/populations.json, which it doesn't.
  • Drop reasons and sign phrases (Sol 7, cloud F8, F9). We rewrote the new drop reasons for site readers and removed the claim that we staged each figure's originator in this harvest. We also tightened "borrowing increase" and "spending reduction" to "positive = …", and added "positive = welfare spending reduction" for OBR row 2659, which the bare phrase had read.
  • Mutants (Sol D, cloud F6). We added tests for the surviving mutants the reviewers listed.
  • Text (Sol 8 and 9, cloud F7 and F9). We corrected the counts this description gave and removed tranche and review history from registry notes and KEY_DECISIONS.md.

The reviews of 589f8229, at b8af2152

GPT-6.1 Sol and a cloud session reviewed 589f8229, and both requested changes. We answered them in b8af2152, and in 0193b91f we merged #231's 4dd5281d and, through it, main with #251.

  • IFS's one-off payment (Sol R1). We had tallied IFS's £80 with its partial-year averages, though the whole payment falls in 2026-27. At b8af2152, we restored IFS row 46 and produced 4,687 claims, 1,265 drops and 3,171 gaps.
  • Values (Sol R2). Sol replaced every statistic with "median" and corrupted every horizon, and the preservation test still passed; it now also checks statistic, horizon, component_horizon and the estimate kind.
  • Reviewed twins (cloud 4, Sol R8). The ingest now raises if a reviewed row and its Table 6.1 row differ in key, in magnitude by more than half the red book's last printed digit, or in year outside Ukraine's entry. A test pins all nine rows and their table cells independently of REVIEWED_TWINS.
  • The tie-breaker (Sol R9). Depending on row order, the ingest could keep either of two printings that differed only in their URL, though we stage no such pair. The tie-breaker now reads every primary publication field except also_printed_in.
  • Drop reasons (cloud 3, 5, 6; Sol R4, R5, R11). We rewrote RF's two reasons, gave AB2026 its own text for no_registered_metric and mtr_no_registered_metric, and removed the promise that we score each restated figure under its originator, and we split the three reasons of over 40 words.
  • Text (cloud 1, 2, 7, 8; Sol R3, R6, R7, R10, R11). We corrected the commit range, the mutant bullet, invariant 2's account of the macro verdict, the costings' coverage and Ukraine's entry. We gave the actions in KEY_DECISIONS.md, the generated reasons and the registry's 13 why strings to their actors, and we counted the one-producer repetitions under Left to a later PR.

We ran 20 mutants against these guards, and the tests kill 19. The twentieth corrupts component_horizon; we tally IFS row 44, the only staged occurrence of that condition, so we emit no claim with it.

The reviews of 0193b91f, at 8a3e4982

GPT-6.1 Sol requested changes at 0193b91f and a cloud session approved it with low findings only. We answered both in 8a3e4982.

  • The fuel duty freeze (Sol F1). In b8af2152, we moved OBR row 2740 to revenue despite its stated PSNB scope. We now retain the borrowing metric and apply OBR published economic + behavioural effects of policy: the Scorecard entry point for PolicyEngine Macro members #55, adding one pe_gap verdict, so claims and drops stay at 4,687 and 1,265 and gaps reach 3,172. The cloud session accepted the move, since RF's subtraction of the OBR's two receipts forecasts gives 4.289 for 2029-30. In README rule 10 we list paragraph 3.43 among the OBR's stated effects on borrowing, and we follow what the OBR states. We removed the sign phrase and fixture pair the move needed.
  • Reviewed twins (Sol F4, cloud 3, 7). We restrict the year exception to red book rows 263, 271 and 272 at 2026 against table row 252 at 2027. The ingest rejects an unequal year after we copy Ukraine's explanation onto another row. _printed_unit accepts "£N million" and "£N billion", rejects other printed forms, and checks the stored value against the printed amount before returning the printed unit. The zero-cell test now moves row 11 into row 108's year, so only the magnitude check can raise.
  • Tests (Sol F2, F3; cloud 5, 7). At 8a3e4982, the preservation test compared every staged condition except a stored program, which killed cloud's surviving price_basis mutant. The tie-breaker test now changes each of the seven harvested publication fields in both orders, with and without a costings repetition, which kills Sol's surviving publisher mutant. We corrected our docstring to say we attach the costings repetition to the last table printing.
  • Text (Sol F5; cloud 1, 2, 4, 6). We corrected this description's --resolve command and the income-path reason, which called RHDI per person typical income. In KEY_DECISIONS.md we again say where the row numbers count from, and we gave the remaining reasons, comments and sentences their actors.

We ran 31 mutants of these guards at 8a3e4982, and the tests killed 29. The other two alter component_horizon and geography_note; we emit neither condition because we tally IFS row 44 and merge red book row 263 into its table row.

The review of 8a3e4982, at a28223f2

GPT-6.1 Sol requested changes at 8a3e4982, with one medium finding and four low ones. We answered them in 412c2f49 and a28223f2, and the ingest emits the same 4,687 claims, byte for byte.

  • Preservation (Sol R1). Our test helper accepted any stored program, so a mutant that replaced CenTax row 100's childcare text with winter_fuel_payment passed. It also accepted an invented _verbatim field on any condition. We now count a verbatim field only on geography, income_group and program, require the registered name beside it where one exists, and reject a replaced program and an invented verbatim field in new tests. The ingest also records a registered program's staged text when its canonical name differs, though no staged program takes that path.
  • Reviewed twins (Sol R2, R3). We point the Ukraine test at an unchanged copy of table row 252, so removing only the target comparison fails it. We also refuse misplaced commas in a printed amount, such as "£10, million", apart from a comma after a lone zero.
  • Text (Sol R4, R5). We named the registry in the AB2025 sentence and gave the remaining docstrings and sentences their actors.

We ran 18 mutants of these guards at a28223f2, and the tests killed all 18.

The review of a28223f2

An Opus 5.5 cloud session approved a28223f2 with five low findings. We corrected this description for three of them: the AB2025 sentence, the tense of the preservation sentence and the words "those forms". We also limited the sentence on commas, and we add the two guards the reviewer asked for in a later PR, below.

Left to a later PR

We add the OBR's receipts estimate for the freeze from paragraph 4.30 and its Table 6.3, "Effects of policy on financial transactions", to uk_obr_tables in a small PR after this one. In another PR we take the 26 pairs of claims in which one producer prints a figure twice and the conditions differ only in how it printed it (Resolution Foundation 14, Tax Policy Associates 7, HM Treasury 5). Among them, HM Treasury prints £50 off bills three times, and Tax Policy Associates prints £19.1bn in a footnote and a chart's description. We retain separate claim ids for those figures here, and we land that PR before any decision to wire the ingest in. We leave out Tables 4.2–4.7, 5.2, 5.8, paragraph 7.20 and FAI's Barnett table.

In a third small PR we refuse a comma after a lone zero and a leading zero in a printed amount ("£0,123 million", "£01 million"). We also add a test that fails if the pattern accepts a four-digit lead ("£1234,567 million"), and extend the preservation test so that it fails when the ingest adds a condition we didn't stage. We stage none of those forms, and _printed_unit still checks the stored value against the printed amount.

🤖 Generated with Claude Code

We register each key tranche 1 proposed in data/uk/ab2026_measures.json
(104 -> 190 measures) and fold none: no proposed scope matches a
registered key, or another proposed key, line for line (rule 3). We
rename one key as we register it (review A's RB-8).

pipeline/ab2026_key_decisions.py records each decision with its scope and
verdict, and the registry builder appends one entry per key. AB2025's rows
carry their registry key in measure_key, and the contract checker rejects
a registered key left in proposed_measure_key, so
pipeline/apply_ab2026_key_decisions.py moves the key on 973 rows in ten
families and writes KEY_DECISIONS.md. It changes nothing else in a row.
We re-pin COUNTS.json and regenerate PROPOSED_KEYS.md, and the Table 6.2
stager now writes the registered keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6FxoZQ5h8QKCGQq2By
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-scorecard Ready Ready Preview Nov 5, 2026 3:48pm UTC

Request Review

The OBR words 14 revenue rows in prose ("positive = net cost",
"positive = spending reduction"), and 12 rows on other metrics state
their direction in words signs.py didn't read. signs.py now reads 23 of
them as same or opposite. It declares three as a stated reason no sign
applies: the OBR's behavioural erosion of the bank surcharge's yield,
business rates flowing to local government, and a bound on a CPI effect
with no direction.

The fixture now pins 16 more (metric, convention) pairs as same or
opposite. Main's and tranche 1's signs.py read all 29,894 of main's
exported rows as this version does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6FxoZQ5h8QKCGQq2By
policyengine-core adds variables in glob order, which differs by
filesystem, so build_ab2025_registry.py --check failed here before this
change. We sort them, as #231 did for AB2026 (R1). Regenerated at
policyengine-uk 2.89.2 (policyengine-core 3.34.5), the registry changes
only the variable lists of 37 name searches; every count stays the same,
and --check and --resolve pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6FxoZQ5h8QKCGQq2By
scorecard_db/ingest_uk_ab2026.py turns each of the 5,952 staged rows into
a claim or a tallied drop: 4,717 claims and 1,235 drops under 15 reasons,
pinned per family in ingest_uk_ab2026_expected.json against COUNTS.json.
It reuses ingest_uk_ab2025's helpers and keeps its order of drops, its
dispositions, worlds, macro verdicts, twin merge and pe_gap verdicts.

Where AB2026 differs, we:
- decide the 70 metric names AB2025's tables don't hold, with Table 6.2's
  cash effects on cash_requirement_change;
- put a percent row with a GDP denominator on percent_of_gdp;
- keep each Table 6.1 or 6.2 claim once and tally its 423 twins in the
  costings and red book, recording each under also_printed_in;
- move OBR row 2740's continued fuel duty freeze to revenue_change, as RF
  states it, and tally three rows scored against worlds their producer
  names once;
- give a Table 6.4 recosting no verdict, since AB2025's registry states
  its verdicts at 2.89.2;
- hold back TPA's comparison-country rows from the page.

We register the OBR's pre-measures October 2026 world, as AB2025
registered November 2025's, add the aliases and the one relationship the
claims need, and teach signs.py three phrases the remapped claims use.
Main's signs.py still reads all 29,894 of main's exported rows the same.

The tests pin the accounting, keys and verdicts, one claim per identity,
each claim's sign reading and determinism, with Hypothesis properties on
samples, row order, the twin rule and the share-of-GDP rule, and a
differential run of AB2025's ingest against origin/main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6FxoZQ5h8QKCGQq2By
Regenerating data/uk/ab2025_measures.json with sorted variables reorders
the name searches in 212 AB2025 pe_gap rows of data/populations.json, and
breaks tests/test_uk_replay_legacy.py's byte pin on the registry. The
sort is Max's call, so we leave main's builder and registry as they are
and report it in the hand-off.

This reverts commit 640bdd3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6FxoZQ5h8QKCGQq2By
With the name-search sort reverted, AB2025's pe_gap results match main
too, so the differential test now compares every table exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6FxoZQ5h8QKCGQq2By
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready for hub review

Head: b2b1995a2f640453d500cb78bc4a1b3838d1b052, on #231's head 92f364c, which hasn't moved since we branched.

Items

  1. The 86 proposed keys (b7bb1c1). We registered all 86 and folded none, since no two scopes match line for line. The registry grows from 104 to 190 measures: 22 packages of exact lines, 4 receipts groups, 32 producer scopes, 15 measures and 13 options. KEY_DECISIONS.md gives each key's decision, verdict, reason, scope and rows. To follow AB2025, we moved each key into measure_key on 973 staged rows and re-pinned COUNTS.json, since Add the Autumn Budget 2026 registry and harvest (tranche 1 of #230) #231's checker rejects a registered key left in proposed_measure_key. The registry regenerates byte for byte at 2.151.0, and --resolve passes.
  2. Signs (3c146d2, 2fefa6f). signs.py reads 23 of the 26 unread conventions, and declares three as a stated reason no sign applies. Both fixtures pin the new readings. Main's 29,894 exported rows read identically.
  3. Shares of GDP. A percent row with a GDP denominator takes percent_of_gdp. IFS's one own row drops as macro-fiscal, as AB2025 drops that unit.
  4. HM Treasury figures staged twice. The ingest keeps each Table 6.1 or 6.2 claim and tallies 423 twins: 408 from the costings and 15 from the red book. It records each twin on the kept claim.
  5. Financial transactions. Table 6.2 and the costings' cash effects land on cash_requirement_change, with OBR row 2684.
  6. The fuel duty freeze. OBR row 2740 moves to revenue_change, beside RF's rows.
  7. The OBR receipts total. It stays on revenue_change. RF's restatement drops under Ingest the two harvested-but-unused UK think-tank families: IFS (268) + Resolution Foundation (71) #86.
  8. AB2025's name search. We sorted it (640bdd3), then reverted it (070113e), because it changes 212 published pe_gap rows in data/populations.json and a legacy byte pin. It's Max's call.
  9. The welfare-savings key. We renamed it ab2026__package_welfare_fraud_and_error_savings_in_forecast.
  10. The ingest (2fefa6f). It turns 5,952 rows into 4,717 claims and 1,235 drops under 15 reasons, pinned per family. It also writes 3,130 pe_gap verdicts.
  11. Left to the owner: staging the OBR estimates review B raised, and FAI's 29 October table.

Tests

  • Focused, with -n 4: test_ab2026_registry, test_uk_ab2026_harvest, test_ab2026_harvest_contract, test_ab2026_key_decisions, test_uk_ab2026_ingest, test_signs, test_uk_ab2025_harvest and test_harvest_ingest all pass. The 8 dashboard receipt checks skip, since no dashboard checkout exists here.
  • Full suite at b2b1995: 3,381 passed, 25 skipped and 1 failed. test_modal_uk_event's factory test needs a Python 3.12 control interpreter, and it fails the same way on Add the Autumn Budget 2026 registry and harvest (tranche 1 of #230) #231's head.
  • Two builds with build_db succeed, and leave no tracked file changed. ruff format --check passes.
  • ci.yml runs only on pull requests into main, so CI doesn't run on this PR.
  • Hypothesis minimised one counterexample, pick=1, nudge=1.0. We executed it: an exact copy of a Table 6.1 row with another value raised in merge_republications. AB2025's merge refuses one claim printed twice with two values by design, so we found no bug, and fixed the property to give the copy a costings row's conditions.

Judgment calls

The PR description lists each call with the alternative we rejected:

  • the verdicts (the triple lock expressible, the minimum wage a development item, the CGT package and fuel freeze partial);
  • the metric calls;
  • the twin rule;
  • the registered OBR world and the three one-row worlds we tally;
  • holding back TPA's 26 comparison-country rows;
  • reverting the AB2025 sort.

For Max

  • The public site. Merging changes nothing the site shows. scorecard_db/build_db.py doesn't call the ingest, and a local build left data/lanes.json and data/populations.json unchanged. Wiring it in would add three lanes, 4,717 claims (4,691 on the page before counterparts) and 3,130 pe_gap verdicts.
  • AB2025's name search. Say if you want the sort, and we'll restore 640bdd3, regenerate the feed and update the legacy pin.

What we couldn't do

  • Re-run pipeline/stage_ab2026_hmt_tables.py: the proxy blocks gov.uk, so we updated the stager to write the registered keys but couldn't prove it reproduces the rewritten file.
  • Run the dashboard receipt checks.
  • Edit the families' NOTES.md, which still name the proposed keys and the welfare key's old name; the session rewriting NOTES should use the registered names.

Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Fux9sYQGvhSFVyJKz
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Fux9sYQGvhSFVyJKz
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Fux9sYQGvhSFVyJKz
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Give HM Treasury and us the verbs that columns, notes and rows held
(findings 14, 25, 26, 30, 33), and state the keys #247 registers for
Table 6.2 line 6 and its total row (section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Name who acts where rules, releases and rows held the verb (findings 1,
24-27, 33), and state the option key #247 registers (section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Return our readings to us and the Welsh Government's figures to it,
state the Barnett key #247 registers, and join the clipped runs
(findings 1, 10, 11, 19, 23, 25, 26, 33; B7; section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Restore our "only" on the actual-ANI costing, give the fetches back to
the lane, name the #207 file behind parents_bunching, and state the
seven option keys #247 registers (findings 1, 9, 24-28, 31, 33; B1;
section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Give the 4 November edit back to readers, restore "a single line" and
what we left out, and state the 14 group keys #247 registers (findings
1, 4, 5, 16, 17, 23-27, 33; section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Return the p.41 judgement to us, give rules' verbs to us, and state the
three keys #247 registers with today's tally of 79 keys on 595 rows
(findings 1, 23-27, 30, 31, 33; B3; section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Restore the chart-label logic and the comment's reference, settle the
£4.4bn periods from rows 34, 54 and 127, and state the 19 keys #247
registers on 200 rows (findings 1-3, 15, 24, 25, 27, 30-33; B2;
section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Restore the conditions and attachments the rewrite moved, rewrite the
key table's cells with actors, and state the 29 keys #247 registers
with today's tally of 128 keys on 2,742 rows (findings 1, 7, 8, 18,
21, 23-25, 27, 28, 30, 32, 33; B4; section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Fix the pubs-relief and line 47 attachments, restore the lane's fetch,
and state the 21 keys #247 registers, with the welfare fraud key under
its new name (findings 1, 22, 24-26, 28, 29, 31-33; section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Give the first lane's 29 October choices to the lane in the past tense,
add today's per-deck counts, cut the label openers and the defensive
clauses, and state the four keys #247 registers (findings 1, 13, 20,
23-26, 29, 30, 32, 33; B8; section D).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6Hz6VzBiZKpP6s4opP
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready for hub review. Items A to D have all landed. They change text and merges only: no claim, count or staged row moved.

Head: 5303262 on uk/ab2026-tranche2.

A. Merge

  • I fetched again and merged origin/uk/ab2026-harvest at 4707e91 ("Report unread operations and look past punctuation in rule 4") as fbea857. The merge touched only the checker, its tests and the README.
  • At the merge, PYTHONPATH=. python pipeline/ab2026_harvest_contract.py sources/harvest-uk-ab2026-2026-10-29/*/ finds 0 problems in all 12 families: 5,952 rows.
  • SEED_INVENTORY shows its usual "missing" line, since it holds no rows.
  • Before each push I fetched again. origin/uk/ab2026-harvest still pointed at 4707e91, so your next commit hadn't landed yet and I had nothing more to merge.

B. The ingest's docstring (5303262)

  • "70 metric names" now reads "66 metric names … (2 adoptions and 64 drops)".
  • "ROW_DROPS tallies three rows scored against worlds their producer names once." now reads "ROW_DROPS tallies 22 rows under six reasons.", followed by the sentence you asked me to keep.
  • The six reasons are:
    • one world named once: 3 rows;
    • RF's restatement of the OBR's forecast: 6;
    • income paths: 9;
    • ratio: 1;
    • earlier estimate: 1;
    • macro or out of scope: 2.
  • The RF comment now reads "(our notes to RF's rows 154 and 397-401, citing its footnote 27)".
  • "so tranche 3 decides" now reads "so this module writes no verdict for a recosting".
  • The lanes point now reads "This module ingests no PolicyEngine counterparts and calls no advance_lanes."
  • I also cut "tranche 2" from the docstring's title line, which now reads "(Port every Autumn Budget 2026 score into the scorecard #230)". That was my own call, on the same rule, and the module now names no tranche.

C. The description

  • I applied all 16 replacements word for word.
  • For item 17, I set the body through the GitHub connector. Reading back pulls/247's .body gives text identical to the file I sent, ending "🤖 Generated with Claude Code".
  • Sentence count, by the same script as before: 112 sentences, mean 21.6 words, median 21, range 8–36, none over 40. The script skips headings, table rows and bold topic labels.
    • The two 8-word sentences are the fraud and error rename, which holds two long key names, and "CI now fetches origin/main for the differential test."
    • I read each sentence outside the 9–40 range myself.

D. Checks at 5303262

PYTHONPATH=. uv run --with pytest --with pytest-xdist --with hypothesis --with pypdf --with pyyaml --with numpy --with psutil --with rfc8785==0.1.4 --with jsonschema pytest tests/test_uk_ab2026_ingest.py tests/test_ab2026_key_decisions.py tests/test_ab2026_registry.py tests/test_uk_ab2026_harvest.py tests/test_ab2026_harvest_contract.py tests/test_signs.py -q -n 4 -rs
  • That run gives 1,311 passed and 8 skipped, all eight in tests/test_ab2026_registry.py:250 (no uk-autumn-budget-dashboard-2026 checkout). The count rises from 1,020 because of the merged checker tests.
  • The contract checker finds 0 problems in 12 families.
  • I didn't rerun the mutations, since no code path changed.

Generated by Claude Code

Rows and keys no longer carry or sit. No code path changes: only comments,
docstrings, one sentence the key decisions' render writes and one problem
message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6H2GSz1M5dJa7nNNpB
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6H2GSz1M5dJa7nNNpB
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6H2GSz1M5dJa7nNNpB
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6H2GSz1M5dJa7nNNpB
MaxGhenis added a commit that referenced this pull request Nov 5, 2026
#251 sorted AB2025's name search on main. We merge it here so #247 can take it
and still show only tranche 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 2 commits November 5, 2026 08:41
GPT-6.1 Sol and a cloud session reviewed 589f822, and both requested changes.

- We adopt IFS row 46, £80 from January 2027's one-off Household Energy Payment,
  on `average_household_income_change` in `gbp_per_household`. The ingest writes
  4,687 claims and 1,265 drops, and the 3,171 pe_gap verdicts don't change.
- The preservation test now checks statistic, horizon, `component_horizon` and
  the estimate kind.
- The ingest raises if a reviewed twin and its Table 6.1 cell differ in key, in
  magnitude beyond the red book's last printed digit, or in year outside
  Ukraine's entry. A test pins all nine reviewed rows and their cells.
- The merge tie-breaker reads every primary publication field and leaves out
  `also_printed_in`.
- We rewrote the drop reasons that misdescribed their rows, gave AB2026 its own
  text for `no_registered_metric` and `mtr_no_registered_metric`, and removed
  the promise that we score each restated figure under its originator.
- We moved the actions in the generated reasons, `KEY_DECISIONS.md` and the
  registry's `why` strings to their actors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This takes #231's final head and main, with #251, which sorted AB2025's name
search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis changed the base branch from uk/ab2026-harvest to main November 5, 2026 14:08
MaxGhenis added a commit that referenced this pull request Nov 5, 2026
Merging tranche 2 at 0193b91 brought IFS row 46 to the stager, because #247
scores it on average_household_income_change. IFS averages the Household Energy
Payment across households in England, and we publish an average across all UK
households, so we tally the claim under a 16th written reason.

We also add the Universal Credit limit to the Carer's Allowance rows, name the
actors in the reasons and docstrings, and raise on a named OBR line under another
sign convention. The tests now compare each row's whole annotation list, reject
claims of another geography or unit or on the OBR costings lane, execute vendor,
and rederive each counterpart from the producer's sign convention.

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

The OBR states the continued fuel duty freeze's effect on public sector net
borrowing, and README rule 10 lists it among the four policies it states so.
We remove the row's move to revenue_change, so it takes the macro verdict
under #55 and adds one pe_gap verdict: 3,172. Claims and drops stay at 4,687
and 1,265. We remove the sign phrase and fixture pair that move needed.

The reviewed-twin guard binds Ukraine's year exception to its three rows and
table cell, reads only "£N million" or "£N billion", and rejects a value its
print doesn't state. The preservation test now compares every staged
condition, and the tie-breaker test now covers each harvested publication
field in both orders. We also fix one docstring's account of which printing
takes a repetition, and give actors to the remaining reasons and comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 5, 2026
…ctors

- Restore the five minus signs the OBR prints on the savings and property
  income tax rows, and split the sentences over 40 words.
- State that OBR row 2740 stays on the borrowing metric, as #247 now does.
- Search all 12 notes for documents, tables, rows, pages and keys acting as
  subjects, and give the verb to the producer or to us.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 5, 2026
#247 keeps OBR row 2740 on the borrowing metric, adding one pe_gap verdict.
No counterpart, claim or tally in this tranche moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 2 commits November 5, 2026 10:46
…scape

- Compare each staged condition with the claim. A verbatim field now counts
  only on geography, income_group and program, beside the registered name,
  so a replaced program or an invented verbatim field fails the test.
- Record a registered program's staged text when its canonical name differs.
  No staged program takes this path, and no claim changes.
- Point the Ukraine test at an unchanged copy of table row 252, so removing
  only the target comparison fails it.
- Refuse misplaced commas in a printed amount.
- Give the remaining docstrings their actors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OBR registers NI as Northern Ireland, so the claim must hold the registered
name with the staged text beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 5, 2026
#247's last review changed its preservation test helper, the ingest's
printed-amount regex and its branch for registered programs. No claim moves, so
no counterpart, tally or unanswered row in this tranche moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
…p ci]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwQq6GvWR7vNQtomhFhHkb
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 5, 2026 16:54
@MaxGhenis
MaxGhenis merged commit 1615e26 into main Nov 5, 2026
15 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merged at a28223f2 with a merge commit, under the merge-your-own-PR gates.

  • Independent review. An Opus 5.5 cloud session approved a28223f2 with five low findings (hub-notes/pr247-review-a28223f2). GPT-6.1 Sol requested changes at 8a3e4982, and these commits answer that review. All Codex lanes stayed held at this head, so we cancelled Sol's queued rerun.
  • CI. gh pr checks returned 0 at this head, with all 15 checks listed, and GitHub reported the merge state as clean.
  • Scope. This PR changes no file under app/, and no site or lane data. We leave wiring the claims into the site to a separate decision.
  • Follow-ups. The description's last section names the three later PRs, including the two guards the reviewer asked for.

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

This branch was successfully deployed

1 active deployment
Preview — a28223f2 Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants