Skip to content

Move the UK spine to geography first (#931) - #1538

Draft
juaristi22 wants to merge 177 commits into
mainfrom
claude/uk-931-geography-first-move-b38c04
Draft

juaristi22 wants to merge 177 commits into
mainfrom
claude/uk-931-geography-first-move-b38c04

Conversation

@juaristi22

@juaristi22 juaristi22 commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Part of #931. This is the output-moving half of the geography-first UK spine, stacked on #1519, which changes no outputs.

The spine clones every FRS household K times at its start: K=15 on the dense line, K=1 on national. Each clone gets its own small area and its own later draws (wealth, consumption, SPI copies and so on). The K=1 national spine nests in the K=15 dense one wherever draws are keyed: it is the clone-0 slice.

#1519 merged on 17 Nov, so this PR targets main, and CI runs on it. It is rebased onto main at 35ec6c7 (below).

Rebases (16 and 27 Nov)

María ruled a linear rebase onto #1519's head 70e5ac1 (15 Nov), then one onto main at 35ec6c7 (27 Nov). Both keep messages and authors; hashes here are the new ones. The second drops main's merges: f366de7 carries what they changed beyond main, so the head's tree is the tested merge 3a9dcb5's. Only the head is tested. The first's commits and defaults are in edits before 25 Nov.

Slice rank, review fixes and main (17 Nov)

  • Slice rank, 646ef45 (María's ruling of 17 Nov). G8 reads each England and Wales owner's home value at a keyed point inside its weighted slice of its constituency and geographic clone, in the order of the segment-2 draw. It was the weighted mid-rank within the FRS region, which counted the area twice: once in the placement and once in the rank. The regional factor's mean is now over geographic clone 0's FRS-base owners, so clone 0 of K clones takes the one-clone values, to rounding, and b5d0301 hands the uprating stage's node the clone index it needs for that. The gate's rank_basis is weighted_slice_within_constituency_and_clone. The ruling followed a comparison of the arm pair with official 2024-25 council tax and house price statistics, which is not published here.
  • The reviews of 16 and 17 Nov are answered item by item: 16 Nov, 17 Nov.
  • Open for María. This list holds every item of both reviews that waits on her:
    • 16 Nov, item 1, G8's key. Either re-point G8 at the UK stock cells: homes and the land under them in England and Wales (#1524) #1597 stock cells by (MSOA, band) in this PR, or keep the constituency value and let the land overlay look up by (MSOA, band). Her outcome will be recorded here.
    • 16 Nov, item 3: whether to tie a home's value to its band in this PR or before the overlay.
    • 16 Nov, item 4: the ratio path, D8 on #20.
    • 16 Nov, item 5: the two held land rows: the calibrate-only rerun, the register wording beside the fragment, and the expiry date.
    • Merge condition: the SPI forest test's Linux x86_64 digests, recorded from CI's log (second review, item 3).
    • 16 Nov, item 9: whether council_tax_band_observed or the bill's provenance stays at release, with #20.
    • 16 Nov, items 3, 4, 6 and 8 were measured on a build of 3bf52de (17 Nov). Whether the figures go in this description is María's call.
    • 17 Nov, item 2: since 35c9fb2 each high-value support copy draws its own area and key (María, 25 Nov) and keeps its parent's value; a keyed value for each copy, or retiring the stage, is still open.
    • 17 Nov, item 12: Inverclyde's nominal Band D, and a CI source for the 318 England and Wales values.
    • 17 Nov, item 14: storing the Warm Home Discount draw in the spine, and G6's coarser-cell guard, which is written but held because it reruns the area draw for each row.
  • Also on 17 Nov: defaults in the fixes: item 4 recomputes a bound spine's definition under new --spine-support-* flags, item 5 counts clone 0's child rows, item 10 is a test, and E5 refuses a release frame. Main was merged in (fd1d709; 26a6d31 gives the area draw's column names their own module), with CI fixes, each explained in its message, and the pins, the US F0 report, the coverage manifest and the H2 fixture regenerated.
  • A K = 15 build (review item 9) needs about 300 GB of checkpoints and more than 64 GiB of memory (the 24 Nov spine peaked at 68.4 GiB). tools/run_uk_cut.py dense-spine (f5b5998, 3ae546c) builds that spine alone on a larger machine and prints its upload (docs/uk-cut-anyone.md, The dense spine alone); 7329169 and 6672a27 cut two of the transferred gates' frame copies.

K = 15 calibration comparison (24 and 25 Nov)

The K = 15 release-candidate spine built at 9a6fd00 is calibrated here beside main at bcb5cba (the last main merged in), with the same settings, before main is merged again. The first head calibration stopped at the problem node: Wokingham's UC two-children cell and Stratford-on-Avon's three-or-more-children cell had a nonzero target and no household in the K = 15 pool, while main's route carried both. 42c3ed9 defers the two cells under a new signed reason (María's ruling of 24 Nov), as Carmarthenshire's band-I cell is deferred; whether the assignment should carry them stays open under #931. The spine still binds: no kernel hashes the two tools, and the spine gate declarations do not move. 0d48565 lets a share-of-parent partition miss a member, as the two deferrals leave those seats' UC children partitions: the parent's factor still holds for the other members, the receipt lists the missing ones under members_absent, and an exhaustive partition still refuses. Both arms are now calibrated, and the findings are with María.

Merge of main (25 to 27 Nov, before the rebase)

8f2db66 merged main at cac12ab: 22 pull requests since bcb5cba, among them #1687 (policyengine-uk 2.179.2, the UC new-claimant draw and Chronicle 15040ea5) and #1663 (the PIP split and the LCWRA imputation). This branch's feed-derived files are rebuilt on 15040ea5. 3abbb44 reviews the engine-population declaration again on 2.179.2: corporate_land_value and the consumer-incident revenue change now read the shares a block sets, and a block whose data supplies the UK totals (policyengine-uk#2896) is refused, since its shares would already be the pool's. 900d70c, 16f41a5, c18c0ae, bbe3633, a4770ed, 788ffb5, 69a45a0 and 3a9dcb5 merged main at 8c51b6e, 268156c, 51d952c, 1c82d18, e29843d, 4b78a9b, 5589fae and 35ec6c7; their messages give the pull requests and the resolutions. #1718, merged in a4770ed, brings policyengine-uk 2.180.0, a 65th stage (uc_housing_costs_claim) and the SPI copies' Child Benefit redraw; the H2 fixture is rebuilt on 2.180.0, and 0906bc6 classifies the new stage for the clone-first nesting test. #1736 (in 69a45a0) moves the feed to Chronicle e4d46c93.

Fixes from the K = 15 comparison (25 Nov)

María ruled on 25 Nov to fix the comparison's three findings in this PR, with one new K = 15 spine for all three:

  • 57bbe08 floors hmrc_spi_employed_income at zero. The HMRC identity adds the SPI tape's miscellaneous employment leaf, which is below zero on some records, and uk_nonnegative_columns blocked the head's build on it. The receipt counts the floored rows' sources, banded.
  • 1e3de63 draws the SPI copies' areas by the FRS rows' rule. spi_copy_areas now runs after spi_housing_shell, and draws each copy at L2 (its region, by the households of the band the shell drew) where the region holds that band, else at L3. Before, copies drew at L3 and the shell drew their band without the area, so band and authority were nearly independent, and one authority's Band G row started past the solver's cap. The shell prices each copy's bill at the expected Band D of that same cell. A copy's area now follows its drawn band, so clone 0's SPI copies hold K = 1's areas only where the shell draws the same band, as their council tax already did.
  • 35c9fb2 gives each high-value support copy its own key and area, drawn at its parent's level as another clone of the household would be, and in Great Britain its council tax at its new authority's Band D. Its value stays its parent's. uk_copy_area_agreement now holds these copies to their parent's region and clone index alone.
  • f9a3a3c regenerates the H2 fixture and the coverage manifest once for the three, recomputes the gate contract pins, and updates the tests. It also fixes the shell's reference where a region holds none of a band: that cell takes L3, as the draw does. 7d5d338 brings two engine-tier tests to the same rules.

Second review (26 Nov)

The second review is answered here. Items 1 and 2 land before the next K = 15 spine, which must be built at f366de7 or later:

  • b5ae96b (item 1): a share_of_parent partition may miss a member only where a signed deferral leaves its cell off the frame; any other gap refuses, naming the partition, the area and the member.
  • 8eaaf96 (item 2): on a statute row the rebate and the reduction move by the bill's own change, so a household on full reduction pays nothing. This moves G6's values.
  • 6f619ce (item 4): uk_high_value_copy_area_mapping_integrity holds the high-value stage's placement record to the geography block.
  • 5242f2c (item 5): the three-system engine test runs the high-value stage's Northern Ireland call on the installed engine.
  • f5c1dc5 (item 6): dense-spine refuses a host under 72 GiB of memory before it fetches the inputs.
  • e40d98a (item 3): the SPI forest test reports its digests on a platform without a recording, so CI's log gives the Linux ones.
  • 37a967f (item 7): five fragments and a test docstring follow the 25 Nov rules. 83fc8ee regenerates the H2 fixture and the coverage manifest.

Commit groups

Group What State
(0) Exact per-clone engine blocks: policyengine-uk's population-share formulas read the pool, not the block in
WAS and land WAS's income predictor on the survey concept; the two self-normalising land rows made diagnostic in
(a) Keyed RNGs, Bernoulli shares, copy ids that do not depend on K, keyed tie-breaks, CGT copies on the true-source weight, ISA tied ranks in: 1a to 7, their follow-ups and the transport kernels' binding rule; arm a1 ran on 10 Nov (below)
(b) Identity columns, the 14/15 move, G1/G1b and the graph plumbing in: commits 1 to 6, a CI follow-up and per-call rank ids (11–12 Nov); arms b-K1 and b-K15 ran (below)
(c) G2–G5 ahead of stages 10–12, take-up replica counting, the frs_brma fold, the SPI-copy area draw, G7, G8 inside the WAS chain, gates, dense re-basing in: 1 to 12 (11–13 Nov); the national-line exclusion commit waits for its signature
(d) G6 council tax localisation, the stage-5 flag, CTR and rebate scaling, the WAS FRS-bill predictor, the reduction-within-bill gate in: 1 to 6 (14 Nov)
(e) Housing shell changes in: 1 and 2 (15 Nov)
(f) Docs in: 1 to 7 (16 Nov)

Groups (0), WAS and land, and (a)

Their per-commit notes, with what moves at each commit, are in this comment.

  • (0), 0.1 to 0.5: exact per-clone engine blocks. policyengine-uk's three population-share formulas read the pool, not the block, a guard judges every other whole-population formula, and the spine's engine calls batch by clone. Its only data change is the annual-income factor's float32 step, kept by ruling on 7 Nov; the rest is inert until G1. The items for Max are in the comment.
  • WAS and land, b50fd72 to 5019573: both WAS stages read the engine's HBAI net income before negative incomes are reset to zero, and the two self-normalising land rows (E43B and E44R) leave the solve as measured diagnostics. Every WAS and Lifetime ISA draw can move, and the solve drops the two rows on both lines. Arm a0 measures it.
  • (a), 5703a34 to 27b4d47: copy ids that do not depend on K, keyed RNGs, Bernoulli shares, keyed tie-breaks, band donors seated within each geographic clone, CGT copies on the true-source weight, ISA tied ranks, the derived binding rule over every first-party package and the transport kernels, the Child Benefit gate's per-age tolerance and E8's band-donor scope. Arm a1 measures it (below).

Group (b)

Six commits, as designed and ruled on 10 Nov. Stage numbers in these notes keep the order before commit 3, which inserts G1 and G1b and moves stages 14 and 15 up.

  • f2c7aae (1) folds geographic clones onto their lowest-id record, with one key group per survey record (ReplicaFold.key_group), and checks record ids by sorting. It adds the shared, country-neutral clone expansion core, microcosm.build.clone_expansion (CloneIdRule, CloneDeclaration, expand_clones), which takes the country's details as a declaration (decision 10; for Max). No value moves: every spine is one clone today.
  • 3e6abef (2) adds G1, geographic_expand, and G1b, geographic_identity, bound to no stage yet.
    • G1 gives every FRS household K clones through the shared core: clone k takes id + k × 10^9 on the five id columns, w / K of its household's design weight and the source columns.
    • G1b writes each household's geography_household_key as the dense line's uk.full.identity did; (c) 4 retires that node.
    • The clone-index names and the clone count move to a leaf module, geographic_clones, which every counting stage and the dense kernels that read the names hash.
    • Each SPI-channel adult draws its bonus within its own clone (O8a), and UC capital counts a cell's donors in survey records (decision 6).
    • A test checks, stage by stage, what of a clone-first spine nests on the one-clone spine exactly and what only to rounding (O10).
    • Node keys move; no value moves at one clone.
  • 8a3c8cc (3) moves stages 14 and 15 (frs_hmrc_spine_leaves, frs_annual_income_spells) ahead of stage 10 and wires G1 and G1b in after them at K = 1 (decision 3). Stages 10 to 13 now run on every clone, and stages 10 to 12 count their receipts' support in source households.
    • Two strict operation kinds join the shared sources schema, expand_geographic_clones and key_households_by_clone_path (for Max). K sits on G1's graph node, never in a stage contract.
    • Stage 16 no longer writes the source columns, which G1 now owns. The root adds two typed carriers, imd_decile and council_tax_band_observed, which the release drops and no receipt reports. microdf-python's version enters every node key (decision 2). The 10 Nov text items, stage 53's tie clause among them (decision 1), ride the one H2 regeneration.
    • No value moves at K = 1: on H2 the oracle's final frame matches the parent's on every existing column, the weights and the mass log, and H2 parity passes. Seven stage contracts move, and every UK spine node re-keys.
    • Outside the UK only the transport gate battery re-keys, since its key covers the operation-kind list, so New Zealand's terminal gate and the export and package nodes after it re-key (for Max). No other transport, US, BE or AM key moves.
    • Dense refuses a clone-first spine; national refuses one from commit 5 (decision 4).
  • 5126da8 (4) receipts the geographic clones and makes the gates read the clone count (decisions 7 and 11).
    • Every FRS-trained fit folds through fold_geographic_clones. On more than one clone, its evidence gains geographic_fold: the clone count, the source households the fit selected, how many of them have clones that differ on what the fit reads, and their share.
    • The SPI income stage's twin check reaches the copies of every clone (twin_identities); each copy's uniforms stay keyed on its own identity.
    • Stage 16's receipt gives the clone count, and its two pension-age counts are rounded source households. Stage 17's funding rows take one count-free form at every seating, with two booleans, funding_within_share and funding_matches_bands; on a capped seating its band counts are rounded source households. The band donor check reads the booleans and, on a capped seating, recomputes the seats from the transferred phase's frame.
    • The six support-clip stages and property components multiply their row maxima by the clone count. Stage 25 counts its households at the value cap in clone 0, and so do the take-up signal and apprentice receipts.
    • A table pins every count-like constant of the spine to what it counts and how it meets the clone count (O13).
    • No value or gate verdict moves at K = 1. Every UK spine node re-keys, not only those from stage 16 on.
  • 43c8829 (5) takes the clone count on the spine build, --n-clones (1 to 100, one by default), and hands it to G1 and the engine, which runs one simulation per clone after G1. The engine's identity does not take K.
    • A release candidate takes one clone until (c) pins the count, and the national line refuses a clone-indexed spine at its first node that reads the frame, one clone included, until (c) drops the clone indices at national export (decision 4).
    • --stage-profile-dir runs every spine kernel inside the stage profiler without moving any node key (the memory guard ruled on 6 Nov). Profiles keep failure messages, so they are not published.
    • The identity tool takes --spine-sidecar and checks K against it. E4 and E5 compare only what their own stages last wrote, on the inputs those stages read: a column a later stage declares rewriting is reported under rewritten_later (E5's student_loan_balance, E4's take-up flags), and E4 rebuilds LHA_category and the apprentice walk's weights as those stages saw them. E8 reports stage 17 in the stage's own receipt forms.
    • A new engine-tier test runs the H2 spine at one and four clones. On H2's capped rung, stage 17's common mass scale at four clones is below one clone's, so four times the clone-0 weights do not nest there; commit 6 takes this up.
    • The engine-uk CI job's cap rises from 60 to 120 minutes for that test (until 753ff31, below).
    • No value moves at K = 1. The sidecar gains geographic_clone_count.
  • 8e733d3 (6) keeps stage 16's refusal of a clone stratum that has base mass and no SPI copy (decision 9's first branch), since b-K15 drew a copy in every clone stratum (B07); a fuller rung draws more in each. Stage 17 is unchanged: its common mass scale at K = 15 equals K = 1's on the f010 rung (B08), which seats capped as H2's does, so the gap commit 5's test found is H2's own, and the common scale stays either way (ruled 10 Nov). Docstrings and a stage-level test; no value moves. The stage-16 notes sentence rides (c)'s first regeneration.
  • 753ff31 runs that test after merge only (ruled 11 Nov), in a new engine_after_merge/uk/ category whose engine-uk-after-merge job runs on pushes to main; the engine-uk cap is main's 90 minutes. The module is renamed test_h2_clone_first.py: as an acceptance-suite file it failed the graph acceptance burndown's checks, which the lint job runs. No node key moves.
  • 0bc82fa (decision 12) gives each engine simulation ids that policyengine-core's 32-bit store keeps apart, which B09 requires before any f100 K = 15 build. policyengine-core stores policyengine-uk's five id variables as int32, converting larger ids without an error, so two ids that wrap to one value become one stored key for every formula that reads it (the Warm Home Discount, Universal Credit deduction and birth-month draws).
    • A new shared, country-neutral module, microcosm.frame.adapters.engine_identifiers (for Max), hands a simulation the frame's tables unchanged where no entity's stored ids repeat. Where an entity's would, its ids become 1 plus their rank in that simulation and memberships follow, so a clone-by-clone call ranks each clone's rows.
    • The UK adapter declares int32 and checks it against the installed engine, refuses a request for an id the engine cannot store exactly (no stage makes one), and filters policyengine-uk's EntityIdWarning, refusing to build if that class moves.
    • national_frame's release ranker keeps its own code; moving it onto the shared step is left for Max.
    • Where no stored id repeats, as on b-K1 (B09), the engine's input is unchanged byte for byte; H2's oracle and fixture are bit for bit. Every UK node re-keys; no other country's does.

Group (c)

Twelve commits, designed on 11 Nov on defaults listed for María's review, and numbered by that design. Commits 1 to 11 are in. Commit 8 is the first to move values at K = 1.

  • 8a46d88 and e5244a7 ((c) 6) add a shared, country-neutral fallback-level chooser for conditioned area draws, choose_fallback_levels in atomic_support_conditioning (for Max), and its review follow-up. Nothing calls it yet, and no node key moves.
  • ccf0dbc ((c) 7) adds the code of the spine's geography and private-rent stages, unwired: the conditioned area draw (atomic_area_conditioning), G2 to G5 and the SPI-copy area stage (spine_geography), and G7 (spine_private_rent). No stage declares them yet; a later commit of the group declares them and regenerates H2. As ruled on 11 Nov, Northern Ireland's SPI copies re-draw their BRMA.
  • bc121ad ((c) 1) counts the Child Benefit, Pension Credit and Universal Credit take-up anchors and the apprentice target within each geographic clone, through a keyword-only strata on the shared assign_binary_with_anchored_residual (for Max), so clone 0 takes a one-clone spine's flags. E4 recomputes each row's clone. K = 1 is bit for bit on H2 (the oracle and the fixture); the root and 48 of the 55 stage kernels re-key, and no transport kernel does.
  • fc2a67e ((c) 2) makes the dense line refuse, before it pins an input or composes a graph, any spine that is not geography-first: one whose stages, operations and build-sidecar geography block include the area stages and the WAS home-value localiser. The roster is a names-only leaf (geography_first_roster), checked by spine_posture; the check runs again on the sidecar the build authenticates and on the spine it composes. No spine built from this code passes yet, so dense refuses every spine, dry runs included, until commit 11. No value or node key moves.
  • b268f6c ((c) 3) retires the dense line's five localisation nodes (home values, council-tax bands, BRMAs, private rents and fuel-relief flags), with their sixteen flags, resource pins and release-candidate refusals. Their work moves into the spine in commits 7, 8 and 11, and the dense line keeps the spine's council-tax bands. The functions the nodes called stay, with their tests. Keys only: 30 dense and national kernels re-key, the bound-spine checkpoint's among them, so every node after a bound spine re-keys; no spine or transport kernel moves.
  • fd5a483 ((c) 4) builds the dense line on the bound spine as it stands. Dense no longer samples, expands, keys or places households of its own: its clone count, sampling rung and seed and its geography binding are the spine's, read from the authenticated sidecar or the spine request, and its pool keeps every row of the spine.
    • The sampling, expansion, identity and geography nodes go, with eight flags: --geography-assignment, the three atomic-support inputs and their three pins, and --source-lineage-modulus.
    • --n-clones only asserts the spine's K. A dense --sample-fraction other than 1.0 or any --sample-seed is refused by name, a dense build id carries the spine's rung, and a release candidate on a sampled spine is refused.
    • The roster refusal still holds every dense build until commit 11.
    • Keys and records only: on H2 the oracle's frame, stage records and evidence are identical to the parent's. The UK registers 84 kernels where it registered 96, and 64 of them re-key; no other country's kernel moves. A size checkpoint cut before this commit does not resume.
  • 73495f0 ((c) 5) holds every dense reader of K to the spine's clone count.
    • Dense engine blocks refuse a frame whose clone count is not the K their node binds, at every block count, and run in one block or K.
    • A dense release candidate needs an unsampled spine of 15 clones built as a release candidate, whose geography binding is a release's: the atomic law, the geography key, a definition digest and the conditioned supports' pins. country_adapter.uk_spine_geography_binding_failures checks it, and the release pre-flight uses the same helper. The spine's own --release-candidate takes 15 only on a geography-first roster.
    • Size evaluation reads a dense dataset as its clone-first spine's rows, through the copy-id table, with no old-layout path.
    • Keys and records only: 12 of the 84 UK kernels re-key (dense, gate and national kernels and the bound spine), no spine node does, and weight_tables' result keys change. A release candidate on a spine request is refused as recording no geography binding until commit 8 composes that route's block.
  • 511ced0 ((c) 10) adds the code of G8 and of the spine's geography gate checks, unwired: the WAS home-value localiser (area_home_values), stage 25's factor helper, a shared check that copies agree with their parents on declared columns (copy_agreement, for Max), and three stage_health checks (atomic mapping integrity, area home values, copy-area agreement). The reused enum-domain, ladder and local-authority evaluators' failure texts no longer carry counts, and was_wealth's capped-row evidence fields are banded (C-40). Commit 11 declares them.
    • Values: none. On H2 the oracle's frame, weights, strata, mass log and stage records are identical to commit 5's; only was_wealth's two capped-row evidence fields change, each to the band of its count. The fixture regenerates byte for byte and H2 parity passes.
    • Keys: 73 of the 84 UK kernels re-key (graph_kernels defines the spine's 58), and every spine node with them; only the full battery's terminal phase code moves; no other country's kernel or node moves.
  • 5bf229b ((c) 9) re-points the atomic-assignment measurement tool (tools/measure_uk_atomic_assignment.py) at the spine's own area draw, for the a2 arm's assignment-only receipt and decision 9's Northern Ireland check. It binds a spine checkpoint, clones and keys its base rows with G1 and G1b, and draws two laws on them: today's region-only one and G2's conditioned one. It records expected against realized area support, the ladder gate's verdict and Northern Ireland's district placements.
    • Its evidence and receipt are unpublishable by construction ("publishable": false; an output path inside a checkout is refused) and follow a stricter disclosure rule, rule 2; evidence written before keeps the rule it was written under.
    • Tool only: no kernel, node key or value moves.
  • 24ea46a ((c) 8) declares and runs the area and private-rent stages in the UK spine, which now has 61 stages. This is the group's first H2 regeneration.
    • Each geographic clone draws its own atomic area and ladder, then takes its engine local authority and fuel-relief flag, before the draws (atomic_area_assign, local_authority, rfdr).
    • area_brma takes frs_brma's place after frs_household_draws. spi_copy_areas gives every SPI copy and income band donor a key and an area of its own. private_rent reads each Great Britain private renter's rent off its BRMA's list.
    • The spine's sidecar records how its areas were drawn. The stages that read the supports hold them to that record, and the spine-request route binds the same block.
    • Values: new columns for the area assignment and ladder, local_authority and in_rural_fuel_duty_relief_area. Great Britain's BRMAs come from the drawn area. Northern Ireland's households keep the BRMA frs_brma drew, and its SPI copies draw their own (ruled 11 Nov). Great Britain private renters' rents follow their BRMA. Through the engine, council tax reduction, LHA and fuel duty move for the households these columns reach, and so do the later stages that read the engine's income. The take-up, person and household draws do not move, since they read no area column.
    • Keys: every spine node re-keys, and 68 of the 83 common UK kernels move. Outside the UK, only the shared transport gate battery re-keys, through the six new operation kinds, so four NZ transport nodes re-key (accepted 12 Nov, below). No US, AM or BE kernel or fingerprint moves.
    • The dense line still refuses every spine, since the roster lacks only was_wealth's home-value localiser (commit 11). National still refuses every clone-first spine (commit 12).
    • Checks: the engine-free UK, shared and importer suites; the engine-tier files the commit touches, one at a time; a new three-system engine test; and 11 mutants, each caught. The area stages also ran on a real spine before the push; that record is not published.
    • Held: the take-up rate readers other than frs_person_draws do not bind take_up_contract.json in their stage contracts. This predates UK graph: move geography assignment ahead of enrichment (geography-first reordering) #931 and goes to a follow-up. Not verified locally, for want of Node modules: test_uk_orrery_reconstruction's dense-declaration test and the Node checks in test_graph_evidence and test_graph_orrery. CI's engine-free job checks them.
    • The commit message lists the defaults taken beyond the design, for María's review.
  • 164edf3 ((c) 11) localises home values inside the WAS chain, retires regional_home_values and registers the spine's geography gates. The spine now has 60 stages. This is the group's second H2 regeneration and its one gates digest break.
    • was_wealth declares the home-value localiser (localise_main_residence_value, G8) after the chain's second segment. Each England and Wales owner's main residence is read off its assigned constituency's knots, at its rank within its FRS region, and the chain's later segments condition on that value. regional_property_uprating now divides by the draw G8 keeps, so it returns each localised home to its knot value. regional_home_values retires.
    • Shared vocabulary (for Max): the source schema gains the localise_main_residence_value kind and an optional denominator on uprate_to_regional_reference, and assign_regional_home_values leaves the schema and ALLOWED_SOURCE_OPERATION_KINDS.
    • Gates: the assembled boundary gains the base area draw's mapping integrity. The transferred boundary gains the SPI-copy area stage's mapping integrity, each later copy's agreement with its parent, the local-authority engine domain and the geography ladder, and it takes the BRMA domain from the assembled boundary. The ranking gate becomes uk_stage_area_home_values_ranking, on the constituency knots. The local battery's BRMA recheck retires, so the local contract has six gates. No gate kind is added. A spine built before this commit no longer binds.
    • The packaged roster is now geography-first, so the dense line accepts a packaged spine whose sidecar records its geography block. National still refuses every clone-first spine (commit 12).
    • As María ruled on 13 Nov, --expected-constituency-vintage retires.
    • Values at K = 1: England and Wales owners' main residences come from their constituency's knots instead of their region's, and the chain's later wealth segments condition on them. Scotland's and Northern Ireland's main residences do not move. High-value home support selects on the localised values; its copies keep their parent's value and, since 25 Nov, draw their own area. Property components and purchases, UC capital, CGT selection and redraw, ISA and private school move with them.
    • Keys: uk.stage.regional_home_values@1 goes, and 78 of the other 88 UK kernels move; every spine, dense and national node re-keys. Outside the UK, only the shared transport gate battery re-keys, again through the allowed operation kinds, so the same four NZ transport nodes re-key (the cause accepted on 12 Nov). No US, AM or BE kernel or fingerprint moves.
    • Checks: the engine-free UK directory in four chunks, the shared and microcosm-data engine-free tests and the US files that import an edited module; the engine-tier files the commit touches, one at a time, H2 parity among them; and the G8 law review's mutants, each caught. Three tests fail here and at the parent alike: the Orrery dense-declaration test (no Node modules), an engine-unavailable test (the engine is installed here) and a test that reads the live US latest pointer (the remote answers 404).
    • Not verified without a build: that every constituency a real spine assigns has knots, and that a real spine passes the new ladder, domain and ranking gates.
    • The commit message lists the defaults taken beyond the design, for María's review.
  • 89caa1a ((c) 12) builds the national line on a one-clone geography-first spine whose households carry their areas. The early refusal of every clone-first spine retires.
    • The national problem and the national preparation refuse a bound spine whose build sidecar records a clone count other than one, or whose roster is not geography-first. They refuse before the problem reads its frame and before the preparation pins its input.
    • The preparation also refuses every build until the reviewed exclusion of household.atomic_area_basis applies on the national line and is in force on the build's --review-date. At this commit the entry lists the local line alone, so every national build is still refused. The next commit, the signature approved on 13 Nov, lifts the refusal with no code change.
    • A national build writes its release without the clone indices, which are constant at one clone, and with the spine's three area codes under the consumers' names. The release-cut gates read that export. The release certifier checks the spine's geography binding with the helper the dense pre-flight uses, on the sidecar the build record names, before any gate runs. It also refuses a candidate that carries a clone index.
    • Values: none move at this commit, since no national build runs. After the signature, a national build's H5 carries the spine's areas. No national build has measured them.
    • Keys: 84 of the 88 UK kernels move, because the spine registry's 62 kernels and 21 other UK kernels hash national_frame. Every spine, dense and national node re-keys. Outside the UK no kernel, fingerprint or node key moves.
    • Checks: the engine-free UK directory in four chunks, the shared and microcosm-data engine-free tests, the US files that name an edited module, the H2 fixture check and a mutant of the national writer, which a new end-to-end test catches. Four tests fail here and at the parent alike: two Orrery tests (no Node modules), an engine-unavailable test (the engine is installed here) and a test that reads the live US latest pointer (the remote answers 404).
    • Not verified without a build: a national build and release cut on a real spine with areas, end to end.
    • The commit message lists the defaults taken beyond the design, for María's review.
  • F10, for @MaxGhenis (a merge blocker). (c)'s geography stages run the shared atomic-geography operator in process, on keyed integer arithmetic. Commit 8 (24ea46a) declares them BITWISE, because the spine's BITWISE gate refuses a platform-scoped typed edge, and commit 11's home-value localiser runs on the same BITWISE stage kernel; the operator's own graph kernels declare PLATFORM_BITWISE. If they should declare PLATFORM_BITWISE instead, commit 8's typed edges and the spine battery's class change with them. The question concerns the operator NZ transport also uses, so its owner may want to read it.
  • Next. The commit that extends the reviewed exclusion of household.atomic_area_basis to the national line waits for its signature. Group (d) follows below.

Group (d)

G6 runs just before WAS (María, 13 Nov). On her 6 Nov rulings, each clone's FRS bill is scaled by its authority's 2024-25 Band D over the expected Band D of its draw cell, and reported CTR and the rebate are scaled by the same ratio. SPI copies and band donors are localised at their own draw cell. WAS's bill predictor reads the pre-G6 paid bill (council_tax_frs_bill, dropped at release), and its HBAI income reads the localised bill. On her 14 Nov rulings, the 2024-25 statute sets the bill where the gross bill was not observed (a missing bill, or a reduction of unknown size) and the band was, and reductions are capped at the bill outside Northern Ireland. Defaults for review: the stage-5 bill provenance, with a fourth value for Northern Ireland, and the form of the CTR ≤ council-tax gate.

The group has six commits. Commit 5 alone moves values, with the group's one H2 regeneration. Commit 6 adds the gate. It is a second gates digest break for the plan's new spine gates, which the plan put in one ((c) 11's), so it extends the plan (D-27). The 10 Nov Child Benefit tolerance change (c8de582) also re-pinned the battery's digests.

  • fdb9a38 ((d) 1) vendors each Great Britain authority's 2024-25 Band D and adds the statutory band formula. No stage reads either yet.
    • England and Wales: uk/council_tax_band_d_england_wales_2024_25.json, built by the new tools/build_uk_council_tax_band_d.py from two raw-only Chronicle registrations (MHCLG's Table 8 and StatsWales), read at Chronicle commit 80a3482, each raw file held to its own sha256 (the feed's pin is not that commit; e279da868). Its --check rebuilds the file byte for byte. Scotland: uk/scotgov_band_d_council_tax_2024_25.json, vendored from the pinned feed (CTAS 2026, 32 council areas).
    • The loader uk_runtime.council_tax_band_d merges both over the roster's 350 Great Britain codes as exact rationals. It refuses a Northern Ireland code, a missing or repeated authority, and an English or Scottish value off pence.
    • The statute: each nation's band proportions to Band D as exact fractions, and the single-adult discount of a quarter. An engine-tier test holds them and the codes to policyengine-uk's.
    • Keys: the UK country and solve fingerprints move, so 11 of the 88 UK kernels move (gate, measure, problem and target kernels) and none of the spine registry's 62. Every spine node after area_brma re-keys (65 of 90), the gate nodes through their kernels and the rest by chain, and so do the dense and national nodes after them. No stage contract, gate phase code or H2 file moves. Outside the UK no key moves.
    • Checks: the tool's --check; the vendor --check over every register entry; 36 engine-free files (the touched ones, the named guards and every reader of the package, the register or the fingerprints); through the engine slot, the engine-tier parity test and the H2 fixture check; the coverage manifest check.
  • df37feb ((d) 2) adds two country-neutral helpers for Max's review, imported by nothing yet: atomic_support_expectations.draw_cell_expectations, a draw cell's exact expected value under the draw's own weights (G6's reference), and bounded_amounts.amounts_within_bound, booleans that hold amounts within a bound (the reduction-within-bill check). No key moves.
    • Checks: 120 tests, with Hypothesis properties against the shared draw's own integer table, and mutants, each caught. The expectation test reads that draw's internal table, so a change to the draw, which New Zealand's transport graph also runs, can fail a shared test.
  • 27bb614 ((d) 3) adds stage 5's bill provenance and the reduction-within-bill check, both unwired: no stage writes the provenance and no gate declares the check, so no value moves.
    • Stage 5 (frs_council_tax): derive_council_tax_provenance names the branch each household's bill took (observed_gross, missing or unknown_reduction), and not_levied in Northern Ireland, from the bill's own masks. The bill is bit for bit unchanged. The provenance's receipt form counts distinct source households before the copies, rounded, so frs_council_tax joins the counting stages.
    • stage_health.council_tax_reduction_within_bill holds each household's rebate and reported reductions (summed over its persons) within its bill, through the shared bounded_amounts, with Northern Ireland left out. Its details are booleans. The stage-health binding routes its keys, and the gate registry gains bounded_amounts.
    • Keys: UK only. 66 of the 88 UK kernels move: the spine registry's 62 (through graph_kernels) and the spine, full-battery and national gate kernels. Every spine node and H2's bundle re-key; on a bound spine, dense re-keys 5 of its 11 nodes and national 1 of 6. No stage contract, gate phase code, fingerprint or H2 file moves. Outside the UK no key moves.
    • Checks: the legacy oracle's identity on H2's fixture through the engine slot (equal); the H2 fixture check and parity test; the coverage manifest check; the UK and shared engine-free directories in chunks, whose three failures fail the same way at the parent and come from this environment; mutants of the provenance and the check, each caught but one on the unchanged bill code.
  • 06c58f6 ((d) 4) adds G6 (council_tax_localise) as one new module, uk_runtime.spine_council_tax, unwired: no source manifest declares the stage and only its own tests import it, so no key or value moves.
    • The reference: each Great Britain row's draw cell is recomputed from the inputs the area draw read, and its reference is the exact expected 2024-25 Band D of that cell under the draw's own weights (the shared draw_cell_expectations). The ratio is the row's own authority's Band D over that reference. SPI copies and band donors use their L3 cell. A guard refuses a row whose drawn area is not in its recomputed cell.
    • The paths: an FRS row with an observed gross bill takes the ratio; a missing bill or a reduction of unknown size takes the 2024-25 statute where the band was observed, and the ratio where it was not. Support-channel rows take the ratio, and Northern Ireland's rows are untouched. The rebate and the reported reduction are scaled by the ratio and capped at the new bill.
    • Before any rewrite, the stage keeps the paid FRS bill (council_tax_frs_bill: the bill less the rebate, floored at zero) for WAS's predictor. Its evidence holds booleans, digests and rounded counts of source households; every field but the clone count is the same at every clone count.
    • Checks: 74 tests on invented households and toy supports, at K = 1 and 3, with the repository guards (482 tests in all); 56 mutants, each caught but one equivalent; the H2 fixture check through the engine slot. No key moves in any country.
  • 12b052f ((d) 5) declares G6 right after private_rent and right before was_wealth, so the spine has 61 stages. It is the group's only value-moving commit and its one H2 regeneration.
    • Stage 5 declares a derive operation for council_tax_bill_provenance and writes it with the bill, from the same branch masks; the bill is unchanged. G6 declares its four operations in order, its two Band D resources with their hashes required, the kept bill as its one output and its three rewrites (council_tax, council_tax_rebate, council_tax_benefit_reported). A strict localise_council_tax operation kind joins the source schema.
    • was_wealth.recipient_predictors, which was_lisa also calls, takes the bill predictor from council_tax_frs_bill and refuses a frame without it; neither WAS declaration changes. The HBAI income both read sees the localised bill and reduction. The release boundary drops both new columns. The roster names G6, so the dense and national lines refuse a spine built before this commit.
    • Graph: G6 joins the reader-isolation boundaries, as the compiler requires (it rewrites the housing shell's reduction, which private_rent reads), and reads the three conditioned supports as graph sources, as the area stages do.
    • What moves: on H2, every existing column keeps its values through private_rent, and stage 5 adds only the flag (a premise check against commit 4). From G6 on, Great Britain's bills, reductions and rebates move, and with them the WAS and LISA draws and every later stage that reads wealth, council tax or the reduction. WAS's bill predictor is unchanged bit for bit. Northern Ireland's rows are unchanged.
    • Keys: 86 of the 88 UK kernels move (all 62 in the spine registry), and uk.stage.council_tax_localise@1 is new. Every node re-keys in the spine (90 → 92 nodes), H2's bundle (88 → 90), dense and national. Outside the UK only the shared gate battery re-keys, through source_manifest: with fixed donors, exactly New Zealand's terminal gate, export prepare and readback, and package nodes, the cause María accepted on 12 Nov. No AM, BE or US key moves.
    • Regenerated: source_stages.json, H2's uk_spine.json, fixture.json and cgt_asset_type_facts.json, and the coverage manifest.
    • Checks: through the engine slot, H2 parity, the H2 fixture check and the engine-tier files the commit edits, among them G6 after the real-engine area and copy stages at K = 1 and 2 and the clone-first test at K = 1 and 4; 958 engine-free tests on the touched files and guards; the UK and shared engine-free directories in chunks, whose four failures fail the same way at the parent and come from this environment.
  • cbf7b34 ((d) 6) adds the gate on council tax reductions, holds the later copies to their parent's council tax, and rewords the WAS support gate's note (María, 14 Nov). No value moves at any clone count, and no H2 or generated file changes.
    • The gate, uk_council_tax_reduction_within_bill: a stage-health entry on council_tax_localise at the transferred boundary, right after uk_copy_area_agreement, release-blocking, with evidence_absent_blocks. It runs (d) 3's check. Outside excluded_regions (NORTHERN_IRELAND, which G6 leaves uncapped), each household's rebate, and its persons' reported reductions summed, must be at most its bill plus absolute_tolerance (1e-9), and every value it reads must be finite and non-negative. Its details are booleans, and its texts name the stage, the check and the columns only. A spine without G6's receipt fails it closed. It sits at the transferred boundary because no spine stage after G6 writes the bill or a reduction.
    • The copy agreement: the four layers whose copies are made after G6 (high_value_support, cgt_support_split, cgt_incidence_clone, cgt_residential_split) also hold each copy to its parent on council_tax and council_tax_rebate. The support channel's layer is unchanged, since G6 prices those copies at their own cell. The kept bill is dropped at release, so the agreement leaves it out (D-26).
    • The WAS support gate's note now names the clipped columns (through its columns parameter) and the exempt ones (main_residence_value, property_wealth). Text only: its parameters are unchanged.
    • Scopes and contract: UK_SPINE_GATE_SCOPE gains the gate, and the spine's transferred phase code also hashes bounded_amounts. microcosm.data.contract is re-pinned from the live producer: the battery's three digests and the spine part's two. Every spine built before this commit no longer binds, commit 5's included.
    • Keys: UK only. 13 of the 89 UK kernels move (gate, target, problem and measure kernels), none of the spine registry's 63. In the spine, the gate nodes and every node after area_brma re-key (67 of 92); dense and national re-key; H2's bundle keeps every key. Outside the UK no key moves, the NZ nodes with fixed donors included.
    • Checks: through the engine slot, the integration smoke and H2 parity; the H2 fixture check (byte-identical); 808 tests on the touched files; the UK and shared engine-free directories in chunks, whose four failures fail the same way at the parent and come from this environment; mutants of the gate's parameters and the copy layers, each caught.
  • Each commit message lists the defaults taken (option and default), for María's review.
  • Held for María: the arms (a2 at (c)'s head, a3 at commit 6 and (e) as its own arm: three arm pairs, where the plan has two); the HBAI-channel receipt at a3; (e)'s contract for SPI bills (D-37); the wording of commit 6's two gate notes, in the diff. For Max: the two shared modules, the localise_council_tax operation kind and its strict schema variant, G6's bitwise class, F10, and bounded_amounts in the spine's transferred phase code.
  • Gate manifest headroom. The full battery's serialized gate manifest, which the UK full gate nodes (uk.full.gates.preflight, uk.full.gates.calibrated) carry as a parameter, is 5,845 characters under the graph schema's string limit at this head (an earlier version of this description gave 118, in error), which Orrery's bound matches. A longer note or another gate needs that shared limit raised, or those nodes to carry a digest or a note-free manifest (Max).
  • Not verified without a build: a real spine passing the new gate.

Group (e)

Group (e) has the housing shell price the council tax of Great Britain's SPI copies and band donors by the 2024-25 statute at their region's expected Band D, the reference G6 takes for their draw cell, after its band draw. The bill reads neither the copy's drawn area nor its local authority, so G6 stays the one localiser (D-37). On María's 14 Nov rulings, the band is drawn as today, from the income classifier, and Northern Ireland's copies keep the bill and reduction the shell draws. council_tax stays in the chained QRF, so the chain's other draws are unchanged: in Great Britain the drawn bill is replaced after the chain, and the reduction is capped at the statute bill. Commit 2 moves values and regenerates H2 once. No gates entry, contract pin, operation kind or schema changes.

  • aef1ce0 ((e) 1) adds uk_runtime.spi_housing_council_tax, unwired, so no key or value moves: each SPI copy's reference Band D (draw_cell_expectations at its L3 cell, its region by households, with G6's arguments), from the region and the conditioned supports, never an area column; and the statute bill there for its nation, drawn band and single-adult discount, in Great Britain only. Its tests run G6 on these bills: within 4 ulps of the statute at each copy's own authority, with no copy capped.
  • e0165f4 ((e) 2) wires it into spi_housing_shell: the value-moving commit, with one H2 regeneration.
    • Declarations: G6's two Band D artifacts and Scottish verify operation, the impute's parameters unchanged, and a derive for council_tax. The shell reads the conditioned supports as graph sources and no household area column, so (d) 5's guard pin stands. The roster names the derive, so dense and national refuse an older spine.
    • What moves on H2 (a premise check against (e) 1): Great Britain SPI copies' bills, and their reductions and rebates where a cap binds; from G6 on, their localised bills and WAS's bill predictor on those rows (the paid bill G6 keeps), still free of the drawn area; then the WAS chain and later stages, FRS rows from the chain's pooled ranks. Bands, every other chained amount and FRS rows through G6 are bit for bit. Keys: UK only. The message lists the checks and the key counts.
  • Not verified without a build: every gate on a real spine with the shell's statute bills.
  • Later, not this PR: the band tilt moves to SPI seating (María, 14 Nov).
  • Held for María: Scottish water's source (E-28).
  • Next. Group (f) follows below. Then the arms (D-35), on the rebased line, and the full builds; any held commit María rules in (Scottish water, text items) lands before the arms. The national-line exclusion commit still waits for its signature; it re-derives microcosm.data.contract's pins at its own head.

Group (f)

Group (f) brings the docs, docstrings and comments in line with the clone-first spine. No value moves.

  • 82ebd55 rewrites docs/uk-atomic-household-lineage.md: true sources, copy paths, the copy-id fields and the geography key.
  • 5b2d8e6 adds a dated UK amendment to the 10 September doctrine in docs/geography-assignment.md; the 10 September paragraph stays as written.
  • 9c77346 brings docs/uk-full-build-graph.md and seven neighbour docs up to date, with the national line's refusals and the certifier's geography check.
  • 4617ab5 points four older fragments at the spine's stages and corrects three UK graph: move geography assignment ahead of enrichment (geography-first reordering) #931 fragments.
  • 6355517 updates docstrings and comments in 25 files and renames three dense names to row-wise. Keys only.
  • 2cb32f5 says what reads the price-paid support bounds and the Scottish band counts. The UK fingerprints move; no value does.
  • 399ab29 names the spine's stages in code prose and fragments instead of their positions. Keys only.
  • Each message lists its defaults (F-1 to F-26) and what moves. Held: the wording on how Scotland's council-tax level meets G6, (d) 6's two gate notes, the ladder details' reporting form, and two items with Max.

Arms a1, b-K1 and b-K15 (10 and 11 Nov)

Their outputs are not published; the full statements (P01 to P16, B01 to B11) are in this description's edit history before 17 Nov. a1 compared full f100 spines at K = 1: main at the merge base (9d080e7), a0 (53e9e9e), a1 (c8de582) and an ids-only sub-arm (fea2a06). Stages 1 to 15 were identical, every spine and stage-health gate passed on a1 and on main, and one tested cell at the pooled and engine stages, which the disclosure floors keep from being named, leaves that statement undecided. b-K1 (f100, K = 1, at 43c8829) kept a1's shared columns and household weights and passed every gate. b-K15 (f010, K = 15) blocked at the transferred phase on two checks that fail the same way at f010 K = 1, and its 32-bit id wrap led to per-call rank ids. Run time and peak memory: a1 0:27 to 0:31 and 19.3 to 21.3 GiB; b-K1 0:29 and 18.6 GiB; b-K15 1:34 and 18.1 GiB.

Rulings applied

  • Per-clone engine blocks stay releasable when corrected and guarded; Max reviews the shared module and the redefined exact.
  • The guard records in the measure step and raises in the spine.
  • Spine engine calls batch by clone on the dense line; national never batches.
  • Stage 52 ranks private-school attendance over the pool when batched; national keeps the engine's flags after a parity check.
  • No blocked or batched work in policyengine-uk's Universal Credit rebalancing years (2026 on), where it draws new-claimant status by position.
  • Both WAS stages read the engine's HBAI net income (6 Nov).
  • The corporate and total-economy land rows are measured diagnostics, and the household row stays bound (6 Nov).
  • Council tax, 6 Nov (rulings 1 and 2): each clone's FRS bill times its authority's Band D over the expected Band D of its draw cell, with reported CTR and the rebate scaled by the same ratio; WAS reads the FRS bill kept from before localisation.
  • Group (a), 7 Nov:
    • copy ids come from fixed UK radices; a shared copy-id table comes with a follow-up stage;
    • dense builds with more than one clone are refused from the first id commit until (c);
    • band donors are seated by today's walk within each geographic clone, and stages 16 and 17 get per-clone strata;
    • CGT support copies are counted on the clone count times the row's weight, with a four-digit copy field;
    • the SPI support channel is a keyed Bernoulli share, and its count gate takes the repo's 4σ binomial band;
    • the CGT redraw's offsets and jitters and BADR's band offsets are keyed; property components' fixed scalar is left alone;
    • tied ISA balances share a weighted mid-rank.
  • Group (a) follow-ups, 8 Nov:
    • the identity tool has no path for spines built before the copy-id table; it refuses them, and each arm runs its tools at its own commit;
    • a binding sweep commit puts every value-computing helper a stage calls into that stage's key, with a test that each one is bound or listed with a reason;
    • the CGT copy count keeps the K-ulp snap, and copy_rule says so;
    • the identity tool's count check takes the 1e-9 tolerance at K = 1 too;
    • the unused legacy national sampler is retired;
    • two older identity-tool gaps (E5's stored-value check and the stacking map's stage-26 flag) get a tool-only commit before the arms;
    • size evaluation keeps refusing a dataset its inferred multiplier does not fit, to be revisited in (c).
  • Group (a) follow-ups, 9 Nov:
    • stages 42 and 26 put the exact-total correction on a whole household first, trying the 64 heaviest, before today's shared fallback, and copy_rule names that one exception (the 8 Nov rule of never correcting a copy cannot always keep the total bitwise exact: in the synthetic nesting test at K = 7 and 13, no whole household can carry the correction);
    • the identity tool's count check at K = 1 is exact wherever all of a family's copies carry one weight, and keeps the 1e-9 bracket for the rest;
    • the derived binding rule covers every first-party package, with the core modules every node runs through (the frame, the graph executor and its keys) listed with a reason;
    • cgt_structure in stages 26 and 46 stays a listed refusal-only check;
    • every other UK graph kernel takes the same rule in the same follow-up, keys only;
    • stage 17's draw text, which says there is one clone before uk.full.expand, is reworded so it holds at any clone count, at (b)'s next stage-17 regeneration, so the H2 fixture regenerates once.
  • Group (a) review rulings, 9 Nov (evening):
    1. stage 42's one-copy check stays, as a reading of rule B, and its copy_rule names it;
    2. the shared fallback, which can still land on a one-copy household the check refused, is accepted, and the stage notes say so;
    3. the K = 1 count hold's two narrowings are accepted; it also holds a family on its members whose clone halves are still equal, four or more of them, and the identity tool's family test takes the 1e-9 bracket;
    4. the hold extends to K > 1, with a two-float reach where the family weight sits near a power of two;
    5. the engine stages bind what the injected engine computes through, found by a second walk root at the engine class;
    6. each gate battery phase keys on what its own gates compute through, carried on phase params; the national gates bind the gate registry's whole reach; the target and problem kernels take the derived rule in place of Classify the imports the target-compilation kernels' hashes do not yet cover #1497's import record;
    7. regional_home_values keeps SeedSource.NONE;
    8. the walk sees names microcosm.graph exports lazily, and the create kernel's H2-only use of load_source is a listed stop;
    9. the graph_frames move stays.
  • Group (a) review follow-ups, 9 Nov (late):
    • the engine walk stays rooted at the methods the engine stages call, so the concept vocabulary stays unbound for them;
    • the reach near a power of two stays at two floats;
    • the gate phase-code functions and tables move into a small module that only the stale-code checks read, and the spine gate kernel refuses a stale phase code, as the full gates do;
    • the annuity and trust column's name moves into a small module of its own, and the rule counts a store into a dict the function itself creates as local, so frs_spine and frs_relationships leave the target kernels' hashes;
    • the derived binding rule extends to the transport kernels (Belgium and New Zealand) in this PR, through a shared, country-neutral form of the rule that the UK and transport tests both use; that covers microcosm.graph.canonical in the transport compile kernels;
    • calibration_run stays off the preflight's and the solve's key, through gate_scopes.
  • 10 Nov:
    • at (b)'s single H2 regeneration, the copy_rule texts of stages 42 and 26 say the exact-total correction takes tied weights in row order, and stage 53's declaration says tied balances share a rank (its within_band field allows only uniform, so (b) settles the form);
    • the seeds and salts stated only in text stay text: stage 44's offset, jitter and rank-tie salts, stage 47's offset and tie salts, and the main asset type tie-break's reuse of BADR's seed;
    • integer_record_keys' uniqueness check becomes sort-based, in (b);
    • the ISA doc's step 6 is corrected, text only;
    • the stale phase-code check stays as it is: it guards a gate node whenever its kernel runs, but not a stored record that a later run serves under the same declaration's key, and the drivers get no check before keying, since both build their graphs in-process;
    • arm a1 runs before (b)'s commits, and (b)'s design runs alongside it;
    • arm a1 runs on full f100 K = 1 spines (main, a0, a1 and, where needed, an ids-only sub-arm) instead of the f010 rung; stage 17's weights and funding are compared at a relative tolerance of 1e-9, and calibration loss and ESS are not measured;
    • the Child Benefit take-up gate holds each measured age within the larger of its fixed deviation and three standard errors of a share at the age's published rate (c8de582);
    • E8's band-donor scope is fixed before the identity read (27b4d47);
    • (b) goes ahead as designed, with these decisions:
      1. stage 53's tie clause goes in its notes (form B);
      2. microdf-python's version is bound into node keys and recorded beside engine_batches when a call batches, and declared at the next lock bump;
      3. G1 sits between stages 15 and 10, so stages 10–13 run per clone from (b), and (c)'s row is reworded;
      4. no national or dense build between (b) and (c): both refuse early;
      5. source_person_id and source_benunit_id are not minted until something reads them;
      6. UC capital's donors are counted as survey records;
      7. clone-aware gate thresholds scale the row maxima by K and count stage 25's sources at cap in clone 0;
      8. (b)'s arms are b-K1 and b-K15;
      9. at stage 16, if b-K15 shows no empty stratum in clones k ≥ 1, the small-clone-stratum rule stays "refuse as now"; otherwise such a stratum with base mass and no SPI copy keeps its base mass; code-only, with any notes riding (c);
      10. the clone expansion core is shared now, in (b)'s first commit, and Max reviews it there;
      11. stage 17's funding rows take one count-free form at every rung;
      12. if b-K15 records a nonzero per-batch int32 count, the f100 K = 15 build waits for per-call rank ids in their own commit.
  • 10 Nov (late), while María is away:
    • b-K15 runs at f010 after a K = 1 run there; if f010 refuses on a thin-sample gate, it runs at f020 with K = 7;
    • at stage 17, if the K = 15 mass scale differs from K = 1's, the common scale stays, and commit 6 lands its stage-16 part only;
    • (c) is designed and implemented on defaults, listed for her review, with no full build;
    • arm results are posted in the forms already used for a1.
  • 11 Nov:
    • Northern Ireland's SPI copies re-draw their BRMA, at about 0.5 % more stage time;
    • b-K15 runs at f010, K = 15, as designed, since f020 and f005 are not spine rungs (the build takes 0.01, 0.10 and 1.0);
    • per-call rank ids take their design's defaults: an entity's ids are renumbered, by rank within each clone's simulation, only where they would repeat after the engine's int32 cast, so no value moves at K = 1;
    • the clone-first K = 4 H2 test runs after merge only, on pushes to main, and the engine-uk cap is main's 90 minutes.
  • 12 Nov: (c) commit 8's six new operation kinds join ALLOWED_SOURCE_OPERATION_KINDS in source_manifest.py. The shared transport gate battery hashes that file, so four NZ transport nodes re-key (nz.gates.terminal, nz.export.prepare, nz.export.readback, nz.package), as group (b)'s two kinds did. María accepted the move. (c) commit 11's kind change (localise_main_residence_value in, assign_regional_home_values out) re-keys the same four nodes by the same cause.
  • 13 Nov:
    • the dense line's --expected-constituency-vintage flag retires (commit 11, 164edf3);
    • the reviewed exclusion of household.atomic_area_basis, which is constant by construction in the UK, extends to the national line, in its own commit after commit 12;
    • G6 runs just before WAS. It keeps the pre-G6 paid bill as council_tax_frs_bill for WAS's bill predictor, dropped at release. WAS and LISA's net-income predictor reads the localised bill. SPI copies and band donors are localised at their own draw cell.
  • 14 Nov (group (d)):
    • the 2024-25 statute sets the bill where the gross bill was not observed (a missing bill, or a reduction of unknown size) and the band was;
    • reductions (CTR and the rebate) are capped at the new bill on every Great Britain row after scaling;
    • the WAS support gate's note is reworded in commit 6 (cbf7b34), at its gates digest break, to name the clipped and the exempt columns, with no figures. María reviews the wording in the diff.
  • 14 Nov (group (e)): the housing shell keeps today's band draw, and the band tilt moves to SPI seating; Northern Ireland's SPI copies keep the shell's drawn bill and reduction.

Proof plan

  • Each group (0) commit is shown by tests, not builds.
  • Arms: ctl = main, a0 = group (0) with the WAS and land commits, a1 = (a), a2 = (b)+(c)+(e), a3 = (d). a1 ran on full f100 spines at K = 1 (ruled 10 Nov), read against a0 and main, with the ids-only sub-arm it needed (above). (b) added b-K1 and b-K15 (above).
  • Two full builds once the move is in: one f100 K=15 dense build and one f100 K=1 national build.
  • Receipts count true sources at floor 3.

🤖 Generated with Claude Code

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Per-commit notes for groups (0), WAS and land, and (a), moved here from the PR body on 11 Nov to make room for (b) and (c). They are as they stood in the body; "below" and "the next section" mean the body's Arm a1 section.

Group (0)

After the move, the dense build's per-clone engine blocks are no longer identical copies. policyengine-uk's shareholding, corporate_land_value and consumption_shareholding divide by a weighted total over the simulated households, so a block would read its own total, not the pool's (PolicyEngine/policyengine-uk#2896 asks pe-uk to fix the cause).

  • 0.1 adds a shared module, microcosm.frame.adapters.engine_population (the pool-share correction, a recorder of formula runs and a guard that judges them), and policyengine-uk's declaration of its 19 whole-population formulas. Nothing imports the module yet.
  • The annual-income factor now comes from the engine's own growth parameters, not a median over whichever block ran. An annual input with other spells can move by one float32 step on both lines.
  • 0.2 sets each share formula in every dense block, and in every simulation the block builds, to the block's own value times f_b·S_b/S. The guard records any other whole-population formula that ran. exact now certifies corrected blocks plus a clean guard (exact_basis), equal to one pooled engine to float32 rounding. Today's identical copies take a correction of 1 and give the same matrix and metrics, bitwise; national runs one block and records none of the new keys.
  • Merged UK #931 prep: count floors in true sources, fold geographic clones in the FRS fits, ready the conditioned area draw #1519's head (cf8432c), with the executor memory fixes that a 15-clone spine needs.
  • 0.3 batches the spine's engine calls by clone, one engine alive at a time.
    • The frame decides batching: a household table whose household_clone_index carries more than one clone. National never batches, and no spine frame carries the column today, so every call still takes one simulation.
    • Each batch reads the pool's shares (c_b = S_b/S at unscaled weights). The guard raises here.
    • The spine sidecar records engine_batches only when the final frame carries more than one clone. A follow-up commit reads that record from the frame, so a resumed spine reports what a fresh run does, and holds each batch's parameter tree to the one the stage-52 restatement reads.
  • 0.4 ranks private-school attendance over the pool when the spine batches, restating pe-uk's formula from household-local engine values with microdf's weighted percentile rank and the engine's own parameters.
    • Unbatched (national, and today's spine), the stage stores the engine's flags after asserting the restatement equals them bitwise. A mismatch raises; its evidence records only booleans (rank_route, engine_parity).
  • 0.5 updates the dense runbook, the build-graph doc, the local preflight's comments and the changelog.

Data changes in group (0): only the annual-income factor's float32 step, kept by ruling on 7 Nov. Everything else is inert until G1.

What moves without being an output:

  • every spine node key (graph_kernels and the engine modules);
  • the full and national target kernels (measure_simulation and the two frame modules);
  • national's stage-52 evidence.

The spine graph declaration (uk_spine.json), source_stages.json and the coverage manifest are unchanged.

For Max:

  • the shared engine_population module (pool shares, the recorder, judge, EngineBlock, materialize_in_batches, frame_key_sums);
  • the redefined exact and whether the preflight, assembler or microcosm-data mirror should also read exact_basis;
  • the inert predicate for private-school VAT;
  • the 18 source pins, which refuse certified blocked runs after a policyengine-uk re-pin touches a pinned file, until the declaration is re-reviewed.

WAS and land

  • 640b2cf has both WAS stages, was_wealth and was_lisa, match the donor's household income (WAS DVTotinc_bhcR8, net regular income before housing costs less council tax) to the engine's HBAI net income before negative incomes are reset to zero, under one predictor name, hbai_household_net_income. The LCFS and ETB services stages already read the engine's concept (UK: move the LCFS stage to the Living Costs and Food Survey 2024-25 #1164). Before, both WAS stages read household_net_income, which also takes off stamp duty, the TV licence, and the business rates and corporate stamp duty that shareholding spreads over the simulated households.
  • 04ff19f calls the recipient's income the engine's closest concept to the donor's and names what differs: the engine's also counts HBAI's in-kind items and the Warm Home Discount, and how WAS treats pension contributions, maintenance and negative incomes is not verified.
  • 410e822 holds ons.land.corporate_land_value (E43B) and ons.land.land_value (E44R) out of the solve as measured diagnostics, in uk/calibration_measure_exclusions.json, tracked to workstream 2 of Epic: UK land value data for land value tax results by constituency #1521.
    • policyengine-uk's corporate_land_value hands out the engine's own aggregate by each household's share of corporate-sector wealth, so a released file meets it at any weights.
    • The total-economy row counts the land of financial corporations, government and NPISH, which the engine's land_value does not hold.
    • ons.land.household_land_value (E44N) stays bound; its binding note now says households alone.
  • 161c777 tests that the two rows leave the solve and stay on the run's compiled register (national_contract_registry.json).
    • No build step reports a held row's estimate.
    • A tool that scores the un-excluded register, such as tools/evaluate_uk_incumbent_surface.py, measures them, as it does every held row.
  • f50a29f follows up the land commits' review:
    • The total-economy reason now says E44R also counts the land of financial corporations, government and NPISH, which neither E44N nor E43B covers.
    • The two held rows' binding notes record the hold, the parity register is regenerated with its tool, and the changelog lists everything that moves.
    • The national target references regenerate byte for byte on the pinned Chronicle feed.
  • 9219c3c rewords the land changelog and renames the land test to say what 161c777's bullet says. The exclusions register's entries keep their usual "measured on every evaluation" phrase, and the hold is also recorded on Epic: UK land value data for land value tax results by constituency #1521.

What moves:

  • Every WAS and Lifetime ISA draw can move on both lines, and with them the later stages that read wealth and the calibrated weights. Arm a0 measures it.
  • The solve drops two rows on both lines. Both lines split each target family's share of the objective evenly over its bound rows, so ons.land.household_land_value, now the ons_land family's only bound row, carries three times its loss weight before. No other row's weight changes. Weights move slightly through both effects, and a calibrate-only rerun attributes them.
  • The two rows leave every surface that reads only solved rows: the incumbent and release-cut scores, uk_target_fit and calibration_diagnostics.json.
  • The national frozen scoring register loses them, so a national run given a frozen register from before 410e822 refuses.
  • The dense release lists the two exclusions among its limitations.

Group (a)

Commits 1a to 7 are in with their review follow-ups, as are the 8 and 9 Nov follow-ups and ruling commits and the transport kernels' derived binding rule (354296a to 4df4065). So are the rest of the 9 Nov (late) rulings for the UK and the ISA doc correction (b289e8f to 30fe64f). Arm a1 ran on 10 Nov (below), and aed673d and fce5828 came out of it.

  • 22bcdbe (1a) mints every copy row's ids from fixed decimal fields in uk_runtime/copy_id_table.py, so a copy id depends only on its source id and copy path, not on K.
    • Copy k in a field takes id + k × radix on all five id columns. Fields, least significant first: vintage (reserved, 10^8), geographic_support (10^9), spi_support_channel (10^11), high_value_support (10^12), cgt_support_split (10^13), cgt_incidence_clone (10^17) and cgt_residential_split (10^18).
    • The executor recovers each copy stage's parents at its declared radix, on exact int64.
    • The dense expand keeps its own multiplier above the spine's largest id. A production spine's residential arms leave no int64 room for a second dense clone, so until (c) every dense entry point refuses more than one clone of such a spine, in one message naming UK graph: move geography assignment ahead of enrichment (geography-first reordering) #931.
  • 2f0f8ce follows up 1a's review. It moves the CGT split's 10,000-copy bound check into cgt_support, adds tests for the dense line, stage-16 nesting and the executor, and corrects texts.
  • At 22bcdbe and 2f0f8ce the identity tool (tools/verify_uk_identity_stability.py) still decodes the old rule, and 11 of its tests fail there. Don't run it from those two commits, pushed together with 1b.
  • 50b7ea1 (1b) moves the decoders outside the stages.
    • Identity tool: decodes the CGT support copies and residential arms at their fields' radices. It refuses, by count, a spine whose copy ids do not follow the table, as every spine with copy rows built before 1a does. Receipt such a spine with the tool at the commit that built it.
    • Dataset-size evaluation: decodes dense ids on exact integers, 10^19 included: a one-clone dense run of a table-minted spine records that multiplier, which used to overflow int64. A caller can pass the recorded multiplier (weight_tables(id_multiplier=)); none does yet. tools/evaluate_uk_dataset_size.py infers it from the spine's or clone 0's household ids and refuses, by count, a dataset the inferred multiplier does not fit, where it used to miscount silently.
    • Messages: UK copy-path refusals print counts, not ids. The shared graph executor's EXPAND checks are unchanged.
    • Guards: static guards keep the retired rule out of every module that mints or decodes copy ids.
    • Bindings: every spine stage whose module or bound helpers draw through microcosm.build.stochastic_assignment now binds it, so an edit to the keyed draws re-keys the stages it moves: 32 more stages, 37 in all.
  • da5a350 follows up 1b's review. It binds the helpers into stage 14, whose employer pension draw reached them through another module, makes the size evaluation's uncovered-spine refusal count-only and unchained, and adds tests on frames the real stages built.
    • It corrects four claims in 50b7ea1's message: only the identity tool used the retired rule; a retired-rule decode would touch more than two functions; no caller passes a recorded multiplier yet; the arm tests used a synthetic chain.
  • 914cae4 (2) counts CGT support copies as ceil(K × w / 60), as ruled on 7 Nov, K being the frame's geographic clone count (1 on every national spine today).
    • For K > 1 the quotient snaps to an integer within K ulps, so an exact multiple of 60 keeps its count at any K. At K = 1 the count is ceil(w / 60) bit for bit.
    • The receipt gains clone_count; the stage-health gate and the identity tool scale their checks by K.
    • A selected clone at exactly 1/K of its source's weight gets its source's count. Selection nests only approximately, since the walk still accumulates each row's own weight: the household where a band's walk reaches its support mass, and households tied on wealth, can be selected in some clones and not others, lowest household id first. 914cae4's message says every clone gets its source's count; 9721448 corrects it.
  • 9721448 follows up commit 2's review. At K > 1 the identity tool's recount takes the family weights' tolerance of 1e-9. A test pins the gate's tolerance, and texts are corrected.
  • 18854c2 takes the re-reviews' nits. The binding test now checks its exemption against the stage's transform, and some comments and help text are fixed.
  • 2afda31 retires national_sampling's legacy compact sampler (sample_uk_national_frame) and family decoder (uk_source_family_units), unused by any build or tool since 8adc836, with a changelog fragment of type removed. No value moves. The full build's population nodes that hash the module re-key, as does every node downstream of uk.full.sample.
  • fe15413 binds every value-computing helper a stage calls into that stage's key. Keys only.
    • A test in test_uk_graph derives the bindings: from each stage's transform it follows every definition the code names, within microcosm.build, and requires the stage's hash to cover each module it reaches.
    • The rule skips three kinds: a listed check that writes and returns nothing, the stage's own declaration, and a few name-only kinds. Each listed item carries a reason.
    • Stages 14 and 18 bind employer_pension_contributions; the seven dense population kernels hash rowwise_geography, with a dense test.
  • e279b69 writes the K-ulp snap into copy_rule and gives the identity tool's recount its 1e-9 tolerance at K = 1 too. Stage 42's correction rule did not land (see the rulings below). No value moves.
    • Besides stages 26 and 42, it re-keys every node keyed on the UK solve fingerprint: the spine, full, preflight and holdout gates, and the target compilation, target selection, problem, measures, national targets, national problem and national gate kernels.
  • bd292eb fixes two identity-tool gaps, tool only.
    • E5's stored-value check now undoes stage 27's rewrite of main_residence_value and property_wealth before checking stage 25's uprating, so it no longer fails on spines built since regional_home_values joined the roster.
    • The stacking map gains stage 26's flag, so the scopes before stage 26 fold the high-value copies back onto their roots.
  • 0c4ebb1 follows up the review of those four.
    • A collection of strings now counts as a value, binding 12 more helpers in 9 stages: 231 bindings of 54 modules in 49 stages in all.
    • Where the rule stops at a single name, the stage or a node upstream must hash the name's module.
    • The spine root's rung sampler moves into national_sampling and declares the modules it samples through, so the root node hashes them.
    • The texts name the count check's blind spot: for a family whose source-scaled weight K × w is within a relative 1e-9 of a multiple of 60, it accepts n or n + 1 copies.
  • 50b6e62 (3) draws stage 16's SPI support channel as a keyed Bernoulli share, as ruled on 7 Nov.
    • A household entering the stage is copied when its uniform falls below π = min(1, 10,000 × f / N), f being the rung's sample fraction and N the distinct source households. The uniform is keyed on the household id (salt spi_support_channel:inclusion), so it depends neither on row order nor on the other households. At π = 1 every household is copied without reading a uniform.
    • The positional draw of an exact count is gone: the copy count is binomial around 10,000 × f.
    • The count gate, renamed e7_spi_synthetic_share, takes the repo's 4σ binomial band around the drawn share as its maximum. The band moves to stochastic_assignment.binomial_share_tolerance, with a sigma argument; stage_health.latent_attribute_tolerance stays as an alias.
    • Where the frame carries household_clone_index, the prior-mass allocation adds a per-clone stratum, inert at K = 1.
    • The receipt records the expected count, the floored share and the rounded source count.
  • cd43acf (4) seats stage 17's SPI income band donors by today's walk within each geographic clone, as ruled on 7 Nov.
    • Eligible households are counted in distinct source households, so the seats do not depend on K.
    • Each donor weighs its band's weight over K. Each clone's regions fund their own donors, at one mass scale common to all clones: the smallest any clone's region allows.
    • The receipt gains clone_count and rounds its eligible counts; seating_scale reads full or capped, and a band's carrier mean age is withheld below three carrier source households. The gate scales by K.
  • af667b7 follows up the review of 3 and 4.
    • Each band's rounded eligible count is clone 0's, the same at every K. Pooled over the clones, it grew with K.
    • A band's carrier mean age is also withheld where the band seats fewer than three households per clone.
    • The spine gate kernel hashes stochastic_assignment, where the latent-attribute band now lives.
    • The texts name the rounded receipt fields, and the gate names an invalid seating scale by its type, not its value.
    • It corrects two claims in the earlier messages: under 3's redraw, stage 17 keeps its seating, but its mass scale and funding factors move in their last bits; and clone 0's band-donor weights nest only while the common mass scale is the one K = 1 takes.
  • Nesting at K > 1, for (b). Stage 16's selection and stage 17's seating nest exactly. When K is a power of two, K × clone-0 weights equal the K = 1 weights bitwise, except on rows that take the exact-total correction. For other K, many rows miss by about one ulp, from the 1/K split. A corrected row misses by a few ulps of the total, about rows × K × 2.2e-16 relative.
  • c9b4862 puts stages 42's and 26's exact-total correction on a whole household first, as ruled on 9 Nov.
    • The shared helper tries the 64 heaviest households the split leaves whole (CGT_SUPPORT_CORRECTION_CANDIDATES), heaviest first, tied weights in row order. The first that can carry the correction takes it, so every root and copy keeps bitwise w / n. Only where none can does spi_support's shared fallback run, unchanged.
    • The whole households are the unselected positive ones, plus, at stage 42, the selected ones left at one copy (at stage 26 every selected household becomes six rows).
    • At stage 42 a one-copy household carries the correction only where its corrected weight keeps its one copy and the walk's selection (keeps_the_split). On 11 synthetic frames the correction would otherwise have lifted such a household to a weight that counts two copies. The check is a reading of the ruling, not in its text, and was kept on 9 Nov (evening); 8ea25b9 names it in copy_rule.
    • Both copy_rule texts gain one clause: "except where none of the 64 heaviest households left whole can carry the exact-total correction, when the shared fallback can put it on a root or copy, off weight / copies by about one ulp of the total weight".
    • Three corrections to its message: a selected household left at one copy weighs at most 60 / K only to within the K-ulp snap; the correction moves off the fallback's row to a whole household only where a later one of the 64 can carry it (where none can, nothing moves); and node keys chain, so beyond the two stages' hashes and the fingerprint nodes, every spine node from stage 26 on and everything downstream of the spine re-keys.
  • 753e89d holds the identity tool's support-split count exactly at K = 1, as ruled on 9 Nov, with two narrowings accepted on 9 Nov (evening). Tool only.
    • Its message says the check is now exact wherever a family's members carry one weight. As shipped it is narrower. The hold applies to families of four or more members whose clone pair sums are all one value c: exact where at least four members show their two clone halves at equal weights, and within one float either side of c elsewhere.
    • Families of three or fewer keep the 1e-9 bracket, since the three one-row corrections between them could have moved every member. So do families whose members differ, and every family at K > 1.
    • In the one-float tier a family the stage split consistently into one copy more on a multiple of 60 goes unreported for 6,393 of the 9,995 counts from 4 to 9,998; where held exactly, for 31 of them.
  • c197760 extends the derived binding rule to every first-party package, as ruled on 9 Nov. Keys only. The core modules every node runs through (the Frame's bundle, schema and weights; the graph executor and population; the key modules) are listed with reasons, not bound.
    • That adds 71 bindings in 47 stages: the QRF modules in 11 stages, frame.materialize, frame.rules, calibrate.geography_constants, graph.randomness and graph.canonical where stages compute through them, and the engine adapter in every stage's hash.
    • The engine object injected into the engine stages stays outside the walk, so the first-party modules it computes through are unbound there until aaa371a binds them.
  • 0a9d208 holds the UK's other graph kernels to the same rule, keys only, as ruled on 9 Nov. A test enumerates every kernel the UK registries register (99) and checks each one's reach against what its hash really hashes.
    • It binds what the rule finds into 35 kernels, among them the dense population kernels, the full build's identity, property, private-rent, export, readback, certification and holdout kernels, the bound spine and the national gates and readback.
    • Nine kernels are held and listed with their reasons, until 021182d and 08b437a bind them: the three gate batteries (uk.spine-gates, uk.full-gates.preflight, uk.full-gates); the target compilation, selection, measures and problem kernels; and the national targets and problem. So are the national gates' evaluators behind the gate registry.
    • Re-keyed with it: every spine node and every full-graph node downstream of it, the national line from its root, and the transport graphs' atomic geography nodes (the NZ transport graph's among them) and what they feed.
  • 558db00 follows up the review of those four, which found no must. Keys only.
    • Tests pin tied whole households taking the correction in row order, the one-copy check's walk half, stage 26's candidate set, the equal-halves threshold and the K = 1 hold's premises.
    • The create-frame helpers move unchanged into a new uk_runtime/graph_frames.py, which the bound spine hashes in place of graph_kernels, so an edit to graph_kernels no longer re-keys and re-solves the national line. The size search and refit hash their five extra modules in their own hashes, so the dense solve no longer carries them.
    • The texts give the fallback's limit: it can land on a whole household, a one-copy household the check refused among them, and the rerun can then divide a different set, as under the rule before. They also give the guarded worst case, about 26 s on a synthetic vector the size of a K = 15 spine, which a national frame does not reach.
  • 8ea25b9 names stage 42's one-copy check in its copy_rule, as ruled on 9 Nov (evening). The clause after the shared exception reads "of those 64, a selected household left at one copy can carry the correction only where its corrected weight keeps its one copy and the walk's selection, a check the fallback does not make".
    • Stage 42's notes add that the shared fallback does not make the check. So where none of the 64 can carry the correction, the fallback can put it on a one-copy household the check passed over, as under the rule before. A synthetic test pins that accepted case.
    • Declarations and text only. No value moves. The H2 fixture's stage-42 declaration and contract hash are regenerated.
  • e46f54a sharpens the identity tool's support-copy hold, as ruled. Tool only.
    • A family of more than three members is held exactly where at least four members show their two clone halves at equal weights and share one pair sum c, whatever the others carry, anchored families included.
    • The hold applies at any clone count. Where every member shares c but fewer than four show equal halves, it reaches one float either side of c, two where c sits within two floats of a power of two.
    • The family test takes the count's 1e-9 bracket, at the K-aware count, which removes the synthetic false missing family.
    • The premises test counts corrections in every function, method and nested function, through attributes too.
    • Corrections to its message, from a0933a5:
      • the exact tier holds where every member that shows equal halves shares c, and a member that took the split's own fallback correction keeps its family on the bracket;
      • c lies in (45 / K, 60 / K] only to within the snap, which can leave it a few floats above 60 / K (at most 16 for K up to 15, by design arithmetic).
  • aaa371a binds what the injected engine computes through into the 16 engine stages, by a second walk rooted at PolicyEngineUKEngine. Beyond the three hand-bound engine modules, the walk reaches one module, microcosm.frame.materialize, now graph_kernels._ENGINE_COMPUTE_MODULES.
    • The walk resolves the names microcosm.graph exports lazily. The create kernel's call to load_source is a listed stop, on the hermetic registry's data-only path, which no build or test runs.
    • regional_home_values keeps SeedSource.NONE, and the comment records why.
    • Corrections to its message: all 16 engine stages call materialize, and 6 of them variable_metadata; on a bound spine, 24 of the local line's 33 nodes re-keyed, from uk.full.expand.owned on.
    • The consequence stated with the ruling, that the engine stages re-key on edits to the concept vocabulary, does not follow: no engine stage calls the engine methods that reach it, and the walk stays rooted at the methods the stages call, as ruled on 9 Nov (late).
  • 021182d keys each gate battery phase on what its own gates compute through, as ruled.
    • A battery's shared hash holds what every phase computes through. Each phase's own modules ride on its node's <phase>_code params (assembled_code, transferred_code, preflight_code, terminal_code).
    • The full gates now refuse a stale or missing preflight_code, as they refused a stale terminal_code.
    • The national gates bind the gate registry's whole reach (50 modules). No kernel stop is held any more.
    • Corrections to its message, from a0933a5:
      • a phase's own key leaves out what only another phase computes through, but key chaining still re-keys the other phase wherever a node upstream hashes the module;
      • in the in-graph build, parity_reference and release_identity joined the solve's key, and so did calibration_run until a0933a5.
  • 08b437a binds the six target and problem kernels by the derived rule, as ruled, in place of Classify the imports the target-compilation kernels' hashes do not yet cover #1497's per-kernel import record. No kernel is held any more.
    • The record and its check go. The shared list's closure check and the hash-input tests stay, with 0a9d208's additions.
    • transport/compile_modules.py's reason for leaving the graph runtime off the transport compile list is now true of the code.
    • Keys only. In the full build, the target kernels, the pool checkpoint, the preflight, the dense solve and everything after it re-key; on the national line, 5 of 6 nodes.
  • a0933a5 follows up the review of those five, which found no must. Every node of every UK graph re-keys; no value, declaration or generated file moves.
    • The spine and local gate scopes and the scoped gate manifest move unchanged from calibration_run, the national calibration runner, into a new uk_runtime/gate_scopes.py, so, as Target compilation keys do not cover the geography labels in microcosm.calibrate.geography_constants #1492 designed, an edit to the runner no longer re-solves in the in-graph build.
    • The gate-battery walk follows the engine each battery's kernel is handed, so the spine gates bind the engine adapter. The engine walk repeats to a fixed point.
    • The premises test also catches a correction made through another module's wrapper, an alias or a partial. Texts are corrected.
  • 65e50b9 (5) keys the CGT redraw's walk offsets and plan jitters, and BADR's band offsets, on their labels, as ruled on 7 Nov.
    • Each of stage 44's cell walks, pooled walks and plans reads one identity-keyed uniform on its own label, the period in the salt, instead of the next draw of one Generator. Stage 47 keys each BADR band's offset on its bounds, so a band added to the facts leaves the others alone.
    • The scalar is shared (stochastic_assignment.stable_identity_uniform). The ISA stage uses it, its output bit for bit unchanged. property_components' receipts-walk offset is unchanged, as ruled.
    • Corrections to its message, from 8ddd0a6:
      • the walks stay coupled through the rake too, which ties income bands together;
      • gainers can cross the annual exempt amount, so the liable set, and stage 46 with it, can move;
      • on a bound spine the national line re-keys 5 of its 6 nodes.
    • For arm a1: keying BADR's offsets moves nearly every claimant row at K = 1, since the systematic walk's phase shifts, not only claimants near each band's walk positions. Counts and gains stay within the gate's walk bound.
  • b8bd453 (6) breaks ties at the six id-ordered walks on identity-keyed uniforms, as designed on 7 Nov.
    • stochastic_assignment.keyed_tie_order adds a uniform keyed on each row's own id as a secondary sort key, so distinct values keep the id order bit for bit. It runs at stage 42's support walk, stage 26's high-value stratum, stage 28's receipts walk, stage 44's rank and stage 47's BADR and main asset type walks.
    • The two support splits declare a seed and salt, and the receipts walk a tie_salt, in the declarations and the strict schema, and _declared_seeds registers them. Stage 42's split, keeps_the_split's rerun and the identity tool's recompute all pass the declared pair.
    • The exact-total correction's candidate order, tied weights in row order, stays: it places a rounding-sized correction and draws nothing.
    • Stale until (c): uk/gates.json's note on the high-value home support gate says the stage makes no draw.
    • Corrections to its message, from 8ddd0a6:
      • at stage 28 an untied landlord keeps its band, but where a tie group of unequal weights straddles a band boundary, tied landlords cross it, moving the bands' counts and the other landlords' receipts;
      • at one clone, stage 42 moves where a band's crossing falls in a tie group whose members weigh above 60;
      • the H2 fixture moved five stage contract hashes, not one;
      • the first copy or clone won every tie at stages 28, 42 and 44, and the last at stage 26;
      • on a bound spine the national line re-keys 5 of its 6 nodes.
  • 0c850b1 (7) gives tied ISA balances one weighted mid-rank, as ruled on 7 Nov. No declaration changes.
    • _weighted_rank orders by (value, id), and every member of a tie group takes the group's mid-rank, (F(x−) + F(x)) / 2 over the total weight. So stage 53 no longer depends on row order where balances tie, and clone 0 no longer ranks lowest among its clones.
    • A singleton keeps its rank bit for bit on id-sorted tables. Its amount can still move through the pooled band walk.
  • 8ddd0a6 follows up the review of 5 to 7, which found no must. Keys only.
    • New tests cover stage 44's pooled-walk keys above the lowest income band, the draws stage 53 actually makes, stage 47's walks and stage 28's unequal-weight ties.
    • Stage 47's band key refuses a non-integer edge. Texts are corrected.
  • 354296a starts the transport kernels' binding rule, as ruled on 9 Nov (late), moving the rule's machinery unchanged into a shared, country-neutral test module, test_support/microcosm_build/derived_binding_rule.py (RuleTables and BindingRule), with its controls in tests/engine_free/shared/test_derived_binding_rule.py.
    • test_uk_graph.py keeps its tables and UK-only parts: the stage table, the engine root and the gate-battery phase walk. A dump of every UK walk the rule computes, with the 99 UK kernel hashes, is byte for byte the same before and after.
    • Corrections to its message, from 8f6c369: five UK test bodies call the shared checks, not four. The refusal-check control builds no rule, and only the helper-rule and kernel-rule controls monkeypatched the UK's tables before.
  • 8c10ecc teaches the refusal check that a store into a container the function itself creates is local, as ruled on 9 Nov (late). So ledger_targets._assert_household_type_bindings_declared now passes the check. Listing it and unbinding frs_relationships come with the UK follow-ups.
    • Corrections to its message, from 8f6c369: global and nonlocal declarations did not count against a local container until 8f6c369, and the message's list of bindings leaves out the augmented assignments and bare annotations the check accepts.
  • 6c76c90 holds every transport kernel to the rule, through a new test_transport_binding_rule.py with the transport's own tables, each entry with a reason.
    • It holds the 45 kernels build_transport_registry registers: the transport package's 37 kernel classes, the shared atomic geography's four, calibrate.ordered_adam@1 and the three rules kernels.
    • It binds 79 (kernel, module) pairs in 36 kernels, the canonical encoder in 32 of them; the encoder joins the transport compile list, now 14 modules.
    • The counterfactual gets its own implementation_hash, which the zero solve inherits. The ordered solve's internals go into calibrate.ordered_adam@1's adapter half, so calibrate.adam@1's hash, which UK kernels embed, does not move.
    • test_transport_compile_modules.py's Classify the imports the target-compilation kernels' hashes do not yet cover #1497 record goes, as 08b437a did for the UK. Its closure checks and hash tests stay. compile_modules.py's _GRAPH_RUNTIME now covers only the kernel protocol and the declarations, and says why.
    • Corrections to its message, from 4df4065: it says all 357 nodes of New Zealand's packaged graph re-key; composed as test_nz_transport_declarations composes it, the graph has 375 nodes, 18 of them synthetic quantile stand-ins, and all 375 re-key. Two reasons in its tables were wrong (the Frame's and require_outputs'); 4df4065 corrects them.
  • 8f6c369 follows up the review of 354296a and 8c10ecc, in the shared machinery and its controls only.
    • Augmenting a local container is a write again unless the value is a new container, and so is an in-place call on it that is handed another object's in-place method. A global or nonlocal declaration disqualifies a name.
    • New controls cover every branch of the check, and the checks that moved into the shared module.
    • Correction to its message, from 4df4065: only 8c10ecc's docstring, not its message, said that a container's augmented operators change it in place or refuse.
  • 4df4065 follows up the review of 6c76c90, which found no binding the code misses today.
    • The kernels the registry hands its engines to are held to the registry as built: those holding an injected engine must be exactly the listed ones, keyword arguments are scanned, and AxiomEngine must be the only engine class the builder constructs.
    • Two reasons and the changelog fragment are corrected.
  • Left as they are, from those reviews:
    • simulate.counterfactual@1 hashes frame.exact_money, which only the zero solve's quantized branches run, so an edit to it re-keys the counterfactual's nodes needlessly.
    • The input closure hashes frame.materialize, since the rule follows AxiomEngine whole.
    • The refusal check still does not see three forms: a for, with or comprehension target that writes through a subscript; a module-level rebinding of dict, list or set; and an in-place method handed to a call that is not an in-place call on a local, as in sorted(rows, key=values.pop). No listed refusal-only check uses any of them.
    • Out of scope, as before: source codecs keyed by their versioned names, and calibrate.adam@1's own hash gaps, whose fix would re-key the UK.
  • b289e8f moves the gate phase-code functions and tables into a module of their own, uk_runtime/gate_phase_codes.py, which only the stale-code check reads. The spine gates now refuse a stale or missing phase code, as the full gates do (ruled 9 Nov (late)).
    • The functions are unchanged, so every phase code keeps its value. The check, require_current_phase_code(params, phase, *, battery), takes the battery's name, not its table, so no gate kernel computes through the tables or hashes the module.
    • So an edit to a phase's module list re-keys that phase's gate node and what follows, and moves no kernel hash. In graph_evidence.py the same edit moved 65 kernel hashes and re-keyed every node of the spine and of the in-graph build.
    • It also takes run A's re-review nits 1 and 2, in texts: eight terminal-only modules re-solve no line, not nine, since uk_runtime.diagnostics re-solves the national line; and in the in-graph build an edit to the runner re-keys only the calibrated gates and what follows, but on a bound spine it re-keys the preflight and the solve too.
    • Correction to its message, from e5d0acc: its per-file kernel counts (65, 8, 5 and 2) overlap. Split disjointly, 65 kernels hash graph_evidence.py, 5 more graph_terminal.py, 2 more gate_scopes.py and none more calibration_run.py: 72 in all.
  • f274857 takes frs_spine and frs_relationships off the target kernels' keys (ruled 9 Nov (late)).
    • The annuity and trust column's name moves, unchanged, into uk_runtime/annuity_trust_column.py, which holds nothing else. The dense measures and the national problem hash that module in place of frs_spine. The spine root, which writes the column, binds it, as does hmrc_spi_income_spine.
    • ledger_targets._assert_household_type_bindings_declared is listed as a refusal-only check, so the target compilation and the national targets no longer hash frs_relationships.
    • On a bound spine an edit to frs_spine.py now re-keys no node of the local or the national line, where it re-keyed 12 and 4 of their nodes; for frs_relationships.py it was 14 and 5.
  • c7e0523 makes the hold's premises test count a second correction made through an import alias, a module-level alias or partial, or inside a wrapper (run A's re-review nit 3). Test only.
    • Correction to a0933a5's message, from c7e0523 and e5d0acc: its identity tool bullet said a second correction through an alias or a partial fails the premises test. Then only a local alias or partial inside the correcting function did. Now an import alias, a module-level alias or partial, a wrapper that refers to a helper twice and an alias spi_support binds all fail. A correction repeated through one reference in a loop still passes, as does one through another module's own corrector; the test's comment says so.
  • e5d0acc follows up the reviews of those three, which found no must. Keys only.
    • The new citations of the 9 Nov (late) rulings read "ruled 9 Nov (late)", since this body numbers only the 9 Nov (evening) rulings.
    • The texts no longer say the spine gates' check stops a replayed declaration: it runs only when the kernel runs, so it does not guard a cache hit (left as it is, as ruled on 10 Nov). Texts are corrected, key chaining included.
    • The gate kernels' static test also holds that every path reaches the check and that the phase checked is the one evaluated, and a new test covers the check's two branches no gate node reaches. The column's reader test also refuses a read through another module's namespace and holds every key covering frs_spine to the create kernel and the spine stages. The premises test also reads the aliases spi_support binds.
  • e9152e2 takes that re-review's two nits, in tests only: the column's reader test checks every import of the name, whatever name it binds, and the premises test's comment says where wrappers and aliases are looked for.
  • 30fe64f corrects docs/uk-isa-subscriptions-1415.md, as ruled on 10 Nov. Step 6 said the Lifetime ISA payment rank blends the balance and income ranks. The code has only ever blended the person's Lifetime ISA balance rank with a keyed uniform, over every holder aged 18 to 47. Step 3 also says that tied balances share a rank. Text only.
  • aed673d widens the Child Benefit take-up gate's per-age tolerance, as ruled on 10 Nov. Each measured age is held within the larger of maximum_age_claim_rate_deviation (0.05) and three standard errors of a share at the age's published rate over its child rows (maximum_age_claim_rate_standard_errors, 3 in uk/gates.json), so only thin ages loosen.
    • a1's first f100 spine, at 30fe64f, refused on this gate at a thin age, where (a)'s keyed re-draws moved the realised rate by sampling noise. The pre-(a) head and the ids-only head passed.
    • No stage output moves. 14 of the 99 UK kernel hashes and 64 of the gated spine's 81 node keys move, and no phase code.
  • fce5828 scopes E8's band-donor rerun to the frame stage 17 wrote. Tool only.
    • Every row minted after stage 17 (stage 26's high-value copies and the CGT support copies, incidence twins and residential arms) is dropped, its mass folded back onto its source, before the check reads the stored seats or reruns the stage.
    • Before, a donor's high-value copies read as donors, and once the copy-id table gave each layer its own field the rerun refused. A row minted after stage 17 that the scope leaves in place is now refused by count.
    • No stage output, node key or kernel hash moves.
  • Next. (b): its six commits as designed and ruled on 10 Nov, then arms b-K1 and b-K15.

What moves in (a):

  • Copy-row ids. With them moves every draw keyed on a copy's own id: the SPI income stage's second stage, stages 19 to 24 and 27 to 41, every twin's Advani-Summers prior, stages 48 to 54, and policyengine-uk's Warm Home Discount draw on copy households.
  • Base rows move second-order, through pooled steps: the high-value selection, the regional value ranks, the landlord walk, the residential solve, the anchor, the CGT walks and calibration.
  • Ids past 2^53. National ids pass 2^53 from the incidence twin on.
  • Released file. Its ids, ranks of the build ids, do not move at K = 1. Its *_build_id columns carry the new copy ids, so copy rows join across versions by lineage (source id and copy path), not build ids.
  • 1b and 2 move no value at K = 1. Every spine node re-keys, and stage 42's evidence gains clone_count.
  • The 8 Nov follow-ups move no value. Every spine and full-build node re-keys. The identity tool's E5 verdict changes on spines built since stage 27 joined the roster.
  • Commit 3 redraws the SPI support channel wherever π < 1: a different set of households is copied, and the count is binomial around 10,000 × f, not exact.
    • With it move the SPI copies' weights, every SPI-channel value from stage 18 on, the high-value and CGT selections that rank SPI rows, and calibration.
    • Stage 17's seating does not move, but its funding factors and mass scale move in their last bits.
    • The empty-stratum refusal reads the new draw, so a frame that built before can refuse, and one that refused can build.
    • H2's fixture has π = 1, so no H2 value moves.
  • Commit 4 and af667b7 move no value at K = 1. Stage 17's receipt takes its rounded forms. At K > 1, mean ages are withheld in more bands, and each band's eligible count is clone 0's.
  • The 9 Nov follow-ups. At stages 42 and 26, at any K, a rounding-sized correction moves from the shared fallback's row, often a root or copy, to a whole household, wherever the heaviest unselected household cannot carry it and a later one of the 64 can. At stage 42, at K = 1 too, a selected household left at one copy that outweighs the heaviest unselected household, or ties it from an earlier row, comes first (which needs every unselected household to weigh at most 60 / K, to within the snap), and takes the correction where it can carry it and keep the split. Those two rows move by rounding amounts, and later stages can move with them. No H2 value moves: on the fixture's frame every call at stages 26 and 42 finds the total already exact.
    • The identity tool's count verdicts move at K = 1. Its receipt keys do not. The binding commits move node keys only.
  • The 9 Nov ruling commits move no value.
    • Stage 42's declarations change with its copy_rule clause and notes sentence, so its stage contract moves, as does every node keyed on the country spec's or solve's fingerprint. source_stages.json, the coverage manifest and the H2 fixture's declarations are regenerated.
    • The identity tool's verdicts move: at K > 1 it now reports a family the stage split consistently into one copy more, and no longer reports the synthetic false missing family.
    • Everything else moves node keys only. With the engine bindings and the gate batteries, every node of every UK graph re-keys.
  • Commits 5 to 7.
    • Values move at stage 44 (every walk offset and plan jitter, and tied gainers), stage 47 (BADR claimants broadly, and main asset types with them), stages 42, 26 and 28 (wherever an exact tie touches a cut) and stage 53 (tied ISA balances and Lifetime ISA payments).
    • Every spine node re-keys. On a bound spine the national line re-keys 5 of its 6 nodes, since the country spec moved.
    • The H2 fixture's declarations, five stage contract hashes and some of its synthetic facts are regenerated, and H2 parity passes.
  • The transport binding commits move node keys only, and no UK key. 40 of the 45 transport kernel hashes move; the four atomic geography kernels and geography.person_location@1 keep theirs. Every node of New Zealand's graph re-keys: the packaged graph's 357 and the test composition's 18 synthetic stand-ins. Belgium composes no graph, and nothing of the US's moves. No value, declaration or generated file moves, and no committed file records a transport hash or node key.
  • The 9 Nov (late) UK follow-ups move node keys only, plus the spine gates' new refusal. Every node of every UK graph re-keys, the local and national lines on a bound spine from their root. Of the phase codes only terminal_code moves; no transport kernel hash, value, declaration or generated file moves.
  • The ISA doc correction moves nothing.
  • aed673d moves the Child Benefit gate's verdicts at thin ages, 14 kernel hashes and the spine's node keys from the assembled gate on. No stage output moves.
  • fce5828 moves E8's verdict and its band-donor receipt only.
  • Arm a1's results are in the next section.

@juaristi22
juaristi22 force-pushed the uk-931-geography-first-prep branch from cf8432c to 690f0a2 Compare November 15, 2026 11:23
@juaristi22
juaristi22 force-pushed the claude/uk-931-geography-first-move-b38c04 branch from c7daedb to 2b0a792 Compare November 16, 2026 08:38
juaristi22 added a commit that referenced this pull request Nov 16, 2026
…ad (#931)

The rebase onto #1519's new head merged the generated files hunk by hunk, and
the housing shell's council-tax commit (644a2e04c) brought in parts of the old
line's regeneration, so the files mixed both sides. This commit regenerates
them once from the rebased spec and code, as 690f0a2 did on #1519. Every
command ran from the repository root on main's lock (policyengine-uk 2.177.7),
in this order:

1. `load_country_spec("uk")` loads with 63 stages, and
   `uk/source_stages.json` equals the typed projection of
   `uk/spec/sources.yaml` that the loader checks, so it does not move.
2. `tools/vendor_uk_ledger_facts.py --check` against a local export of the
   Chronicle consumer artifact at the feed pin 4ce631f5: all 43 register
   resources ok, exit 0. Nothing is re-vendored: the Scottish Band D resource
   is byte for byte what the tool writes from that feed.
3. `tools/graph_uk_spine_fixture.py`, then the same with `--check`: the folder
   "regenerates byte-identically", exit 0, and no stale file is left in it.
4. `tools/build_uk_release_input_coverage_manifest.py` without
   `--candidate-h5`, then the same with `--check`: "current", exit 0.
5. The UK gate battery's contract pins, derived from the live producer as
   `test_gate_battery_contract_pins` derives them: all twelve equal the
   committed ones in `microcosm/data/contract.py`, so neither it nor
   `test_contract.py` moves.
6. The stage totals the changelog fragments and docs state already match the
   loaded spec, so none moves: the spine's 63 stages (in
   `docs/uk-full-build-graph.md` and `931-spine-localises-council-tax`), and
   the totals after the earlier changes (63 after the area stages, 62 after
   the home-value localiser). Counts that describe one commit's own key moves
   stay as that commit wrote them.

What moved, and why:

- `sources/fixture.json`, the H2 stage declarations, now holds the merged
  spec's 63 stages. Main's `pip_points` stage returns: where main's stage and
  #1538's `private_rent` were inserted at one sorted place, the rebase kept
  #1538's side. `frs_council_tax` takes the merged notes and operations (main's
  `verify_vendored_fact_resource` and `level_scottish_council_tax`, then
  #1538's `derive` of the bill's provenance), and `frs_spine`, `frs_take_up`
  and `uc_capital_coherence` take the merged notes, so no declaration in the
  file names policyengine-uk 2.174.1. `spi_housing_shell` stays 644a2e04c's,
  and `config`, `inputs` and `description` stay #1538's.
- `uk_spine.json` is written from the merged graph: it now declares main's
  `pip_points` and `uc_limited_capability` nodes, and each stage node's
  contract hash follows the merged declarations, code and vendored resources.
- `sources/cgt_asset_type_facts.json` and
  `sources/property_purchase_targets.json` are re-sized by the tool to the
  frames the merged legacy oracle builds on policyengine-uk 2.177.7, and
  `sources/property_rental_facts.json` returns to main's, which #1538 never
  changed. Their shapes do not move, only their synthetic values.
- `release_input_coverage_manifest.json`: main's `pip_points` family returns
  (the same sorted-place conflict dropped it), and every family's
  `source_manifest_sha256` is the current `source_stages.json`'s. No other
  field moves.

No other file in the H2 folder moves: the CSVs, the FRS tabs, `schema.json`,
the toy supports, `NORMALIZATION.md` and `PRODUCED_BY.txt` regenerate byte for
byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Review of 2b0a792a3, the head rebased onto #1519's 70e5ac1ed on 16 November (108 commits). I first read the branch at c7daedbfa, then re-checked each point below against the rebased head. I read the body and all its groups. Groups (0), (a), (b) and (c) I traced for nesting and weights; "WAS and land", (d) and (e) I read in full, with the land value project (PolicyEngine/uk-land-value-tax#20, #1521, #1524/#1597) in mind. For the rebase, I diffed every file the findings below cite, read the full messages of the new commits that touch them, and checked the two stages main added to the spine. For the other new commits I read only the subject lines. Everything is a code trace plus arithmetic on the committed resources. CI doesn't run on this PR until #1519 merges, and I ran no build or test. Comments are on method and code only. D8 and the routes in #20 stay open there.

Settled by the rebase

Should, and needs a decision before the move merges

  1. The home-value node's key is not the one Epic: UK land value data for land value tax results by constituency #1521 asked to agree this month.

    • The epic says the land lookup needs each household's small area and own band, and that "changing the key after the move means a second full build".
    • G8 reads constituency_code, the owner's weighted mid-rank within its FRS region, and tenure_type against high_value_home_value_knots.json at constituency level (uk_runtime/area_home_values.py:155-191). It reads no MSOA, authority or band.
    • The code cites "Form F (C-15)" (:3), but I can't find that ruling in the body, the comments or UK graph: move geography assignment ahead of enrichment (geography-first reordering) #931. None of them mention UK stock cells: homes and the land under them in England and Wales (#1524) #1597, the stock cells or the key.
    • What the move already does well: every clone carries oa_code, lsoa_code, msoa_code and its band (geography_ladder.py:127-139, :555-556). The export boundary and the uk_export_surface gate keep them on both lines (UK_RELEASE_EXPORT_DROPPED_COLUMNS and uk_release_export_frame, national_frame.py:1101-1135). Tenure is on the frame before was_wealth (tenure_constants.py:8-34).
    • So a lookup by (MSOA, band) needs no rebuild. Reading the home value itself from the cell's knots does. That is what UK stock cells: homes and the land under them in England and Wales (#1524) #1597's note expects ("the frame's home values will be read from it"). The key sits in the WAS stage's contract hash, so changing it later re-keys every later node on both lines, plus H2.
    • UK stock cells: homes and the land under them in England and Wales (#1524) #1597's value block is on main at calendar-2024 prices, the same basis year as the constituency knots, and every input the new key needs is on the frame at G8.
    • Suggested change: settle it in the body. Either re-point G8 at the stock cells in this PR, or state that the overlay will look up by (MSOA, band) with the constituency value kept, and accept item 3's mismatch.
  2. Home values are read off a constituency's knots at a regional rank, but the area draw is no longer independent of that rank.

    • The rank comes from within the FRS region (area_home_values.py:435-450; value at property_localisation.py:445-447).
    • Before this PR the dense draw was region-only, so the rank was uniform within each constituency.
    • G2 now draws areas by region × IMD tenth × band weight (atomic_area_conditioning.py:14-25, :199-204). The WAS chain predicts value from the paid bill, which rises with band (was_wealth.py:916-925). So owners sent to dear constituencies should carry high regional ranks, and they are then read at a high quantile of those constituencies' knots.
    • The result is that sorting between areas is applied twice, and the spread of home values across constituencies is overstated. The size is unmeasured.
    • The ranking gate checks coverage, vintage and the count at the cap, not realised values against knots (stage_health.py:5134-5175).
    • Suggested change: on the a2 arm, report each constituency's weighted mean rank among its assigned owners, which should be near 0.5, or its realised quantiles against the knots. If they're off, rank within the constituency or the draw cell. The same question applies, more weakly, to G7's private rents (private_rent_localisation.py:414). This feeds the land overlay directly, since land is looked up by value.
  3. Nothing ties a home's value to its band.

    • Neither G8 nor the WAS chain reads the band; the chain's only link is the paid bill after discounts and reductions. So a band H home with a single-adult discount looks like a lower band to it.
    • 51eee4992 retires the dense step that redrew the band "at the same uniform, so value and band agree by construction" (property_localisation.py:15-17), and nothing replaces it. No gate compares band with value.
    • Suggested change: add a band × value-decile table by region from the a2 arm, and a line in the body on whether this is fixed here (item 1) or before the overlay.

Should

  1. The ratio path keeps the surveyed authority's level inside the localised bill (spine_council_tax.py:1004-1006).

    • Authority means come out right in expectation (r = D(a) / E, :818-838). Individual bills don't.
    • London is the clearest case: 33 boroughs, Band D from £968.76 to £2,375.35, coefficient of variation 18% (5% in the rest of England, 7% in Wales).
    • Taking the unweighted London mean (£1,905.94) as the reference: a household surveyed in Westminster (£975.02) and assigned to Kingston gets 975.02 × 2,375.35 / 1,905.94 = £1,215. One surveyed in Kingston and assigned to Westminster also gets £1,215. The true bills are about £2,375 and £975.
    • SPI copies and FRS rows with a missing bill get the exact statute bill. So two groups in one authority and band carry different spreads.
    • The seat results include the shares paying more and less, which depend on each household's bill. This is D8 on #20 ("survey bill, rescaled"; please confirm), so I'm giving the numbers for that decision, not ruling. Since the band is observed for nearly every 2024-25 household, the statute bill at the assigned authority is available as the comparison. Suggested change: from arm a3, report the within-authority, within-band spread of London bills before and after G6.
  2. E44N now carries three times its weight, and the held land rows are reported only by a tool.

    • Dropping E43B and E44R is sound: £6,872,455m − £4,485,171m − £2,063,534m = £323,750m, which no weights can supply.
    • But E44N is now the family's only bound row and takes the family's whole share of the objective. The calibrate-only rerun the adjudication asks for, to attribute the change, hasn't been reported. Arm a0 measured WAS and land together.
    • The register says both held rows are "measured on every evaluation" (uk/calibration_measure_exclusions.json:1372-1390). The fragment 931-uk-land-rows-diagnostic.changed.md says no build step reports a held row's estimate; only a tool such as tools/evaluate_uk_incumbent_surface.py does.
    • Both exclusions expire on 2027-02-06, in the project's publication month. A build after that date without a renewal would bind E44R's unreachable gap again (full_targets.py:305-306).
    • Epic: UK land value data for land value tax results by constituency #1521's workstream 2 proposes holding E44N out as well. If that's adopted, this item reduces to reporting the three rows.
    • Suggested change: run the calibrate-only arm before merge, or record it as a merge condition. Make the register text match the fragment, have the build print all three land rows beside ONS, and move the expiry past March.

Nit

  1. The statute path applies only the single-adult discount (spine_council_tax.py:907-944). Rows that used to take the cell mean of bills after discounts now take the full statutory bill unless ADULTH is 1: student, carer and disabled band reductions are lost. The direction is upward. Worth reporting the statute bill over the old cell mean on these rows, by band.
  2. On statute rows the reduction is scaled by the ratio, not by the change in the bill (:1011-1021). Where the old bill and the reduction were equal and the statute bill is above r × the old bill, a household on full reduction is left paying the difference. Small population.
  3. Scotland after the rebase (D-53, accepted for now).
    • Main's stage 5 now levels every Scottish bill by one factor to the published liability, and G6 takes that bill as it finds it.
    • Rows with observed_gross provenance take the ratio and keep the factor. Great Britain FRS rows with missing or unknown_reduction provenance and an observed band take the 2024-25 statute instead (spine_council_tax.py:49-52, :334-339), which drops the factor.
    • So it's worth one line in the a3 receipt on whether Scotland's total still meets the level after G6.
  4. council_tax_band_observed and council_tax_bill_provenance are dropped at release (national_frame.py:804, :812). The land overlay can then tell neither an observed band from a drawn one nor a statute bill from a rescaled one. Keeping one of them would help #20.
  5. An engine simulation renumbers an entity's ids 1..n only when they would repeat after the int32 cast (microcosm-frame/.../policyengine_uk.py:528-538), and a batch's receipt doesn't say whether it did. Recording that would let K = 1 and K = 15 be compared on any id-keyed value.
  6. The body's G6 section still says the England and Wales Band D file is "pinned to the feed's Chronicle commit". After 035cc0ef9 it's read at 80a3482, which the feed never pinned.

Checked and fine

  • Band proportions equal policyengine-uk's band_ratios: England A–H in ninths, Wales with band I at 21/9, and Scotland's post-2017 E–H. The single-adult discount is 25%. Band D is 2024-25, matching FRS 2024-25, and the stage refuses any other period. There are 318 + 32 = 350 authorities.
  • The WAS income predictor on HBAI net income before the reset is the closer concept to DVTotinc_bhcR8. The WAS bill predictor reads the pre-G6 bill.
  • Engine blocks: the pool-share correction for the three share formulas, the guard on whole-population formulas, and the refusal in the 2026+ UC rebalancing window. After the rebase, aa5726577 keeps an engine block's periods within the resolver's year, which Stop US and UK build simulations at the year they read #1615's scratch engine requires.
  • Draws: the SPI share is a keyed Bernoulli, and no UK stage calls an unkeyed predict. The remaining sequential generators are outside the clone path or were ruled on. Copy ids use fixed radices and are checked against int64.
  • Main's arrivals on the clone path: the two new spine stages run after geographic_expand. uc_limited_capability makes no draw and counts by source_household_ids. pip_points draws from stable_identity_uniforms on each person's own id and counts its small-cell floor by source households (pip_points.py:611-668). The four FRS stages given a name-only counting exemption in 704191f10 (frs_relationships, frs_employment, frs_education, frs_legacy_proxies) all run before the clone step.
  • Weights: w / K once, in G1, with a mass record. Stage 16 allocates within region × clone and conserves the total. Take-up passes the clone index as strata. Nothing I read contradicts the nesting test's exact/approximate table.

Evidence gaps

  • No build has measured any value-moving commit from (c) 8 on: arms a2, a3 and (e) are still held. So G6, G8 and the statute bills have no measured size. Every national build is still refused until household.atomic_area_basis is signed for the national line. So the national file with assigned authorities, which is what #20 needs from UK graph: move geography assignment ahead of enrichment (geography-first reordering) #931, is untested end to end.
  • The body reports local engine-free, engine, H2 parity and clone-first checks passing on the rebased head. None of it has run under CI.
  • 784e41991 pins the conditioned supports for main's cut runner, but where the files are hosted isn't named yet. So a cut can't run end to end from the runner.
  • Not traced: the take-up targets of stages 44 to 47, all six keyed walks of cca9a16a6, the ISA mid-rank arithmetic, whether any tool still reaches the legacy rowwise_* expansion, and which engine variables hash a stored id (this needs the engine). From the rebase, I didn't read the diffs of the binding-rule, gate-pin, CI-plan, seed-protocol, test and changelog-count commits. The PR's comments were searched, not read in full.

Readiness against 30 November

The rebase onto #1519 is done, and the stack is consistent. The remaining sequence is:

Each step is feasible, but none has slack. I'd treat the land overlay on today's local-area release as the working plan unless CI is green here by about 23 November.

🤖 Generated with Claude Code

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Independent review at 5739728f1. Fifteen reviewer passes read the diff from different angles: line scans of the clone core, the geography stages, council tax, the wealth chain and the graph, then removed behaviour, the rebase seam, cross-file callers, language pitfalls, the engine adapter, nesting, proof strength, reuse, efficiency and conventions. A last pass swept the dense and national release path and found nothing new. I then verified each item below myself: I re-ran the script or the test, or read the code. Everything ran on invented frames and the repository's toy supports. No licensed data was read and no build ran. Vahid's eleven items of 16 November are not repeated. R/ is packages/microcosm-build/src/microcosm/build/uk_runtime/.

Verdict. The core held (see "Checked and fine"). One test fails at this head and needs a commit before the first CI run. Two items need a sentence or a decision in the description. The rest are gaps in gates, proofs and build cost, and most are cheap to close.

Before the first CI run

1. engine-us fails: the committed US coverage report is stale

  • This branch edits stochastic_assignment.py, which the US seed protocol attests by its bytes. a1a94801e re-pinned the code digests but did not regenerate docs/evidence/spec-engine/us-f0-coverage.json.
  • test_committed_report_is_current (test_spec_engine_coverage_tool.py:173) fails at the head ("At index 59155 diff"). It needs no US engine. The engine-us job runs it, with --maxfail=1.
  • tools/spec_engine_coverage.py regenerates the report (8 lines change). No US tier was among the local checks, so the three US groups are worth one run before the retarget.

Needs a line or a decision in the description

2. The high-value support copies are now six identical rows

  • At the base, regional_home_values and the dense value node passed support_copy= to owner_uniforms. Each copy took its own keyed rank in the top twentieth, and on the dense line its own area. That was the purpose of the UK: data fixes to model the High Value Council Tax Surcharge (mansion tax) correctly, and the related housing and council-tax gaps #1240 support split.
  • At the head no caller passes support_copy (area_home_values.py:435). G8 runs before the split, the split copies every column, and uk_copy_area_agreement holds each copy to its parent. On invented owners (one region, 20 seats) the stratum's 180 rows hold 30 distinct (value, constituency) points. The retired step gave 180.
  • The a39183178 message records this as default C-19. The description says the copies keep their parent's value and area. It does not say that the stage no longer adds value support, and no arm measures the tail (distinct sources above each threshold, by area).
  • Suggested: decide it in the body. Either give each copy a keyed rank again (and take the value out of the agreement check for this layer), or retire the stage and its five extra rows per selected household. If the default stands, the support_copy branch of owner_uniforms is dead.

3. The nesting claim stops at council_tax_localise for England and Wales owners

  • G8 ranks each owner within its region over the rows of every clone (the same call, area_home_values.py:435), and the factor's mean is pooled too. On invented sources at K = 1 and K = 15, with clone 0's draws and areas equal, every localised home of clone 0 differs from the one-clone value. A rank within region and clone agrees to 2e-13.
  • The wealth segments after G8, the high-value selection, UC capital, CGT and ISA read that value. The take-up anchors and the SPI stages got per-clone strata so that they nest. G8 did not.
  • Suggested: rank within region and clone (a strata argument, as (c) 1 gave the anchored residual), or say in the summary that exact nesting holds through council_tax_localise.

Should

4. A release candidate no longer checks the localisation resources of a bound spine

  • The base refused --release-candidate unless the knots, the band mixes, the BRMA and RFDR layers and the rent resources were the committed package files (four refusals in the base's full_build_cli.py). (c) 3 retired them with the dense nodes.
  • At the head, _require_release_candidate_spine (full_build_cli.py:1172) checks K, the release posture and the geography binding. The sidecar's resource_pins and stage_artifact_pins are only copied into provenance (calibration_run.py:551). The binding's definition_sha256 is held to its format only (country_adapter.py:285).
  • So a spine built at one commit binds as a release candidate at a later commit that changed only a resource. The knots and the Scottish Band D both changed this month. The values come from the old files, and the manifest names the new commit. A probe on the preparation tests' stand-in spine passes with seven overwritten pins and a zero digest.
  • Suggested: hold the sidecar's resource pins to the current package, in the dense check and in the national certifier's geography check, and recompute or pin the definition digest.

5. The Child Benefit gate counts child rows over every clone

  • minimum_age_child_rows (200) and the binomial band that 76909e534 added both read eligible_child_rows, which is int(of_age.sum()) over all rows (child_benefit_take_up.py:577, stage_health.py:1198).
  • One invented receipt (900 source children at age 5, 150 at age 19, the same realised rates): at K = 1 the gate measures one age and passes. At K = 15 it measures both and fails. The band treats rows as independent, but the clones of a reporting family claim together and siblings share a draw.
  • The K-constants table does not list the parameter. Its guard test matches only names that start with max (test_uk_k_sensitive_constants.py:686), so a count minimum needs no classification.
  • Suggested: classify the parameter (rows over every clone, clone 0's rows, or sources), and widen the pattern to minima.

6. The identity tool's E4 and E5 can print PASS without a comparison

  • E4 skips every column that a later stage declares writing (verify_uk_identity_stability.py:319): 10 of its 21. Six are childcare columns, listed only because childcare_copy_take_up declares them. That stage rewrites copies only, and E4's scope keeps no copy.
  • With those six columns overwritten on every native row, --check e4 prints PASS and exits 0, at K = 1 and at K = 3. E5 on a release compares no stored column and exits 0.
  • So B03's "e4 and e5 pass" covers fewer columns than the base tool compared. Suggested: treat childcare_copy_take_up as spi_copy_areas is treated, and make E5 refuse an empty comparison, as E7 does.

7. The two mapping-integrity gates cannot fail on content

  • uk_atomic_area_mapping_integrity and uk_spi_copy_area_mapping_integrity read an outcome that the stage writes as a constant (spine_geography.py:554). They check only the format of the digests (stage_health.py:5060). A receipt with invented digests passes.
  • The stage validates, in memory, the frame that it has just derived (spine_geography.py:498). The base ran the shared validation as its own node on the stored pool columns, and the pool checkpoint refused unless it passed.
  • With every household drawn at L3, or with lsoa_code, msoa_code and constituency_code overwritten on a finished frame, the mapping gate, the ladder gate and G6's guard all pass.
  • Suggested: compare the receipt's digests with the sidecar's geography block, and re-derive the ladder from the stored frame at the transferred boundary.

8. Nothing before merge runs the spine at K > 1

  • In the pull-request jobs, only geographic_expand's kernel runs at K > 1. Twelve stages that run on every clone have no clone-first test. The nesting test names 6 of the 51 post-clone stages by hand (test_uk_clone_first_nesting.py:188), so main's two new stages are in neither it nor the K table.
  • The after-merge test holds exact nesting through area_brma. It holds later outputs to a share within 0.2 of the one-clone share (test_h2_clone_first.py:341).
  • Removing the certifier's _refuse_clone_indexed_candidate(frame) call (certify_uk_release_cut.py:384) passes all 156 tests that load the tool, because the harness stops at the Ledger read.
  • Suggested: a K = 2 graph run of the engine-free prefix of the spine in the pull-request tier, a stage table derived from source_stages.json, and one test that reaches the certifier's frame load.

9. The full K = 15 build: disk, memory and time

  • Disk. Each structural node stores its whole population twice, without compression. The arms' run folders are 13 to 14 GB at f100, K = 1, and 30 GB for b-K15 (f010, K = 15). That gives about 300 GB at f100, K = 15, before the head's four new structural nodes and 16 new string columns. Check the volume behind --checkpoint-dir before the build.
  • Memory. spine.gates.transferred holds about five copies of the final frame (graph_evidence.py:499). The new council tax check adds the fifth: _without_excluded_regions copies the whole household and person tables to read five columns (stage_health.py:5392). If it selects the columns first, its allocation falls to 4 per cent, with the same verdicts. An estimate from the declared dtypes puts the five copies near the 26 GiB supervisor limit at K = 15.
  • Time. The executor digests each string cell in Python, twice per node. With 24 household string columns that is about an hour per K = 15 spine (about 4 minutes at K = 1). The ladder columns and local_authority are functions of atomic_area_code.

10. The Northern Ireland copies' engine call runs outside the population guard

  • _scratch_frame drops the clone column (spine_geography.py:1689) so that the adapter takes a sub-pool as one simulation. The guard runs on the batched path only. The docstring rests this on LHA_category reading only a household's own bedroom entitlement.
  • On policyengine-uk 2.177.7 the calculation runs 315 variables on invented households. Universal Credit eligibility and claim status are among them, and two are on the engine's whole-population list. Both are inert today (one returns 0 without a reform, the other is a stored input), so today's values are right.
  • No test holds the sub-pool result equal to a whole-frame call, so an engine re-pin can change the copies' BRMAs with no refusal. Suggested: that equality in the three-system test, and an adapter mode that runs a declared sub-pool read under the guard.

Smaller

11. --inspection-export raises TypeError: inspection_export.py:93 calls describe_uk_export without the required solve_year. The mismatch is on main already. This PR edits the kernel's hash and its test, and the test's stand-in lambda hides the defect.

12. Inverclyde's 2024-25 Band D is vendored at the nominal £1,547.01. The council gave a one-off credit equal to the 8.2 per cent rise (budget notice, equality assessment of the credit), so households paid at the frozen £1,429.77 level. The engine's 2025-26 figure, £1,551.30, is £1,429.77 × 1.085. G6 prices each Inverclyde clone 8.2 per cent high, and the same figure feeds stage 5's Scottish level. This needs a ruling: a sourced exception, or a note that the nominal rate is kept. Also, nothing that runs in CI holds the 318 England and Wales values to their source (the one test skips unless four CHRONICLE_UK_BAND_D_* variables are set), and the loader accepts an off-pence English value although the description says that it refuses one.

13. The dense candidate manifest's household_weight_kind_chain (graph_terminal.py:2149) lists sample and geographic_expand after staging, with kind importance. Both now run at the start of the spine on design weights. No test reads the dense chain.

14. Lower:

  • The rank rule gives each renumbered clone the same id-keyed engine draws. No spine value reads one there today, by two facts that nothing checks. Storing warm_home_discount_random_draw in the spine closes it.
  • The shell and G6 each compute the copies' reference Band D with their own copy of one loop. A 10 per cent drift in one passes every check.
  • Dead dense-era code stays in modules that stage kernels hash (property_localisation.py, frs_brma.py, collapse_replicas, atomic_geography_nodes). To delete it later re-keys those stages. Now every node re-keys anyway.
  • About fifteen local copies of shared identifiers are held by equality tests, against rule 2 of docs/shared-constants.md. The copy at cgt_support.py:189 has no reader.
  • docs/agent-guide.md still says that a national cut runs end to end with tools/run_uk_cut.py.
  • --stage-profile-dir is refused inside this checkout as spelled only. receipt_counts.outside_work_trees is the wider check.
  • G6's draw-cell guard cannot see a cell that became coarser after the draw.
  • Description: the gate manifest's headroom is 6,923 characters at this head, not 118, and the engine-uk limit on main is 90 minutes, not 60.

Checked and fine

  • Ids and clones: the copy-id table at the extremes of every field up to K = 100 (unique, exact round trip, inside int64). G1 and G1b at K = 1 to 100. Clone 0 equals the one-clone frame.
  • The fold: 4,000 random cases against a slow reference (NaN, NA, categoricals, ids above 2^53), with weights conserved.
  • Keyed draws: the diff adds no sequential generator. Clone 0 of atomic_area_assign, local_authority, rfdr, spi_copy_areas and council_tax_localise at K = 15 equals K = 1 on every column. Private rents agree within 3 ulps. Per-clone strata hold clone 0 in 1,600 shuffled pairs.
  • Council tax: G6 equals an independent brute-force model bit for bit on 1,998 random rows. The statute tables, the cap, the kept bill and draw_cell_expectations hold. The 350 Band D values are consistent with the engine's 2025-26 values, apart from item 12.
  • Wealth and copies: G8's masks and refusals, knots for all 575 constituencies, the uprating's return to the knot value, the exact-total corrections at K in {1, 3, 7, 13, 15} (total conserved bitwise in 400 runs), the copy-count snap and the ISA mid-rank.
  • Engine adapter: rank ids keep every membership. A batched call equals one simulation value for value. The pool-share correction matches one simulation over the pool within 2e-7 on three unequal clones. The guard's list equals the installed engine's 19 names. A batched call at 2026 is refused.
  • Graph and gates: declarations against code for every new or moved stage, gate scopes, contract pins, the ten new operation kinds and the profiler wrapper. Eleven of thirteen mutants of new guards are caught (one survivor is item 8, the other is value-equivalent).
  • Rebase: no rebased commit lost a guard, a refusal or a test (1,691 + 1,212 test names). The merged registers are unions. Main's two new stages nest at clone 0.
  • Cross-file: none of the 163 removed names has a reader left. All 612 source modules import. 29 UK tools answer --help. No script or runbook passes a retired flag.
  • Release path: the national export's renames and drops, the direction of the roster check, the review-date check, the rung that is read ahead, and engine blocks held to 1 or K.
  • ruff check passes.

Not checked

  • CI has not run. The US tiers that need policyengine-us did not run here.
  • No engine-tier test, H2 parity run or build ran in this review. Nothing was checked on the real supports or on a real frame at K = 15.
  • The identity tool's E8 count hold and the measurement tool's suppression arithmetic were read, not attacked.
  • The FRS coding of the IMD decile variables (which end is most deprived) was not checked against the survey documentation.

Two disclosure-control items went to the author separately.

🤖 Generated with Claude Code

@juaristi22
juaristi22 changed the base branch from uk-931-geography-first-prep to main November 17, 2026 15:40
@juaristi22

Copy link
Copy Markdown
Collaborator Author

Reply to the independent review of 17 Nov. The fixes are on the branch, now at 54d66ca, which also merges main (fd1d709) now that #1519 has merged. Each item names its commit or commits. R/ is packages/microcosm-build/src/microcosm/build/uk_runtime/.

Before the first CI run

1. 561745e regenerates docs/evidence/spec-engine/us-f0-coverage.json (eight lines). Its --check and test_committed_report_is_current pass.

Needs a line or a decision in the description

2. The description now says it. The high-value support copies keep their parent's value, area and geography key (C-19), so the stage adds rows, not distinct values. G8 runs before the split, and 614c101 replaced owner_uniforms, so its support_copy branch is gone. Two options stay open for María: give each copy its own keyed point inside its parent's slice, or retire the stage.

3. 614c101 (María's ruling of 17 Nov) changes how G8 ranks owners. Each owner is now ranked within its assigned constituency and geographic clone, at a keyed point inside its own weight slice. The regional factor's mean is now taken over geographic clone 0's FRS-base owners, in G8 and in the uprating alike. So clone 0 of K clones now takes the one-clone values, to rounding (test_geographic_clone_zero_takes_the_one_clone_values, and the factor test in test_uk_regional_uprating). 5b95434 hands the uprating stage's graph node the clone index; without it, the after-merge test found localised homes off their knots at four clones.

Should

4. 76ad295 and 586832f change what a --release-candidate dense build checks on a bound spine:

  • it holds the spine's resource_pins and stage_artifact_pins to the package;
  • it recomputes the spine's definition_sha256 from the three supports, which it reads under new --spine-support-* flags.

The national certifier does the same. Default taken: recompute from the supports. Alternative: pin one committed definition digest, which needs no new flags. 4e1d183 documents the checks.

5. 5a86883 makes the Child Benefit gate count clone 0's child rows. Default taken: clone 0's rows; alternative: sources. The K-constants guard now also matches minima and unit counts, and the table classifies what that finds.

6. 033ca4b: E4 now compares the columns that childcare_copy_take_up declares, and E5 refuses a comparison of no stored column. As a result, E5 on a release now refuses.

7. 20bcd98: the two mapping gates now hold their record's digests to the spine's geography block, and re-derive the frame's areas on the pinned supports. A missing block, support or frame makes them evidence_absent. 282b30c updates their notes, and fb0e0a7 re-pins.

8. b5f9b7e adds three tests:

  • an engine-free run of the spine's prefix at K = 2 through rfdr in the pull-request tier (three engine stages get invented values);
  • the nesting test's stage list, now read from source_stages.json, with all 51 post-clone stages classified;
  • a certifier test that reaches the frame load.

9. 779cd09: the council-tax check now copies only the columns it reads. The disk and time notes are in the description.

10. 0f63f65: the three-system test now holds the Northern Ireland copies' sub-pool BRMAs equal to a whole-frame call, at K = 1 and 2. The adapter mode is not done, because it is not a small change.

Smaller

11. 42b85ee.

12. 3d23a80 refuses an off-pence English Band D. Not done:

  • A CI test of the 318 England and Wales values needs their source files, or an extract of them, to be committed or fetched in CI.
  • Inverclyde waits for María's ruling.

13. 5a24881, with a test that reads the dense chain.

14. The lower items:

  • Shared names: 1647acf. This is partial: six copies stay, and each needs a module move.
  • One reference Band D expectation for the shell and G6: ce3e62e.
  • Dense-era dead code removed: 489c354.
  • --stage-profile-dir now uses outside_work_trees, and the agent guide now says what the cut runner does: b3d9a65 and 3ace11d.
  • The description's headroom and 90 minutes are corrected.

Not done in item 14:

  • Storing warm_home_discount_random_draw in the spine. It is a new spine column, so it is not contained.
  • G6's coarser-cell guard. It would rerun the area draw for each row. It is written, but held for María.

The two items sent separately are addressed.

Also: 7482e58 moves the area draw's three column names into a module that holds them alone, so the mapping gates (item 7) and the national line do not key on frs_spine.

Checked here: the full engine-free set before the merge (20,913 tests; the only failures need the Orrery Node package or an environment without the UK engine), every engine-free file the merge and its fixes touch after it, the UK engine files the changes touch, H2 parity, the staging smoke, and the after-merge clone test at one and four clones. CI runs now that the PR targets main.

🤖 Generated with Claude Code

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Reply to the review of 16 Nov (2b0a792a3). Status at 54d66ca. #1519 has merged, so this PR now targets main and has main merged in. The independent review of 17 Nov is answered here.

1. The home-value key. G8 still reads the constituency knots. Two options are open for María:

2. Sorting applied twice. Addressed by 614c101 (María's ruling of 17 Nov):

  • G8 now ranks each owner within its assigned constituency and geographic clone, at a keyed point inside its own weight slice, in the order of the segment-2 draw. The regional rank no longer chooses a constituency's quantile, and a constituency's owners follow its knots in expectation.
  • 5b95434 gives the regional uprating the clone index, so G8's factor and the uprating's stay equal at K > 1.
  • G7's private rents still rank within region and size; that question stays open.

3. Band and value. They are not tied yet. A band × value-decile table by region goes into the checks on the next head build. Whether to tie them in this PR or before the overlay is open for María.

4. The ratio path (D8 on #20). Open for María. The within-authority, within-band spread of London bills before and after G6 is to be measured on the next head build.

5. The land rows. The two register entries are María's sign-offs. The calibrate-only rerun, their wording beside the fragment and the expiry date are hers to settle, so nothing changes here yet.

6. Discounts on the statute path. To be measured on the next head build: the statute bill against the old cell mean, by band.

7. The reduction on statute rows. Agreed: scaling the reduction by the ratio can leave a household on full reduction paying the difference. The fix scales it by the bill's own change, capped at the bill. It moves G6's values, so it waits for María.

8. Scotland after G6. One line comparing the Scottish total with the level goes into the checks on the next head build.

9. Release columns. Whether to keep council_tax_band_observed or the bill's provenance at release is open for María and #20.

10. Renumbered ids in a batch's receipt. Not done yet. It is a small receipt field in the adapter, and it waits until CI on main is green.

11. The G6 sentence. Fixed in the description: the England and Wales file is read at 80a3482, and each raw file is held to its own sha256.

🤖 Generated with Claude Code

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up at 6dfb657, covering the reply to the 16 Nov review and the PR's own commits since 2b0a792a3.

The 16 Nov items. Each claim in the reply holds at this head.

  • Item 2 is fixed by 614c101e6 and 5b9543494. G8 now reads each owner's value at a keyed point inside its weighted slice of constituency × geographic clone (uk_runtime/property_localisation.py:288-388). The ordering follows the segment-2 draw. Clone 0 of K reproduces the one-clone values by construction: same ids, weights scaled by 1/K, so the slice fractions are unchanged. Empty, zero-weight, single-owner and tied slices are handled.
  • Item 11 is fixed in the description.
  • Items 1 and 3–10 are unchanged at the places cited, as the reply says. They wait on María (7 is an agreed fix that moves values) or on the next head build (3, 4, 6, 8). Item 10 waits for CI on main.

One request on these: the body's "Open for María" list carries only the 17 Nov review's items 2, 12 and 14. Could the 16 Nov items still open (1, 4, 5, 7 and 9) go there too, so the list is the one place to see what's pending? Item 1 asked for its outcome to be settled in the body.

The PR's own commits since 2b0a792a3. These are the review fixes, the merge of main at fd1d7099e and the four test commits after 54d66ca. No new defects found, and the narrow engine-free tests around them pass (260). Two small things:

  • The merge left a duplicated fragment in the pin comment at packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py:366: "attested bytes." repeats line 360's ending.
  • The re-pinned US spec_sha256 at :368 hasn't been confirmed by an engine-us run yet, since every engine-us run since the merge was cancelled or is still running. The engine-free and engine-us jobs are pending at this head.

Review drafted with AI assistance and checked against the code at 6dfb657.

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Reply to the follow-up review of 17 Nov (6dfb657). The branch is now at 946eeb7.

  • The open list. The description's "Open for María" list now holds every item of both reviews that waits on her: items 1, 3, 4, 5, 7 and 9 of 16 Nov, and items 2, 12 and 14 of 17 Nov. Item 1 lists its two options, and her outcome will be recorded there. Items 3, 4, 6 and 8 were measured on a build of 54d66ca (17 Nov). Whether those figures go in the description is María's call.
  • The duplicated fragment in the pin comment of test_us_multispine_pool_tool.py is dropped in 946eeb7. The change is to the comment only.
  • The re-pinned US spec_sha256. engine-us (3.14) passed at 6dfb657, so CI has run that test with the new pin. Separately, load_bundle("us"), run here without the US engine, gives a binding equal to the test's expected binding in every field, the hash included. engine-us (3.13) and the engine-free jobs run again at 946eeb7.

The description also lists the CI fixes since the merge. All are in tests.

🤖 Generated with Claude Code

@juaristi22

juaristi22 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

@PavelMakarchuk, could you build the 15-clone UK spine for this PR on a larger machine? It is the one step of #931 that does not fit María's laptop. The dense calibration and the comparisons then run on her machine, from your spine.

What it is. One full-sample UK spine at 15 geographic clones, built as a release candidate (the dense line's spine). Nothing else: no calibration, no publication. One command builds it, tools/run_uk_cut.py dense-spine (see The dense spine alone).

The machine. No full-sample spine at 15 clones has run yet, so these are estimates from the one-clone spine and a 10% sample at 15 clones:

  • memory: about 30 to 40 GiB at peak, so 64 GiB of RAM is comfortable;
  • disk: 400 GB free (the command checks it); the checkpoint store alone is about 300 GB;
  • time: about 6 to 14 hours;
  • the UK Data Service licence must cover you and the machine for the FRS, SPI, WAS, LCFS, NTS, ETB and APS.

The data: nothing to download by hand. The command fetches every input from Hugging Face at its pinned revision into ~/microcosm-uk-work/inputs/, and checks each file's sha256 before it builds anything:

  • the seven UK Data Service archives (FRS 2024-25, SPI 2022-23, WAS round 8, ETB, NTS, LCFS 2024-25 and APS; about 1.2 GB to download) from policyengine/policyengine-uk-data-private;
  • the three conditioned area supports from policyengine/microcosm-uk-build-inputs;
  • one HMRC table from gov.uk.

It does not need the Chronicle artifact. A second run reuses inputs that are already there and still match their pins.

Before the build: two things.

  1. Hugging Face access. HF_TOKEN needs read access to policyengine/policyengine-uk-data-private (gated: María approves access requests) and to policyengine/microcosm-uk-build-inputs, and write access to policyengine/microcosm-uk-build-inputs for the upload at the end.
  2. A signing key of your own. A release-candidate spine is shippable only once a registered key signs its gate report, and the registry has no key for you yet. On macOS:
    uv run --no-sync python -m microcosm.data.gate_signing_keys generate --keychain-service microcosm-uk-gate-signing-key
    It stores the key in your login keychain and prints only its fingerprint. On Linux, generate without --keychain-service writes the key to stdout for a pipe straight into a secret store (it refuses to print it to a terminal). Post only the fingerprint here, never the key. I will register it as active and reply with the commit to build.

The build, at the commit I reply with:

cd <your microcosm checkout>
git fetch origin claude/uk-931-geography-first-move-b38c04
git checkout --detach <commit>
uv sync --all-packages --locked --extra uk
export HF_TOKEN=…
MICROCOSM_UK_TERMINAL_GATE_SIGNING_KEY="$(security find-generic-password -a "$USER" -s microcosm-uk-gate-signing-key -w)" \
  uv run --no-sync python tools/run_uk_cut.py dense-spine --label k15 \
  --allow-off-main 'María Juaristi: the #931 15-clone spine for #1538 (18 Nov)'

On Linux, set MICROCOSM_UK_TERMINAL_GATE_SIGNING_KEY from your secret store for this one command only. uv run --no-sync python -m microcosm.data.gate_signing_keys check tells you, with the key set, whether the registry lets it sign.

The command fetches each input and checks it against its pin, then checks the checkout, the key, the registers' expiry dates and the disk, and only then builds, into ~/microcosm-uk-work/cuts/k15-<sha9>/dense-spine/. It is resumable: if it stops, run the same command again. It keeps an unfinished attempt until you pass --retry-spine.

At the end it prints one upload command, uv run --no-sync hf upload policyengine/microcosm-uk-build-inputs …/dense-spine-handoff spines/k15-<sha9> --repo-type dataset …. Please run it. It sends the spine H5 (about 7 GB), its .sha256, .build.json, .spine_gates.json and .hmrc_replay.json, and the memory profile. Please keep the cut folder until María confirms the spine binds on her machine; after that it can go.

What to post back here: the outcome, the wall time and the Hugging Face commit link only. Please don't paste log lines or gate details; they can carry survey values. If the build stops, post the step and exit code, keep the cuts/k15-<sha9>/ folder, and we will say what to send.

Edited 18 Nov: the memory figure is corrected (one clone's frame measures 0.39 GiB in memory, so about 6 GiB at 15 clones; 658378b removed two of its copies), and the data section is added.

🤖 Generated with Claude Code

juaristi22 added a commit that referenced this pull request Nov 23, 2026
The dense-spine preflight (tools/run_uk_cut.py dense-spine) refuses an
expired register entry. On this branch eleven local-line target-fit entries
expired on 2026-11-16, one more expires on 2026-11-23 and three on
2026-11-24, so the #931 15-clone spine could not build at the branch head.
This carries María's renewal of 2026-11-22 (a26cefb on main, from #1687)
unchanged: the same fifteen local cells and one national row, the same
adjudication, approval date and 28-day window. The earliest expiry is now
2026-12-01.

The battery tests' clock moves to 2026-11-22, the latest approval on this
branch; its comment names this branch's approvals only.

(cherry picked from commit a26cefb)

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

Copy link
Copy Markdown
Collaborator Author

The dense spine builds again, at 6fff0bc. At 658378b, tools/run_uk_cut.py dense-spine refused at preflight, because eleven local-line target-fit entries had expired on 16 Nov. 6fff0bc carries María's renewal of 22 Nov (a26cefb on main, from #1687) unchanged and moves the battery tests' clock to 22 Nov. The earliest expiry is now 1 Dec.

The conflicts with main don't block the build: the runner builds any pushed commit given --allow-off-main. They block only the merge. A merge of main would change the commit, though, and a spine built at 6fff0bc binds only a dense build at 6fff0bc.

🤖 Generated with Claude Code

@juaristi22

Copy link
Copy Markdown
Collaborator Author

The K=15 spine at 6fff0bc is built and uploaded. tools/run_uk_cut.py dense-spine --label k15 ran on a GCP VM in London: n2-highmem-16 (16 vCPUs, 128 GB), a 600 GB pd-balanced disk, Ubuntu 24.04 and Python 3.14. The hand-off is in policyengine/microcosm-uk-build-inputs under spines/k15-6fff0bccf, at HF commit f34b620. The H5 is 6.86 GB, sha256 4c891c4b…71b40179, and the upload was checked byte for byte.

What the run took, for next time:

  • Time: 7h46m wall clock for the whole runner: preflight, fetch, build, gates and hand-off. The 94 profiled stages account for 2.7 h of that; the rest falls outside them. The longest stages were lcfs_consumption (34 min), private_school_attendance (16 min) and hmrc_spi_income_spine (10 min). The upload took about a minute.
  • Memory: peak RSS was 68.8 GiB. The heaviest stages were hmrc_spi_income_spine (68.4 GiB) and nts_bus_travel (54.6 GiB), and three more peaked at 41–44 GiB. Nothing swapped. A 64 GB machine won't fit this build.
  • CPU: 15 CPU-hours in all, so on average fewer than 2 of the 16 vCPUs were busy. A machine with fewer cores and the same memory would likely do, but that's untested.
  • Disk: the cut folder grew to 230 GB, nearly all of it the node-graph checkpoint store, and about 253 GB was written in all. The runner's preflight wants 400 GB free.

To run this on a VM again, pin uv sync --python 3.14: uv otherwise picks 3.15, which has no torch 2.12.0 wheel. Also keep secrets out of /dev/shm, which logind empties when the last SSH session ends. Both are noted for #1645.

This spine binds only a dense build at 6fff0bc, and the next register expiry is 1 Dec. The logs stay private, since they can carry survey values.

🤖 Generated with Claude Code

juaristi22 and others added 29 commits November 27, 2026 16:49
…s their spine route does (#931)

The four tests that run on both routes (the clone count, an asserted clone
count, the engine blocks' clone count and a release candidate on a sampled
spine) reach prepare_full_build's engine checks on the input_h5 route, where
_attempt stubbed only the git pin. The engine-free tier installs no
policyengine-uk, so they fail there. That route now takes the file's
stand_in_engine fixture, which the spine route already uses. The file's 31
tests pass with the engine installed and with it absent from import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y platform, at a seed where its premise holds (#931)

engine-free (3.13) failed at e425b20 on
test_the_corrections_reach_rows_the_weight_classes_compare: on the Linux
runner, spi_support_channel's exact-total correction moved no row.
Generator.uniform computes low + (high - low) * u in C, which clang fuses
into one rounding on arm64 macOS. So 12 of the invented frame's 90 weights
differ in the last bit between macOS and an x86-64 runner, and the premise
held at seed 4 on macOS only.

The file's two invented weight draws now go through NumPy's ufuncs
(_design_weights), which round the product and the sum apart on every
platform, so the runner's weights do not change. At seed 4 the premise then
fails everywhere, so the seed is 11: the first seed from 0 at which both
corrections move a clone-0 row at one clone, and where the donors' reached
stratum holds at every K, as the test's docstring asks.

The file's 58 tests pass with the engine installed and with it absent. A
pytest plugin that rounds Generator.uniform and normal in two steps makes
the old file fail as CI did. Under that plugin, with the engine absent, the
five other test files this PR changes that pair uniform draws with an
exact-total premise pass (268 tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…by the merge of main (#931)

The merge (fd1d709) left "attested bytes." at the start of the #931 line
of the spec_sha256 comment, repeating the end of an earlier line. Comment
only. The pinned spec_sha256 below it equals the US bundle's binding,
computed by load_bundle("us") without the US engine, in every field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1662's factor schedules (#931)

Main's #1662 checks a published projection's schedules in
reference_factors._declaration, through _schedule and
ledger_targets.selector_field_is_supported. calibration.prepare@1,
targets.problem@1, takeup.assign@1, geography.support_from_facts@1 and
diagnostics.calibration@1 hash reference_factors but not ledger_targets,
so the transport binding rule refused them on the merge with main. Each
now hashes ledger_targets, as money.normalize@1 already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d host the conditioned supports for fetch (#931)

The 15-clone release-candidate spine needs far more memory than the
dense calibration, so it has to be built on a larger machine and handed
to the calibration elsewhere. `tools/run_uk_cut.py dense-spine --label
<label>` does that in one command:

- it fetches every input but the Chronicle artifact;
- its preflight checks the checkout, the environment, a signing key
  registered to sign (a release-candidate spine is shippable only once
  signed), the registers' expiries and the host, with a 400 GB free-disk
  floor by default; it reads no reference and starts no emitter;
- it builds the spine as a release candidate at the local doctrine's 15
  clones into <cut>/dense-spine/, apart from the national cut's spine,
  with the per-node memory profile in <cut>/dense-spine-profile/;
- it is resumable, and --retry-spine moves an unfinished attempt and its
  profile aside;
- once the spine is done it hard-links the H5, its .sha256, .build.json,
  .spine_gates.json and .hmrc_replay.json and the profile into
  <cut>/dense-spine-handoff/, and prints their upload to
  policyengine/microcosm-uk-build-inputs under spines/<label>-<commit>/,
  a separate, deliberate call.

The three conditioned atomic-area supports get a hosting location in
the inputs manifest: the same repository, under atomic-area-supports/
and the sha256 of their sources.yaml pins as canonical JSON, so a re-pin
moves the path and an older checkout still finds its files. `inputs`
prints each source's path_in_repo. The national cut's argv and
done-check are unchanged.

What moves: no kernel hashes the runner or its inputs manifest, so no
key, dataset or receipt moves.

Checks: test_run_uk_cut.py (seven new tests on invented data) with the
UK engine hidden, the CI integration-job test, the live-tree reference
test that reads uk-cut-anyone.md, ruff check and format, git diff
--check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rame copies (#931)

The runbook's estimate for a full-sample spine at 15 clones left out
what the review found for the transferred gates: they hold about four
copies of the frame (five before 779cd09), and the frame is about 20
GiB uncompressed at 15 clones (about 1.4 GiB at one clone, times 15).
The checkpoint store is about 300 GB, as the review measured from the
arms' run folders. So the estimate is now about 80 to 110 GiB of peak
memory (a machine with 128 GiB or more), 6 to 14 hours and about 300 GB
of checkpoint store; the 400 GB free-disk floor stands.

Docs only; nothing else moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne gate node (#931)

María asked why a stage held four copies of the data. Two of them were
duplicates:

- graph_kernels._minimal_frame deep-copied the context's frozen tables
  and handed them to Frame, whose __init__ copies each table again. So
  every stage's hand-over briefly held two kernel-side copies beside the
  stored population and the executor's frozen copy. It now hands the
  frozen tables to Frame as they are; Frame makes the one copy. The
  strata, one person-level column, keep their copy.
- The spine gate kernel built a second Frame from the first, to attach
  the run's mass log and metadata, and held both while the gates ran.
  _minimal_frame now takes mass_log and metadata, and the kernel builds
  one Frame with the same tables, household weights, strata, mass log
  and metadata as before.

Measured with tracemalloc on an invented full-width frame at the
uk_spine fixture's declared dtypes: the gate node held 3.02 copies
beside the stored population (peak 3.04) and now holds 2.02 (peak 2.04).
One clone's final frame measures 0.39 GiB in memory, so at 15 clones a
copy is about 6 GiB: this saves about 6 GiB through the transferred
gates and at each stage's hand-over.

docs/uk-cut-anyone.md: the dense spine's cost text now uses that
measured frame, not the H5 file's layout, which overstated it about 3.5
times: about 30 to 40 GiB of peak memory at 15 clones.

What moves: keys only. Every kernel that hashes graph_kernels or
graph_evidence re-keys (every spine stage, both spine gate nodes, the
dense population and export kernels). No value, receipt, gate digest,
contract pin or generated file changes; the H2 fixture holds data only.

Tests: two new ones in test_uk_graph_evidence.py (the kernel frame is
one copy of its context, peak below 1.5 tables where the old hand-over
peaked at about 2, and owns its tables; the gate kernel builds its frame
through one _minimal_frame call with the run's mass log and metadata and
no Frame of its own), and the 26 engine-free files that use either
module, with the UK engine hidden: all pass but the Orrery reconstruction test,
which needs the Orrery Node package this checkout does not install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dense-spine preflight (tools/run_uk_cut.py dense-spine) refuses an
expired register entry. On this branch eleven local-line target-fit entries
expired on 2026-11-16, one more expires on 2026-11-23 and three on
2026-11-24, so the #931 15-clone spine could not build at the branch head.
This carries María's renewal of 2026-11-22 (a26cefb on main, from #1687)
unchanged: the same fifteen local cells and one national row, the same
adjudication, approval date and 28-day window. The earliest expiry is now
2026-12-01.

The battery tests' clock moves to 2026-11-22, the latest approval on this
branch; its comment names this branch's approvals only.

(cherry picked from commit a26cefb)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ousehold (#931)

The dense calibration on the geography-first K=15 spine built at 6fff0bc
stopped at the problem node: the rowwise driver's support check refused two
constituency cells with a nonzero target and no household in the pool,
Wokingham's (E14001593) two-children cell and Stratford-on-Avon's (E14001526)
three-or-more-children cell. Every other Great Britain cell of both buckets
binds, and the dense pool on main's route carried both. The local line now
defers them under the new signed reason
uc_children_constituency_spine_support_absent, as Carmarthenshire's band-I
cell is deferred, so the spine can be calibrated and compared with main's
route; the assignment's support for the two cells stays open under #931
(María's ruling of 24 November 2026).

The parity tool reads the new reason beside the small-cell rules, so the
incumbent's two cells become fixture-only rows that carry the deferral's
rationale. Both resources were regenerated from the rows of the pinned
Chronicle 4ce631f5 feed that a local selector matches. Every other reference,
membership record and parity row is byte-identical to the committed files;
the UC child-bucket drift rationale quotes 2,525 rows instead of 2,527.

No kernel hashes either tool, and the spine gate declarations do not move,
so the spine built at 6fff0bc still binds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… seat deferrals compile (#931)

The dense build at 6613fdf stopped at the target compilation: the
cross-grain partition step refused Stratford-on-Avon's (E14001526) UC
children partition, because the three-or-more-children cell that 6613fdf
defers was not in the reconciliation frame. A signed deferral with a value
joins the frame only where a control moves its leg, and no control moves the
UC child buckets. Wokingham's (E14001593) two-children cell is the same case.
The dry run compiles no targets, so it passed.

The partition is share_of_parent: each bucket moves by its parent's own
reconciliation factor, which no other bucket enters, so the buckets present
move exactly as they would beside the absent one.
apply_cross_grain_partitions now lets a share_of_parent partition miss a
member and names the absent member under members_absent in its receipt. An
exhaustive partition still refuses a partial set: it rescales its members
jointly onto the parent, so it would move the absent member's mass onto the
others.

On the pinned Chronicle 4ce631f5 artifact, tools/uk_target_surface_receipt.py
compiles the surface through the target compilation node's own code path
with this change: members_absent names the two seats, each with its one
deferred bucket, and no other partition cell lacks a member.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2.179.2, and refuse a block whose data supplies the UK totals (#931)

What failed: after the merge of main cac12ab, which brings
policyengine-uk 2.179.2, the declaration no longer matched the installed
engine, so every engine block and every batched spine call refused its
work. The H2 clone-first test stopped at area_brma's batched call, and 18
of the declaration's engine tests failed.

Why: policyengine-uk 2.179.2 (policyengine-uk#2896) lets the data supply
the UK totals each share divides by (uk_total_<component>), so that a
simulation of part of the UK gives each household its share of the UK
total; without them, in a simulation built from data, shareholding and
consumption_shareholding still divide by the simulated weighted total.
corporate_land_value is now shareholding times the aggregate corporate land
value, and consumer_incident_tax_revenue_change reads
consumption_shareholding, so both leave the engine's whole-population list.
The three contributed budget changes, the employer NI responses and the
carbon tax keep the tests that make them zero at current law. The
constructor takes a stored new-claimant draw where the dataset supplies one
for the year (uc_new_claimant_health_element_draw, which main's
uc_new_claimant_draw stage stores), and otherwise draws by position as
before. Two council tax reduction formulas gain .any() shortcuts, and a
dataset check lists attends_private_school among its first-period columns.

What changes:
- The declaration is reviewed against 2.179.2. corporate_land_value leaves
  the corrected class and consumer_incident_tax_revenue_change the
  zero-at-policy class; both read the shares a block sets, so they are
  observed. Nine pinned sources take their 2.179.2 digests, the two that
  left the list lose theirs, and utils/uk_totals.py and utils/data_source.py
  are pinned, since the corrected shares rest on both. The window stays: a
  year the stored draw does not reach still takes the position-keyed stream.
- A new declaration field, supplied_totals, names the inputs each corrected
  formula divides by in place of the simulated total where the data
  supplies them. EngineBlock refuses a block whose data holds any of them
  nonzero (check_supplied_totals): such a share is already the pool's, and
  the pool-share factor would scale it again. The build supplies the totals
  only in release frames, which no engine block computes over, so no build
  output moves. A declaration without the field keeps its digest.
- The dense measure step's weight-share list drops corporate_land_value,
  since a block's pool shares must cover exactly the declaration's corrected
  formulas, and its exact-scope text says which formulas read the shares.
- Tests: the drift lists take the two council tax reduction formulas, whose
  shortcuts give every unit the value its branch would, and the dataset
  check, which no formula reads; the pins test names the two helpers; new
  tests hold the supplied totals to the engine's own names and refuse a
  block that supplies one; the block-correction test bounds
  corporate_land_value as it does business rates and checks it takes the
  pool's value in every block. The changelog fragment and the two runbook
  passages say the same.
- The H2 clone-first test, which its blocks now let run again, counts
  main's uc_new_claimant_draw: 64 stages.

Checks: the declaration's engine tests (53) and the shared machinery's
(147) pass, and so do the block-correction engine tests (10) and the
measure step's, the declaration constants', the adapter's and the batches'
tests; the H2 clone-first test passes at one and four clones (34).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runbook estimated 30 to 40 GiB of peak memory for a full-sample spine
at 15 clones. The first one, built on 24 Nov, peaked at 68.4 GiB in
hmrc_spi_income_spine, with 54.6 GiB in nts_bus_travel and 43.7 GiB in
salary_sacrifice; its stage nodes took 2.7 hours in all, and its H5 is
6.9 GB. The runbook now gives these figures, asks for a machine with more
than 64 GiB of RAM, and names the command's 400 GB free-disk check in place
of the 300 GB store estimate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…give the frame-copy test the executor's read-only views (#931)

CI on 900d70c failed engine-free on
test_the_hold_counts_every_weight_change_after_the_split: it counted 11
stages after the CGT support split where it expected 10. Main's
uc_new_claimant_draw (#1687) is the eleventh, and both frames it builds
pass their input's household weights, as the test requires, so the count
is 11. The clone-first nesting test classifies every post-clone stage in
the roster's order; uc_new_claimant_draw joins the stages
test_h2_clone_first.py holds at four clones, which passes with it.

test_a_kernel_frame_is_one_copy_of_its_context built its kernel context
with executor._freeze_frame, which main's #1724 replaced with read-only
views of the stored population (_read_only_table). On those views a Frame
holds one copy once built, as before, but two copies are alive for a
moment: pandas copies one block per column and then joins the copies
(from a deep copy the peak is 1.07 copies). That is no more than the
executor's frozen copy and the frame's own were before. The helper now
hands the views; the held bound stays 1.5 copies and the peak bound is
2.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rnels (#931)

This branch's derived transport binding rule found two kernels that
compute through microcosm.frame.shared_columns without hashing it:
export.readback@1 and transport.input_closure@1. Both compute through
frame.materialize, which main's #1683 made check a frame's shared columns
before it writes. Each now hashes the module, as main's population and
target kernels do, and the evidence kernels' pinned module lists name it.
The two kernels re-key; no spec pin moves (the US spec pin, the UK loader
pin and the US F0 coverage report are as before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The HMRC employed-income identity adds the miscellaneous employment leaf,
which the SPI tape's MOTHINC carries below zero on a few records, so a
drawn row could hold a negative hmrc_spi_employed_income, which the stage
declares non-negative. The K = 15 spine's per-clone draws gave <3 such
values, and uk_nonnegative_columns blocked its build: the third finding of
the K = 15 comparison, fixed as María ruled on 25 Nov.

derive_hmrc_income_auxiliaries now floors the identity at zero, and the
earned and assessable totals add the floored value, so TI equals TEI plus
TII exactly as before. hmrc_employed_income_floored names the rows the
floor lifts, and the stage's receipt gains employed_income_floor: the
distinct source households among geographic clone 0's rows, rounded. The
stage's notes say so, source_stages.json follows them, and
SPI_HMRC_EMPLOYED_INCOME_FORMULA shows the floor. The H2 fixture is
regenerated once, after the three fixes of the K = 15 findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… households are drawn (#931)

The first finding of the K = 15 comparison: SPI support-channel copies drew
their area at L3, their region by households, and the housing shell drew
their council-tax band from region, composition and incomes, so band and
local authority were nearly independent. Upper bands sat in authorities
with few such homes, and one authority's Band G stock row started past the
solver's cap and froze. María ruled on 25 Nov to copy the FRS rows' rule.

- spi_copy_areas moves after spi_housing_shell. The four stages it moves
  past read no area column, and they key their draws on household, person
  and carrier ids, not on the geography key.
- uk_draw_inputs gives a copy its drawn band (a band A to I) as its band
  input, its decile still missing, so the copy stage draws it at L2, its
  region by that band's households, where the region's cell holds the band,
  else at L3. The stage now refuses only a copy drawn at a decile level, and
  its declared area draw names the levels L2 and L3; the sources schema's
  area_draw takes levels in place of level.
- The shell prices each Great Britain copy's bill at the expected Band D of
  that same cell: uk_spi_housing_council_tax_inputs takes one exact
  reference per Great Britain region of the copies and band its nation
  prices, before the band draw, by the call council_tax_localise makes, and
  the bill reads the reference of the band drawn. council_tax_localise,
  which recomputes each row's level from uk_draw_inputs, localises the bill
  from the same cell, so it needed only its notes changed.
- The notes of atomic_area_assign, spi_copy_areas, spi_housing_shell and
  council_tax_localise, the shell's declared derive formula, the modules'
  docstrings, four docs and a changelog fragment say so; source_stages.json
  follows sources.yaml. The H2 fixture and the tests are brought up once,
  after the three fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as another clone of its household (#931)

María's ruling of 25 Nov: each copy high_value_home_support makes
derives its own area. Before, every copy kept its parent's key, area
and council tax (C-11, C-19), so all copies of a high-value home sat in
its clone's area, and the high-value areas uk_high_value_homes_support
assesses rested on fewer distinct source households than the copies
could give them.

- The stage, after its split, places every copy it made
  (spine_geography.assign_uk_high_value_copy_areas): a
  geography_household_key over the copy's own path, read on the support
  channel's, the high-value and the geographic branches; an area drawn
  with atomic_area_assign's definition, stream and seed from the copy's
  own draw inputs, which are its parent's, so at its parent's level;
  then its local authority, BRMA and fuel-relief flag. Northern
  Ireland's copies draw their BRMA on their own benefit units after one
  engine call over their households alone, as spi_copy_areas does (C-9).
- On each Great Britain copy whose local authority changed, the bill,
  the rebate and the person reduction council_tax_localise wrote at the
  parent's authority are multiplied by the new authority's 2024-25 Band
  D over the former one's, one correctly rounded product of exact
  rationals (spine_council_tax.relocalise_uk_council_tax). The copy
  keeps its parent's draw cell, so this is council_tax_localise's amount
  at the new authority, to rounding. Northern Ireland's bills stay. The
  home value and every other column stay the parent's.
- spine_geography.place_uk_copies is the copy placement the SPI-copy
  area stage and this stage now share; the SPI-copy area stage's
  behaviour is unchanged.
- The declaration: sources.yaml's stage gains the artifacts it reads
  (FRS release, local authority names, BRMA layer and counts, RFDR
  layer, both Band D resources), the Scottish Band D feed check, the
  LHA_category predictor, the new assign_high_value_copy_areas operation
  and twenty rewrites; the split's values text says the copies are
  placed. The sources schema and the manifest vocabulary gain the new
  operation, and spine_build's declared seeds read it as they read
  assign_spi_copy_areas. graph.py gives the stage the conditioned
  supports as sources and its rewritten cells; graph_kernels and
  spine_build build it with the engine and the supports.
- Gates: uk_copy_area_agreement holds the high-value copies to their
  parent's region and clone index alone, as it holds the support
  channel's; the CGT layers are unchanged. The notes of that gate,
  uk_stage_high_value_home_support_mass and
  uk_council_tax_reduction_within_bill say what the stage now does.
- Evidence: the stage's receipt adds copy_areas and council_tax: among
  clone-0 rows, the distinct source households copied, by system, every
  system withheld where one rests on one or two, and those whose copies
  changed authority, rounded by the shared rules; no key or code.
- Tests: test_uk_high_value_copy_areas.py runs the packaged area stages,
  the support channel's stand-in and this stage on the toy supports at
  K = 1 and K = 3 (own keys over the path, the parent's draw cell, the
  area's lookups, roots and other columns unchanged, the Band D rescale
  bit for bit, one engine call, clone 0 as K grows, rounded evidence,
  refusals). test_uk_high_value_home_support.py reads the split by its
  kind.
- Docs: geography-assignment item 9 and the household lineage page;
  fragment 931-high-value-copies-own-areas.changed.md.

The H2 fixture, the pins and the full test sweep follow in one pass
after the three fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 15 fixes, recompute the gate contract pins, and bring the tests to the new rules (#931)

One regeneration and one test sweep for 31523eb (the employed-income
floor), 6578fd8 (SPI copies drawn by their band) and 2d06486
(high-value copies placed), as María asked (25 Nov).

- The housing shell's reference (6578fd8): a Great Britain region
  can hold none of a band its nation prices, and then a copy of that
  band draws at L3. uk_spi_housing_council_tax_inputs took every
  (region, band) cell at L2, so the H2 regeneration stopped on a cell
  without mass. It now takes each cell at the level the draw's chooser
  gives it, through uk_draw_levels and uk_draw_frame, as
  council_tax_localise recomputes a copy's cell, and it refuses again a
  copy whose region no system selects (uk_draw_systems), which the
  per-cell references had stopped doing.
- high_value_home_support builds its output tables with assign, so the
  rescaled council tax columns replace their own and pandas shares the
  others; no value changes.
- graph_kernels binds what the high-value stage now computes through, as
  the derived binding rule requires: the engine modules, spine_geography
  and spine_council_tax, the area draw's and the lookups' modules,
  council_tax_band_d and the feed-fact modules. This re-keys the stage's
  node and every node after it.
- tools/verify_uk_identity_stability.py: E4 takes high_value_home_support's
  rewrite of brma back, as it takes spi_copy_areas', since its scope drops
  every copy, and refuses a scoped frame that keeps a high-value copy
  (_require_no_high_value_copies). Nothing hashes the tool.
- Regenerated: the H2 fixture (tools/graph_uk_spine_fixture.py, which
  now builds the high-value stage with the engine and the supports) and
  the coverage manifest. source_stages.json is current.
- Pins: the UK gate battery's policy, gates-manifest and spec-fingerprint
  digests and the spine part's certification digests in
  microcosm.data.contract, re-derived from the live producer
  (GateBatteryRun.report_payload and release_certification's
  _scoped_digests); test_contract mirrors the battery's three. The
  calibration seam's and the release cut's digests do not move. The US
  spec pin, the US inventory digests and the loader pin do not move.
- Tests:
  - test_uk_spi_housing_council_tax: the references are keyed by
    (region, band); each copy's reference is the localisation's own for
    its cell, worked again at L2 by the band's households and at L3 by
    households; the narrow frame at a copy's level keeps the band at L2;
    the refusals of the references' form are the mapping's.
  - test_uk_spine_council_tax and test_uk_spine_geography: a copy draws
    at L2 where its region's toy areas hold its band, else L3.
  - test_support's with_spi_copies_placed draws copies at L2 or L3.
  - test_uk_source_stages, test_uk_spine_acceptance_receipt and
    test_uk_clone_first_nesting: spi_copy_areas after spi_housing_shell;
    after council_tax_localise only high_value_home_support rewrites the
    bill, the rebate and the reduction.
  - test_uk_stage_health: the copy gate holds high-value copies on region
    and clone index (a new test lets one take its own place and refuses
    another region); brma and local_authority, and the bill, have
    high_value_home_support as their last writer.
  - test_uk_graph and test_uk_full_target_graph: the new compile order,
    the high-value stage among the support readers and the key writers,
    and private_rent binds no council-tax cell now that spi_copy_areas
    sits between it and the shell.
  - test_uk_atomic_area_conditioning: a copy's band input is its drawn
    band. test_uk_frs_spine: the stage's declared seeds include the area
    stream and the BRMA salt. test_uk_spi_housing_shell: the reference is
    the band's cell. test_uk_identity_stability_receipts: E4's reversals.
  - test_uk_spi_forest_release: the receipts' macOS digests, with the
    floor's receipt; the person digests do not move. Linux is still not
    recorded.
  - test_h2_clone_first: high-value copies keep their parent's value
    and kept draw, and take keys and areas of their own; the keys stay
    unique. Clone 0's SPI copies now draw their area from the band the
    housing shell drew, whose draws nest on one clone's only to the
    share class (as their council tax already did), so clone 0 holds
    K = 1's areas on every FRS row and every copy whose drawn band is
    K = 1's, and K = 1's keys on every row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er, and let its SPI copies draw at L2 or L3 (#931)

CI's engine-uk jobs (3.13 and 3.14) failed at ec0898f on
test_uk_country_adapter: since 2d06486 the high-value home support
stage reads the three conditioned atomic-area supports, to place its
copies, so it is among the graph nodes that read them.
test_uk_spine_three_systems held every Great Britain SPI copy at L3;
since 6578fd8 a copy draws by its drawn band, at L2 where its region
holds the band, else at L3, so the test holds it to those two levels.

Run here: every file of CI's engine-uk job (tools/ci_test_plan.py
list-job engine-uk, 84 files), without --maxfail, passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ves off the frame (#931)

5e682cb let a share_of_parent partition miss any member, in any area and
at any grain, so that the two signed UC child-bucket deferrals of 6613fdf
compile. It also let a feed gap in any of the UK's three such partitions (the
census tenure shares, the UC child buckets and the gas-connected share)
compile with the cell untargeted, where it used to refuse, and no reader held
the receipt's members_absent (the second review of 26 Nov, item 1).

apply_cross_grain_partitions now takes signed_absent, the (target id, area)
pairs a signed deferral may leave off the frame, and refuses any other
missing member, naming the partition, the area and the member. The UK target
compilation hands it the membership's signed cells off the surface. An
exhaustive partition still refuses any partial set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot the cell's ratio (#931)

G6 priced a Great Britain row with no observed gross bill and an observed
band by the 2024-25 statute, but still scaled its rebate and reported
reduction by the draw cell's ratio. Where a household's reduction met its old
bill and the statute bill rose above the ratio times that bill, a household
on full reduction was left paying the difference (Vahid's review of 16 Nov,
item 7, agreed on 17 Nov; the second review of 26 Nov, item 2, asked for it
before the next K = 15 spine).

On a statute row whose old bill is positive, the rebate and the reduction now
move by the bill's own change, amount x new / old, one correctly rounded
quotient of exact rationals, and are then capped at the new bill as before.
A reduction that met the old bill meets the statute bill exactly. A statute
row whose old bill is zero has no change to follow and keeps the ratio, and
ratio paths are unchanged. Equal amounts on equal inputs stay equal, so the
rebate still equals the reduction wherever it did. The high-value copies'
rescale after G6 still gives G6's amount at the new authority, since the
statute bill and the capped reduction are both in proportion to the
authority's Band D.

This moves G6's values on statute rows with a reduction, so the next K = 15
spine must be built at this commit or later. The H2 fixture is regenerated
with the other fixes of this series.

Tests: the oracle moves statute rows' amounts by the bill's change; the
statute test checks it, in a cell of two authorities too; a new test sets
every statute row's reduction and rebate to its old bill and finds each at
the statute bill exactly, uncapped, with some row where the ratio would have
left a gap. The stage notes, the build-graph page and two fragments say the
rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tches the inputs (#931)

The dense-spine preflight checked the checkout, the environment, the key,
the registers and 400 GB of free disk, but read no memory figure. The
15-clone spine peaked at 68.4 GiB in hmrc_spi_income_spine, so a 64 GiB
host passed the preflight, fetched the inputs and stopped in that stage (the
second review of 26 Nov, item 6).

tools/run_uk_cut.py now reads the host's physical memory from sysconf and
holds it to DENSE_SPINE_MIN_MEMORY_GIB, 72 GiB, above that peak with room for
the system. dense-spine checks it before it fetches the spine's inputs and
again in its preflight, as a blocking check; a memory that cannot be read
blocks too. --min-memory-gib sets another floor, and 0 none. No other
command's checks change.

The runbook says where the check runs and names the flag. Tests cover the
floor's edges, an unreadable memory, the preflight's check, the early
refusal that fetches nothing, and the flag; the tests that run dense-spine
never read this machine's memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…led engine in the three-system test (#931)

Since 2d06486, high_value_home_support makes one engine call over its
Northern Ireland copies' households, on a scratch frame without the clone
index, as spi_copy_areas does. Only a stand-in engine ran it, and the H2
fixture has no Northern Ireland household, so no test reached the call on
the real engine (the second review of 26 Nov, item 5).

The three-system engine test now runs the stage after council_tax_localise,
at one clone and at two, on the stand-in's frame with every household
invented as an owner, its home worth more the less its row weighs, so the
stage's packaged stratum copies households of Northern Ireland and of Great
Britain. It holds:
- one engine call, of one simulation, over the Northern Ireland copies'
  households alone, whose BRMAs are frs_brma's draw on that call's frame;
  Great Britain's copies read the area-to-BRMA layer for their new areas,
  and every other row keeps its BRMA;
- that call's frame equals the rows of the frame the stage cut it from,
  less the clone index, and gives the copies the LHA_category, and so the
  BRMAs, a call over that whole frame gives them; at two clones the whole
  frame's call runs clone by clone under the adapter's guard.

The two calls agree at both clone counts. Invented data only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecording, so CI can record Linux (#931)

The merge of main at 8c51b6e recorded test_uk_spi_forest_release.py's
digests of this branch's draws on macOS arm64 only and removed the Linux
x86_64 entry, so the frozen-digest tests skip in both engine-free CI legs
(the second review of 26 Nov, item 3). The machine that records lacks
Docker's x86_64 emulation.

On a platform without a recording, the test now computes its digests first
and warns with them, and the library versions it ran with, before it skips.
pytest's warnings summary prints the warning, from xdist's workers too and
under CI's flags, so this commit's engine-free run on Linux x86_64 reports
the digests to record there. A follow-up commit records them from that log,
after which the tests run in CI again; until then they skip as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…raphy block (#931)

Since 2d06486, high_value_home_support draws its copies' areas on the
conditioned supports and keeps the validation outcome, the definition's
digest and the supports' digests under copy_areas in its receipt. The two
other stages that draw areas, atomic_area_assign and spi_copy_areas, each
have a mapping-integrity gate that holds that record to the spine's
geography block; the third had only its mass gate (the second review of
26 Nov, item 4).

gates.json adds uk_high_value_copy_area_mapping_integrity, a release-blocking
stage-health gate at the transferred boundary, beside the SPI-copy stage's.
It is the same check: the record's outcome (pass, or not_run on a frame
without a high-value copy) and scope, its digests against the block's
definition and support pins, and the frame's areas re-derived on the pinned
supports. The check reads a stage's record under the receipt key its new
evidence_record parameter names, here copy_areas; the stage-health binding
routes the key, and a receipt without that record fails closed.
UK_SPINE_GATE_SCOPE adds the gate, and microcosm.data.contract adds its entry
and re-pins the battery's policy, manifest and fingerprint digests and the
spine part's from the live producer.

Tests: the packaged gate's parameters; it passes on a high-value receipt
with the copy stage's record nested under copy_areas, through the battery
too, with evidence_absent where the block, the supports or the frame is
missing; it fails closed on a record at the receipt's top or none; the gate
lists and the contract mirrors follow. The build-graph page and the
high-value fragment name the gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o the 25 Nov rules (#931)

Five changelog fragments of this PR, which ship in one entry with the
fragments of the 25 Nov fixes, still said what those fixes replaced: that
high-value support copies keep their parent's area, and that SPI copies and
band donors draw at L3 with both draw inputs missing, after
spi_income_band_donors. The after-merge H2 test's module docstring said the
same, though its code follows the new rules (the second review of 26 Nov,
item 7).

They now say that SPI copies and band donors draw after spi_housing_shell,
at L2, their region by the households of the band the shell drew, where the
region holds that band, else at L3; that the shell's reference is taken per
(region, band) cell at the level the draw's chooser gives it; and that each
high-value copy keeps its parent's value but draws its own key and area and
takes its new authority's council tax. Text only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…econd review's fixes (#931)

One regeneration for the series 59188f7..75e6234. The H2 spine fixture
is unchanged: its households hold no statute-row reduction, so G6's new rule
moves none of its values, and only the copy of council_tax_localise's notes
in the sources fixture moves. The release-input coverage manifest follows
gates.json and the stage notes, and --check passes.

Checked here at this tree: the UK engine-free tests (9,746 pass; the one
failure is the test that needs an environment without the UK engine), the
engine-tier files the series touches with H2 parity, the UK graph and the
after-merge clone test at one and four clones (55), and the staging smoke
(2). The UK target surface compiled on the pinned feed with the new
partition rule: its only absent partition members are the two signed UC
child-bucket cells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tages in the four-clone test (#931)

Main's uc_housing_costs_claim (B1 of microcosm#1710), merged in a4770ed,
runs after uc_limited_capability. The clone-first nesting test requires
every post-clone stage to say, in the roster's order, where its clone 0 is
held to the one-clone run, so it failed CI's engine-free job on a4770ed
until the stage was classified. Like uc_limited_capability it calls the
engine, so its clone 0 is held only after merge, by test_h2_clone_first.py
at four clones, whose stage count moves from 64 to 65.

Checks: with policyengine-uk hidden, as in CI's engine-free job, the
nesting test and three other files that name the roster's last stages;
and 20,968 UK, shared, graph and data engine-free tests, none failing,
before the sweep stopped for the next merge of main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch is rebased onto main 35ec6c7 without its twelve merge
commits. This commit holds what those merges changed beyond main's own
commits, so the head's tree is again the tree of the tested merge
3a9dcb5:

- the regenerated stage table, coverage manifest, parity fixture and
  gate contract;
- the stamps for main's fact feed on the Scottish Band D facts;
- the adaptations of the UK graph, gates, national frame, data contract,
  tests, CI workflow, cut tool and guide to main's changes;
- lines from main that earlier commits of the rebase left out, where a
  branch commit changed the same lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22
juaristi22 force-pushed the claude/uk-931-geography-first-move-b38c04 branch from 3a9dcb5 to f366de7 Compare November 27, 2026 16:57

This branch has not been deployed

No deployments
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