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