Repository navigation
Pair Autumn Budget 2026 claims with the dashboard's Budget-day runs (tranche 3 of #230) - #249
Conversation
Every receipt of the UK Autumn Budget dashboard's Budget-day runs records policyengine 6.11.1, policyengine-uk 2.151.0, policyengine-core 3.33.3 and the Microcosm UK cut of 25 October 2026. The registry's engine_pin asks for a pair record before tranche 3 ingests any counterpart. No receipt states the package RECORD or wheel digests, the packaged bundle manifest digest, the dataset's size or a requirements freeze. We take those from the replay variant the receiver qualified for the same pair (#242), and copy its requirements freeze byte for byte, so the record's identity digest equals that variant's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6GLASJqd8EV4budnw3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pipeline/stage_uk_ab2026.py vendors the eight pe_modifier receipts and the seven CSVs a pairing reads from PolicyEngine/uk-autumn-budget-dashboard-2026 at 1eca3182, and writes MANIFEST.json with each file's sha256 and source. It checks each receipt against the registry and each CSV against its receipt. It then pairs each of the 372 claims on those measures with one cell, or tallies one of 13 written reasons. 67 claims take a counterpart: the whole exchequer effect from HM Treasury's Table 6.1 and the OBR's Table 1.1 totals against budgetary_impact.csv, and HM Treasury's count of Pension Tax Allowance gainers against age_impact.csv. stage_uk_ab2026_expected.json pins the counts per measure. ingest_uk_ab2026 gains STAGED_COUNTERPARTS and advance_lanes. build_db.py calls neither, so the site doesn't change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6GLASJqd8EV4budnw3
tests/test_uk_ab2026_counterparts.py checks that every vendored file hashes to the manifest, its receipt and the registry; that the 6.11.1 pair record states what each receipt states; that each counterpart re-derives from its cell byte for byte; and that the accounting closes. Hypothesis flips claims' signs, shuffles and samples the claims. A temporary database built with the AB2026 ingest and these results shows each comparison once, and advance_lanes moves only the official lane. The AB2025 differential test now also compares stage_uk_ab2025's output, the attached counterparts and the advanced lanes with origin/main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6GLASJqd8EV4budnw3
The dashboard counts each year's simulated liabilities and payments, while HM Treasury and the OBR score receipts when they reach the Exchequer. For example, HM Treasury puts £35m of property income yield in 2027-28 against our £399m. Each exchequer counterpart now names that axis. A README in results/uk/ab2026/ says what we vendor and how the stager uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6GLASJqd8EV4budnw3
|
Ready for hub review Head: Steps
Tests
Headline countsOf the 372 claims, 67 take a counterpart: 36 HM Treasury Table 6.1 lines, 30 OBR Table 1.1 totals and one HM Treasury gainer count. We tally 305 under 13 reasons, listed in the PR body. Among the 67, 36 have the same sign on both sides, 26 read zero on both sides, and none has opposite signs. In four, the producer prints a figure where our run gives zero: the Pension Tax Allowance in 2030-31 and 2031-32. In one, HM Treasury prints zero and we estimate −£110m: the trading allowance in 2027-28. Judgment calls
Later runsThe dashboard's
The dashboard labels each year by its fiscal year's start. Only the combined run and the new bus fare cap differ, and no claim pairs with either, so the choice of vintage changes no counterpart here. What wiring it in would addWe built a database in a scratch worktree with
We didn't check Not done
Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stager now tallies HM Treasury's six fuel duty rows (it scores every litre of taxable fuel; we estimate household fuel), the Pension Tax Allowance's four rows after it ends on 5 April 2030, and the 22 years where the claim and our run both read zero. Carer's Allowance and property income rows keep their comparison and name the OBR's Scottish lines for the year, read from the OBR's component claims at stage time; the Pension Tax Allowance rows say our figure nets off means-tested benefits. Reasons and annotations take plain sentences, the unreachable sign_not_this_quantity reason goes, the expected file pins each paired claim's file, column and row, and the 6.11.1 pair lists the local executor only. Comparisons fall from 67 to 35; tallied claims rise from 305 to 337. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6JktXnPP5pkAJncdhu
…erparts tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6JktXnPP5pkAJncdhu
|
Ready for hub review Head: Findings and what we did
Not appliedWe applied every item. The scope test, as the brief specifies it, leaves one gap. The electricity VAT receipt says the zero rate "applies in Great Britain from October 2026 and across the UK from April 2027", and since "Great Britain" isn't among the names, the test requires no tally or annotation there. We didn't decide that measure's scope, since HM Treasury's and the OBR's rows on it would need reading against the costing first. Counts by reason
The brief expected 35 and 337, and the run gives both. The diff of Item 6: the Pension Tax Allowance's cost
MutationsEach mutation ran in its own worktree twice: A against the committed staging, B after
Nothing survived. If someone copied the drifted tally and pairing into the expected file, a named test would still fail. TestsThe focused command ( Wiring countsWe built a temporary database ( What we couldn't verify
🤖 Generated with Claude Code Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…drop #247 drops HM Treasury's two red book repetitions of the payment's 2026-27 cost (73043569, 73a625cf), which tranche 3 tallied as devolved shares, so the tally falls from 372 to 370. No paired claim, value or cell moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6JktXnPP5pkAJncdhu
Each kept exchequer row now names every nonzero line of the OBR's breakdown for its measure and year outside the receipts heads and the welfare line (Scottish block grant adjustment, Scottish self-financed expenditure, departmental resource spending, other AME), with the amount read from the OBR's claim; an unnamed line raises. Electricity VAT rows say HM Treasury's costing counts charity, residential care and a little business use; Carer's Allowance rows say we leave Northern Ireland at current law; property income names UK-wide finance cost relief. The netting, gainer and two reasons' text follow the 229bbc1 review. The tests build the expected lines from the OBR's claims, read Great Britain, GB, Scottish and Welsh in receipts, feed a nonzero welfare line, and the expected file pins each paired claim's value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6JktXnPP5pkAJncdhu
|
Ready for hub review Head: What changed, by ruling
The merge
Counts by reason
Tests and mutationsThe focused command ( I ran 13 mutations at
Left undone
🤖 Generated with Claude Code Generated by Claude Code |
Re-pins the tally after merging tranche 2 at 5ff3c4b, which drops three IFS spending-decile claims (1b2e6f7f, 35db1466, 61178ad2), so 367 claims and no spending_decile_breakdown reason; no paired claim, value or cell moves. The stager now skips only the receipts heads, the welfare line and the property behavioural line, raises on any other unnamed line and on two claims sharing a named line, and writes each line as a cost or a gain with "we" as the actor. Property rows from 2028-29 carry the OBR's £0.1 billion behavioural erosion, read from its claim; trading allowance rows carry the receipt's caveat on gross receipts. The gainer, property, electricity, pension and measure_ended text follow the 2cfdf22 review. The tests build each breakdown sentence from the claims with their own names, articles and signs, and assert every scope sentence in full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6JktXnPP5pkAJncdhu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6JktXnPP5pkAJncdhu
|
Ready for hub review Head: The merges
Findings
Calls I made
Counts by reason
The diff of TestsAt MutationsEach mutation ran at
Sentence lengths
Left undone
Generated by Claude Code |
…26-tranche3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The baseline annotation on HM Treasury's rows now reads "HM Treasury names no baseline in its table", so `results/uk/staged_ab2026/ab2026_counterparts.jsonl` changes on those 18 rows and no paired claim, value or cell moves. The rest changes only docstrings and comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
#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>
#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>
In paragraph 3.17 the OBR says the measure raises £0.4 billion a year on average from 2028-29, and that behavioural responses cut the yield by £0.1 billion a year. We had put the average on the £0.1 billion, so we drop it from the behavioural sentence and the stager's comment. Eight staged annotations change, and no value does. Ten mutants that Sol ran at 44d226d survived the tests, though the committed guards reject each input. We now also test: - the gainer and exchequer guards on each nation, Great Britain, no geography and more units; - the OBR costings lane on any key, and on the keys in its registry; - exchequer claims without a readable sign; - named and behavioural OBR lines under a reversed convention or none; - the opposite-sign annotation on a flipped claim; - each reason against the producers whose claims it covers, and the £1 minimum in the two count reasons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
We merged #247 and retargeted this PR to |
We answer L1 and L2 of the cloud review of a58ddc3. - We now feed the unreadable-sign test the magnitude convention as well, so a stager that rejects only unknown signs fails it (mutant Y1). - We write the 16 reasons out in the test and require the stager's to match, so a test fails if we change a word in any reason (mutants Y2 and Y4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
We merged
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com |
In tranche 3 of #230, we pair the Autumn Budget 2026 claims on the registry's eight
pe_modifiermeasures with PolicyEngine's Budget-day estimates. We read those estimates from the UK Autumn Budget dashboard's published artifacts at1eca3182, the commit we pin in the registry, and run no microsimulation. We branched from #247's branch, which merged as1615e267, and retargeted this PR tomain.Changes
The 6.11.1 pair (8d2d9f5)
We add
pair-pe6.11.1_uk2.151.0_microcosm-uk-2024-25-national-20261025T091414Z-a6299504todata/uk/certified_pairs.json, the pair we name in the registry'sengine_pin. The dashboard's generator writes the wrapper, model, core and data versions, the dataset's digest and URI, the certificate and the data years into every receipt. It writes no package RECORD or wheel digest, bundle manifest digest, dataset size or requirements freeze. We take those from the replay variant the receiver qualified for the same pair on main (#242) and copy its freeze byte for byte, so the pair's identity digest equals that variant's. The dashboard ran these jobs on Modal under Python 3.13.3 and its own lock, which we don't bind in the record, so we list the local executor only.Vendored artifacts (b11011b)
pipeline/stage_uk_ab2026.py vendorcopies the eight receipts and the six CSVs we pair from intoresults/uk/ab2026/. It checks each receipt against the registry'sreceipt_file_sha256and each CSV against its receipt'sfilesdigest, and records each file's path, sha256, source path and source commit inMANIFEST.json.Pairing (b11011b, eb7c13b, and the commits after review)
pipeline/stage_uk_ab2026.py stagereads the 368 claims tranche 2's ingest writes on these measures and pairs each with one cell, or tallies it under one of 16 written reasons. We readsrc/uk_budget_data/calculators.pyat the pin for what each column measures.gov_balancefrombudgetary_impact.csv, and orient that change to the sign conventionsigns.pyreads from the claim. We pair 34 claims this way: 17 HM Treasury Table 6.1 lines, and 17 OBR measure totals from the "Scorecard measures" section of its breakdown, which we key to Table 6.1 lines.people_directly_affectedfromage_impact.csv. We count people whose own income tax, National Insurance, student loan repayment or employment income changes by at least £1, excluding households without an income decile. Of these four, the government changes only income tax through this allowance.We name each row's file, column and row, and we annotate it to say that we estimate with no behavioural response, measure from current law in policyengine-uk 2.151.0, and count liabilities where producers count receipts. On the OBR's rows, we add to the baseline annotation that the OBR measures from its forecast before the Budget's measures. HM Treasury names no baseline in its table, and we say so on its rows.
We pin these counts per measure and each paired claim's cell in
pipeline/stage_uk_ab2026_expected.json. The stager raises on drift, on a claim shape it has no rule for, and on a nonzero claim against a zero from our run outside the Pension Tax Allowance's ended years.Results and lanes (b11011b)
The stager writes
results/uk/staged_ab2026/ab2026_counterparts.jsonlin AB2025's campaign form, whichingest_campaignattaches by claim id. We addSTAGED_COUNTERPARTSandadvance_lanestoingest_uk_ab2026, andadvance_lanesmoves a lane tocomputedonce its claims have counterparts.Invariants (tested)
vendorwrites the committed manifest and files from those bytes, and refuses a receipt or CSV whose bytes changed.advance_lanesmoves only the official lane.stage_uk_ab2025's output, the attached counterparts and the advanced lanes with origin/main. CI fetchesorigin/mainfor it since Ingest the Autumn Budget 2026 harvest (tranche 2 of #230) #247, and the test fails rather than skips in CI if the ref is missing.What wiring it in would add
We built a temporary database at
a58ddc3with the AB2026 ingest, its verdicts, this staging andadvance_lanes, on a copied lanes feed, then ranexport_populationsinto a scratch path. We find 4,687 AB2026 claims in the database, 3,207 of them with a result: 35constructedand 3,172pe_gap. The export writes 4,661 rows, 3,172pe_gap, 1,454 not computed and 35 constructed, and we count 35 answered of 3,828 on the official lane, 0 of 586 on the microsimulation lane and 0 of 273 on the admin-other lane.The public site
scorecard_db/build_db.pycalls neitheringest_uk_ab2026nor this stager, so when we merge, we change nothing on the site and leavedata/lanes.json,data/populations.jsonanddata/comparison.jsonas they are. Max decides when we publish these comparisons on the site.Review fixes
After the review of
2cfdf22, we merged tranche 2 at589f822without moving any claim, value or cell. We also named HM Treasury as the actor in the baseline annotation on its 18 rows ("HM Treasury names no baseline in its table"), and named the actors in docstrings and comments (a21cabd).The review of 75c4a1f
The same cloud session approved
75c4a1fwith one low finding. No test pins claimf59d84db9343c682f25b, so in the L4 bullet below we now plan to regenerateSTAGING_UNANSWERED.jsonl, where the stager lists the claim by id, in place of updating pins.The review of a58ddc3
The cloud session that reviewed
a21cabdrequested changes ata58ddc3, with one medium finding and four low ones, and we answered them in75c4a1f. We changed only the counterparts test, so no claim, value, cell or staged row moved.a58ddc3, we also rewrote the record of53cdc41in "The reviews of a21cabd". We restored that record and added the later change.f59d84db9343c682f25bthe aggregation "annual average from 2028-29" onmain. We'll set it to "annual" in the follow-up PR where we stage the OBR's paragraph 4.30 and Table 6.3 rows, and regenerateSTAGING_UNANSWERED.jsonl, where the stager lists the claim by id.At
75c4a1f, the same nine test files gave 2,470 passed and 1 skipped with four workers and the same two deselections. A test killed each of the 36 earlier mutants and the reviewer's three survivors.The review of 44d226d
GPT-6.1 Sol approved
44d226dwith three low findings. We merged tranche 2 ata28223fin570ed6cwithout moving any claim, and answered the findings ina58ddc3. No paired claim, value or cell moved, and we changed the staged rows only in the behavioural sentence on eight property rows.53cdc41, so we dropped it from the sentence and the stager's comment.At
a58ddc3, the same nine test files gave 2,468 passed and 1 skipped with four workers and the same two deselections, and a test killed each of the 36 mutants we ran, including Sol's ten.The merge of 8a3e498
We merged tranche 2 at
8a3e498in44d226d. #247's ingest now keeps OBR row 2740 ondecisions_effect_on_borrowingunder the macro verdict and gives it onepe_gapverdict, so we store one more result and export one fewer row as not computed. No counterpart, tally or annotation moved, andstagereproduces the committed files.We ran the same nine test files with four workers at
44d226d. They gave 2,421 passed and 1 skipped, with the same two deselections, and a test killed each of the 22 mutants again.The reviews of a21cabd
GPT-6.1 Sol and a cloud session each approved
a21cabdwith low findings only. We merged tranche 2 at0193b91inb3d917band answered both reviews in53cdc41. No paired claim, value or cell moved, and we changed the staged rows only in their annotations.0193b91, tranche 2's ingest scores this claim onaverage_household_income_change, so the stager reads it. IFS averages January 2027's Household Energy Payment at £80 across households in England, and we publish £67.44 across all UK households for 2026-27, with no figure for England alone. We tally the claim under a 16th reason and name the measure and England in the rule, so the stager still raises on a spending-decile claim on another measure or area.53cdc41we wrote that the OBR expects more landlords to incorporate to save tax and more to underpay, cutting the yield by £0.1 billion a year on average from 2028-29. We took the average out ina58ddc3(Sol N1). We say in the trading allowance sentence that we may overstate the Exchequer's cost for some traders and understate it for others.vendoragainst the committed bytes. We now rederive each counterpart without the stager's sign helper. A test killed each of the 22 mutants we ran on these guards and sentences, including the trading sentence on every row, which passed before.We ran nine test files with four workers at
53cdc41:test_ab2026_harvest_contract,test_ab2026_key_decisions,test_ab2026_registry,test_uk_ab2026_harvest,test_uk_ab2026_ingest,test_uk_ab2026_counterparts,test_signs,test_harvest_ingestandtest_uk_certified_pairs. They gave 2,397 passed and 1 skipped, the registry's regeneration, which needs the 2.151.0 environment. We deselectedtest_every_exported_row_carries_a_declared_signandtest_app_data_copies_match_committed_data, because our sparse tree lacks their inputs, and CI runs both.The review of 2cfdf22
The reviewer of
2cfdf22found that the stager skipped the OBR's behavioural line on property income without saying so, and that the tests didn't tie each amount to its line.5ff3c4b, and its ingest drops three IFS claims that split households by spending (1b2e6f7f,35db1466,61178ad2). The stager then reads 367 claims, no longer needs the spending-decile reason, and raises on a claim on that axis. We also mergedb227956and002d90c, in which we added only tests to tranche 2, and no paired claim, value or cell moved in any of the three merges.The review of 229bbc1
The reviewer of
229bbc1found that we left Scottish lines the OBR prints off the trading allowance's and the Pension Tax Allowance's rows, and that the scope test copied the stager's choices.gov_balanceitself counts, and raises on any other line it can't name.signs.pyreads that phrase to orient an exported row, and we use the same phrases on AB2025's rows.c58128e, and its ingest drops HM Treasury's two red book repetitions of the Household Energy Payment's 2026-27 cost (73043569,73a625cf), which we tallied as devolved shares, so the stager reads 370 claims. No paired claim, value or cell moved.The review of eb7c13b
The reviewer of
eb7c13bfound that three measures' totals cover more than our run does, and that we compare a producer's figure on four rows with a year our run leaves at zero. We now tally 32 more claims and keep 35 comparisons, down from 67.stage_uk_ab2026_expected.json.🤖 Generated with Claude Code