Repository navigation
Move the UK spine to geography first (#931) - #1538
juaristi22 wants to merge 177 commits into
Conversation
|
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
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:
The spine graph declaration ( For Max:
WAS and land
What moves:
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.
What moves in (a):
|
cf8432c to
690f0a2
Compare
c7daedb to
2b0a792
Compare
…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>
|
Review of Settled by the rebase
Should, and needs a decision before the move merges
Should
Nit
Checked and fine
Evidence gaps
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 |
|
Independent review at 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 run1.
Needs a line or a decision in the description2. The high-value support copies are now six identical rows
3. The nesting claim stops at
Should4. A release candidate no longer checks the localisation resources of a bound spine
5. The Child Benefit gate counts child rows over every clone
6. The identity tool's E4 and E5 can print PASS without a comparison
7. The two mapping-integrity gates cannot fail on content
8. Nothing before merge runs the spine at K > 1
9. The full K = 15 build: disk, memory and time
10. The Northern Ireland copies' engine call runs outside the population guard
Smaller11. 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 13. The dense candidate manifest's 14. Lower:
Checked and fine
Not checked
Two disclosure-control items went to the author separately. 🤖 Generated with Claude Code |
|
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. Before the first CI run1. 561745e regenerates Needs a line or a decision in the description2. 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 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 ( Should4. 76ad295 and 586832f change what a
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 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:
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. Smaller11. 42b85ee. 12. 3d23a80 refuses an off-pence English Band D. Not done:
13. 5a24881, with a test that reads the dense chain. 14. The lower items:
Not done in item 14:
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 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 |
|
Reply to the review of 16 Nov ( 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):
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 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 🤖 Generated with Claude Code |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
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
614c101e6and5b9543494. 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_sha256at:368hasn'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.
|
Reply to the follow-up review of 17 Nov (
The description also lists the CI fixes since the merge. All are in tests. 🤖 Generated with Claude Code |
|
@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, 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:
The data: nothing to download by hand. The command fetches every input from Hugging Face at its pinned revision into
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.
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 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 At the end it prints one upload command, 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 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 |
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>
|
The dense spine builds again, at 6fff0bc. At 658378b, The conflicts with main don't block the build: the runner builds any pushed commit given 🤖 Generated with Claude Code |
|
The K=15 spine at 6fff0bc is built and uploaded. What the run took, for next time:
To run this on a VM again, pin 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 |
…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>
3a9dcb5 to
f366de7
Compare
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)
rank_basisisweighted_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.council_tax_band_observedor the bill's provenance stays at release, with #20.--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.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:
hmrc_spi_employed_incomeat zero. The HMRC identity adds the SPI tape's miscellaneous employment leaf, which is below zero on some records, anduk_nonnegative_columnsblocked the head's build on it. The receipt counts the floored rows' sources, banded.spi_copy_areasnow runs afterspi_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.uk_copy_area_agreementnow holds these copies to their parent's region and clone index alone.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:
share_of_parentpartition 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.uk_high_value_copy_area_mapping_integrityholds the high-value stage's placement record to the geography block.dense-spinerefuses a host under 72 GiB of memory before it fetches the inputs.Commit groups
frs_brmafold, the SPI-copy area draw, G7, G8 inside the WAS chain, gates, dense re-basingGroups (0), WAS and land, and (a)
Their per-commit notes, with what moves at each commit, are in this comment.
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.
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.geographic_expand, and G1b,geographic_identity, bound to no stage yet.geography_household_keyas the dense line'suk.full.identitydid; (c) 4 retires that node.geographic_clones, which every counting stage and the dense kernels that read the names hash.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.expand_geographic_clonesandkey_households_by_clone_path(for Max). K sits on G1's graph node, never in a stage contract.imd_decileandcouncil_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.fold_geographic_clones. On more than one clone, its evidence gainsgeographic_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.twin_identities); each copy's uniforms stay keyed on its own identity.funding_within_shareandfunding_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.--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.--stage-profile-dirruns 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.--spine-sidecarand 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 underrewritten_later(E5'sstudent_loan_balance, E4's take-up flags), and E4 rebuildsLHA_categoryand the apprentice walk's weights as those stages saw them. E8 reports stage 17 in the stage's own receipt forms.geographic_clone_count.engine_after_merge/uk/category whoseengine-uk-after-mergejob runs on pushes to main; the engine-uk cap is main's 90 minutes. The module is renamedtest_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.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.EntityIdWarning, refusing to build if that class moves.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.
choose_fallback_levelsinatomic_support_conditioning(for Max), and its review follow-up. Nothing calls it yet, and no node key moves.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.strataon the sharedassign_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.geography_first_roster), checked byspine_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.--geography-assignment, the three atomic-support inputs and their three pins, and--source-lineage-modulus.--n-clonesonly asserts the spine's K. A dense--sample-fractionother than 1.0 or any--sample-seedis refused by name, a dense build id carries the spine's rung, and a release candidate on a sampled spine is refused.country_adapter.uk_spine_geography_binding_failureschecks it, and the release pre-flight uses the same helper. The spine's own--release-candidatetakes 15 only on a geography-first roster.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.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 threestage_healthchecks (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.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."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.atomic_area_assign,local_authority,rfdr).area_brmatakesfrs_brma's place afterfrs_household_draws.spi_copy_areasgives every SPI copy and income band donor a key and an area of its own.private_rentreads each Great Britain private renter's rent off its BRMA's list.local_authorityandin_rural_fuel_duty_relief_area. Great Britain's BRMAs come from the drawn area. Northern Ireland's households keep the BRMAfrs_brmadrew, 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.frs_person_drawsdo not bindtake_up_contract.jsonin 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 intest_graph_evidenceandtest_graph_orrery. CI's engine-free job checks them.regional_home_valuesand 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_wealthdeclares 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_upratingnow divides by the draw G8 keeps, so it returns each localised home to its knot value.regional_home_valuesretires.localise_main_residence_valuekind and an optionaldenominatoronuprate_to_regional_reference, andassign_regional_home_valuesleaves the schema andALLOWED_SOURCE_OPERATION_KINDS.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.--expected-constituency-vintageretires.uk.stage.regional_home_values@1goes, 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.household.atomic_area_basisapplies 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.national_frame. Every spine, dense and national node re-keys. Outside the UK no kernel, fingerprint or node key moves.household.atomic_area_basisto 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.
uk/council_tax_band_d_england_wales_2024_25.json, built by the newtools/build_uk_council_tax_band_d.pyfrom two raw-only Chronicle registrations (MHCLG's Table 8 and StatsWales), read at Chronicle commit80a3482, each raw file held to its own sha256 (the feed's pin is not that commit;e279da868). Its--checkrebuilds 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).uk_runtime.council_tax_band_dmerges 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.area_brmare-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.--check; the vendor--checkover 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.atomic_support_expectations.draw_cell_expectations, a draw cell's exact expected value under the draw's own weights (G6's reference), andbounded_amounts.amounts_within_bound, booleans that hold amounts within a bound (the reduction-within-bill check). No key moves.frs_council_tax):derive_council_tax_provenancenames the branch each household's bill took (observed_gross,missingorunknown_reduction), andnot_leviedin 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, sofrs_council_taxjoins the counting stages.stage_health.council_tax_reduction_within_billholds each household's rebate and reported reductions (summed over its persons) within its bill, through the sharedbounded_amounts, with Northern Ireland left out. Its details are booleans. The stage-health binding routes its keys, and the gate registry gainsbounded_amounts.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.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.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.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.deriveoperation forcouncil_tax_bill_provenanceand 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 strictlocalise_council_taxoperation kind joins the source schema.was_wealth.recipient_predictors, whichwas_lisaalso calls, takes the bill predictor fromcouncil_tax_frs_billand 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.uk.stage.council_tax_localise@1is 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, throughsource_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.source_stages.json, H2'suk_spine.json,fixture.jsonandcgt_asset_type_facts.json, and the coverage manifest.uk_council_tax_reduction_within_bill: a stage-health entry oncouncil_tax_localiseat the transferred boundary, right afteruk_copy_area_agreement, release-blocking, withevidence_absent_blocks. It runs (d) 3's check. Outsideexcluded_regions(NORTHERN_IRELAND, which G6 leaves uncapped), each household's rebate, and its persons' reported reductions summed, must be at most its bill plusabsolute_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.high_value_support,cgt_support_split,cgt_incidence_clone,cgt_residential_split) also hold each copy to its parent oncouncil_taxandcouncil_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).columnsparameter) and the exempt ones (main_residence_value,property_wealth). Text only: its parameters are unchanged.UK_SPINE_GATE_SCOPEgains the gate, and the spine's transferred phase code also hashesbounded_amounts.microcosm.data.contractis 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.area_brmare-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.localise_council_taxoperation kind and its strict schema variant, G6's bitwise class, F10, andbounded_amountsin the spine's transferred phase code.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).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_taxstays 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.uk_runtime.spi_housing_council_tax, unwired, so no key or value moves: each SPI copy's reference Band D (draw_cell_expectationsat 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.spi_housing_shell: the value-moving commit, with one H2 regeneration.deriveforcouncil_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.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.
docs/uk-atomic-household-lineage.md: true sources, copy paths, the copy-id fields and the geography key.docs/geography-assignment.md; the 10 September paragraph stays as written.docs/uk-full-build-graph.mdand seven neighbour docs up to date, with the national line's refusals and the certifier's geography check.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
exact.copy_rulesays so;copy_rulenames 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);cgt_structurein stages 26 and 46 stays a listed refusal-only check;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.copy_rulenames it;regional_home_valueskeepsSeedSource.NONE;microcosm.graphexports lazily, and the create kernel's H2-only use ofload_sourceis a listed stop;graph_framesmove stays.frs_spineandfrs_relationshipsleave the target kernels' hashes;microcosm.graph.canonicalin the transport compile kernels;calibration_runstays off the preflight's and the solve's key, throughgate_scopes.copy_ruletexts 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 (itswithin_bandfield allows onlyuniform, so (b) settles the form);integer_record_keys' uniqueness check becomes sort-based, in (b);engine_batcheswhen a call batches, and declared at the next lock bump;source_person_idandsource_benunit_idare not minted until something reads them;ALLOWED_SOURCE_OPERATION_KINDSinsource_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_valuein,assign_regional_home_valuesout) re-keys the same four nodes by the same cause.--expected-constituency-vintageflag retires (commit 11, 164edf3);household.atomic_area_basis, which is constant by construction in the UK, extends to the national line, in its own commit after commit 12;council_tax_frs_billfor 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.Proof plan
🤖 Generated with Claude Code