Skip to content

Make the UK eFRS parity re-pin one reviewed command; hold every identity mirror in lockstep (companion to #747) - #749

Draft
MaxGhenis wants to merge 4 commits into
mainfrom
uk-efrs-parity-repin-post-462
Draft

Make the UK eFRS parity re-pin one reviewed command; hold every identity mirror in lockstep (companion to #747)#749
MaxGhenis wants to merge 4 commits into
mainfrom
uk-efrs-parity-repin-post-462

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Makes the UK enhanced-FRS parity re-pin one reviewed command, and holds every committed mirror of the reference identity in lockstep under PR CI. Companion to #747, which carries the actual 1.56.14 → 1.56.16 move (uk-data#462's benunit-sort fix) as a hand-made eleven-file commit for #686: this PR's tool reproduces that commit exactly (see the cross-check below), so the next re-pin — a later uk-data release bundling the take-up mask and the pension split, if that is the decision — is a single command on top of #747. Nothing here regenerates a licensed instrument; the committed pins on this branch are main's (v1.56.14) until #747 lands.

What lands

  1. tools/repin_uk_efrs_parity_reference.py — resolves an HF release tag to its commit and the artifact's LFS sha256/size, verifies the licensed bytes (HF cache / --input-h5 / --download), rewrites every committed mirror of the identity in lockstep and refuses leftovers, regenerates uk/efrs_parity_reference.json and uk/release_input_coverage_manifest.json with the committed tools (engine held at uv.lock's policyengine-uk unless --allow-engine-change), emits the gate's totals sidecar outside the repository (UK parity increment 4: port the weighted integrity gates (input-mass parity + QRF tail concentration) into the UK terminal battery (#578) #609), moves totals_sha256 (the sidecar's canonical evidence digest), re-cuts the four gate-battery digests that attest the moved spec, writes a disclosure-safe receipt, and runs the lockstep tests. --dry-run computes everything into a scratch directory and edits nothing. Guards: the recompute path must reproduce the committed digests before it may mint new ones; a release whose populated-column surface differs from the checked-in candidate evidence is refused until --candidate-h5 refreshes it; the release tag moves only through the anchored SOURCE_VERSION assignment (Whole-spine parity for the UK: re-pinned incumbent, comparison instruments, signed register, and the E10 evidence (#686) #747's constant), never a global literal replacement; frs_release.json's raw-zip acquisition revision is left alone unless --move-frs-release-acquisition is passed and the zip's LFS sha is verified identical at the new revision.
  2. packages/microcosm-build/tests/test_uk_efrs_repin_tool.py — holds the eight identity mirrors, the four totals_sha256 mirrors and the gate-battery digest mirrors equal to the committed parity reference and to each other, binds source.version to SOURCE_VERSION once that constant exists, proves the digest recompute reproduces the committed pins, and covers the literal-move machinery hermetically. A drift in any one mirror now fails PR CI.

Pin inventory (every committed place the reference identity lives)

# file what on re-pin
1 uk/efrs_parity_reference.json source.{revision,sha256,size_bytes,url[,version]}, 145 nonzero_shares, entity_stats, engine lists regenerated
2 uk/release_input_coverage_manifest.json reference.{revision,sha256,populated_input_columns}; columns/counts derived regenerated (deterministic; --candidate-h5 only if the surface moves)
3 uk/gates.json uk_input_mass_parityreference_registry.efrs-post-calibration.identity.{revision,sha256}, totals_sha256 moved (with 4: a gates-only edit fails closed against the runtime registry)
4 uk_runtime/weighted_integrity.py UK_INPUT_MASS_REFERENCE_EVIDENCE_SHA256, _UK_INPUT_MASS_REFERENCE_DESCRIPTOR moved
5 microcosm-data …/contract.py _UK_INPUT_MASS_REFERENCE_IDENTITY, _UK_INPUT_MASS_REFERENCE_EVIDENCE_SHA256, _UK_GATE_BATTERY_{POLICY_SHA256,GATES_MANIFEST_SHA256,SPEC_FINGERPRINT,INPUT_MASS_EVIDENCE_SHA256} moved / re-cut (_UK_GATE_BATTERY_DEGENERATE_EVIDENCE_SHA256 is adjacent and unaffected)
6 tools/build_uk_efrs_parity_reference.py SOURCE_REVISION, SOURCE_SHA256, SOURCE_SIZE_BYTES (+ SOURCE_VERSION after #747) moved
7 tests: test_uk_parity_reference.py, test_uk_terminal_gates.py, test_uk_weighted_integrity.py, microcosm-data/tests/test_contract.py literal mirrors of 3–5 moved
8 licensed, uncommitted: the 131-column totals sidecar (--emit-weighted-totals) canonical digest = totals_sha256 (weighted_integrity._input_mass_reference_evidence_sha256, not file bytes) regenerated outside the repo

Not the artifact identity, left as is: uk/frs_release.json acquisition.huggingface_revision (the raw FRS zip; same LFS sha 05dd0069… at both HF revisions; validated by nothing); uk/take_up_contract.json commit: ebf733c ×7 (uk-data's parameters/ tree and utils/takeup.py are unchanged between the tags); uk_national_targets.json registry_parity (already 12a1e028 = v1.56.16); brma_rent_counts.json (VOA CSV provenance); UK_REFERENCE_DATASET_NAME (a label). The UK spec_sha256 does not move: the instruments are legacy_json resources, which project nothing onto the normative spec surface (checked empirically on 057dd95: swapping the three files leaves 8bf62b6e… unchanged; only the unpinned package_fingerprint moves). Prose that still names the 2023-24 identity — the opening paragraph of UK_COVERAGE_PROGRESS.md, a test_us_plan.py comment about the pre-1.56.16 registry accounting — is journal/comment text, not a pin; historicize when convenient.

Cross-check against #747

What a re-pin does not re-adjudicate

uk_input_mass_parity's tolerance (4.5218…, minted as the worst surviving drift against the 2023-24 reference per the #630 receipts) and its two reviewed exclusions (charitable_investment_gifts → 2027-02-20, owned_land → 2026-09-20) are bound to the reference name, not its identity; a same-name re-pin carries them mechanically and the gate re-evaluates them (stale / expired entries fail) at the next licensed run. Re-arming is #686's step (#747 "held behind the review gate"), not a side effect of moving the pins. #733's nonzero-share screen of the microcosm spine (27 columns beyond ±0.02) was taken against the v1.56.14 reference; #747 re-runs it (26 columns).

Provenance

Implemented by Claude (Fable) in session. Adversarial verification: a Claude Workflow was rejected on the session limit, so six sol lanes (read-only) read the instruments / gates / contract / release object / target surface, and six sol lanes refuted them; all verdicts adjudicated in session, and every mechanism claim above re-opened against the code. Licensed artifacts read from the local HF cache; nothing downloaded, nothing published; the totals sidecars stayed outside every checkout.

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits August 23, 2026 12:21
The reference artifact's identity (HF revision, sha256, size) is mirrored in
eight committed files and attested by the totals digest and four gate-battery
digests; #723 moved it by hand. tools/repin_uk_efrs_parity_reference.py makes
the move one reviewed command: resolve the release tag through the HF API,
verify the licensed bytes, rewrite every mirror in lockstep and refuse
leftovers, regenerate both instruments with the committed tools, emit the
totals sidecar outside the repository, move totals_sha256 and re-cut the
battery digests, write a disclosure-safe receipt, run the lockstep tests.
--dry-run edits nothing; the recompute path must reproduce the committed
digests before it may mint new ones.

test_uk_efrs_repin_tool.py holds every identity / totals-digest /
battery-digest mirror equal to the committed parity reference, so a drift in
any one of them fails PR CI.

Prepares the post-uk-data#462 re-pin (v1.56.14 -> v1.56.16 or later) for #686.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed-in candidate evidence

The coverage manifest is rebuilt from the reference plus the committed
candidate evidence; if a release changes the reference's populated-column
surface the evidence must be refreshed with the certified candidate first,
so the tool stops instead of writing a manifest over stale evidence.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The regenerated reference records the installed policyengine-uk version; a
re-pin that silently changed the engine would conflate an artifact move with
an engine-surface move. Refuse unless --allow-engine-change is passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…_VERSION

#747 records the uk-data release tag beside the byte identity
(SOURCE_VERSION / source.version). A regeneration for another release must
not inherit the committed tag, so the identity now carries the tag (from
--release, or --version with explicit pins), the in-memory patch sets it, and
the on-disk move is anchored to the SOURCE_VERSION assignment — never a
global replacement of a tag literal, which also appears in unrelated pins
such as the registry-parity pinned_version. The lockstep test binds the
committed reference's source.version to the tool's constant once it exists.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the uk-efrs-parity-repin-post-462 branch from c5341bd to 34ba133 Compare August 23, 2026 10:21
@MaxGhenis MaxGhenis changed the title Re-pin the UK eFRS parity reference past uk-data#462: re-pin tool, identity-mirror lockstep, dry-run evidence (held) Make the UK eFRS parity re-pin one reviewed command; hold every identity mirror in lockstep (companion to #747) Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant