Retarget the UK build to FRS 2024-25: re-pin raw vintages, regenerate parity instruments, re-measure gate baselines - #733
Conversation
2c6da1f to
e9cbb2e
Compare
|
Automated review pass (Claude Code, low-effort single diff pass — no verification run, and the bulk pin/sha/nonzero-share data churn was not validated).
|
|
Thanks @vahid-ahmadi — dispositions of the four findings (fixes cherry-picked from the WS-D worktree where they first landed, commit
|
…arry on the scoped instrument frame Dispositions of vahid-ahmadi's four findings on PR #733 (fix commits kept cherry-pickable for that branch): 1. CONFIRMED — the rung named-edge ValueError path duplicated the generic failure handler verbatim. One except-Exception handler now carries the named-edge branch first (a re-raise cannot reach a sibling except clause of the same try, so the merge is structural, not a re-raise). 2. CONFIRMED — _frs_only_frame rebuilt the scoped E4 instrument frame without the artifact's mass log while its sibling _engine_safe_frame carries it; now passed through. 3. Reviewed, no change — the cgt_source_stages.json 1.0->1 retypes sit in descriptive operation blocks with no type-sensitive consumer (the real declared_factor is minted in Python); reverting would re-cut three digests for zero behavioral difference. 4. Intentional — UK_CANDIDATE_DATASET_NAME stays populace_uk_2023 by the #686 partition: the candidate side (labels, manifest, thresholds) moves only at the swap decision, per the #733 commit body. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… re-map, ingest scale ladder The frozen release object uk/frs_release.json (survey/base 2024, calibration 2025, SN 9563, DOI, UKDS zip sha, HF acquisition pins) drives lockstep asserts over the re-pinned raw-tab manifest: all 21 frs_table artifacts re-pinned to the 2024-25 tabs with the SPI-convention keys, six stages' SN 9252 prose defect fixed, and the typed spec moved in lockstep. TIME_PERIOD and the HMRC SPI/CGT build periods move to "2024"; the 2023-24 HMRC published surface is re-mapped as a signed nearest-available-vintage declaration (period_mapping: latest_published_tax_year) with the frozen original byte-untouched and the source-contract validator reconstructing the live canonical payload. take_up_contract build_year 2024 flips the two 2024 date-keyed rates. The ingest driver joins the #627 scale ladder (--sample-fraction post-frs_spine via the generic frame-sampling helpers) with receipt-postures on three full-scale fences at sampled rungs, and the WAS bridge-donor locator defect that refused every full-roster licensed run is fixed with a hermetic pin-coherence regression test. Part of #723. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The regenerator pins move to enhanced_frs_2024_25.h5 at the v1.56.14 tag (= incumbent-at-pin ebf733c) and the committed reference re-freezes at the new vintage: 145 columns (surface unchanged), period "2024", entity counts now test-pinned with the re-derived record-count identity (16,288 raw + 10,000 SPI) x 2 + 270 CGT band donors = 52,846 - no raw household is dropped at 2024-25 and the donor count follows the HMRC band file (30 x 9). The release-input coverage manifest regenerates against the new reference with the certified 2023 candidate unchanged (candidate side moves at #686); known gaps stay empty and the restored-column receipts hold. Part of #723. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The efrs-post-calibration input-mass descriptor is replaced in place (same name, #687's replacement model): enhanced_frs_2024_25.h5 identity and the totals_sha256 of the regenerated 131-column weighted-totals evidence, with the registry, gates.json, and the data-shard publication mirrors re-pinned in the same reviewed change per the gate-battery contract. No thresholds move - #723 records the re-measured baselines, #686 arms them. UK_REFERENCE_DATASET_NAME follows the incumbent's 2024-25 dataset name. Both per-reference reviewed exclusions are re-signed against the new reference (charitable_investment_gifts; owned_land on a fresh 2024-25 stability receipt), pending the approver's confirmation on the PR. Part of #723. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ise channel-blind scope note UK_REFERENCE_DATASET_NAME drops the _recalibrated suffix (adjudicated 2026-08-20): the pinned reference is the published enhanced_frs_2024_25.h5 itself and no recalibrated variant exists at this vintage, so the gate-report label now names the artifact exactly (June report strings keep their own label). The registry scope notes stop claiming the incumbent "structurally lacks" the SPI clone channel - the 2024-25 artifact carries the synthetic rows structurally but no admin-restored mass in the channel-exclusive columns, which is the fact the reviewed exclusions rest on; the approved exclusion reasons are untouched. Gate digests re-cut over the post-#729 union in the same change. Part of #723. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…block; self-describing June freeze Finding 1 (accepted): the family-coverage block rendered the #723 re-mapped period fields from the canonical manifest while hashing only the frozen mirror - evidence fields and their hash must name the same bytes. The block now carries a dual pin (source_manifest for the frozen June identity, canonical_source_manifest for the bytes the re-mapped fields come from) and a test binds each field set to the sha256 of the file it actually derives from. Finding 2 (rejected with armor): the committed replay report is the June evidence freeze and deliberately keeps mapped_build_period 2023 - it is evidence for the grandfathered release, not the 2024 line, and retires with the frozen manifest after #686 per #687; instead of regenerating it, a new assertion binds it to the FROZEN manifest's declared mapping so the partition is self-describing. Part of #723. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…arry on the scoped instrument frame Dispositions of vahid-ahmadi's four findings on PR #733 (fix commits kept cherry-pickable for that branch): 1. CONFIRMED — the rung named-edge ValueError path duplicated the generic failure handler verbatim. One except-Exception handler now carries the named-edge branch first (a re-raise cannot reach a sibling except clause of the same try, so the merge is structural, not a re-raise). 2. CONFIRMED — _frs_only_frame rebuilt the scoped E4 instrument frame without the artifact's mass log while its sibling _engine_safe_frame carries it; now passed through. 3. Reviewed, no change — the cgt_source_stages.json 1.0->1 retypes sit in descriptive operation blocks with no type-sensitive consumer (the real declared_factor is minted in Python); reverting would re-cut three digests for zero behavioral difference. 4. Intentional — UK_CANDIDATE_DATASET_NAME stays populace_uk_2023 by the #686 partition: the candidate side (labels, manifest, thresholds) moves only at the swap decision, per the #733 commit body. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rebase onto main past #735 (#622 target surface at the 2024-25 line) and #741: the UK spec bundle and the three gate-battery digests move because the merged tree changes the attested surface, so they are re-cut here in one reviewed step - policy, gates manifest, spec fingerprint, and the bundle sha, with the release-input coverage manifest regenerated over the same union. The national build record now carries both source_vintages additions (#735's ledger_facts and #723's frs). Part of #723. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
79f5993 to
d70ea39
Compare
Spine build vs the eFRS incumbent (FRS 2024-25)Head-to-head of the microcosm-built spine against the re-frozen parity reference extracted from the incumbent's What this instrument is: unweighted per-column nonzero shares from Structural
Ours is the pre-clone product, the reference the post-clone artifact — the #688-adjudicated grain difference: (16,288 FRS + 10,000 SPI) × 2 clones + 270 CGT band donors = 52,846. Counts therefore aren't comparable directly, but the synthetic composition is (0.3804 vs 0.3801), which is what makes the share screen meaningful: no divergence below is explained by channel-mix dilution. Twin builds payload-identical; prior mass splits exactly in half across channels (14,486,216.5 each). Share agreement
The 27, by producing stageE6 consumption — 16 ( E5 wealth — 6 ( E7 SPI channel — 3 (rewritten by E8-pending — 1: One divergence not covered by an existing class
Missing from the spine — 6, all mechanism-known
What this does and does not establishEstablishes: no degenerate or missing raw mapping at the new vintage; every imputation stage produces signal on the expected surface; all divergence beyond noise is attributable to a named stage. Does not establish distributional agreement — unweighted shares are blind to level and tail, and the reference carries CGT doubling and band donors we don't produce until #684. Weighted totals across the 131-column register, and the composition close, bind at #686. Evidence: |
…ed-world CGT asserts, stage-bound mass receipts Five findings from the pre-push adversarial round, all dispositioned: 1. Gate-battery cross-shard triplet re-pinned in both mirrors from the live producer over the post-#733/#735 union (policy 5cb072a0, gates c5123517, fingerprint 23cf63b6) - the rebase had left main's pre-E8-gate values. 2. The Advani-Summers percentile-69 p95 corrected 15,190 -> 151,900, verified against CAGE WP 465 Table A1 (p. 39); all 61 rows checked value-for-value, single mismatch confirmed as the incumbent's dropped digit - fix-and-sign replaces replicate-and-document. The prior-draw loader now fails closed on any non-monotone quantile row. 3. Salary-sacrifice and student-loan receipts gain expected-vs-realized fields (expected mass = rate x pool, realization deviation), quantifying the Bernoulli realization the port-faithful mechanism accepts. 4. The CGT spine drift assert now binds every operation's full declared parameter mapping closed-world (extra keys rejected), not a subset. 5. Salary-sacrifice and student-loans declare stage-named mass-conservation reasons in both manifests (schema extended), emit matching MassChangeRecords, and the regenerated coverage manifest binds each family to its own receipt instead of the generic fallback (pre-E8 families keep the fallback - follow-up noted). Bundle spec sha re-pinned (17c820bc) for the manifest edits; gate triplet unchanged by them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closes #723. Workstream E of the UK-migration master epic #665, child of #145. Retargets the UK build to FRS 2024-25 (survey/base 2024, calibration year 2025) per the vintage decision recorded on the issue: the parity bar re-freezes on the incumbent's live artifact
enhanced_frs_2024_25.h5@ the v1.56.14 tag (= incumbent-at-pin ebf733c). Donor vintages (SPI 2022-23, WAS r8, LCFS 2023-24, ETB) are unchanged. The 2023 instruments are preserved in git history at the pre-#723 pins (#687's model).What moved
uk/frs_release.json+load_uk_frs_release()loader: survey/base/calibration years,time_period, vintage token, SN 9563, DOI10.5255/UKDA-SN-9563-1, UKDS tab-zip sha, and the HF acquisition pins (repo, revisiona2039519…= tag 1.56.14, zip sha05dd0069…— the HF zip is byte-identical to the UKDS EUL zip). Lockstep tests bindTIME_PERIOD, everyfrs_tableartifact vintage, andtake_up_contract.build_yearto it.frs_tableartifact entries re-pinned (sha256/size for the 2024-25 tabs,vintage: "2024_25") and upgraded to the SPI-stage convention (tax_year_start: 2024,ukds_study_number: 9563,doi); survey/source prose updated on all FRS stages; typedspec/sources.yamlmoved in lockstep (its artifact schema gains the three keys)."2024"—TIME_PERIOD,HMRC_SPI_BUILD_PERIOD,HMRC_CGT_BUILD_PERIOD; the take-up contract'sbuild_year: 2024flips two date-keyed rates (tax_free_childcare 0.586→0.88 @2024-04-06, tv_licence_evasion 0.1058→0.1252 @2024-01-01); both drivers stampsource_vintages: {frs: 2024_25}into build sidecars.mapped_build_period: 2024with the new explicit tokenperiod_mapping: "latest_published_tax_year". The frozenhmrc_income_source_stages.jsonand its sha pin are untouched; the frozen-copy lockstep test's named-rewrite whitelist carries the re-map; the default HMRC source-contract validator now reconstructs the live canonical payload fromsource_stages.json(frozenbase_candidateretained). Fact-value alignment to the target year stays with Adopt the UK national calibration contract (re-homed from chronicle#164 per the #166 ruling) #707/Consume Ledger UK facts: uk_target_references, mapping module, and a compile-parity gate #622/Adjudicate the UK spine grain at the ingest/calibration seam #688.enhanced_frs_2024_25.h5(sha97a07f9c…, time_period "2024") —efrs_parity_reference.json(145 columns — surface unchanged; engine 2.89.0) andrelease_input_coverage_manifest.json(145 required / 0 exclusions; candidate side stays the certifiedpopulace_uk_2023until Assemble the microcosm-built UK spine: whole-spine parity and swap acceptance #686). Known gaps: none added, none removed. New test pins the record-count identity: household 52,846 = (16,288 raw + 10,000 SPI) × 2 + 270 CGT band donors (30 × 9 HMRC bands; 181 FRS-side + 89 SPI-side). Two vintage findings: no composition-rule drop at 2024-25 (2023-24 dropped 390 raw households) and the donor count moved 780 → 270 (band-file min-lower filter).efrs-post-calibrationregistry descriptor replaced in place with the 2024-25 identity andtotals_sha256 e70a4538…(131-column register, width unchanged); mirrors re-pinned ingates.json,weighted_integrity.py, and the data-shard contract. No thresholds move — Retarget the UK build to FRS 2024-25: re-pin raw vintages, regenerate parity instruments, re-measure gate baselines #723 measures, Assemble the microcosm-built UK spine: whole-spine parity and swap acceptance #686 arms.UK_REFERENCE_DATASET_NAME → enhanced_frs_2024_25_recalibrated.--sample-fraction(Doctrine: the scale ladder — dev-scale runs before production spend ("boring before billed") #624 rungs) subsamples households post-frs_spinevia the generic frame-sampling helpers; sampled rungs refuse checkpoints, record a sampling receipt + rung token, and adopt the named-edge abort. Three full-scale fences gain an explicit receipt-posture on sampled rungs (leaves raw-coverage, SPI stack scaling, ultra-sparse effective-mass restoration); f100 keeps every fence strict.Signed differences and fixed defects
sourceprose; all now cite SN 9563 with the DOI, and the release object is the single source.lcfs_consumptiondeclared the WAS tab withlocator: <filename>whilewas_wealthpinslocator: "caller-supplied local input";_artifact_pins()refused every full-roster licensed run (introduced by the E6 merge-time provenance fixup, after E6's acceptance twins ran; invisible to secrets-free PR CI). Locator aligned; hermetic pin-coherence regression test added.rate_at()atbuild_year2024; values verified against the committed contract keys.Licensed acceptance (all data local; disclosure-safe evidence only,
data/ukds/acceptance/723-frs-2024-25/)raw_vintage_audit_2024_25.json): staged 25-tab set byte-identical to the UKDS zip @ the pinned HF revision;provenance.jsonwritten (E6 schema). No consumed-column regressions (benunit's 178-column material-deprivation drop, covesa1-4,montheverywhere — all unread).househol.tabconfirmed sernum-scrambled (the E2 sort guard now binds for real); SALSAC domain 216/3,743/12,732 of 16,691 (asked-state capture unchanged); EDUCQUAL codes 1–87 both vintages, no map change.twin_payload_compare.json, exit 0) on the full 21-stage roster.int(rate × n_units)), e5, e6.spine-smoke-f001.h5+ sampling sidecar + Logbook row) — no abort receipt needed.dfe_education_spendingours 0.225 vs ref 0.0003), E5 wealth-QRF, E7 SPI-channel QRF — plus E8-pending salary-sacrifice. Missing columns:capital_gains/student_loan_plan(E8 Port capital gains structure, salary sacrifice, and student loan stages #684), three E9-class derived-benefit columns,household_weight(bookkeeping). Weighted-distributional comparison binds at Assemble the microcosm-built UK spine: whole-spine parity and swap acceptance #686.owned_land_stability_receipt.json): 71.4% national / 112.9% max-region seed swing — the uk-data#448 class persists (37.7% at 2023-24), evidencing the exclusion renewal. Seed0 cross-check annotated as the Carry manifest rewrites into the shared Stage/StageRecord producer graph #721 in-place-rewrite class (in-build determinism = the payload-identical twins).uk_weighted_integrity_baselines_2024_25.json): 174 input-mass totals + 47 QRF tail grids at spine grain; incumbent-side totals evidence (uk_input_mass_reference_2024_25.json, 131 columns) digest-bound into the gate registry. These are the candidate thresholds Assemble the microcosm-built UK spine: whole-spine parity and swap acceptance #686 arms.Adjudications (@juaristi22, 2026-08-20 — confirmed in session)
charitable_investment_gifts(expires 2027-02-20) andowned_land(expires 2026-09-20, fresh 2024-25 stability receipt above). The registry scope notes were tightened afterward to state the precise fact (the 2024-25 incumbent carries the SPI-synthetic rows structurally but no admin-restored mass in the channel-exclusive columns); the approved exclusion reasons are verbatim-untouched.UK_REFERENCE_DATASET_NAME = "enhanced_frs_2024_25"— the_recalibratedsuffix was dropped per adjudication: the label now names the pinned artifact exactly (no recalibrated variant exists at this vintage; the June report strings keep their own label).Adversarial review (Codex, 2026-08-20) — dispositions
Two high findings, both dispositioned in
Adversarial-review dispositions(last commit):source_manifest= the frozen June identity;canonical_source_manifest= the bytes the re-mapped fields come from), with a test binding each field set to the sha256 of its actual source and asserting the frozen mirror still declares the June mapping.hmrc_income_replay_report.jsondeliberately recordsmapped_build_period: 2023; it is evidence for the grandfathered June release, not the 2024 line, and retires with the frozen manifest after Assemble the microcosm-built UK spine: whole-spine parity and swap acceptance #686 (Legacy 2023-vintage build of the microcosm UK spine (deferred) #687's disposition). Regenerating it would destroy the June anchor. Instead, a new assertion binds it to the frozen manifest's declared mapping, making the freeze partition self-describing. (This is the one additive touch totest_uk_hmrc_replay_artifacts.py; every pre-existing assertion is unchanged.)Also in this round: rebased onto main past #729 (uk-national-calibrate) — conflicts resolved by keeping #729's structures with our values applied, and the gate-battery digests re-cut over the union from the live producer payload.
UK-specificity note
UK-specific: the release object and its loader (FRS/UKDS identity), the manifest re-pins, the HMRC period re-map, take-up contract year. General: the ingest-driver rung support (generic
frame_samplinghelpers), the sampled-rung fence postures (any country's ladder can use the pattern), the pin-coherence regression test shape, and the three added artifact-schema keys.Implemented by Codex under
/codex-implement-plan(4 recorded deviations, all reviewed: uv cache relocation; coverage-manifest regenerated in two commits; HMRC contract validator reconstruction — kept, it is the mechanism for signed re-maps over a frozen original;frs_release.jsonallowlisted in the immutable-reference naming test). Claude review added the WAS-pin fix, the sampled-rung fence postures, and the e4-receipt scoping — all licensed-run findings PR CI cannot see.🤖 Generated with Claude Code