Repository navigation
UK #931 prep: count floors in true sources, fold geographic clones in the FRS fits, ready the conditioned area draw - #1519
Conversation
|
Review of 7f74d4c. I read the PR body, #931 and all five commits, focusing on the shared lineage reader ( The design holds up. Should
Nit
Checked and fine
CI. There is no run at 7f74d4c or at cad323b. The last Tests run (41954535023) was at 6e7a256 (commits 1 to 3), and all 11 jobs passed. Commit 4 and the re-pin have only the local runs described in the body, so a CI run at head is needed before this leaves draft. Verdict: commits 1 to 3 do what they say for floors and geographic clones. Items 1 and 2 need an answer, and item 2 should be settled before the move relies on the fold. 🤖 Generated with Claude Code |
|
Round 2 at 668e13f. Since 7f74d4c there are two commits: the merge of main (cd15bca) and the SPI employment fold (668e13f). I read both, along with the files behind each round-1 item. I read the code only and rely on CI for the tests. There are no replies on the PR yet, so all five items carry over. Round 1 items
A reasoned won't-fix on any of these is fine. Items 1 and 2 still need an answer before the move. New code No new findings. Checked and fine:
CI. Tests run 42075566346 at 668e13f: all 11 jobs passed (lint, engine-free and engine-uk on 3.13 and 3.14, engine-us, integration-uk, wheels, installed-emitter, select-countries). This closes round 1's point that CI had not run at head. Verdict: the new fold is consistent with the six earlier ones and CI is green. Items 1 and 2 remain the ones to settle before the move relies on the fold. 🤖 Generated with Claude Code |
|
Notes at 668e13f, on top of Vahid's two rounds. The SPI employment fold (668e13f) already covers the seventh FRS-trained fit, so it isn't listed here. Items 1 to 4 change no output. Item 5 would, so it belongs in a follow-up. 1. A concrete case for Vahid's item 2 (fold agreement).
This column would make a natural replicated fixture with clones that differ. The same question applies to any id-keyed draw that sits between the clone step and a folded fit. 2. The legacy
3. The US sections of
This PR already edits the doc, so a one-line note at the head of those sections, saying they describe #893's unmerged work, would cover it. Alternatively, a follow-up could trim them. The body could also say "never merged" rather than "no longer exists". 4. Cache keys after commit 3.
One sentence in the body would stop a full recompute being read as a regression. 5. Follow-up, not for this PR: group gate folds by true source household.
For the move (nothing to change here)
🤖 Generated with Claude Code |
|
Thanks both. The answers are in five commits, on top of a second merge of main ( Vahid
María (planning review)
For the move. I've passed both notes to the session implementing the stacked move PR:
The second merge. Main's re-pin of the UK feed onto chronicle#411 rewrote the feed block of the Scottish band resource; its counts are unchanged. So the Scottish conditioned support is rebuilt with the same weights and new metadata ( None of this moves an output: the fold changes nothing without clones, no spine stage writes 🤖 Generated with Claude Code |
Scotland's conditioned support took each council's CTAXBASE 2025 band mix, so within a council the band said nothing about where a household lives (Vahid's item 3 on #1519). It now takes the mix of the area's 2022 data zone from NRS's dwelling estimates by data zone, December 2024 sheet. The bytes are the ones Chronicle already registers as nrs-dwellings-data-zone-2025, pinned here by sha256. Chronicle emits only the workbook's total as facts; PolicyEngine/chronicle#419 asks for the band columns. - The tool pins the workbook beside chronicle#412's files. It checks the header, the zone count and that each zone's bands sum to its total, and keys each area to its zone through the support's own lsoa_code; all 7,392 zones match. - The Scottish support is rebuilt (0c7d7826, 1,607,702 bytes). England and Wales and Northern Ireland rebuild byte for byte, and the zero-mass cells are unchanged. - The band vintage uk_ctaxbase_2025 becomes uk_nrs_dz_dwellings_2024 in sources.yaml and vintages.yaml. - Tests cover the reader and its refusals, the band source naming the workbook, and the mounted check that each zone's areas share its mix. No output moves: only the geography-first move binds these supports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Vahid's item 3, the Scottish band weights, now come by data zone ( First, a correction to my reply above. I said no data-zone source was registered in Chronicle. In fact Chronicle already registers NRS's dwelling estimates by 2022 data zone (
PolicyEngine/chronicle#419 asks Chronicle to emit the band columns as facts. Once it does, the support can read them from the feed instead, and the numbers will be the same. No output moves, since only the move binds these supports. The PR body is updated. |
|
Round 3 at 3778eb2. Since round 2 (668e13f) there are seven commits: the second merge of main (f9421ea) and six review fixes (fd902f6, 193870e, bb68b57, e9d557c, 77b1eb1, 3778eb2). I read the six fix commits and the merge's file list, with María's two replies. In a scratch clone I ran these engine-free test files, and all pass: the shared lineage reader, the clone-collapse sweep, the UC reporter redraw and the SPI income stage in full, plus the receipt-count scan, the conditioned supports and their tool, the apprentice draw and annual income. I also ran one extra SPI test (item 6) and checked the NRS workbook with the tool's own reader. Earlier items
María's planning items 2 to 4 (the bare New finding Should
Checked and fine
CI. Tests run 42209756229 at 3778eb2 was still running at 12:05Z. lint, wheels, select-countries, installed-emitter, integration-uk and engine-uk (3.13 and 3.14) have passed. engine-free and engine-us (3.13 and 3.14) were still running; on round 2's run engine-free took about 1 hour 40 minutes. The run at 77b1eb1 was cancelled. Verdict: items 1, 3, 4 and 5 are closed. Item 2 is closed apart from its SPI consequence in item 6, which is the one thing to settle before the move relies on the SPI fold. It moves no output today. 🤖 Generated with Claude Code |
…and add geographic_expand and geographic_identity (#931) frs_hmrc_spine_leaves and frs_annual_income_spells (stages 14 and 15) move ahead of frs_take_up, and two new stages follow them: geographic_expand (G1) gives every FRS household K geographic clones, and geographic_identity (G1b) keys each clone. frs_take_up, frs_person_draws, frs_household_draws and frs_brma (stages 10 to 13) then run on every clone. The spine build installs both new stages at K = 1, so every spine is still one clone and no value moves. Positional stage numbers in this message, the changelog, comments and tests follow the order before this commit: 14 and 15 are the two moved stages, 10 to 13 the draws and frs_brma, and 16 onward are as before. The order. sources.yaml moves the two stage blocks unchanged and inserts G1 and G1b after them; the graph follows the manifest. The moved stages read only pay, self-employment income, age and gender; stages 10 to 12 read none of their outputs and write none of their inputs, and none of the five sets weights (a test holds this). Both moved stages join the raw FRS tabs on raw person ids, so they run on the survey's own rows, before the clones. The assembled checkpoint still ends at frs_brma, so the assembled phase and its gates now cover 14, 15, G1, G1b and 10 to 13, and the assembled gate admits spi_support_channel. G1 and G1b, declared and wired at K = 1: - The sources schema and ALLOWED_SOURCE_OPERATION_KINDS gain two strict op kinds. expand_geographic_clones declares the entity, the clone-index columns, the ordinal bound of 100, the copy-id geographic_support field at radix 10**9, clone-major order, an equal design-weight split, the source columns, conservation to the split's rounding, declared factor 1.0 and a reason that names no K. key_households_by_clone_path declares the source frs and frs_release.json, which G1b also declares as its one artifact with runtime_sha256_required, so the release's bytes enter its stage contract. Each transform checks its declaration against its module's reviewed parameters, whole; G1 refuses any artifact and G1b any but that one. - No declaration names K. uk_spine_graph(geographic_clones=K) puts K, 1 to GEOGRAPHIC_CLONE_LIMIT, on G1's node params, and refuses K above 1 for a manifest without G1, so K enters that node's key and every later one, never a stage contract. - graph.py: G1 joins UK_SPINE_STRUCTURAL_STAGES as an EXPAND that conserves mass at design weights, with an open surface and six cells. Its household cells are listed in the order the transform writes them (source_year, source_household_key, source_household_id, household_clone_index), since the graph appends an EXPAND's new cells in that order and H2 parity compares column order; an engine-free test now holds that order too. G1b reads the household source id, source year and clone index and writes geography_household_key. uk.full.identity rewrites the key where the spine already carries it, so the dense graph still compiles. - graph_kernels.py: both stages get their modules and the helpers the derived rule finds (G1: clone_expansion and copy_id_table; G1b: atomic_household_identity, frs_release and microcosm.graph.canonical) and join the counting stages, and G1 joins the copy-id readers at geographic_support. The registry's structural set is UK_SPINE_STRUCTURAL_STAGES. UKExpandStageKernel refuses a transform whose clone count differs from its node's, giving the two declared counts. The fixture registry builds G1 and G1b from an integer config.geographic_clones and its engine with clones=K, and its descriptor check no longer names a stage count. - spine_build: _GEOGRAPHIC_CLONES = 1 feeds the graph, the G1 transform and _rules_engine(clones=1). Its clones keyword defaults to None, so the full build's two engine installs are unchanged. G1 and G1b are installed when the roster names them. - The geography key's name, GEOGRAPHY_HOUSEHOLD_KEY_COLUMN, now lives in the geographic_clones leaf, which G1b hashes as a counting stage, and atomic_area_support re-exports it as IDENTITY_COLUMN, so the derived rule holds every reader to the leaf and the stage table needs no entry for it; no kernel that reads it misses the leaf. G1b names its string dtype through pandas, as atomic_household_lineage does, not through the executor's token table. The identity columns. source_household_id, source_year and source_household_key are G1's outputs and cells. spi_support_channel (stage 16) no longer declares or writes them, and its copies inherit them. The stage and the dense expansion default them from a household's own ids only on a table without household_clone_index, and refuse a clone-indexed table that lacks any of them, naming the columns. source_person_id and source_benunit_id are not minted (decision 5). Their names (UK_GEOGRAPHIC_SOURCE_COLUMNS, SOURCE_YEAR_COLUMN, SOURCE_HOUSEHOLD_KEY_COLUMN) move to the geographic_clones leaf, which spells the source id itself, since it imports nothing first-party (a test holds it equal to microcosm.frame.concepts'); geographic_expand re-exports them, and the SPI support channel and the dense crosswalk read the leaf's tuple instead of copies of their own. Stages 10 to 12 count true sources. frs_take_up, frs_person_draws and frs_household_draws are given household source_household_id and household_clone_index, so the shared reader counts their receipts' support in source households on every clone; it refuses the clone index without the source column. A test holds every stage after G1 that counts before the copies to both columns. Folding consumes. household_clone_index joins the inputs of spi_employment_shell, spi_housing_shell and uc_capital_coherence, which fold geographic clones, and of property_components. The typed root cells. frs_spine writes imd_decile (int64: the household's decile on its own nation's FRS index, IMDE, IMDW, IMDS or IMDN, 1 to 10, else 0, since the root refuses NaN) and council_tax_band_observed (bool: False in Northern Ireland, for a ctband code outside 1 to 9, for a band the region does not use and for an unknown region). council_tax_band itself is unchanged. The root refuses a household tab without one of the four IMD variables, naming it, rather than read zeros. Both cells are typed, leave at the release boundary (UK_RELEASE_EXPORT_DROPPED_COLUMNS) and stay out of every receipt and the sidecar's nonzero shares, whichever route built the records; the root's notes describe them. The root binds geography_constants, since both read each household's nation from the region tier. Their first reader is the area assignment of #931 group (c). microdf in node keys. microdf-python's version joins _numerical_dependency_versions ("not-installed" when absent), so it is in the root's and every stage's node params, and the sidecar records it as microdf_python beside engine_batches when a call batches; on that route private_school_attendance stores microdf's weighted percentile rank. pyproject.toml, uv.lock and us_runtime/worker_identity.py are unchanged; the version is declared at the next lock bump. Texts: - CGT_SUPPORT_EXACT_TOTAL_EXCEPTION, and with it the copy_rule of both support splits, high_value_home_support (stage 26) and cgt_support_split (stage 42), names the candidate order: heaviest first, tied weights in row order. - The notes of isa_subscriptions (stage 53) say tied balances share one weighted mid-rank, so the keyed uniform alone orders them, and the Lifetime ISA payments reuse the amounts operation's balance_rank_weight. docs/uk-isa-subscriptions-1415.md steps 3, 5 and 6 say the rank is on the class's balance, the added people walk on their own, holders over 47 pay nothing, and the cap at each holder's room keeps the baseline under the limit. - The weight rule of spi_income_band_donors (stage 17) names one clone's donor count and its draw a spine without household_clone_index; its notes size the seats on eligible households counted in source households. The notes of spi_support_channel (stage 16) say what its uniform depends on, and its source names every geographic clone. cgt_support_split's notes and the CGT changelog say which household the identity tool's recompute can count as a family the stage never made, and that the bracketed family test does not report it. - The source and notes of private_school_attendance (stage 52) say it computes attendance over the whole frame, from the pinned engine's values and parameters. - BONUS_SACRIFICE_SPI_DRAW and the notes of salary_sacrifice (stage 48) say an SPI adult draws within its own geographic clone from cells pooled over every clone; the draw text now also says the lowest cell joins the one above, as the code does. - uc_capital_coherence's notes count a cell's donors in survey records. - G1's notes say it clones before any other copy step, and childcare_copy_take_up's notes and docstring say frs_take_up draws each geographic clone on its own ids before any other copy exists, and that geographic clones keep those draws. - Texts this change made stale: household_lineage, spi_support, spi_band_donors, geographic_clones, geographic_expand, geographic_identity, salary_sacrifice, graph_population, diagnostics, copy_id_table, gate_phase_codes (six of the transferred-only modules are now hashed at or before frs_brma), receipt_counts, frs_take_up, private_school_attendance, frs_spine's and national_frame's band-flag wording (a band the FRS gives that the region uses), the clone-first stand-in, the identity tool's E7 docstring, docs/uk-full-build-graph.md (56 stages, the clone index on every spine frame, microdf_python in the sidecar), and the earlier #931 changelog fragments that said G1 was unwired, that no spine carries a clone index, or that the stage table and the kernel table read as before; and the new fragment 931-uk-spine-geographic-expand.changed.md. The code-mirrored texts are identical in the code, sources.yaml and source_stages.json. The was_wealth and was_lisa notes are unchanged. Bindings. The national gates hash geographic_clones, since their support-family fold reads the clone index columns, which the national frame carries from a clone-first spine; the kernel table's clone-index reason now covers only the calibrated gates, the dense measures and the national problem. The stage table keeps the source household column's name alone, its reason rewritten: geographic_expand writes it through the constant and declares it by name, every stage after it that reads the name is given the column, and frs_annual_income_spells, before it, is given neither the column nor a copy column. The kernel table's premise check now asserts that geographic_expand alone writes the clone-index columns on the spine and that the spine build installs it at one clone. Tools. tools/graph_uk_spine_fixture.py's oracle builds G1 and G1b from their packaged stages at _GEOGRAPHIC_CLONES = 1 and its engine with clones=1; its config records geographic_clones: 1, and uk_spine.json is written at that K. Its synthetic households gain IMDE, IMDW, IMDS and IMDN (invented deciles in turn, one household in seventeen blank). Its descriptor and PRODUCED_BY.txt no longer give a transform count. tools/build_uk_release_input_coverage_manifest.py gains a geographic_expand family, whose required reason is G1's declared reason, matched verbatim. Dense and national. The dense expansion refuses a spine carrying geographic_expand's clone index at any n_clones, naming the clone-first spine and #931 group (c), and its overflow message limits "n_clones=1 still expands" to a spine without the index. The national line is not yet refused early; a later commit of this group adds that refusal. No national or dense build runs on a clone-first spine before (c) (decision 4). Why: María's rulings of 10 Nov. Decision 3 (X) puts G1 and G1b after stages 14 and 15 and before stage 10, so the stages that read raw tabs by raw person id run on the survey's rows and stages 10 to 13 run on every clone from this commit. Decision 1 (Form B) puts stage 53's tie clause in its notes, which enter no stage contract. Decision 2 binds microdf's version into node keys without a re-lock, which would move the US approved-lock digest. Decision 5 mints no person or benefit unit source columns until something reads them. Every declaration edit of group (b) is in this commit, so H2 regenerates once. The clone columns' names sit in the geographic_clones leaf so that G1, G1b, the SPI support channel and the dense line read one definition their keys hash, rather than copies or a listed exemption. What moves. At K = 1 no value moves: on the H2 fixture the legacy oracle's final frame agrees with the parent's on every existing column, bit for bit and in dtype, on the weights and on every earlier mass record (checked through the engine slot). frs_take_up, frs_person_draws and frs_household_draws now count their receipts' support in true source households, which at one clone are the households themselves. The bytes move: - the stage order: frs_hmrc_spine_leaves and frs_annual_income_spells now run ahead of frs_take_up, with geographic_expand and geographic_identity between them; - the column order, since the households' source columns now come from geographic_expand; - each table's clone index, at 0; - geography_household_key, which a household's copies repeat until group (c); - the root's imd_decile and council_tax_band_observed, which the release drops and no receipt or sidecar share reports; - geographic_expand's mass record and both new stages' evidence; - spi_support_channel's strata, grouped by a constant clone index; - spi_income_band_donors' funding strata, which gain the clone index, so each label ends "|0"; - the national support-family fold, whose key columns gain the clone index. Seven stage contracts move: frs_spine (its outputs), spi_support_channel (its source text, outputs and nonnegative outputs), spi_income_band_donors (weight_rule and draw), high_value_home_support and cgt_support_split (copy_rule), salary_sacrifice (spi_bonus_draw) and private_school_attendance (its source text). geographic_expand's and geographic_identity's contracts are new. K is a parameter of geographic_expand's graph node, never of a contract. No contract hashes a stage's reads or notes. The source id and clone index that frs_take_up, frs_person_draws and frs_household_draws now read move only their nodes' inputs, and so does the clone index that spi_employment_shell, spi_housing_shell, uc_capital_coherence and property_components now read. The notes of isa_subscriptions (the tie clause, Form B), uc_capital_coherence, frs_spine, geographic_expand and childcare_copy_take_up move no contract. The dense line refuses every clone-first spine, and the national line's degenerate gate would refuse the constant indices. The coverage gate now requires geographic_expand's mass record, so a release from a spine built before this commit fails it too. No national or dense build runs between (b) and (c) (decision 4). Positional stage numbers in prose (comments, tests and changelogs) still follow the order before this commit. Hash and fixture. Every UK spine node re-keys: - microdf-python's version joins every node's numerical dependencies; - every stage kernel hashes graph_kernels and national_frame, both edited here; - the root's outputs move. sources.yaml, source_stages.json and the coverage manifest move the UK country fingerprint and the solve fingerprint, so every node keyed on one of them re-keys: the spine gates, the national targets and gates, the target selection, compilation, measures and problem, the full preflight and calibrated gates, and the rotated holdout. The rest of the national and dense lines re-key through the modules they hash: national_frame, graph_population, rowwise_dataset, geographic_clones, atomic_area_support, spi_support, household_lineage, receipt_counts and diagnostics, and the national gates through geographic_clones, which their key now hashes. Only the shared atomic-geography kernels and the export package keep their keys. Outside the UK one kernel re-keys: the shared transport gate battery (gates.battery@1). Its key covers the source closure of its gate bindings, which reaches source_manifest, so NZ's terminal gate and the export and package nodes after it re-key (the NZ spec is inactive). These keep their keys: - every other transport kernel; - the US post-transfer graph's nodes and kernels; - the US, NZ, BE and AM specs, seeds and fingerprints. uv.lock, pyproject.toml and the US approved-lock digest are untouched. The schema's two new operation kinds move only the spec engine's grammar receipt, which every country's emitted, uncommitted bundle lock carries. Regenerated: - source_stages.json, with the stage list merged by stage, so every other stage keeps its bytes and key order; - the release input coverage manifest, without --candidate-h5, then --check: a geographic_expand family, and source_stages.json's new digest in every family; - the H2 fixture, through the engine slot, then --check: uk_spine.json and sources/fixture.json (config.geographic_clones set to 1, both new stages and every declaration edit), household.csv and schema.json (the root's two carriers), frs_raw/househol.tab (synthetic IMDE, IMDW, IMDS and IMDN) and PRODUCED_BY.txt (no transform count). person.csv, benunit.csv, weights.json, NORMALIZATION.md and the donor and facts files regenerate byte for byte, and H2 parity passes. gates.json is unchanged. Tests (engine-free unless named; invented values only): - test_uk_graph.py: 56 stages; G1 in the EXPAND set and G1b a NONE node; eleven copy-id readers; the source household column's reason in the stage table; the geography key named in the leaf, read bound by G1b and re-exported by atomic_area_support; the kernel table's clone-index reason, whose premise is now that G1 alone writes the columns on the spine and the spine build installs it at one clone, and the national gates hashing the leaf; a stage after G1 that counts before the copies reads both lineage columns; every folding stage and property_components read the clone index; the moved stages and the draws read nothing the other writes; the root's typed carriers; G1 owns the source cells; microdf in every node's dependencies. - test_uk_geographic_expand.py and test_uk_geographic_identity.py build their transforms from the packaged stages and add: G1 is an EXPAND that conserves mass at design weights; K is on G1's node, never its contract; the graph's and the kernel's K refusals; no new row at K = 1 and tripled tables at K = 3 through the executor; the node lists each table's new cells in the order G1 writes them, at K = 1 and 3; the coverage family; the source columns named once in the leaf; the H2 registry building G1 and its engine at the fixture config's K, and refusing a K that is not an integer; a drifted declaration, a clones field and artifacts refused; G1b's node, and frs_release.json's bytes in its contract and not G1's. - test_uk_clone_first_nesting.py runs the packaged G1, and a K = 3 test runs stages 10 to 12 on the stand-in and holds their support counts to K = 1's. - test_uk_frs_spine.py: the carriers' types and codes, the absent-IMD refusal, codes that move only the carriers, the sidecar's share omission, and the band-flag test renamed for what the flag means; the driver's synthetic spec follows the packaged order with G1 and G1b, its engine stubs take clones, and the driver asks for its engine at one clone. - test_uk_spi_support.py and test_uk_spi_spine.py: the channel keeps G1's source columns and declares none; the clone-indexed refusal. - test_uk_full_population_graph.py: dense meets the reworded refusal at K = 1 and 2; the dense lineage refusal. test_uk_full_target_graph.py: uk.full.identity rewrites the key the spine carries. - test_uk_copy_id_table.py (G1's radix and the executor's trace at K = 1 and 3), test_uk_terminal_gates.py (the export drop), test_uk_rules_engine_provenance.py (microdf only when batching), test_uk_source_stages.py, test_uk_graph_evidence.py (the assembled gate admits spi_support_channel), test_uk_spine_acceptance_receipt.py, test_uk_identity_stability_receipts.py (G1 in the stacking-map exceptions), test_uk_spi_band_donors.py (frames through the real G1), test_uk_uc_capital_coherence.py, test_uk_cgt_support.py, test_uk_high_value_home_support.py and shared/test_country_spec.py: pins and literals. - Engine tier: tests/engine/uk/test_uk_graph.py subtracts the carriers from the nonzero-share pin, and test_uk_release_input_coverage.py's shipped-manifest pin gains geographic_expand. Checks. Before the review fixes, the whole of T/uk, run once in eight chunks, gave 7712 passed, 44 skipped and 2 failed; both failures fail at the parent too (one expects the UK engine absent, one needs a Node package this machine lacks). After them, every engine-free file they touch or that imports an edited module passes: 2652 passed and 14 skipped in 72 files, the graph package's engine-free H parity tests included. Through the engine slot, the fixture tool and its --check (byte-identical), H2 parity, tests/engine/uk/test_uk_graph.py and the shipped-manifest test pass. The source-stage regeneration and the coverage tool's --check report current, ruff check and ruff format --check are clean, and tools/ci_test_plan.py verify is ok. integration-uk and the rest of the engine-tier UK suite were not run here; this PR gets CI once #1519 merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 4 at cf8432c. Since round 3 (3778eb2) there are seven commits: the re-pin onto chronicle#421 (f086e01), Scotland's band weights read from Chronicle's NRS facts (c8066be), the four executor memory commits (a0e31d8, 5dd5e1d, 13ce7a3, 2fe3341) and the merge that joins them (cf8432c). There are no replies on the PR since round 3. I read the seven commits and the updated body. In a scratch clone I ran the new and touched tests: the graph retention and structural-column tests and Earlier items
New code No new findings in the seven commits. Checked and fine:
For #1538 (not reviewed) #1538's head (25d148f) is built on cf8432c. Two things in #1519 will reach it:
CI. There is no run at cf8432c, and the PR does not show why. The PR now conflicts with main, so no Verdict: items 1 to 5 are closed. Item 6 is still open. The new commits move no output, and the local tests I ran pass. The main conflict blocks CI here and will carry into #1538. 🤖 Generated with Claude Code |
Every UK floor now counts the survey household each copy and clone keeps in source_household_id, through one country-neutral reader: microcosm.build.source_lineage.record_sources reads any entity's true source through household membership on a declared copy lineage, and the UK declares its lineage once (household_lineage.UK_COPY_LINEAGE). receipt_counts.SOURCE_HOUSEHOLD_COLUMN is the shared source_household_id, not household_source_id, the support channel's immediate parent, which a copy made from a clone sets to the clone. The reader refuses a frame without the column and a null source; the stages before the SPI support channel say so, and their households are their own sources. The receipts of stages 10 to 12 and 15, the SPI pay floor and pension coherence, company cars, SPI benefit coherence, UC take-up's pools, the legacy closure, salary sacrifice and its bonus donor floor, Carer's Allowance, the trading allowance, the support floor, the sampled-rung private-rent region floor and the single-year age, dataset-size, council-tax, BRMA, weighted-integrity, benefit-cap and UC-relationship reports count through it. The five finite stages that declared household_source_id declare source_household_id, and UC take-up's pooling text and two notes name it. A static test refuses a distinct count of household_id, person_household_id or household_source_id in the UK runtime and tools outside two named structural checks, and the counting modules are bound into every stage hash that imports them. The two columns agree on every household row of today's spine, so no spine output moves. uk_spine.json and the coverage manifest are regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#931) The fits that train on the frame's FRS rows now fold a record's geographic clones into its first training row, with their weights summed exactly, before they fit: the SPI stage-2 and reference forests, the housing shell, the UC reporter redraw, the UC capital donor cells and the salary-sacrifice forest. SPI, high-value and CGT copies stay rows of their own. Today's spine has no geographic clones, so every fit's rows and weights are unchanged. The machinery is country-neutral. microcosm.build.source_lineage gains copy_paths, which reads every household's ordered copy path from a declared lineage, and replica_keys and collapse_replicas, which keep one row per record and path without the named branches. household_lineage.collapse_geographic_clones is the UK's entry, and uk_household_clone_paths now reads through copy_paths on UK_COPY_LINEAGE with identical paths. The housing shell and UC capital stages declare the lineage live where they run, and a test refuses a collapsing stage whose surface would hide one. Replicated-fixture tests hold each fit to the rows and weights it fits without clones, and fail without the fold. The SPI income stage binds spi_rank_transport into its hash. uk_spine.json is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sampling stage of the shared atomic-geography declaration can declare weight_by (input, map, default) in place of its one weight column: each household samples by the weight column map names for its input code, or by default where the code is missing, and a code the map does not name is refused. The UK geography-first draw needs it to weight a household's output area by the dwellings in its own council-tax band. Declarations without weight_by keep their canonical bytes, definition digest and draws: New Zealand's committed declaration and today's UK one are unchanged, and the invented fixture's draws are pinned. Only the geography kernels' implementation hashes, and with them their cache keys, move. The graph builder adds the weight_by input to the assignment's household slice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each of the three UK atomic-area supports gains a conditioned form that only the geography-first move binds; today's build binds the registered supports, so no output moves. A conditioned support extends its registered support byte for byte and adds: - imd_decile, an exact-match constraint code: the area's decile within its nation at the 2019 vintage the FRS 2024-25 deciles follow (IoD 2019, WIMD 2019, SIMD 2020v2, NIMDM 2017), the plurality of its live residential postcodes in the May 2026 NSPL, with ties and postcode-less areas resolved by the parent area; - households by council-tax band times 10^6, exact integers for a weight_by stage: England and Wales from the area's LSOA mix in VOA CTSOP1.1 (band I only in Wales), Scotland from its council's CTAXBASE 2025 chargeable dwellings, so there the band moves mass only between councils, and none in Northern Ireland, which has domestic rates. tools/build_uk_conditioned_area_supports.py builds them from chronicle#412's raw-only registrations, read at PR chronicle#413's head and pinned by sha256. The committed provenance records every input, the decile rule counts, the rounding and a precomputed table of zero-mass draw cells. sources.yaml declares them under role uk_atomic_area_conditioned_support with five new geography vintages; spine.yaml declares the FRS channel's observed_constraints [imd_decile], an optional field the shared spine schema now admits; validate_uk_country_source_projection refuses a spec in which the supports, their conditioned forms and that declaration disagree. The building blocks are country-neutral, in microcosm.build.atomic_support_conditioning: modal_area_codes, apportion_weights, extend_atomic_support and zero_mass_cells. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chronicle#413 merged as c51f40d2b. Each of its five registrations the conditioned supports read pins the same file at the merge as at the PR head (df468b8) they were built from: the same filename, URL, sha256 and size. The tool's CHRONICLE block and the provenance now name the merge commit, and the three support files regenerate byte for byte. The provenance note also no longer claims DWP has been asked to confirm the FRS decile vintage; it says the vintage is still to be confirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SPI employment shell (#1490) trains its occupation classifier and draws its industry donors on the frame's FRS adults. As in the six fits of commit 2, it now folds each survey record's geographic clones into the record's first training row with their summed weight, and every other copy stays a row of its own. Today's spine has no geographic clones, so its rows and weights are unchanged, value for value. - Its household slice declares the support clone index its fold reads. - It joins the clone-collapse sweep's stages, which checks that slice. - A replicated-fixture test runs it on two production geographic clones: the fit, its training shares and clone 0's draws equal the frame's own, and the test fails with the fold switched off. - uk_spine.json moves only in its household slice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) From Vahid's review (item 4), the scan now also sees: - `len(df.drop_duplicates(key))`, with the key as an argument or `subset=`; - `groupby(key).ngroups` and `len(df.groupby(key))`; - a `.loc[rows, "column"]` tuple slice; - a column named through a module constant, such as `HOUSEHOLD_ID_COLUMN = "household_id"`. Snippet tests pin each form and a pass case for other keys. The wider scan found one more count, a structural row check in tools/verify_uk_identity_stability.py that every SPI band donor holds one carrier. It is named in `_KEPT_ROW_COUNTS` beside the two existing ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From Vahid's review (item 5): `derive_is_apprentice`, `derive_frs_person_draws` (with and without its receipt) and `derive_frs_annual_income_spells` fell back to each row's household when `person_sources` was missing. On a cloned person table that counts K clones as K sources. `person_sources` is now a required keyword. The spine stages already pass true sources (`record_source_households`). The callers that did lean on the fallback now pass `own_source_households(person)` themselves: - the tests, which build raw frames where each household is its own source; - `tools/verify_uk_identity_stability.py`, which compares only the draws, never the receipt's counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the planning review (item 2): the stage filtered FRS training rows on `clone_index == 0`, the artifact's column name. No spine stage writes it, since the spine names it `household_clone_index` and `expand_uk_geographic_pool` drops a bare `clone_index`, so the filter did nothing. But a frame that carried it would train clone 0 at clone 0's own weight, not at the fold's summed weight. The stage now refuses such a table, and a test checks it. The `_dead_support` fixture drops the column after its support rebuild. Its four households then all train, so: - the engine tests count four and three reference rows, not two and one; - the engine tests count the reference forest's fits from the transport's fold receipts, one per fold that scores a recipient; - the replicated test no longer drops the column itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ext (#931) Three review notes, none of which changes code behaviour: - **UC capital (Vahid, item 1).** The note says `UC_CAPITAL_MINIMUM_CELL_DONORS` counts a cell's donor benefit-unit rows after the geographic fold, so a high-value copy counts as a donor of its own. It is a row threshold, not a disclosure floor. Whether it should count true sources is for the move's audit of K-sensitive constants, since switching it can move outputs. - **Scotland (Vahid, item 3).** The conditioned supports' provenance now notes that Scotland's band mix is its council's, so within a council a household is placed in proportion to households. It names a mix by 2022 data zone as the way to lift that, once one is registered in Chronicle. The support bytes are unchanged. - **The US doc passages (planning review, item 3).** `docs/geography-assignment.md` notes, at the head of each, that the US passages describe microcosm#893, which closed unmerged on 9 October 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From Vahid's review (item 2) and the planning review (item 1), with María's ruling to keep each variant. The fold kept a record's first clone at the clones' summed weight even when the clones differ on what the fit reads. Once the move gives clones their own ids, they will differ: a landlord's finance costs are drawn on uniforms keyed by person id, and reach the UC reporter redraw through benefit-unit investment income. The fold dropped every clone's value but the first. How the fold works now: - `collapse_replicas` takes the fit's `inputs`, one row per record, and folds replicas only where they agree on every input; a missing value agrees only with a missing value. - Replicas that differ stay rows of their own. Each distinct variant keeps its first record, with the summed weight of the replicas that share it, so the fit sees every clone's value at its share and nothing is dropped. - `collapse_geographic_clones` requires `inputs`, so no fit folds blind. The seven fits pass what they read: - the housing shell its predictors and targets; - the UC reporter redraw its predictors and the reported amount; - UC capital its cell keys and the capital it donates; - salary sacrifice its predictors and sacrifice; - the employment shell its predictors, occupation and donated industry; - the SPI stage the raw columns its two forests derive from at fold time. Today's spine has no geographic clones, so every fit's rows and weights are unchanged, value for value. Tests: - shared tests pin the variant rule, missing values and refusals; - the sweep test adds a record whose clones differ; - a replicated fixture moves one clone's property income by 500, and the UC reporter redraw then trains on both variants at half the unit's weight each, while every other unit folds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scotland's conditioned support took each council's CTAXBASE 2025 band mix, so within a council the band said nothing about where a household lives (Vahid's item 3 on #1519). It now takes the mix of the area's 2022 data zone from NRS's dwelling estimates by data zone, December 2024 sheet. The bytes are the ones Chronicle already registers as nrs-dwellings-data-zone-2025, pinned here by sha256. Chronicle emits only the workbook's total as facts; PolicyEngine/chronicle#419 asks for the band columns. - The tool pins the workbook beside chronicle#412's files. It checks the header, the zone count and that each zone's bands sum to its total, and keys each area to its zone through the support's own lsoa_code; all 7,392 zones match. - The Scottish support is rebuilt (0c7d7826, 1,607,702 bytes). England and Wales and Northern Ireland rebuild byte for byte, and the zero-mass cells are unchanged. - The band vintage uk_ctaxbase_2025 becomes uk_nrs_dz_dwellings_2024 in sources.yaml and vintages.yaml. - Tests cover the reader and its refusals, the band source naming the workbook, and the mounted check that each zone's areas share its mix. No output moves: only the geography-first move binds these supports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run_graph kept every structural population version until the run ended and attached all of them to the manifest. Nothing serializes them, and the spine reads only its final version, but holding every one is what keeps a 15-clone spine from fitting in 32 GiB. A caller can now name the versions it reads, and the run frees every other one as soon as its last reader has run. - run_graph takes retain_populations. None, the default, keeps today's behaviour: every version is kept and attached. - Given a collection, a name that is not a version of the graph, or is not a name, is refused before any source is read. Each version's last reader comes from the compiled graph: its ordinary members read it as their incumbent, and each structural node built on it reads it as its base. Once that node has run, reached or not, the version leaves the run. Only the named versions and their mass ledgers are attached. - The UK opts in. The spine names its final version. Each dense and national phase names what it reads from its own manifest: the export the installed population, the national checkpoint and solve their own populations, the numerical phase the pool only when it writes a size checkpoint from a graph with a size search, and every other phase nothing. The atomic-assignment measurement names uk.full.expand. The transport CLI and the parity tools keep the default. No output moves. The keyword enters no key, receipt or cache record, and each node reads the same population as before. The new graph tests run a structural chain cold, warm and under resume="require", with and without the keyword: the store objects are byte-identical and the manifests agree on every field but the attached populations. Weak references show each dead version's tables freed right after its last reader and not before, for a version read by two members and two boundaries too, and when the last reader is unreached. The synthetic spine and dense builds keep only the versions they read. No kernel source hash binds an edited module, so no node key moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cf8432c to
690f0a2
Compare
…#931) The first CI run on the rebased head failed where main's newer code meets this branch's strict true-source reader. Main's input-mass carriers, reference surface and release-input coverage, and its pip points and UC limited-capability stages, count support through receipt_counts, which here reads source_household_id. Their test frames carried only household_source_id. This commit gives those frames the column. The code needs no change: every built frame carries source_household_id. - These frames gain source_household_id: the battery, reference-surface and weighted-integrity tests, the coverage helper in test_support, and the pip-points and UC limited-capability engine tests. - The docstrings of the coverage's source reader and the input-mass carriers now name the true source. - test_uk_target_compile_modules records, for the three target-kernel groups, the four imports receipt_counts makes here: source_lineage, household_lineage, national_frame and frame.concepts. Main's target kernels hash receipt_counts (8ea0ee1), so the walk now meets them. Main records its other edges into national_frame the same way, and the move's derived binding rule replaces the record. CI stops at the first failure (--maxfail=1), so its two lists ran locally without that limit: all 809 engine-free files, and the 30 engine-UK files from the first failure on. With this commit both pass, apart from five tests that fail only in this environment: four Orrery tests that need tools/orrery-contract/node_modules, and the CGT projection's check that the UK engine extra is absent. What moves: the two docstring edits move the hashes of the kernels that hash weighted_integrity or release_input_coverage. No value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for rounds 3 and 4. Where each item stands at Items 1–5. Closed, as your verdicts say; nothing in them has changed since. Item 6: SPI clones that differ, and the transport's one row per twin. You're right that at
Round 4: the conflict with main. Settled by rebasing this PR on main (
CI. The first run on the rebased head failed on main's newer tests whose frames lack |
…and add geographic_expand and geographic_identity (#931) frs_hmrc_spine_leaves and frs_annual_income_spells (stages 14 and 15) move ahead of frs_take_up, and two new stages follow them: geographic_expand (G1) gives every FRS household K geographic clones, and geographic_identity (G1b) keys each clone. frs_take_up, frs_person_draws, frs_household_draws and frs_brma (stages 10 to 13) then run on every clone. The spine build installs both new stages at K = 1, so every spine is still one clone and no value moves. Positional stage numbers in this message, the changelog, comments and tests follow the order before this commit: 14 and 15 are the two moved stages, 10 to 13 the draws and frs_brma, and 16 onward are as before. The order. sources.yaml moves the two stage blocks unchanged and inserts G1 and G1b after them; the graph follows the manifest. The moved stages read only pay, self-employment income, age and gender; stages 10 to 12 read none of their outputs and write none of their inputs, and none of the five sets weights (a test holds this). Both moved stages join the raw FRS tabs on raw person ids, so they run on the survey's own rows, before the clones. The assembled checkpoint still ends at frs_brma, so the assembled phase and its gates now cover 14, 15, G1, G1b and 10 to 13, and the assembled gate admits spi_support_channel. G1 and G1b, declared and wired at K = 1: - The sources schema and ALLOWED_SOURCE_OPERATION_KINDS gain two strict op kinds. expand_geographic_clones declares the entity, the clone-index columns, the ordinal bound of 100, the copy-id geographic_support field at radix 10**9, clone-major order, an equal design-weight split, the source columns, conservation to the split's rounding, declared factor 1.0 and a reason that names no K. key_households_by_clone_path declares the source frs and frs_release.json, which G1b also declares as its one artifact with runtime_sha256_required, so the release's bytes enter its stage contract. Each transform checks its declaration against its module's reviewed parameters, whole; G1 refuses any artifact and G1b any but that one. - No declaration names K. uk_spine_graph(geographic_clones=K) puts K, 1 to GEOGRAPHIC_CLONE_LIMIT, on G1's node params, and refuses K above 1 for a manifest without G1, so K enters that node's key and every later one, never a stage contract. - graph.py: G1 joins UK_SPINE_STRUCTURAL_STAGES as an EXPAND that conserves mass at design weights, with an open surface and six cells. Its household cells are listed in the order the transform writes them (source_year, source_household_key, source_household_id, household_clone_index), since the graph appends an EXPAND's new cells in that order and H2 parity compares column order; an engine-free test now holds that order too. G1b reads the household source id, source year and clone index and writes geography_household_key. uk.full.identity rewrites the key where the spine already carries it, so the dense graph still compiles. - graph_kernels.py: both stages get their modules and the helpers the derived rule finds (G1: clone_expansion and copy_id_table; G1b: atomic_household_identity, frs_release and microcosm.graph.canonical) and join the counting stages, and G1 joins the copy-id readers at geographic_support. The registry's structural set is UK_SPINE_STRUCTURAL_STAGES. UKExpandStageKernel refuses a transform whose clone count differs from its node's, giving the two declared counts. The fixture registry builds G1 and G1b from an integer config.geographic_clones and its engine with clones=K, and its descriptor check no longer names a stage count. - spine_build: _GEOGRAPHIC_CLONES = 1 feeds the graph, the G1 transform and _rules_engine(clones=1). Its clones keyword defaults to None, so the full build's two engine installs are unchanged. G1 and G1b are installed when the roster names them. - The geography key's name, GEOGRAPHY_HOUSEHOLD_KEY_COLUMN, now lives in the geographic_clones leaf, which G1b hashes as a counting stage, and atomic_area_support re-exports it as IDENTITY_COLUMN, so the derived rule holds every reader to the leaf and the stage table needs no entry for it; no kernel that reads it misses the leaf. G1b names its string dtype through pandas, as atomic_household_lineage does, not through the executor's token table. The identity columns. source_household_id, source_year and source_household_key are G1's outputs and cells. spi_support_channel (stage 16) no longer declares or writes them, and its copies inherit them. The stage and the dense expansion default them from a household's own ids only on a table without household_clone_index, and refuse a clone-indexed table that lacks any of them, naming the columns. source_person_id and source_benunit_id are not minted (decision 5). Their names (UK_GEOGRAPHIC_SOURCE_COLUMNS, SOURCE_YEAR_COLUMN, SOURCE_HOUSEHOLD_KEY_COLUMN) move to the geographic_clones leaf, which spells the source id itself, since it imports nothing first-party (a test holds it equal to microcosm.frame.concepts'); geographic_expand re-exports them, and the SPI support channel and the dense crosswalk read the leaf's tuple instead of copies of their own. Stages 10 to 12 count true sources. frs_take_up, frs_person_draws and frs_household_draws are given household source_household_id and household_clone_index, so the shared reader counts their receipts' support in source households on every clone; it refuses the clone index without the source column. A test holds every stage after G1 that counts before the copies to both columns. Folding consumes. household_clone_index joins the inputs of spi_employment_shell, spi_housing_shell and uc_capital_coherence, which fold geographic clones, and of property_components. The typed root cells. frs_spine writes imd_decile (int64: the household's decile on its own nation's FRS index, IMDE, IMDW, IMDS or IMDN, 1 to 10, else 0, since the root refuses NaN) and council_tax_band_observed (bool: False in Northern Ireland, for a ctband code outside 1 to 9, for a band the region does not use and for an unknown region). council_tax_band itself is unchanged. The root refuses a household tab without one of the four IMD variables, naming it, rather than read zeros. Both cells are typed, leave at the release boundary (UK_RELEASE_EXPORT_DROPPED_COLUMNS) and stay out of every receipt and the sidecar's nonzero shares, whichever route built the records; the root's notes describe them. The root binds geography_constants, since both read each household's nation from the region tier. Their first reader is the area assignment of #931 group (c). microdf in node keys. microdf-python's version joins _numerical_dependency_versions ("not-installed" when absent), so it is in the root's and every stage's node params, and the sidecar records it as microdf_python beside engine_batches when a call batches; on that route private_school_attendance stores microdf's weighted percentile rank. pyproject.toml, uv.lock and us_runtime/worker_identity.py are unchanged; the version is declared at the next lock bump. Texts: - CGT_SUPPORT_EXACT_TOTAL_EXCEPTION, and with it the copy_rule of both support splits, high_value_home_support (stage 26) and cgt_support_split (stage 42), names the candidate order: heaviest first, tied weights in row order. - The notes of isa_subscriptions (stage 53) say tied balances share one weighted mid-rank, so the keyed uniform alone orders them, and the Lifetime ISA payments reuse the amounts operation's balance_rank_weight. docs/uk-isa-subscriptions-1415.md steps 3, 5 and 6 say the rank is on the class's balance, the added people walk on their own, holders over 47 pay nothing, and the cap at each holder's room keeps the baseline under the limit. - The weight rule of spi_income_band_donors (stage 17) names one clone's donor count and its draw a spine without household_clone_index; its notes size the seats on eligible households counted in source households. The notes of spi_support_channel (stage 16) say what its uniform depends on, and its source names every geographic clone. cgt_support_split's notes and the CGT changelog say which household the identity tool's recompute can count as a family the stage never made, and that the bracketed family test does not report it. - The source and notes of private_school_attendance (stage 52) say it computes attendance over the whole frame, from the pinned engine's values and parameters. - BONUS_SACRIFICE_SPI_DRAW and the notes of salary_sacrifice (stage 48) say an SPI adult draws within its own geographic clone from cells pooled over every clone; the draw text now also says the lowest cell joins the one above, as the code does. - uc_capital_coherence's notes count a cell's donors in survey records. - G1's notes say it clones before any other copy step, and childcare_copy_take_up's notes and docstring say frs_take_up draws each geographic clone on its own ids before any other copy exists, and that geographic clones keep those draws. - Texts this change made stale: household_lineage, spi_support, spi_band_donors, geographic_clones, geographic_expand, geographic_identity, salary_sacrifice, graph_population, diagnostics, copy_id_table, gate_phase_codes (six of the transferred-only modules are now hashed at or before frs_brma), receipt_counts, frs_take_up, private_school_attendance, frs_spine's and national_frame's band-flag wording (a band the FRS gives that the region uses), the clone-first stand-in, the identity tool's E7 docstring, docs/uk-full-build-graph.md (56 stages, the clone index on every spine frame, microdf_python in the sidecar), and the earlier #931 changelog fragments that said G1 was unwired, that no spine carries a clone index, or that the stage table and the kernel table read as before; and the new fragment 931-uk-spine-geographic-expand.changed.md. The code-mirrored texts are identical in the code, sources.yaml and source_stages.json. The was_wealth and was_lisa notes are unchanged. Bindings. The national gates hash geographic_clones, since their support-family fold reads the clone index columns, which the national frame carries from a clone-first spine; the kernel table's clone-index reason now covers only the calibrated gates, the dense measures and the national problem. The stage table keeps the source household column's name alone, its reason rewritten: geographic_expand writes it through the constant and declares it by name, every stage after it that reads the name is given the column, and frs_annual_income_spells, before it, is given neither the column nor a copy column. The kernel table's premise check now asserts that geographic_expand alone writes the clone-index columns on the spine and that the spine build installs it at one clone. Tools. tools/graph_uk_spine_fixture.py's oracle builds G1 and G1b from their packaged stages at _GEOGRAPHIC_CLONES = 1 and its engine with clones=1; its config records geographic_clones: 1, and uk_spine.json is written at that K. Its synthetic households gain IMDE, IMDW, IMDS and IMDN (invented deciles in turn, one household in seventeen blank). Its descriptor and PRODUCED_BY.txt no longer give a transform count. tools/build_uk_release_input_coverage_manifest.py gains a geographic_expand family, whose required reason is G1's declared reason, matched verbatim. Dense and national. The dense expansion refuses a spine carrying geographic_expand's clone index at any n_clones, naming the clone-first spine and #931 group (c), and its overflow message limits "n_clones=1 still expands" to a spine without the index. The national line is not yet refused early; a later commit of this group adds that refusal. No national or dense build runs on a clone-first spine before (c) (decision 4). Why: María's rulings of 10 Nov. Decision 3 (X) puts G1 and G1b after stages 14 and 15 and before stage 10, so the stages that read raw tabs by raw person id run on the survey's rows and stages 10 to 13 run on every clone from this commit. Decision 1 (Form B) puts stage 53's tie clause in its notes, which enter no stage contract. Decision 2 binds microdf's version into node keys without a re-lock, which would move the US approved-lock digest. Decision 5 mints no person or benefit unit source columns until something reads them. Every declaration edit of group (b) is in this commit, so H2 regenerates once. The clone columns' names sit in the geographic_clones leaf so that G1, G1b, the SPI support channel and the dense line read one definition their keys hash, rather than copies or a listed exemption. What moves. At K = 1 no value moves: on the H2 fixture the legacy oracle's final frame agrees with the parent's on every existing column, bit for bit and in dtype, on the weights and on every earlier mass record (checked through the engine slot). frs_take_up, frs_person_draws and frs_household_draws now count their receipts' support in true source households, which at one clone are the households themselves. The bytes move: - the stage order: frs_hmrc_spine_leaves and frs_annual_income_spells now run ahead of frs_take_up, with geographic_expand and geographic_identity between them; - the column order, since the households' source columns now come from geographic_expand; - each table's clone index, at 0; - geography_household_key, which a household's copies repeat until group (c); - the root's imd_decile and council_tax_band_observed, which the release drops and no receipt or sidecar share reports; - geographic_expand's mass record and both new stages' evidence; - spi_support_channel's strata, grouped by a constant clone index; - spi_income_band_donors' funding strata, which gain the clone index, so each label ends "|0"; - the national support-family fold, whose key columns gain the clone index. Seven stage contracts move: frs_spine (its outputs), spi_support_channel (its source text, outputs and nonnegative outputs), spi_income_band_donors (weight_rule and draw), high_value_home_support and cgt_support_split (copy_rule), salary_sacrifice (spi_bonus_draw) and private_school_attendance (its source text). geographic_expand's and geographic_identity's contracts are new. K is a parameter of geographic_expand's graph node, never of a contract. No contract hashes a stage's reads or notes. The source id and clone index that frs_take_up, frs_person_draws and frs_household_draws now read move only their nodes' inputs, and so does the clone index that spi_employment_shell, spi_housing_shell, uc_capital_coherence and property_components now read. The notes of isa_subscriptions (the tie clause, Form B), uc_capital_coherence, frs_spine, geographic_expand and childcare_copy_take_up move no contract. The dense line refuses every clone-first spine, and the national line's degenerate gate would refuse the constant indices. The coverage gate now requires geographic_expand's mass record, so a release from a spine built before this commit fails it too. No national or dense build runs between (b) and (c) (decision 4). Positional stage numbers in prose (comments, tests and changelogs) still follow the order before this commit. Hash and fixture. Every UK spine node re-keys: - microdf-python's version joins every node's numerical dependencies; - every stage kernel hashes graph_kernels and national_frame, both edited here; - the root's outputs move. sources.yaml, source_stages.json and the coverage manifest move the UK country fingerprint and the solve fingerprint, so every node keyed on one of them re-keys: the spine gates, the national targets and gates, the target selection, compilation, measures and problem, the full preflight and calibrated gates, and the rotated holdout. The rest of the national and dense lines re-key through the modules they hash: national_frame, graph_population, rowwise_dataset, geographic_clones, atomic_area_support, spi_support, household_lineage, receipt_counts and diagnostics, and the national gates through geographic_clones, which their key now hashes. Only the shared atomic-geography kernels and the export package keep their keys. Outside the UK one kernel re-keys: the shared transport gate battery (gates.battery@1). Its key covers the source closure of its gate bindings, which reaches source_manifest, so NZ's terminal gate and the export and package nodes after it re-key (the NZ spec is inactive). These keep their keys: - every other transport kernel; - the US post-transfer graph's nodes and kernels; - the US, NZ, BE and AM specs, seeds and fingerprints. uv.lock, pyproject.toml and the US approved-lock digest are untouched. The schema's two new operation kinds move only the spec engine's grammar receipt, which every country's emitted, uncommitted bundle lock carries. Regenerated: - source_stages.json, with the stage list merged by stage, so every other stage keeps its bytes and key order; - the release input coverage manifest, without --candidate-h5, then --check: a geographic_expand family, and source_stages.json's new digest in every family; - the H2 fixture, through the engine slot, then --check: uk_spine.json and sources/fixture.json (config.geographic_clones set to 1, both new stages and every declaration edit), household.csv and schema.json (the root's two carriers), frs_raw/househol.tab (synthetic IMDE, IMDW, IMDS and IMDN) and PRODUCED_BY.txt (no transform count). person.csv, benunit.csv, weights.json, NORMALIZATION.md and the donor and facts files regenerate byte for byte, and H2 parity passes. gates.json is unchanged. Tests (engine-free unless named; invented values only): - test_uk_graph.py: 56 stages; G1 in the EXPAND set and G1b a NONE node; eleven copy-id readers; the source household column's reason in the stage table; the geography key named in the leaf, read bound by G1b and re-exported by atomic_area_support; the kernel table's clone-index reason, whose premise is now that G1 alone writes the columns on the spine and the spine build installs it at one clone, and the national gates hashing the leaf; a stage after G1 that counts before the copies reads both lineage columns; every folding stage and property_components read the clone index; the moved stages and the draws read nothing the other writes; the root's typed carriers; G1 owns the source cells; microdf in every node's dependencies. - test_uk_geographic_expand.py and test_uk_geographic_identity.py build their transforms from the packaged stages and add: G1 is an EXPAND that conserves mass at design weights; K is on G1's node, never its contract; the graph's and the kernel's K refusals; no new row at K = 1 and tripled tables at K = 3 through the executor; the node lists each table's new cells in the order G1 writes them, at K = 1 and 3; the coverage family; the source columns named once in the leaf; the H2 registry building G1 and its engine at the fixture config's K, and refusing a K that is not an integer; a drifted declaration, a clones field and artifacts refused; G1b's node, and frs_release.json's bytes in its contract and not G1's. - test_uk_clone_first_nesting.py runs the packaged G1, and a K = 3 test runs stages 10 to 12 on the stand-in and holds their support counts to K = 1's. - test_uk_frs_spine.py: the carriers' types and codes, the absent-IMD refusal, codes that move only the carriers, the sidecar's share omission, and the band-flag test renamed for what the flag means; the driver's synthetic spec follows the packaged order with G1 and G1b, its engine stubs take clones, and the driver asks for its engine at one clone. - test_uk_spi_support.py and test_uk_spi_spine.py: the channel keeps G1's source columns and declares none; the clone-indexed refusal. - test_uk_full_population_graph.py: dense meets the reworded refusal at K = 1 and 2; the dense lineage refusal. test_uk_full_target_graph.py: uk.full.identity rewrites the key the spine carries. - test_uk_copy_id_table.py (G1's radix and the executor's trace at K = 1 and 3), test_uk_terminal_gates.py (the export drop), test_uk_rules_engine_provenance.py (microdf only when batching), test_uk_source_stages.py, test_uk_graph_evidence.py (the assembled gate admits spi_support_channel), test_uk_spine_acceptance_receipt.py, test_uk_identity_stability_receipts.py (G1 in the stacking-map exceptions), test_uk_spi_band_donors.py (frames through the real G1), test_uk_uc_capital_coherence.py, test_uk_cgt_support.py, test_uk_high_value_home_support.py and shared/test_country_spec.py: pins and literals. - Engine tier: tests/engine/uk/test_uk_graph.py subtracts the carriers from the nonzero-share pin, and test_uk_release_input_coverage.py's shipped-manifest pin gains geographic_expand. Checks. Before the review fixes, the whole of T/uk, run once in eight chunks, gave 7712 passed, 44 skipped and 2 failed; both failures fail at the parent too (one expects the UK engine absent, one needs a Node package this machine lacks). After them, every engine-free file they touch or that imports an edited module passes: 2652 passed and 14 skipped in 72 files, the graph package's engine-free H parity tests included. Through the engine slot, the fixture tool and its --check (byte-identical), H2 parity, tests/engine/uk/test_uk_graph.py and the shipped-manifest test pass. The source-stage regeneration and the coverage tool's --check report current, ruff check and ruff format --check are clean, and tools/ci_test_plan.py verify is ok. integration-uk and the rest of the engine-tier UK suite were not run here; this PR gets CI once #1519 merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto #1519's new head dropped (#931) Main and this branch each moved the packaged UK spine from 54 to 56 stages on the same lines: main for uc_limited_capability and pip_points (microcosm#1095 Y1 and P1), this branch for geographic_expand and geographic_identity. The rebase merged that edit once, without a conflict, so the counts git never stopped on kept this branch's own figures and lost main's two stages. The merged roster has 63 stages, which the spec and graph tests already pin. - tools/graph_uk_spine_fixture.py: UK_FIXTURE_STAGE_COUNT is 63, and its comment counts from main's 56. At 61 the H2 fixture tool refuses the merged roster, so this lands before the H2 fixture is regenerated. - The clone-first H2 test (engine_after_merge) pins 63 stages and names main's two. - docs/uk-full-build-graph.md: the spine roster and its stage nodes are 63, and the two paragraphs on school attendance name the stage private_school_attendance instead of a position that has moved twice. - The spine fragments give the merged count after each change: 63 once the areas are assigned, 62 when regional_home_values retires, and 63 again with council_tax_localise. The fragments' other counts, of the stages and kernels that hash a module, are re-derived with the H2 regeneration, from the keys it measures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead at, now the feed pin is main's (#931) tools/build_uk_council_tax_band_d.py reads chronicle#412's two raw registrations at CHRONICLE_COMMIT (80a3482), and its comment and module docstring called that the commit uk/chronicle_feed.json pinned when the resource was built. On the rebased line chronicle_feed.json pins main's 4ce631f5 and never pinned 80a3482, which came from #1519's earlier re-pin. The resource still reads correctly: it reads no fact through the feed, and each raw file is held to its own sha256 and its manifest at that commit. This commit keeps the constant and the resource as built, and rewords the two passages to say so. The Scottish Band D resource is vendored from the feed and names main's pin. No value, resource or key moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
…ttests stochastic_assignment (#931) What failed: on #1519's new head, test_spec_engine_seeds' digest tripwire and test_spec_engine_loader's golden vector. Why: main's b708616 (12 Nov) made microcosm.build.stochastic_assignment one of the US seed protocol's attested kernel modules. This branch adds the keyed tie order, the keyed uniform for a label, the binomial share band and a strata keyword to that module, so its bytes, and with them the protocol's implementation digest, differ from main's. The compiled seed map, the minimal bundle's golden vector and the US bundle's semantic hash each embed the protocol. What changes: four pins, re-derived on this tree. EXPECTED_HASHES' seed_protocol and seed_map in spec_engine/inventory_coverage.py, the golden vector in test_spec_engine_loader.py, and the US bundle's spec_sha256 in engine_workflow/us/test_us_multispine_pool_tool.py. That last test needs policyengine_us, so its value was computed through the same load_bundle("us") call the pool tool makes. With stochastic_assignment.py alone at main's bytes, all four equal main's pins again. The US inventory coverage is complete with the new pins. What moves: no code path. A US run records this branch's seed-protocol digest and spec_sha256 in place of main's. stable_identity_uniforms, the one stochastic_assignment function the US keyed draws call, is unchanged, so no US draw changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…differing clones with spine keys (#931) Item 6 of Vahid's review on #1519, settled on the move (María's ruling of 15 Nov). The SPI income stage folds its forests' training rows through fold_geographic_clones, and clones that differ on what the forests read stay rows of their own. cross_fit_transport keys its training rows on person_source_id and refuses a repeated key with a generic message. On the clone-first spine each clone carries its own key: geographic_expand mints each clone's ids before spi_support_channel keys person_source_id on each row's own id, so differing clones train under keys of their own. Only a frame whose clones were made after the support channel, as the dense pool and the test helpers built on it make them, can give two differing clones one key. - Refusal. Where the stage builds the transport's training keys after the fold, it refuses a repeated person_source_id before the transport, naming the cause (clones of one survey record made after the support channel share its key) and no household or value. The transport keeps its own check. - Tests. test_uk_spi_income gains two. On spine-style keys (_clone_first_support at two clones), clone 1 of one record reports more dividends than clone 0: both clones train as rows of their own under distinct keys, the record's clone-1 copies find their twin on clone 1's row, the fold receipt records the variety, and the stage runs. On a dense-pool frame (with_geographic_clones) with the same change, the stage refuses with the new message and never calls the transport. - Changelog. The fits-fold fragment says that on the clone-first spine each clone carries its own SPI transport key, and that the stage refuses a frame whose differing clones share one. Keys: the SPI income stage's kernel re-keys, as do the three other graph kernels whose hash binds spi_income (spi_income_band_donors, property_components and company_cars). No value moves. The refusal reads the training keys that the transport's own uniqueness check reads, so every frame it refuses was refused before, by that check or earlier in _folded_twin_identities, and it never fires on a valid spine. No stage declaration, generated file or fixture changes. Tests: test_uk_spi_income.py, test_uk_spi_spine.py and test_uk_spi_rank_transport.py, engine-free: 116 passed, 1 skipped (the licensed donor is not staged locally). ruff check on the repository and ruff format --check on the touched files pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ive them on main's code (#931) The take-up, helper-binding and dense fragments counted stages, kernels and modules as each commit saw them before this branch moved onto #1519's new head, so they left out main's stages, kernels and gate code. Each count is now the one its own commit gives on this branch. It was measured engine-free on an archive of that commit: what each kernel's implementation hash hashes, what the binding rule's own derivations return, and what the registries register. The same probes on the commits as they were before the move give back each count restated here, and give one result on both lines for every count left as it was. - 931-take-up-counts-per-clone: the frs_spine root and 49 of the 57 stages after it hash stochastic_assignment; main's pip_points binds it, and uc_limited_capability does under the helper-binding fragment's last bullet. The transport registry registers 48 kernels, main's three income-evidence kernels among them, and all but the gate battery keep their hashes. The battery's key binds the sources its gate bindings compute through, US keyed draws among them, and since microcosm#1585 those import stochastic_assignment, so NZ's terminal gate node re-keys, with the export, readback and package nodes that chain on it. The US keyed draws take only stable_identity_uniforms, which is unchanged, so no US draw moves, but the US seed protocol attests the module, so its digest, the seed map's and the US bundle's spec hash move. The re-pin of those near the end of this branch covers them. - 931-dense-on-the-clone-first-spine: 86 kernels remain (98 before) and 68 change hash, 43 of them among the spine registry's 60. Main's two stages, frs_council_tax and frs_disability hash household_lineage on main's code, and 15 stages keep their hashes. The dense graph's 16 of 23 platform-keyed nodes are as before. - 931-uk-helper-bindings: 72 bindings in 48 stages, and 39 stages gain the engine adapter, since pip_points takes it with the others. The selection's key covers 52 modules, since main's target kernels also hash receipt_counts. With main's uc_limited_capability, 17 stages call the engine where the engine bullets said 16. Those bullets now name the 16 that bind its modules as 16 of the 17 and point to the last bullet, which says uc_limited_capability is one of 18 and that UK_GATE_REGISTRY_MODULES lists 56 modules after it. The gate list's bullet says main's newer gate code moves the registry's reach by five modules. Every other count in the fragment is the same on this branch. - 931-fold-lowest-id-sorted-keys said that no transport kernel re-keys on its commit. On this branch the gate battery does, for the same reason, and the seed protocol's digests move, so it says both now. Only changelog text changes: no code, key or value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' kernel and node counts (#931) The transport-binding and national-areas fragments counted the 45 kernels build_transport_registry registered before this branch moved onto #1519's new head. On main it also registers main's three income-evidence kernels. Each count is now the one its own commit gives on this branch, measured engine-free as in the previous commit, and the same probes give back the old counts on the commits as they were before the move. - 931-transport-helper-bindings: test_transport_binding_rule holds 45 of the 48 registered kernels; the income-evidence three are held to it later in #931. 43 of the 48 kernel hashes move, those three among them, and the atomic geography and person location kernels keep theirs. NZ's packaged graph has 369 nodes on main's declarations, with no synthetic quantile stand-ins, and all of them re-key: 365 directly and four by chaining. No UK kernel hash moves (0 of 101). - 931-national-one-clone-areas: the 48 transport kernels keep their keys. The composed graphs' 27 and 31 nodes, the six US kernels and the eight-node US graph measure the same on both lines. Only changelog text changes: no code, key or value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s two stages on the spine (#931) Five more #931 fragments counted UK kernels, spine nodes and stage positions as their commits saw them before this branch moved onto #1519's new head. Main's uc_limited_capability and pip_points add two stage kernels to the UK registries and two nodes to the spine, and uc_limited_capability runs before isa_subscriptions. Each count is now the one its own commit gives on this branch, measured engine-free as in the two previous commits: kernel hashes before and after each commit, and the node keys of the gated spine and of the in-graph build on it, with every source keyed by its name. The same probes give back the old counts on the commits as they were before the move. The in-graph build is counted, as there, with its export, readback, package and certification nodes. - 931-isa-tied-balance-rank: isa_subscriptions is stage 54. Of the 101 UK kernel hashes only its own moves, and keys move from stage 54 on: 4 of the gated spine's 83 nodes (pip_points follows it) and 36 of the in-graph build's 115. - 931-uk-child-benefit-age-noise-tolerance: 66 of the gated spine's 83 nodes re-key. - 931-dense-k-pin: 12 of the 86 UK kernels change hash, none of the spine registry's 60, and the composed spine has 86 nodes. - 931-dense-localisation-nodes-retired: the UK registries register 98 kernels (103 before), and the same 30 change hash. - 931-atomic-assignment-tool-on-the-spine: its probe covers 86 kernels. Only changelog text changes: no code, key or value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 5 at What the rebase kept
Earlier items 1–5. Unchanged and still closed. The conditioned supports rebuilt on main's feed keep their digests (E&W
New findings
Nit
Evidence gap
CI at Verdict: the rebase kept both sides, and the PR still moves no output by reading. Items 6 and 7 are handled on #1538. What's left before this leaves draft is the K = 1 spine comparison, and optionally the fragment sentence. 🤖 Generated with Claude Code |
Main has moved 183 commits since this branch's base, 3a7067f. The merge is clean. The one file both sides changed, test_country_spec.py, merges line by line and differs from main's only by this branch's two lines. Nothing is regenerated: - since the base, main's UK spec changes only its two reviewed target-fit exclusion files; the UK feed pin and the H2 fixture are unchanged; - on the merged tree, the release input coverage manifest and the H2 fixture pass their tools' --check. Main's lock moves microcosm-emitter-interface from 0.15.0 to 0.16.0, so the venv was synced to it before the checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for round 5. Where each item stands at The evidence gap: closed. One real spine at the base,
The head spine is the one #1538's session built on 16 November as its control arm. The base ran today, from a copy of that launcher. Main merged (
6. The fragment's SPI sentence. This PR's fragment stays as it is. On this PR the SPI case has no build path, so the general rule is what this PR ships. #1538 adds the SPI sentence with the change that makes the exception real. 7. The scan. Agreed on both points. #1538's 8. With this, I'm marking the PR ready for review. |
María asked that the pull request target main's head. #1519 (#931's geography-first prep) merged at 15:33Z; its 22 commits change the UK build. The one conflict, the release input coverage manifest's source_stages.json hashes, is resolved by regenerating the manifest on the merged tree (tools/build_uk_release_input_coverage_manifest.py): it differs from main's only by that hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1519 merged into main (f86134f), so this branch now targets main. Seven files conflicted; each resolution keeps both sides' changes: - calibration_run.py: main made uk_scoped_gate_manifest call the shared gate_battery.scoped_gate_manifest, while this branch had moved the function to gate_scopes.py; gate_scopes' copy now calls the shared helper, with main's docstring, and calibration_run no longer defines or imports it. - battery_bindings.py: the import block keeps this branch's ModuleType; importlib.resources.files goes, since main's resource loading replaced its last use. - inventory_coverage.py, test_spec_engine_loader.py and test_us_multispine_pool_tool.py: both sides' comments are kept, and the US seed map, seed protocol and bundle digests are recomputed for the merged bytes; docs/evidence/spec-engine/us-f0-coverage.json is regenerated by tools/spec_engine_coverage.py, whose --check passes. - docs/gate-battery-contract.md: main's text, with the merged counts (UK 99 entries: 91 national-line, 6 local-candidate, 2 local diagnostics; BE 10, 2 declared not applicable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and add geographic_expand and geographic_identity (#931) frs_hmrc_spine_leaves and frs_annual_income_spells (stages 14 and 15) move ahead of frs_take_up, and two new stages follow them: geographic_expand (G1) gives every FRS household K geographic clones, and geographic_identity (G1b) keys each clone. frs_take_up, frs_person_draws, frs_household_draws and frs_brma (stages 10 to 13) then run on every clone. The spine build installs both new stages at K = 1, so every spine is still one clone and no value moves. Positional stage numbers in this message, the changelog, comments and tests follow the order before this commit: 14 and 15 are the two moved stages, 10 to 13 the draws and frs_brma, and 16 onward are as before. The order. sources.yaml moves the two stage blocks unchanged and inserts G1 and G1b after them; the graph follows the manifest. The moved stages read only pay, self-employment income, age and gender; stages 10 to 12 read none of their outputs and write none of their inputs, and none of the five sets weights (a test holds this). Both moved stages join the raw FRS tabs on raw person ids, so they run on the survey's own rows, before the clones. The assembled checkpoint still ends at frs_brma, so the assembled phase and its gates now cover 14, 15, G1, G1b and 10 to 13, and the assembled gate admits spi_support_channel. G1 and G1b, declared and wired at K = 1: - The sources schema and ALLOWED_SOURCE_OPERATION_KINDS gain two strict op kinds. expand_geographic_clones declares the entity, the clone-index columns, the ordinal bound of 100, the copy-id geographic_support field at radix 10**9, clone-major order, an equal design-weight split, the source columns, conservation to the split's rounding, declared factor 1.0 and a reason that names no K. key_households_by_clone_path declares the source frs and frs_release.json, which G1b also declares as its one artifact with runtime_sha256_required, so the release's bytes enter its stage contract. Each transform checks its declaration against its module's reviewed parameters, whole; G1 refuses any artifact and G1b any but that one. - No declaration names K. uk_spine_graph(geographic_clones=K) puts K, 1 to GEOGRAPHIC_CLONE_LIMIT, on G1's node params, and refuses K above 1 for a manifest without G1, so K enters that node's key and every later one, never a stage contract. - graph.py: G1 joins UK_SPINE_STRUCTURAL_STAGES as an EXPAND that conserves mass at design weights, with an open surface and six cells. Its household cells are listed in the order the transform writes them (source_year, source_household_key, source_household_id, household_clone_index), since the graph appends an EXPAND's new cells in that order and H2 parity compares column order; an engine-free test now holds that order too. G1b reads the household source id, source year and clone index and writes geography_household_key. uk.full.identity rewrites the key where the spine already carries it, so the dense graph still compiles. - graph_kernels.py: both stages get their modules and the helpers the derived rule finds (G1: clone_expansion and copy_id_table; G1b: atomic_household_identity, frs_release and microcosm.graph.canonical) and join the counting stages, and G1 joins the copy-id readers at geographic_support. The registry's structural set is UK_SPINE_STRUCTURAL_STAGES. UKExpandStageKernel refuses a transform whose clone count differs from its node's, giving the two declared counts. The fixture registry builds G1 and G1b from an integer config.geographic_clones and its engine with clones=K, and its descriptor check no longer names a stage count. - spine_build: _GEOGRAPHIC_CLONES = 1 feeds the graph, the G1 transform and _rules_engine(clones=1). Its clones keyword defaults to None, so the full build's two engine installs are unchanged. G1 and G1b are installed when the roster names them. - The geography key's name, GEOGRAPHY_HOUSEHOLD_KEY_COLUMN, now lives in the geographic_clones leaf, which G1b hashes as a counting stage, and atomic_area_support re-exports it as IDENTITY_COLUMN, so the derived rule holds every reader to the leaf and the stage table needs no entry for it; no kernel that reads it misses the leaf. G1b names its string dtype through pandas, as atomic_household_lineage does, not through the executor's token table. The identity columns. source_household_id, source_year and source_household_key are G1's outputs and cells. spi_support_channel (stage 16) no longer declares or writes them, and its copies inherit them. The stage and the dense expansion default them from a household's own ids only on a table without household_clone_index, and refuse a clone-indexed table that lacks any of them, naming the columns. source_person_id and source_benunit_id are not minted (decision 5). Their names (UK_GEOGRAPHIC_SOURCE_COLUMNS, SOURCE_YEAR_COLUMN, SOURCE_HOUSEHOLD_KEY_COLUMN) move to the geographic_clones leaf, which spells the source id itself, since it imports nothing first-party (a test holds it equal to microcosm.frame.concepts'); geographic_expand re-exports them, and the SPI support channel and the dense crosswalk read the leaf's tuple instead of copies of their own. Stages 10 to 12 count true sources. frs_take_up, frs_person_draws and frs_household_draws are given household source_household_id and household_clone_index, so the shared reader counts their receipts' support in source households on every clone; it refuses the clone index without the source column. A test holds every stage after G1 that counts before the copies to both columns. Folding consumes. household_clone_index joins the inputs of spi_employment_shell, spi_housing_shell and uc_capital_coherence, which fold geographic clones, and of property_components. The typed root cells. frs_spine writes imd_decile (int64: the household's decile on its own nation's FRS index, IMDE, IMDW, IMDS or IMDN, 1 to 10, else 0, since the root refuses NaN) and council_tax_band_observed (bool: False in Northern Ireland, for a ctband code outside 1 to 9, for a band the region does not use and for an unknown region). council_tax_band itself is unchanged. The root refuses a household tab without one of the four IMD variables, naming it, rather than read zeros. Both cells are typed, leave at the release boundary (UK_RELEASE_EXPORT_DROPPED_COLUMNS) and stay out of every receipt and the sidecar's nonzero shares, whichever route built the records; the root's notes describe them. The root binds geography_constants, since both read each household's nation from the region tier. Their first reader is the area assignment of #931 group (c). microdf in node keys. microdf-python's version joins _numerical_dependency_versions ("not-installed" when absent), so it is in the root's and every stage's node params, and the sidecar records it as microdf_python beside engine_batches when a call batches; on that route private_school_attendance stores microdf's weighted percentile rank. pyproject.toml, uv.lock and us_runtime/worker_identity.py are unchanged; the version is declared at the next lock bump. Texts: - CGT_SUPPORT_EXACT_TOTAL_EXCEPTION, and with it the copy_rule of both support splits, high_value_home_support (stage 26) and cgt_support_split (stage 42), names the candidate order: heaviest first, tied weights in row order. - The notes of isa_subscriptions (stage 53) say tied balances share one weighted mid-rank, so the keyed uniform alone orders them, and the Lifetime ISA payments reuse the amounts operation's balance_rank_weight. docs/uk-isa-subscriptions-1415.md steps 3, 5 and 6 say the rank is on the class's balance, the added people walk on their own, holders over 47 pay nothing, and the cap at each holder's room keeps the baseline under the limit. - The weight rule of spi_income_band_donors (stage 17) names one clone's donor count and its draw a spine without household_clone_index; its notes size the seats on eligible households counted in source households. The notes of spi_support_channel (stage 16) say what its uniform depends on, and its source names every geographic clone. cgt_support_split's notes and the CGT changelog say which household the identity tool's recompute can count as a family the stage never made, and that the bracketed family test does not report it. - The source and notes of private_school_attendance (stage 52) say it computes attendance over the whole frame, from the pinned engine's values and parameters. - BONUS_SACRIFICE_SPI_DRAW and the notes of salary_sacrifice (stage 48) say an SPI adult draws within its own geographic clone from cells pooled over every clone; the draw text now also says the lowest cell joins the one above, as the code does. - uc_capital_coherence's notes count a cell's donors in survey records. - G1's notes say it clones before any other copy step, and childcare_copy_take_up's notes and docstring say frs_take_up draws each geographic clone on its own ids before any other copy exists, and that geographic clones keep those draws. - Texts this change made stale: household_lineage, spi_support, spi_band_donors, geographic_clones, geographic_expand, geographic_identity, salary_sacrifice, graph_population, diagnostics, copy_id_table, gate_phase_codes (six of the transferred-only modules are now hashed at or before frs_brma), receipt_counts, frs_take_up, private_school_attendance, frs_spine's and national_frame's band-flag wording (a band the FRS gives that the region uses), the clone-first stand-in, the identity tool's E7 docstring, docs/uk-full-build-graph.md (56 stages, the clone index on every spine frame, microdf_python in the sidecar), and the earlier #931 changelog fragments that said G1 was unwired, that no spine carries a clone index, or that the stage table and the kernel table read as before; and the new fragment 931-uk-spine-geographic-expand.changed.md. The code-mirrored texts are identical in the code, sources.yaml and source_stages.json. The was_wealth and was_lisa notes are unchanged. Bindings. The national gates hash geographic_clones, since their support-family fold reads the clone index columns, which the national frame carries from a clone-first spine; the kernel table's clone-index reason now covers only the calibrated gates, the dense measures and the national problem. The stage table keeps the source household column's name alone, its reason rewritten: geographic_expand writes it through the constant and declares it by name, every stage after it that reads the name is given the column, and frs_annual_income_spells, before it, is given neither the column nor a copy column. The kernel table's premise check now asserts that geographic_expand alone writes the clone-index columns on the spine and that the spine build installs it at one clone. Tools. tools/graph_uk_spine_fixture.py's oracle builds G1 and G1b from their packaged stages at _GEOGRAPHIC_CLONES = 1 and its engine with clones=1; its config records geographic_clones: 1, and uk_spine.json is written at that K. Its synthetic households gain IMDE, IMDW, IMDS and IMDN (invented deciles in turn, one household in seventeen blank). Its descriptor and PRODUCED_BY.txt no longer give a transform count. tools/build_uk_release_input_coverage_manifest.py gains a geographic_expand family, whose required reason is G1's declared reason, matched verbatim. Dense and national. The dense expansion refuses a spine carrying geographic_expand's clone index at any n_clones, naming the clone-first spine and #931 group (c), and its overflow message limits "n_clones=1 still expands" to a spine without the index. The national line is not yet refused early; a later commit of this group adds that refusal. No national or dense build runs on a clone-first spine before (c) (decision 4). Why: María's rulings of 10 Nov. Decision 3 (X) puts G1 and G1b after stages 14 and 15 and before stage 10, so the stages that read raw tabs by raw person id run on the survey's rows and stages 10 to 13 run on every clone from this commit. Decision 1 (Form B) puts stage 53's tie clause in its notes, which enter no stage contract. Decision 2 binds microdf's version into node keys without a re-lock, which would move the US approved-lock digest. Decision 5 mints no person or benefit unit source columns until something reads them. Every declaration edit of group (b) is in this commit, so H2 regenerates once. The clone columns' names sit in the geographic_clones leaf so that G1, G1b, the SPI support channel and the dense line read one definition their keys hash, rather than copies or a listed exemption. What moves. At K = 1 no value moves: on the H2 fixture the legacy oracle's final frame agrees with the parent's on every existing column, bit for bit and in dtype, on the weights and on every earlier mass record (checked through the engine slot). frs_take_up, frs_person_draws and frs_household_draws now count their receipts' support in true source households, which at one clone are the households themselves. The bytes move: - the stage order: frs_hmrc_spine_leaves and frs_annual_income_spells now run ahead of frs_take_up, with geographic_expand and geographic_identity between them; - the column order, since the households' source columns now come from geographic_expand; - each table's clone index, at 0; - geography_household_key, which a household's copies repeat until group (c); - the root's imd_decile and council_tax_band_observed, which the release drops and no receipt or sidecar share reports; - geographic_expand's mass record and both new stages' evidence; - spi_support_channel's strata, grouped by a constant clone index; - spi_income_band_donors' funding strata, which gain the clone index, so each label ends "|0"; - the national support-family fold, whose key columns gain the clone index. Seven stage contracts move: frs_spine (its outputs), spi_support_channel (its source text, outputs and nonnegative outputs), spi_income_band_donors (weight_rule and draw), high_value_home_support and cgt_support_split (copy_rule), salary_sacrifice (spi_bonus_draw) and private_school_attendance (its source text). geographic_expand's and geographic_identity's contracts are new. K is a parameter of geographic_expand's graph node, never of a contract. No contract hashes a stage's reads or notes. The source id and clone index that frs_take_up, frs_person_draws and frs_household_draws now read move only their nodes' inputs, and so does the clone index that spi_employment_shell, spi_housing_shell, uc_capital_coherence and property_components now read. The notes of isa_subscriptions (the tie clause, Form B), uc_capital_coherence, frs_spine, geographic_expand and childcare_copy_take_up move no contract. The dense line refuses every clone-first spine, and the national line's degenerate gate would refuse the constant indices. The coverage gate now requires geographic_expand's mass record, so a release from a spine built before this commit fails it too. No national or dense build runs between (b) and (c) (decision 4). Positional stage numbers in prose (comments, tests and changelogs) still follow the order before this commit. Hash and fixture. Every UK spine node re-keys: - microdf-python's version joins every node's numerical dependencies; - every stage kernel hashes graph_kernels and national_frame, both edited here; - the root's outputs move. sources.yaml, source_stages.json and the coverage manifest move the UK country fingerprint and the solve fingerprint, so every node keyed on one of them re-keys: the spine gates, the national targets and gates, the target selection, compilation, measures and problem, the full preflight and calibrated gates, and the rotated holdout. The rest of the national and dense lines re-key through the modules they hash: national_frame, graph_population, rowwise_dataset, geographic_clones, atomic_area_support, spi_support, household_lineage, receipt_counts and diagnostics, and the national gates through geographic_clones, which their key now hashes. Only the shared atomic-geography kernels and the export package keep their keys. Outside the UK one kernel re-keys: the shared transport gate battery (gates.battery@1). Its key covers the source closure of its gate bindings, which reaches source_manifest, so NZ's terminal gate and the export and package nodes after it re-key (the NZ spec is inactive). These keep their keys: - every other transport kernel; - the US post-transfer graph's nodes and kernels; - the US, NZ, BE and AM specs, seeds and fingerprints. uv.lock, pyproject.toml and the US approved-lock digest are untouched. The schema's two new operation kinds move only the spec engine's grammar receipt, which every country's emitted, uncommitted bundle lock carries. Regenerated: - source_stages.json, with the stage list merged by stage, so every other stage keeps its bytes and key order; - the release input coverage manifest, without --candidate-h5, then --check: a geographic_expand family, and source_stages.json's new digest in every family; - the H2 fixture, through the engine slot, then --check: uk_spine.json and sources/fixture.json (config.geographic_clones set to 1, both new stages and every declaration edit), household.csv and schema.json (the root's two carriers), frs_raw/househol.tab (synthetic IMDE, IMDW, IMDS and IMDN) and PRODUCED_BY.txt (no transform count). person.csv, benunit.csv, weights.json, NORMALIZATION.md and the donor and facts files regenerate byte for byte, and H2 parity passes. gates.json is unchanged. Tests (engine-free unless named; invented values only): - test_uk_graph.py: 56 stages; G1 in the EXPAND set and G1b a NONE node; eleven copy-id readers; the source household column's reason in the stage table; the geography key named in the leaf, read bound by G1b and re-exported by atomic_area_support; the kernel table's clone-index reason, whose premise is now that G1 alone writes the columns on the spine and the spine build installs it at one clone, and the national gates hashing the leaf; a stage after G1 that counts before the copies reads both lineage columns; every folding stage and property_components read the clone index; the moved stages and the draws read nothing the other writes; the root's typed carriers; G1 owns the source cells; microdf in every node's dependencies. - test_uk_geographic_expand.py and test_uk_geographic_identity.py build their transforms from the packaged stages and add: G1 is an EXPAND that conserves mass at design weights; K is on G1's node, never its contract; the graph's and the kernel's K refusals; no new row at K = 1 and tripled tables at K = 3 through the executor; the node lists each table's new cells in the order G1 writes them, at K = 1 and 3; the coverage family; the source columns named once in the leaf; the H2 registry building G1 and its engine at the fixture config's K, and refusing a K that is not an integer; a drifted declaration, a clones field and artifacts refused; G1b's node, and frs_release.json's bytes in its contract and not G1's. - test_uk_clone_first_nesting.py runs the packaged G1, and a K = 3 test runs stages 10 to 12 on the stand-in and holds their support counts to K = 1's. - test_uk_frs_spine.py: the carriers' types and codes, the absent-IMD refusal, codes that move only the carriers, the sidecar's share omission, and the band-flag test renamed for what the flag means; the driver's synthetic spec follows the packaged order with G1 and G1b, its engine stubs take clones, and the driver asks for its engine at one clone. - test_uk_spi_support.py and test_uk_spi_spine.py: the channel keeps G1's source columns and declares none; the clone-indexed refusal. - test_uk_full_population_graph.py: dense meets the reworded refusal at K = 1 and 2; the dense lineage refusal. test_uk_full_target_graph.py: uk.full.identity rewrites the key the spine carries. - test_uk_copy_id_table.py (G1's radix and the executor's trace at K = 1 and 3), test_uk_terminal_gates.py (the export drop), test_uk_rules_engine_provenance.py (microdf only when batching), test_uk_source_stages.py, test_uk_graph_evidence.py (the assembled gate admits spi_support_channel), test_uk_spine_acceptance_receipt.py, test_uk_identity_stability_receipts.py (G1 in the stacking-map exceptions), test_uk_spi_band_donors.py (frames through the real G1), test_uk_uc_capital_coherence.py, test_uk_cgt_support.py, test_uk_high_value_home_support.py and shared/test_country_spec.py: pins and literals. - Engine tier: tests/engine/uk/test_uk_graph.py subtracts the carriers from the nonzero-share pin, and test_uk_release_input_coverage.py's shipped-manifest pin gains geographic_expand. Checks. Before the review fixes, the whole of T/uk, run once in eight chunks, gave 7712 passed, 44 skipped and 2 failed; both failures fail at the parent too (one expects the UK engine absent, one needs a Node package this machine lacks). After them, every engine-free file they touch or that imports an edited module passes: 2652 passed and 14 skipped in 72 files, the graph package's engine-free H parity tests included. Through the engine slot, the fixture tool and its --check (byte-identical), H2 parity, tests/engine/uk/test_uk_graph.py and the shipped-manifest test pass. The source-stage regeneration and the coverage tool's --check report current, ruff check and ruff format --check are clean, and tools/ci_test_plan.py verify is ok. integration-uk and the rest of the engine-tier UK suite were not run here; this PR gets CI once #1519 merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto #1519's new head dropped (#931) Main and this branch each moved the packaged UK spine from 54 to 56 stages on the same lines: main for uc_limited_capability and pip_points (microcosm#1095 Y1 and P1), this branch for geographic_expand and geographic_identity. The rebase merged that edit once, without a conflict, so the counts git never stopped on kept this branch's own figures and lost main's two stages. The merged roster has 63 stages, which the spec and graph tests already pin. - tools/graph_uk_spine_fixture.py: UK_FIXTURE_STAGE_COUNT is 63, and its comment counts from main's 56. At 61 the H2 fixture tool refuses the merged roster, so this lands before the H2 fixture is regenerated. - The clone-first H2 test (engine_after_merge) pins 63 stages and names main's two. - docs/uk-full-build-graph.md: the spine roster and its stage nodes are 63, and the two paragraphs on school attendance name the stage private_school_attendance instead of a position that has moved twice. - The spine fragments give the merged count after each change: 63 once the areas are assigned, 62 when regional_home_values retires, and 63 again with council_tax_localise. The fragments' other counts, of the stages and kernels that hash a module, are re-derived with the H2 regeneration, from the keys it measures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead at, now the feed pin is main's (#931) tools/build_uk_council_tax_band_d.py reads chronicle#412's two raw registrations at CHRONICLE_COMMIT (80a3482), and its comment and module docstring called that the commit uk/chronicle_feed.json pinned when the resource was built. On the rebased line chronicle_feed.json pins main's 4ce631f5 and never pinned 80a3482, which came from #1519's earlier re-pin. The resource still reads correctly: it reads no fact through the feed, and each raw file is held to its own sha256 and its manifest at that commit. This commit keeps the constant and the resource as built, and rewords the two passages to say so. The Scottish Band D resource is vendored from the feed and names main's pin. No value, resource or key moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
…ttests stochastic_assignment (#931) What failed: on #1519's new head, test_spec_engine_seeds' digest tripwire and test_spec_engine_loader's golden vector. Why: main's b708616 (12 Nov) made microcosm.build.stochastic_assignment one of the US seed protocol's attested kernel modules. This branch adds the keyed tie order, the keyed uniform for a label, the binomial share band and a strata keyword to that module, so its bytes, and with them the protocol's implementation digest, differ from main's. The compiled seed map, the minimal bundle's golden vector and the US bundle's semantic hash each embed the protocol. What changes: four pins, re-derived on this tree. EXPECTED_HASHES' seed_protocol and seed_map in spec_engine/inventory_coverage.py, the golden vector in test_spec_engine_loader.py, and the US bundle's spec_sha256 in engine_workflow/us/test_us_multispine_pool_tool.py. That last test needs policyengine_us, so its value was computed through the same load_bundle("us") call the pool tool makes. With stochastic_assignment.py alone at main's bytes, all four equal main's pins again. The US inventory coverage is complete with the new pins. What moves: no code path. A US run records this branch's seed-protocol digest and spec_sha256 in place of main's. stable_identity_uniforms, the one stochastic_assignment function the US keyed draws call, is unchanged, so no US draw changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…differing clones with spine keys (#931) Item 6 of Vahid's review on #1519, settled on the move (María's ruling of 15 Nov). The SPI income stage folds its forests' training rows through fold_geographic_clones, and clones that differ on what the forests read stay rows of their own. cross_fit_transport keys its training rows on person_source_id and refuses a repeated key with a generic message. On the clone-first spine each clone carries its own key: geographic_expand mints each clone's ids before spi_support_channel keys person_source_id on each row's own id, so differing clones train under keys of their own. Only a frame whose clones were made after the support channel, as the dense pool and the test helpers built on it make them, can give two differing clones one key. - Refusal. Where the stage builds the transport's training keys after the fold, it refuses a repeated person_source_id before the transport, naming the cause (clones of one survey record made after the support channel share its key) and no household or value. The transport keeps its own check. - Tests. test_uk_spi_income gains two. On spine-style keys (_clone_first_support at two clones), clone 1 of one record reports more dividends than clone 0: both clones train as rows of their own under distinct keys, the record's clone-1 copies find their twin on clone 1's row, the fold receipt records the variety, and the stage runs. On a dense-pool frame (with_geographic_clones) with the same change, the stage refuses with the new message and never calls the transport. - Changelog. The fits-fold fragment says that on the clone-first spine each clone carries its own SPI transport key, and that the stage refuses a frame whose differing clones share one. Keys: the SPI income stage's kernel re-keys, as do the three other graph kernels whose hash binds spi_income (spi_income_band_donors, property_components and company_cars). No value moves. The refusal reads the training keys that the transport's own uniqueness check reads, so every frame it refuses was refused before, by that check or earlier in _folded_twin_identities, and it never fires on a valid spine. No stage declaration, generated file or fixture changes. Tests: test_uk_spi_income.py, test_uk_spi_spine.py and test_uk_spi_rank_transport.py, engine-free: 116 passed, 1 skipped (the licensed donor is not staged locally). ruff check on the repository and ruff format --check on the touched files pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ive them on main's code (#931) The take-up, helper-binding and dense fragments counted stages, kernels and modules as each commit saw them before this branch moved onto #1519's new head, so they left out main's stages, kernels and gate code. Each count is now the one its own commit gives on this branch. It was measured engine-free on an archive of that commit: what each kernel's implementation hash hashes, what the binding rule's own derivations return, and what the registries register. The same probes on the commits as they were before the move give back each count restated here, and give one result on both lines for every count left as it was. - 931-take-up-counts-per-clone: the frs_spine root and 49 of the 57 stages after it hash stochastic_assignment; main's pip_points binds it, and uc_limited_capability does under the helper-binding fragment's last bullet. The transport registry registers 48 kernels, main's three income-evidence kernels among them, and all but the gate battery keep their hashes. The battery's key binds the sources its gate bindings compute through, US keyed draws among them, and since microcosm#1585 those import stochastic_assignment, so NZ's terminal gate node re-keys, with the export, readback and package nodes that chain on it. The US keyed draws take only stable_identity_uniforms, which is unchanged, so no US draw moves, but the US seed protocol attests the module, so its digest, the seed map's and the US bundle's spec hash move. The re-pin of those near the end of this branch covers them. - 931-dense-on-the-clone-first-spine: 86 kernels remain (98 before) and 68 change hash, 43 of them among the spine registry's 60. Main's two stages, frs_council_tax and frs_disability hash household_lineage on main's code, and 15 stages keep their hashes. The dense graph's 16 of 23 platform-keyed nodes are as before. - 931-uk-helper-bindings: 72 bindings in 48 stages, and 39 stages gain the engine adapter, since pip_points takes it with the others. The selection's key covers 52 modules, since main's target kernels also hash receipt_counts. With main's uc_limited_capability, 17 stages call the engine where the engine bullets said 16. Those bullets now name the 16 that bind its modules as 16 of the 17 and point to the last bullet, which says uc_limited_capability is one of 18 and that UK_GATE_REGISTRY_MODULES lists 56 modules after it. The gate list's bullet says main's newer gate code moves the registry's reach by five modules. Every other count in the fragment is the same on this branch. - 931-fold-lowest-id-sorted-keys said that no transport kernel re-keys on its commit. On this branch the gate battery does, for the same reason, and the seed protocol's digests move, so it says both now. Only changelog text changes: no code, key or value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…' kernel and node counts (#931) The transport-binding and national-areas fragments counted the 45 kernels build_transport_registry registered before this branch moved onto #1519's new head. On main it also registers main's three income-evidence kernels. Each count is now the one its own commit gives on this branch, measured engine-free as in the previous commit, and the same probes give back the old counts on the commits as they were before the move. - 931-transport-helper-bindings: test_transport_binding_rule holds 45 of the 48 registered kernels; the income-evidence three are held to it later in #931. 43 of the 48 kernel hashes move, those three among them, and the atomic geography and person location kernels keep theirs. NZ's packaged graph has 369 nodes on main's declarations, with no synthetic quantile stand-ins, and all of them re-key: 365 directly and four by chaining. No UK kernel hash moves (0 of 101). - 931-national-one-clone-areas: the 48 transport kernels keep their keys. The composed graphs' 27 and 31 nodes, the six US kernels and the eight-node US graph measure the same on both lines. Only changelog text changes: no code, key or value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s two stages on the spine (#931) Five more #931 fragments counted UK kernels, spine nodes and stage positions as their commits saw them before this branch moved onto #1519's new head. Main's uc_limited_capability and pip_points add two stage kernels to the UK registries and two nodes to the spine, and uc_limited_capability runs before isa_subscriptions. Each count is now the one its own commit gives on this branch, measured engine-free as in the two previous commits: kernel hashes before and after each commit, and the node keys of the gated spine and of the in-graph build on it, with every source keyed by its name. The same probes give back the old counts on the commits as they were before the move. The in-graph build is counted, as there, with its export, readback, package and certification nodes. - 931-isa-tied-balance-rank: isa_subscriptions is stage 54. Of the 101 UK kernel hashes only its own moves, and keys move from stage 54 on: 4 of the gated spine's 83 nodes (pip_points follows it) and 36 of the in-graph build's 115. - 931-uk-child-benefit-age-noise-tolerance: 66 of the gated spine's 83 nodes re-key. - 931-dense-k-pin: 12 of the 86 UK kernels change hash, none of the spine registry's 60, and the composed spine has 86 nodes. - 931-dense-localisation-nodes-retired: the UK registries register 98 kernels (103 before), and the same 30 change hash. - 931-atomic-assignment-tool-on-the-spine: its probe covers 86 kernels. Only changelog text changes: no code, key or value moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #931. This is the prep PR of the geography-first spine plan. It carries all four of the plan's prep commits, and none of them changes an output of today's build.
Commit 4 builds the conditioned area supports from the registrations in PolicyEngine/chronicle#413. It was built at that PR's head (
df468b8) before the merge, then re-pinned to the merge commit (c51f40d2b), where every registration pins the same bytes. A later commit reads Scotland's band weights from the NRS facts PolicyEngine/chronicle#421 added to the UK feed, which main pins. Four more commits cut what the graph executor holds in memory, so that the move's 15-clone spine can fit in 32 GiB; they move no output either.On 15 November the branch was rebased on main (
3a7067fa2). "Rebased on main" below says what that changed.Why
The move, a later PR, clones every FRS household K times at the start of the spine. Each clone then gets its own small area, and every later stage runs per clone. Four things have to hold before that, and all four hold today without moving an output:
household_idorperson_household_idreads K clones as K sources.household_source_id, the support channel's immediate parent, does too, because a copy made from a clone names the clone there.The machinery is country-neutral
Per María's ask, nothing new names a UK column. The new
microcosm.build.source_lineagetakes a country's copy lineage as data:CopyLineage: the entity copies are made of and its true-source column (default: the sharedsource_household_id).CopyBranch: each copying step, in path order, with its marker and ordinal columns.Its readers are:
record_sources: every record's true source, for any entity, through household membership.copy_paths: every household's ordered copy path.replica_keysandcollapse_replicas: one row per record and path without the named branches, with the weights summed exactly.The UK declares its lineage once, as
household_lineage.UK_COPY_LINEAGE.weight_byis added to the sharedatomic_geographyoperator itself. The newmicrocosm.build.atomic_support_conditioningbuilds a support's conditioning columns from any country's point records, shares and supports (commit 4), and the shared spine schema gains an optionalobserved_constraintsfield.Commit 1: every floor counts true source households (a403050)
receipt_counts.SOURCE_HOUSEHOLD_COLUMNis now the sharedsource_household_id, read throughrecord_source_households, the UK's entry on the shared reader.before_copies. Their households are then their own sources, and a frame that already carries copy lineage is still refused.household_source_iddirectly and skipped the null check;household_source_idnow declaresource_household_id. UC take-up's pooling text and two notes name it too. Updating that wording was María's choice; it is the one evidence digest that moves (see "The proof").household_id,person_household_idorhousehold_source_id, outside two named structural checks that each benefit unit sits in one household.receipt_counts,household_lineageandsource_lineageare bound into the hash of every stage whose module or helpers import them. A test derives that set from the imports.Commit 2: the FRS-trained fits fold geographic clones (78e7f24)
The six fits:
A seventh, the SPI employment shell from main's UK: carry the FRS occupation (SOC 2020 major group), and redraw it on the SPI channel #1490, joins in
8fe2d003c(below).What each fit does now. It folds a record's geographic clones into the record's first training row, summing their weights exactly with
math.fsum. SPI, high-value and CGT copies stay rows of their own, as now. Today's spine has no geographic clones, so every fit's rows and weights are unchanged, value for value.Only clones that agree fold (
94befd186, from review). Each fit passes what it reads, and clones fold only where they agree on it. Clones that differ stay rows of their own, each variant with its own clones' summed weight, so the fit sees every clone's value at its share. That will happen once the move gives clones their own ids: through a draw keyed on those ids, or a stage run per area.The SPI fit is the exception (Vahid's item 6). Its rank transport keys training rows on
person_source_idand refuses a repeated key, so a kept variant that shares one would stop the stage. On this PR nothing reaches that: its only geographic clones are the dense pool's, made after the spine. On the move's clone-first spine (Move the UK spine to geography first (#931) #1538) each clone has its ownperson_source_id, so variants never repeat a key, and Move the UK spine to geography first (#931) #1538 adds a UK graph: move geography assignment ahead of enrichment (geography-first reordering) #931 refusal for a repeated key after the fold, an SPI test with differing clones and the changelog sentence.The clone path.
uk_household_clone_pathsnow reads throughcopy_pathsonUK_COPY_LINEAGE, as María asked. The paths are identical on the 3 November spine (24 distinct path shapes) and on a two-clone pool of it, so the dense identity keys and draws don't move. Three identity tests now match the shared reader's branch names in their error messages.Declarations. The housing shell and UC capital stages declare the lineage live where they run. A test refuses any collapsing stage whose surface would hide a lineage column; in the move that includes the geographic clone index.
Replicated-fixture tests. One per fit: the stage runs on its fixture and on two production-expanded geographic clones of it (
expand_uk_geographic_pool), and the fit must receive the same rows and weights, or clone 0 must draw what it draws alone. Each test fails with the fold switched off.The SPI income stage now binds
spi_rank_transportinto its hash.Commit 3: the shared operator's
weight_by(972f824)weight_by(input,map,default) in place of its singleweight. Each household samples by the columnmapnames for its code, or bydefaultwhen the code is missing. A code the map does not name is refused.weight_bykeep their canonical bytes, definition digest and draws. That covers New Zealand's committed declaration and today's UK one, and the invented fixture's draws are now pinned. Only the geography kernels' implementation hashes move, in the UK and New Zealand alike.resume="require"refuses at preflight instead of recomputing.geography.assign_atomic@1.Commit 4: the conditioned area supports (945110f)
What they are. Each of the three UK supports gains a conditioned form, declared beside it in
sources.yamlunder the new roleuk_atomic_area_conditioned_support. It keeps its support's bytes column for column:uk_conditioned_support_baserecovers them exactly, and the tests compare them with the registered digest. It adds the columns the move conditions on. Only the move binds them; today's build reads the registered supports.imd_decile. The area's deprivation decile within its nation, an exact-match code for the shared operator.Vintage. The 2019 vintage of each index: IoD 2019, WIMD 2019, SIMD 2020v2 and NIMDM 2017. The FRS 2024-25 documentation lists no change to
IMDE,IMDW,IMDSorIMDNsince 2023-24, which predates the 2025 indices. An internal comparison (no figures quoted) also fits England's FRS decile shares by region to IoD 2019 better than to IoD 2025, as it does for the 2023-24 FRS. The vintage is still to be confirmed with DWP. If it turns out to be 2025, only the England and Wales column is rebuilt.Rule. The May 2026 NSPL is the last edition to carry the 2019-vintage ranks. It gives every live residential (small-user) postcode its small area and rank.
inferred_modal.How each area's decile was set:
Band weights. Each band column is the area's households in that council-tax band times 10^6, an exact integer, for the move's
weight_bystage.voa_council_tax_band_mix_lsoa.json, the mix UK: data fixes to model the High Value Council Tax Surcharge (mansion tax) correctly, and the related housing and council-tax gaps #1240's band node reads). The mix is stated to 6 dp and ends at exactly 1, so nothing is rounded. Only Wales has band I, and the assembler refuses any in England.5e1d2c7d0), rounded half to even. Sincee2e5afd42they are read from the facts Chronicle emits for them. The largest per-area deviation is 3 millionths of a household. Every area in a zone has the zone's mix, and a test checks this. NRS counts dwellings on the valuation list, as VOA does in England and Wales.Zero-mass cells. For each support and each weight column (households and every band), the provenance lists the FRS region × decile cells and region cells with no mass. So the move can choose its fallback (band weight → household weight, then IMD → region) before it draws. Today every region has households in every decile. The only empty cells are band H in seven of England's region × decile cells, and band I across England.
Inputs.
tools/build_uk_conditioned_area_supports.pyreads three sets of inputs:e2e5afd42);uk/uk_atomic_area_conditioned_supports.provenance.jsonrecords every input's identity, the Chronicle commit and feed read, a fingerprint of the NRS facts, each nation's decile rule counts, households by decile, the rounding and the zero-mass cells. It holds published area data only. The support bytes are local inputs, as today's are.Declarations.
sources.yamlgains three rows pinning the bytes. Each keeps its support's vintages and adds the decile vintage and, outside Northern Ireland, the band vintage. The five new geography vintages are reciprocally compatible with every other.spine.yaml, the FRS channel declaresobserved_constraints: [imd_decile]. The shared spine schema now admits this optional field.validate_uk_country_source_projectionnow requires three things: each system's support and its conditioned form, the conditioned vintages extending the support's, and the spine declaration.uk_atomic_support_register(conditioned=True)reads the conditioned pins for the move's preflight.Country-neutral.
microcosm.build.atomic_support_conditioningholds the pieces any country can use:modal_area_codes,apportion_weights,extend_atomic_supportandzero_mass_cells. A test draws on added columns with the shared operator unchanged. The code column is an exact-match constraint, andweight_bychooses the weight column.Re-pinned to chronicle#413's merge (
d495d2067). At the merge commitc51f40d2b, each of the five registrations pins the same filename, URL, sha256 and size as at the PR head. The tool'sCHRONICLEblock and the provenance now name the merge, and a test holds the two together. Rerunning the tool regenerates the three support files byte for byte.Review. Max: this commit adds a shared module and an optional field to the shared spine schema. No other country declares the field, and their specs resolve as before.
Main's newer stages and the employment-shell fold (8fe2d00, fe823f2)
Main's newer stages count true sources (
fe823f2a6). Stages main added after this branch began count their receipts' support throughreceipt_counts, which here readssource_household_id. So, as commit 1 did for the stages before them:spi_employment_shellandaps_occupation(UK: carry the FRS occupation (SOC 2020 major group), and redraw it on the SPI channel #1490),pip_points,uc_limited_capability,frs_disability,frs_council_taxandfrs_spinejoin_COUNTING_STAGES;aps_occupationandpip_pointsdeclaresource_household_idin place ofhousehold_source_idin their household slices, since the strict reader refuses a slice without it;uc_limited_capabilityreads an open surface;frs_spine's three new counts (the carer households in the care-recipient evidence, and the two support counts of the DWP carer hours) go throughown_source_households. The survey holds no copies whenfrs_spineruns, so each counts the same households as before;frs_spineto the node that runs its transform (create_uk_frs), and takesfrs_employmentas its control, sincefrs_council_taxnow counts.Before the rebase, the merge of main
f44512df1made the same change for the two UK: carry the FRS occupation (SOC 2020 major group), and redraw it on the SPI channel #1490 stages.A seventh FRS-trained fit (
8fe2d003c). The employment shell trains its occupation classifier and industry donors on the frame's FRS adults, so it now folds geographic clones like commit 2's six fits.aps_occupationtrains on APS donors, not on the frame, so it needs no fold.Review fixes
From Vahid's two rounds and the planning review:
94befd186). Commit 2 above has the details. A replicated fixture with differing clones uses the planning review's case: a landlord's property income, drawn apart per clone, reaches the UC reporter redraw as two rows at half the unit's weight each.5e1d2c7d0). Chronicle already registers NRS's dwelling estimates by 2022 data zone, band columns included, but emits only the total as facts. The tool now reads bands A to H from those bytes, pinned by sha256. It uses the December 2024 sheet, which is nearest the FRS 2024-25 year and VOA's stock at 31 March 2025.lsoa_code. All 7,392 zones match NRS's.0c7d7826, 1,607,702 bytes). England and Wales and Northern Ireland rebuild byte for byte, and the zero-mass cells are unchanged.uk_ctaxbase_2025is renameduk_nrs_dz_dwellings_2024.nrs-dwellings-data-zone-2025) chronicle#419 asked Chronicle to emit the band columns as facts. Emit NRS's council tax bands by 2022 data zone chronicle#421 does, and the support now reads them from the feed with the same numbers (below).449ebb5d0). It now catchesdrop_duplicates(key),groupby(key).ngroups,len(df.groupby(key)),.loc[rows, "column"]and columns named through a module constant. It found one more structural row check intools/verify_uk_identity_stability.py, now named.fc66d2c59). The person draws and annual income no longer fall back to each row's household.clone_indexfilter is gone (233f7b9e3). The SPI income stage refuses a table carrying the artifact's bareclone_index; no spine stage writes it.a7c18ec92):5e1d2c7d0has since lifted;docs/geography-assignment.mddescribe Consolidate the US survey graph build and enrichment pipeline #893.Scotland reads Chronicle's NRS facts (e2e5afd)
4ce631f5, carries them. Before the rebase, this branch re-pinned the feed onto Restore ASEC ED_VAL via a pinned sidecar and close the source-carry class #421's merge itself (f086e0169, now dropped).e2e5afd42). The tool streams NRS's December 2024 record set from the pinned feed and checks the whole feed against the pin. It still refuses a zone without all nine counts, or whose bands miss its total.5d61db5f).a8ca096b, 1,607,718 bytes). England and Wales and Northern Ireland rebuild byte for byte, and every receipt is unchanged.The executor keeps less in memory (b19a6d3, 6745bed, 2d67333, 55ef324)
Why. At 15 clones, a spine run would hold more than this 32 GiB machine has:
last_result;The move needs these fixes before its f100 15-clone spine, not before its f010 arms.
E1: keep only the versions the caller reads (
b19a6d3b3,55ef32460).run_graph(..., retain_populations=...)lives in the shared microcosm-graph.None, the default, keeps today's behaviour.uk.full.expand.docs/graph-acceptance.mdrecords it. Main took 29 while this branch was open.E2: release each stage's result once its evidence is captured (
6745bed14). The sharedstage_evidence.release_stage_resultsclearslast_resultafter the snapshot, walking the same wrappers as the fit-weight probe. The UK kernels call it when the registry asks. The spine turns it on, and so does the full build's--spine-requestroute, which prepares its spine the same way. Inside the stages, only the snapshot readslast_result.E3: write structural versions one column at a time (
2d67333c2). Each entity's ids are copied once and shared, and each column is copied only when written, in the same order. A structural cache hit still checks each stored column, but keeps none of them.Other releases (
55ef32460). The executor also lets go of each node's context, decoded artifacts, incumbent and result once nothing reads them.Review. Max: this changes the shared executor and adds amendment 30 (29 until main took that number), which you may want to reword.
Rebased on main (15 November)
At María's ask, the branch is rebased on main
3a7067fa2. The two merges of main (cd15bcaee,f9421ea47) are gone, and each commit is replayed on main in its old order.household_source_idtosource_household_idin UC take-up's pooling text, the carer's allowance take-up's notes and the trading allowance's slice. The SPI income stage keeps main'ssource_household_idsimport, which main's carer link calls, and which here reads true sources.f086e0169re-pinned the UK feed onto80a3482, the merge of Emit NRS's council tax bands by 2022 data zone chronicle#421. Main has since pinned4ce631f5(Add dwellings by sector, ONS's capital stocks of dwellings and Census 2021 tenure by MSOA (#438) chronicle#439), which descends from it, so the branch keeps main's pin and everything regenerated from it.0b0f80ea, Scotlanda8ca096b, Northern Ireland6d71f2a9): NRS's December 2024 band facts are the same in both feeds.retain_populationsis now amendment 30 (55ef32460).fe823f2a6holds main's newer stages to the floor rule (above).690f0a275regenerates the supports' provenance, the coverage manifest and the H2 fixture from their tools on the rebased tree, with the environment synced to main's lock (policyengine-uk 2.177.7). Both tools pass--check.70e5ac1ed). The first run failed where main's newer tests meet this branch's strict true-source reader: their frames carried onlyhousehold_source_id.70e5ac1edgives those framessource_household_id, rewords two docstrings to the true source, and records the four importsreceipt_countsmakes here for the three target-kernel groups, which hash it on main. CI stops at its first failure, so both lists ran locally without that limit and pass, apart from five checks that fail only in this environment (four Orrery tests withoutnode_modules, and the UK engine extra check).Commits before and after the rebase
246b33adfa40305015f00739eda78e7f24ee6e7a25628972f824c9cad323b79945110ffa7f74d4c32d495d2067668e13f518fe2d003cfd902f63a449ebb5d0193870e6ffc66d2c59bb68b570e233f7b9e3e9d557c39a7c18ec9277b1eb15194befd1863778eb2c65e1d2c7d0a0e31d886b19a6d3b35dd5e1d626745bed14f086e0169c8066be53e2e5afd4213ce7a3a32d67333c22fe33410e55ef32460fe823f2a6(new)690f0a275(new)70e5ac1ed(new, after the rebase)Main merged again (17 November)
bb0ccf376merges main3b75cf151, 183 commits past the rebase's base. It is a merge, so the commits above keep their hashes.test_country_spec.pywas changed on both sides, and it merges line by line.3a7067fa2, main's UK spec changes only its two reviewed target-fit exclusion files, and the UK feed pin and the H2 fixture are unchanged. On the merged tree, the coverage manifest and the H2 fixture pass their tools'--check.microcosm-emitter-interfaceto 0.16.0, and the environment was synced to it.The proof: no output change
Three spine comparisons cover the branch. The first predates the merges, the review fixes and the rebase, and the second, for the executor's memory fixes, predates the rebase. The third (17 November) runs on the rebased tree and confirms why the first carried over. Everything after the first is of a kind already shown to move nothing:
source_household_idinstead ofhousehold_source_id, the switch commit 1 made, and the real spine shows the two columns agree on every household row;frs_spine's new counts read each household as its own source before any copy exists;clone_index), pass the same sources explicitly, or are notes and tests;Real spine, before and after. Each spine is a K=1 full spine from the licensed sources, with a fresh checkpoint store and
--staging-local-only. The base isfc5bb9014, the merge base before main was merged in. There are two heads, named by their hashes before the rebase:cad323b79(all four commits) and, earlier,6e7a25628(commits 1–3). Both heads give every result below.uk_frame_content_identityis equal:3939a72ea5693441c3af4efea61ccc1ad8ae5d11f02ce91574cf61bae1cb003bon all three.tools/compare_uk_h5_payload.pyexits 0).release_id, which names each build's start time.The executor's memory fixes, before and after. Base
c8066be53, headcf8432c9b(before the rebase), both K=1 full spines from the same launcher and inputs. The launcher now passes--aps-tab, which the spine requires since UK: carry the FRS occupation (SOC 2020 major group), and redraw it on the SPI channel #1490.uk_frame_content_identityis equal:b19e3f90daf4b1a69c66d4d2e6c4c6c3d05198e08255cc6d03917e5b1f826d07.release_id.The rebased tree, before and after (17 November). Base
3a7067fa2(main at the rebase) and head70e5ac1ed, both K=1 full spines from the same launcher and inputs (policyengine-uk 2.177.7). The head is the control arm Move the UK spine to geography first (#931) #1538's session built on 16 November. The base ran from a copy of its launcher, in a fresh worktree.uk_frame_content_identityis equal:08002518846b4dea4a9ebd0606d68d3131d2e0c1be41e5390b3401fcde38d367.tools/compare_uk_h5_payload.pyexits 0), and the spine gate report differs only inrelease_id.household_source_idandsource_household_idagree on every household row.Precondition. On the 3 November spine and on both spines here,
household_source_idandsource_household_idagree on every household row, with every copy type present.Commit 4 binds nothing today. No stage reads the conditioned supports, and the spine above is unchanged with them declared. The commit after it,
d495d2067, re-pins the provenance to chronicle#413's merge and rewords one provenance note. The support files regenerate byte for byte.H2.
uk_spine.jsonis regenerated on the rebased tree. Against main, only the inputs of the ten stages whose declarations change move, plus UC take-up's stage contract hash.fixture.jsonmoves only in the two texts. The coverage manifest moves only in its source-manifest pins. Commit 4 moves none of the three: they regenerate byte for byte.Tests run locally:
test_uk_cgt_projection's check that the UK engine extra is absent, which fails wherever the extra is installed.3778eb2c6(before the rebase): the conditioned-support and tool tests, the UK country adapter, the atomic-support provenance and the shared spec tests pass with the rebuilt supports mounted.c8066be53(before the rebase): with the pinned feed available and the rebuilt supports mounted, 21 files pass, with 3 skips: the feed pin, full-targets, reference, local-target, census, validation-level, vendoring, ledger-target, local-parity, DESNZ, high-value home, council-tax, conditioned-support and country-adapter tests; the shared epoch, ledger-artifact and spec tests; and the engine coverage-manifest and H2 parity tests.c8066be53) pass. The new tests run the toy graphs cold, warm and underresume="require", with and withoutretain_populations.fe823f2a6changes: 1,558 passed and 5 skipped. Three of main's tests met this branch's required inputs;fe823f2a6gives them the sources, and both files pass;test_uk_graph.py.ci_test_plan.py verify, on each state.The full suites are left to CI.
What moves without being an output
6745bed14).stage_evidence.pyandgraph_kernels.pyare bound into every UK stage kernel's implementation hash.--spine-request, and fromuk.full.expand.ownedonward with--input-h5.receipt_counts(8ea0ee1), which this PR changes, so their keys move too;70e5ac1ed's docstring edits move them again, with those of the kernels that hashrelease_input_coverage.fe823f2a6): the hashes, and so the node keys, of the seven stages that join_COUNTING_STAGES, and ofuk.create@1throughfrs_spine.Found in passing
receipt_countswithout binding it into their hash, so an edit to it alone left their cache keys in place. With the lineage modules, 24 stages were missing a binding; all are now bound, and the test above derives the set.docs/geography-assignment.mddescribes the US work of Consolidate the US survey graph build and enrichment pipeline #893, including a block adapter (us_runtime/atomic_block_support.py). Consolidate the US survey graph build and enrichment pipeline #893 closed unmerged on 9 October 2026, so that code never reached main. The doc now says so at the head of each US passage (a7c18ec92).inferred_modal; the move may choose to relax IMD in Northern Ireland.uv run --no-sync --with odfpy, which leaves the lockfile alone; it is documented in the tool.🤖 Generated with Claude Code