Repository navigation
Add the frs_relationships UK spine stage and rebind the ONS household-composition cells (#791) - #903
Conversation
|
Review at The derivation is right. I ran Registration is lockstep: Should-fix1. The adjudication register is re-worded under an unchanged signature. 2. The plan of record is not in the tree. Body and receipts cite Questions
Nits
#904 overlapBoth drafts sit on the same base. A trial merge auto-resolves five of the seven shared files and conflicts on two: Could not verifyThe R2–R9 tape, build and calibration numbers, the Nothing blocks. 1 and 2 before this leaves draft; the rest at your discretion. The derivation itself I am satisfied with. |
…regeneration test (#791) Should-fixes: the census_disclosure_control_noise adjudication reason carries a dated re-wording trailer for the bound bridge beside the #887 one; the plan of record is committed as docs/uk-relationship-to-head-plan-791.md and the receipts and PR body point at it. Questions: the unrelated-adults and lone-parent contract notes record the skip-generation age switch (under 16 with no parent present: two unrelated adults; 16-19 in full-time education: the FRS codes the grandparents as legal guardian, so a family with a dependent child) and cite the ONS "Families and households statistics explained" definition by URL. Nits: a non-numeric age refuses instead of reading as 0; stage_health.py is the main text plus the composition hunks only. Retire test_cached_reference_regeneration_matches_committed_surface (Maria's call): it regenerated the pinned eFRS parity reference under the installed engine, was skipped in CI and has failed on main since the 2.97.0 lock; the other thirteen reference integrity tests stay. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Thanks, all addressed at Should-fix 1: the Should-fix 2: the plan of record lives outside the tree by María's convention (her local Your skip-generation question is on the Nits: a non-numeric The cached-reference regeneration test in 🤖 Posted with Claude Code |
…-composition cells (#791) The FRS household grid (relhrp, R01-R14, hrpid, hrpnum) becomes four exported frame columns - person.relationship_to_head, person.ons_family_role, person.ons_family_index and household.ons_household_type - derived per the ONS Families and households definitions in a new stage after age_tail. The household type carries Chronicle's ons.household_type value ids verbatim, so the frame, the manifest, the contract rows and the published facts share one string. The derivation is declared as a schema-validated derive_ons_household_composition manifest operation that the runtime lockstep-asserts, gated at the assembled boundary by a stage-health check and an enum-domain gate, and mirrored into the data contract's part scopes and digests. All ten ons.household_composition.* rows bind on the new column and the three microcosm#791 measure exclusions are retired (register 51 -> 48), which binds the national_household_composition_partition_vs_census_households bridge. A compile-time check refuses any ons_household_type condition outside the declared domain or a partition that does not cover it once. Found and fixed on the way: the graph executor's placeholder for a new dense column on a filtered population (a sampled rung) was built on a fresh RangeIndex and inserted label-aligned, widening int64 to float64; it now binds to the table's index, with a regression test. Receipts in experiments/791-household-composition-receipts.md: tape probe clean on all 16,288 households; full licensed build 17/17 spine gates; twin diff vs spine-q = only the four columns; calibration 367 targets, loss 0.0114, 0 outside the 25% fence, the ten cells within +/-0.9%; rowwise dry run binds the bridge with declared factor 1.0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 7779747)
…regeneration test (#791) Should-fixes: the census_disclosure_control_noise adjudication reason carries a dated re-wording trailer for the bound bridge beside the #887 one; the plan of record is committed as docs/uk-relationship-to-head-plan-791.md and the receipts and PR body point at it. Questions: the unrelated-adults and lone-parent contract notes record the skip-generation age switch (under 16 with no parent present: two unrelated adults; 16-19 in full-time education: the FRS codes the grandparents as legal guardian, so a family with a dependent child) and cite the ONS "Families and households statistics explained" definition by URL. Nits: a non-numeric age refuses instead of reading as 0; stage_health.py is the main text plus the composition hunks only. Retire test_cached_reference_regeneration_matches_committed_surface (Maria's call): it regenerated the pinned eFRS parity reference under the installed engine, was skipped in CI and has failed on main since the 2.97.0 lock; the other thirteen reference integrity tests stay. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 12462fb)
…eceipts point at her local copy Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit b4ab81c)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
b4ab81c to
48b1566
Compare
…mark the stamp as in-process Two attested identities moved with the merge ref, both re-pinned to the values the merged tree computes: the UK country bundle (main's #903 added the frs_relationships spine stage on top of this branch's attested kernel changes, so neither side's pin survives the merge), and the multispine pool tool's constants-adapter country_spec digest, which had already moved to the branch's attested value recorded in docs/evidence/spec-engine/ us-f0-coverage.json when the seed identities were re-pinned but was still asserted at main's value in test_us_multispine_pool_tool.py. survey_atomic_geography._population_stamp now says it is an in-process seal that must never be persisted or compared across reconstructions (microcosm#907 / #909), naming what a cross-call pin has to carry instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…egenerate the surfaces (#904) María merged chronicle #263 (closing #261): consumer facts now carry dimension_labels and dimension_value_labels as chronicle.consumer_fact.v2, the schema-8 hierarchy's missing input. The UK artifact rebuilt at 474a0ae carries 141,400 rows (the c6f9361 rows plus chronicle #259/#260's nine Universal Credit packages), every row labelled. - uk/chronicle_feed.json pins the new artifact (facts bb12d77a, manifest c649b7fe, consumer-fact schema 6a42e4a5, rows chronicle.consumer_fact.v2). - The national generator runs again on main's hierarchy code: references and membership regenerate byte-identical to round 2 apart from the feed label (424 active / 7 deferred / 7 signed out, no value or period moves) and the generator's hierarchy lookups equal the hand-completed ones. - The nine vendored resources regenerate (rows unchanged, headers move); the local census restates the pin; the compile-parity receipts are unchanged; compile_uk_target_registry compiles 424 / 0 unsupported. - All 109,693 local-level facts are identical between the two artifacts, so the local surface moves only by its membership feed label. The local generator and the local runtime compile stay refused on main and here: Chronicle emits no geography.name and Microcosm's catalog has no constituency or local-authority labels (receipts Part I); that is the local grain's own follow-up. - The seam-driver test reads the pin's facts digest instead of a literal; the local validation-level register restates the new pin. - Baseline (receipts Part J): spine-p cannot host the post-#903 composition rows, so round 3 ran on #903's spine-r twin; every #890 row inside the 25% bound, the battery blocked on the HMRC self-employment 20-30k band cell (+25.8%, +24.1% on #903's own spine-r run), María's ruling. - Filed chronicle#266 (geography.name) and microcosm#920 (local grain blocked since #855) on María's go. Rebased onto main 15ebde8 first (only the spec-digest conflict). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merge origin/uk-full-build-graph-registration (051fb97) into the #893 integration head (2300e56) after taking origin/uk-context-framing-fix-20260913 (072c2e8, amendments 25 and 26). Resolution rules: the graph package, its tests, the charter and the interface lock are #918's; #901's own draft of WeightUpdate and the frame-context fields, its test_weight_update.py and its charter section are dropped. US-owned tests and tools/spec_seed_identity_diagnostics.py are #893's; #901's 10 September review fixes to them (and the us_spine_stage_contracts.json fixture and the VerifiedParameterAssets test) are superseded. UK files #901 rewrote into shims or cut down are #901's. Stage roster is 29: #901's 28 plus frs_relationships from #903; the retained-leaves / SPI pair stays retired. Ports of HEAD-side UK changes into #901's modules: #903's frs_relationships transform in uk_runtime/spine_build.py and its ons_household_type enum-domain gate artifact through one shared uk_spine_gate_artifacts() used by the spine-phase gate kernel, the full-build final gates and the driver test; #855's hierarchy decode in graph_targets.registry_from_payload and on the local target surface (_surface_records encodes it as TargetRegistry.to_json does, _local_specs decodes it and keeps it out of metadata), so the schema-8 hierarchy the shared uk_local_target_surface now emits survives the surface artifact and reaches diagnostics. Invented UK test registries take their hierarchy from one shared tests/uk_hierarchy_fixtures.py helper. Dropped run_graph(population_retention="lazy") from full_build_cli: the shared executor on main has no such mode (see the #893 reconciliation record). Pins regenerated on the merged tree: calibrate H1 parity, the H2 uk_spine.json fixture, the UK country-bundle spec digest, the UK release-input coverage manifest, APPROVED_UV_LOCK_SHA256 / LOCK_SHA256 for the merged uv.lock, and the microcosm.graph/kernel.py contract in the US implementation inventory. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The calibration-comparison evidence discloses its register vintage (the a256c88 register: 47 current entries plus the three #903 retired, no band-H, hence 374 and 545 targets; 377 and 542 under HEAD) and drops the stale fuel-duty sentence (#904 retired that exclusion; the row sits at -23.9% inside the bound). The runbook names the constants' home in microcosm.calibrate.geography_constants. A geography predicate must project to the reference's own entity, refused otherwise, so a hand-edited register cannot misalign a mask silently. The three 2026-09-14 exclusions are asserted by name, date, tracking and window. ruff format is clean on every touched file. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Receipts Part B records the measurement design: the four refusals of the baseline attempts (stale ladder, pre-#903 spine, the cross-grain collision fixed in 97ee7d5, the unset gate signing key) and the ruling to drop the separate baseline and measure the family once at 1,500 epochs against the D2 figures of the 10 September report. Part D records the run on 96e6204 (dense K=15, seed 42, spine-r, feed df35af7): council tax authority cells within 10 % 92.2 % -> 99.6 %, cells past 25 % 33 -> 5 (three band-H micro-cells, one Western Isles band A, one Derbyshire Dales band G residue), England bias by band -0.2 % to +0.1 % where every band was negative, the four band-G micro-cells and the inner-London A-D misses resolved, Wales 99.5 % and Scotland 98.0 % within 10 %, the 97 council-tax controls of the joint solve within 3.7 %, the other local families unchanged; uk_local_target_fit failing targets 53 -> 24 (council tax 33 -> 5), uk_local_weight_ratio fails as before; obr.council_tax -11.0 % -> -12.8 % (the CT-C level gap, open on #929); the frozen-vs-recomputed VOA artifact is gone. The vendored incumbent registry fixture relabels its 90 voa/council_tax/<REGION>/<band> rows onto the mhclg and welshgov ids that registry_parity.mapped declares (values untouched; the compile parity registers are byte-identical), so the incumbent-surface evaluation names the family that now owns the rows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes #791. Plan of record: María's local
repos/uk-791-relationship-to-head-plan.md(approved 2026-09-11; plans are kept outside the tree by her convention); receipts R1–R11 inexperiments/791-household-composition-receipts.md.What changes
Spine. A new stage
frs_relationships(afterage_tail; manifest 30 → 31 entries, executed roster 28 → 29) re-reads the pinned FRS 2024-25adult,childandhouseholtabs and derives four frame columns from the household grid (relhrp,R01–R14,hrpid,hrpnum):person.relationship_to_head,person.ons_family_role,person.ons_family_index,household.ons_household_type. The household column is valued with Chronicle'sons-families-households-2025ons.household_typevalue ids verbatim, so the frame value, the manifest declaration, the contract row and the published fact are one string. The derivation follows the ONS Families and households definitions (family = couple, or lone parent with a child; a child of any age with no partner or own child belongs to the parent's family; dependent = under 16 or 16–18 in full-time education; one family plus other individuals is one-family; no family present = two or more unrelated adults; two or more families = multi-family). Codes and rules are declared as a schema-validatedderive_ons_household_compositionmanifest operation whose parameters the runtime lockstep-asserts (theage_tailpattern), with the FRS SN 9563 / ONS / Chronicle provenance recorded beside each list.Gates.
uk_stage_frs_relationships_composition(stage health at the assembled boundary: one HEAD per household agreeing withhrpidandhrpnum, contiguous person numbers, no double partners, no unmapped codes, family-index and enum consistency, the ten-cell partition covering every household exactly once, grid reciprocity within the reviewed tolerance of 3 ordered pairs on the 2024-25 tape) anduk_ons_household_type_enum_domain; both in the spine scope and mirrored in the data contract. The four columns are on the export allowlist.Contract and registers. All ten
ons.household_composition.*rows bind onhousehold.ons_household_type == <value id>(one reduce-less condition each; notes rewritten with the translation record); the three microcosm#791 measure exclusions are retired (register 51 → 48; the 2026-08-26 tranche 39 → 36); a compile-time check refuses anyons_household_typecondition outside the declared domain or a partition that does not cover it once; the census-households bridge is bound and the local adjudication wording, the uk-data parity register and the cross-grain doctrine note say so.Executor fix (found by this work). A new dense column on a filtered population (a sampled rung) was widened to float64 because the executor's placeholder was built on a fresh RangeIndex and inserted label-aligned; the placeholder now binds to the table's index, with a regression test.
Re-adjudication of the register (the three retired entries)
lone_parent_dependent_childrenseen on the Q50f run is +0.21 % here.unbound_bridges == []; the composition bridge binds both lower grains with declared factor 1.0 and zero shift, so the 1,011 census cells are numerically unchanged.Review round 1 (Vahid, at 7779747)
Should-fix 1 is in (dated re-wording trailer on the
census_disclosure_control_noiseadjudication). Should-fix 2: the plan of record lives outside the tree by María's convention (her localrepos/uk-791-relationship-to-head-plan.md); the receipts carry what the tree needs of it. The skip-generation age switch and the ONS source for "two or more unrelated adults" are now on the contract notes and in R1/R11.ageNaN refuses instead of reading as 0;stage_health.pycarries only the composition hunks. The cached-reference regeneration test intest_uk_parity_reference.pyis retired (María's call): it regenerated the reference under the installed engine, was skipped in CI, and has failed on main since the 2.97.0 lock; the other thirteen reference integrity tests stay.Follow-ups (not in this PR)
test_uk_measure_simulation.pycounts and the UK spec sha; whichever lands second re-pins (Vahid: 47 / 35 / a third sha).definitionfields is optional; the definitions are recorded on the contract rows and in the receipts.🤖 Generated with Claude Code