Repository navigation
Put the release contract on paper and freeze C1 and C5 as golden fixtures (M0) - #1285
Conversation
Extract the UK national assembler's two manifest documents into uk_national_release_manifests, a pure function the assembler and the new golden generator both call (byte-for-byte unchanged output, checked against the previous assembler on the green fixture). tools/generate_release_contract_fixtures.py writes version 1 of the release contract's golden fixtures, following the staging-fixture pattern: the UK national line's build and release manifests (C1), an inventory of the files and certification fields the contract requires of that line, the two pointer payloads the publisher writes and a registry snapshot (C5), with SHA256SUMS. --check regenerates and compares bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/release-contract.md states the ARCH-1 end state Max ruled on 2026-10-15 (d1160), what is served today, and contracts C1 to C5: what the code enforces now, cited to the function that does it, and what it will enforce from 2026-11-06. It says how C1 keys by declared country instead of release-id strings, carries microcosm#378's parity rule, documents the golden fixtures, and records the retire list's state. It replaces the branch-only docs/us-uk-release-path.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The data shard holds every fixture byte to SHA256SUMS and proves each file is what the contract's own code accepts or writes: the C1 manifests pass every release-contract check except the two files the fixture omits on purpose, the loader selects the national artifact from them through the registry, the inventory equals the live constants, both pointers equal the publisher's payloads and read back, and the registry snapshot equals the registry. test_release_contract_keying.py turns the C1 keying gap into executable statements, including that the same release bytes validate under an NZ id and fail under a US id. The build shard checks the generator reproduces the fixtures, and a property test holds uk_national_release_manifests to the contract for every valid input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
format_uk_release_id, UKReleaseIdentity and apply_uk_release_identity minted populace-uk-<year>-<tier>-k<N> ids and had no caller outside their own tests and the uk_runtime re-export. The 10-09 systems report listed the two functions as retire-now; UKReleaseIdentity goes with them because it is built on format_uk_release_id and is equally unused. New releases take their id from C1's declared identity (docs/release-contract.md). The module keeps the national and dense line ids and the tier vocabulary, which the release assemblers and input-coverage checks import. The contract still validates existing exact-k ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add changelog fragments for the contract, its fixtures and the retired UK id-minting helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The C1 golden's gates now carry each certification part's status census
({"passed": N}), the shape the certifier writes and the contract requires;
the property strategy draws the same shape, and a new assembler test holds
a real assembly's manifests and directory to the golden key for key.
- uk_national_release_manifests copies runtime instead of aliasing it, and
the property compares serialized bytes so key order is covered.
- docs/release-contract.md: correct the US Logbook writers; qualify the
model-package checks by id; describe the source-enrichment compatibility
rule and make C2 v1 generalize it (Core pinned exactly, claims bounded,
PEP 440 equality, first matching claim); grandfather by published
revision, not id; route every id-keyed check and the pointer readers
through the declared country; keep remote staging delivery required with a
re-delivery path and move the gate into prepare_release; ship the staging
terminal document and Logbook row in the release directory; smaller
wording fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Opus 5.5 review of c2d50d8: REQUEST_CHANGES (0 blockers, 3 majors, 16 minors and nits). All 19 are addressed at 47389ec. Majors:
Design points, now settled in the doc:
Also: Local runs: 67 tests pass across the touched files, and The independent GPT-6.1 Sol review is re-queued on 47389ec (Subfleet job |
The live-tree guard (test_no_incumbent_data_package_references_in_live_tree) refuses the retired package's full name outside frozen references; the contract document is live text, not a frozen reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in main at 4a36edc. One conflict, in tools/assemble_uk_release_dir.py: main's SPI Public Use Tape marker (49c4bcb) edited the manifest construction this branch moves into uk_national_release_manifests. The pure function now takes spi_marker and writes main's two additions, the microdata entry's spi_public_use_tape_dependent flag and licensed_data, in main's key order; _stage_and_finalize passes the marker through. Two main changes reach the release-contract fixtures and tests: - The SPI marker changes what the national assembler writes, so the generator passes a marker built by uk_spi_public_use_tape_marker from one synthetic stage that reads the tape, and the C1 release_manifest.json golden gains the flag and licensed_data. - microcosm#823 (003dbd0) made the national line the UK 2025 default load: its registry key is ("uk", 2025, "compact") now, not ("uk", 2025, "national"). The C5 registry.json snapshot is regenerated, and the three tests that looked the spec up by the old key use DEFAULT_VARIANT, as main's own assembler test does. The Hypothesis property draws the marker and checks that the manifest restates it. The golden-shape test no longer treats a list's length as shape, because the golden's marker names one stage and an assembly from the packaged spec names every stage that reads the tape. inventory.json, build_manifest.json and both pointer payloads regenerate byte for byte. same_edit.py flags no identical edit on both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… findings docs/release-contract.md now reads each "today" statement from origin/main 4a36edc and states each version-1 requirement as the plan's, with a dated column for how far each milestone had got. When refusal starts stays Max's call. Sol's review of fda37a7: - 1: rules 2 and 3 tighten the validator for calibration releases; rule 4 tightens both loaders. - 2: C2 v1 rule 6 keeps today's rule for schema-1 manifests in both loaders. - 3: the certification needs every scoped gate passed, shippable: true and the full-spec digests; one HMAC covers the whole document. - 4: the failed-diagnostics exception, in the validator and the pointers. - 5: an exact pin compares Version(V) == Version(built). - 6: present-tense M3 wording in agent-guide.md, README.md, both changelog fragments, release_identity.py and two test docstrings. - 7: the re-delivery command writes staging_redelivery.json and never rewrites the build manifest. - 8: the producer copies its Logbook row when record_build_attempt returns. - 9: the dense line's signed verdict is uk_local_gates.json; whether it composes a certification stays open. - 10: the publish order names publish_cli's gates and require_parent_publication. Main moved under the document: the compatibility_recertification release type (#1366), the emitter behind microcosm-emitter-interface with the staging hand-over (#1410), and the UK registry flip (#1432). The document covers each and records one new open item: the recertification lane writes two entries that C2 v1 rules 2 and 3, as written, refuse. The retire list's #873 row records that #873 closed unmerged later on 2026-10-15. The prose uses active voice throughout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main moved the UK releases (#1537) and every US build (#1571) to build folders, releases/<release>/<build>/, published through the emitter and recorded in releases.json. One conflict, tools/assemble_uk_release_dir.py. Both sides rewrote the manifest-writing part of _stage_and_finalize: main gave both manifests the build-folder shape (release and build as two strings, the build's details at the release manifest's top level, a role and no revision on each artifact, score_vs_reference.json) and deleted the cut tag; this branch had extracted the manifests into the pure uk_national_release_manifests. Resolution: take main's file whole, then extract again. The pure function holds main's two documents and takes no cut_tag, _EVIDENCE lists the six evidence files with score_vs_reference last, and _stage_and_finalize keeps main's signature, calls the function and copies the evidence from a dict keyed like _EVIDENCE. A scratch test ran main's assembler and this one on main's green fixture with a fixed clock, with and without an SPI-dependent stage: the eight release files, the NPZ and stdout match byte for byte. The golden fixtures, their generator and the tests that read them still describe the tagged shape after this commit; the next commit restates them, so tests that read them fail between the two. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main at 27e305d publishes every UK and US build into its own folder, releases/<release>/<build>/, and records it in releases.json (#1537, #1571). The goldens this branch froze at a2cc084 held the tagged layout and two pointer files, and the merged contract's manifest checks refuse the UK pair 26 times. The generator, tools/generate_release_contract_fixtures.py, now writes these files under packages/microcosm-data/tests/fixtures/release_contract/v1, each with the writer a real build uses: - c1/microcosm-uk-2024-25-national/{build,release}_manifest.json: uk_national_release_manifests and _write_json, in the UK assembler. - c1/microcosm-us-2024-national/{build,release}_manifest.json: _build_manifests and _finish_build_folder_release, in the US builder. The second calls rewrite_release_dir, in microcosm.data.build_folder_manifests, whose serialization the fixture freezes. - c1/inventory.json: what the contract requires of the UK national release, now with the releases.json role, the build-folder flag and the retired build fields. - c5/uk/releases.json and c5/us/releases.json: the emitter interface's add_build (a publication), make_current (a promotion) and ReleasesRecord.serialize. The interface sets no default, so the generator sets it with dataclasses.replace, as build_folder_switch._switch_record does; both records name the national release. - c5/registry.json: the registry snapshot, whose entries now carry release and build_folder_filename. - writers.json: the writer of every file SHA256SUMS lists, as module and function. The release owner asked that each golden name the writer whose bytes it freezes. The generator drops c5/latest.json and c5/latest-national.json. The tagged publisher, which writes pointer files, refuses every build-folder release, and main's own tests cover the pointer reader that remains. Seams. The UK writer is a pure function and needs none. The US builder reads the clock, the checkout and the installed packages through module globals and computes the calibration gate itself, so the generator replaces four globals of the builder's module: _runtime_versions, _git_output, datetime and _release_gate_failures. The last returns no failures: the US golden records a passing calibration gate, as the UK inputs give each certification part a passing census. A scratch copy without that seam, given one synthetic diagnostic row, wrote a failed gate with 19 sentences, 18 of them naming critical fiscal targets, so the golden would move with that list. What the goldens omit. No fixture holds a signed certification, a gate report, calibration diagnostics, a source-coverage file or a stored-input verdict: those bind digests of live registers. The tests pin the refusals each omission causes, two for the UK folder and five for the US folder. The US manifests carry live values on purpose: the builder's layout, the gate-evidence keys (US_RELEASE_GATE_EVIDENCE_FILES), the documented-absent inputs (US_DOCUMENTED_ABSENT_INPUTS), the calibration diagnostics' schema version, and the dataset, calibration and repository names. A pull request that changes one of them regenerates the fixtures. Tests. - test_release_contract_fixtures.py (data shard; it imports only microcosm.data): SHA256SUMS pins every byte; writers.json covers exactly the pinned files and no golden names the generator as its writer; no fixture holds a certification, an attestation or a signature; both pairs of manifests pass the manifest checks, have the build-folder layout, and draw exactly the refusals their omitted files cause; each releases.json lists the golden build as the national release's current build; the loader selects each build through its record's entry and refuses it under the other role. - test_release_contract_keying.py: the US release names form a closed list of five, the US requirements key on those names and on the populace-us- prefix, and an unlisted name publishes into no build folder. It no longer pins line_pointer_payload, which nothing under packages/*/src or tools calls; main's test_release.py and test_loader.py still test that helper. - test_release_contract_fixture_generation.py (build shard): --check reproduces the bytes; every writer writers.json names exists, and the real build paths call them; each releases.json equals the interface's serialization of one publication and one promotion, default apart; and the Hypothesis property now states the build-folder invariant for the UK assembler's manifests, loader selection through releases.json included. Run on 2026-11-12, one pytest process over these three files, the two UK files this branch also touches, and main's test_release.py, test_loader.py, test_registry.py and test_uk_release_publication.py: 401 passed and 2 skipped (main's live-Hub test, which lacks credentials here). --check passed twice in a row. Mutation checks, in scratch copies with the committed fixtures left as they are. Each of these makes --check exit 1 and name the file it moves: - a key of the UK pure function, built_at or publisher_labels (the UK release manifest; the assembler's golden-shape test fails too); - the UK description's wording (the UK release manifest; --check alone); - rewrite_release_dir's artifact key role, and its indent (the US manifests; --check alone); - the US national release's role in contract.US_RELEASES (the US releases.json; the record test and the closed-list test fail too); - the role the interface's add_build records, in a scratch copy of the interface (both releases.json; the serialization test fails too); - the US registry entry's build_folder_filename (registry.json; the snapshot test and the loader test fail too). Regenerating with each mutant and reading the result with the data shard's tests fails the manifest, record or loader tests for the five changes a contract check reads, and passes for the other three: the description, the publisher_labels key and the indent. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
release_identity.py's docstring, the retired-helpers test's docstring and the two changelog fragments described releases the way the tagged layout worked: one constant id "across cuts", and a version 1 that "derives a new release's id". Main publishes each build into its own folder under a constant release name, and the release owner ruled on 2026-11-11 that version 1 names releases microcosm-<country>-<vintage>-<line> and fixes no grammar for a build's name. The texts now say that: - release_identity.py: the national and dense releases each keep one constant name, and each of their builds publishes into its own folder under it; version 1 renders a new release's name from the identity its manifest declares. - test_uk_release_identity.py: the same sentence in the retired-helpers test's docstring. No code changes in either file. - changelog.d/1285-release-contract.added.md: the document describes the code on 2026-11-11, C5 version 1 takes the build-folder shape, and the fixture list names what the generator freezes now (UK and US build-folder manifests, the inventory, one releases.json for each repository, the registry snapshot, writers.json, SHA256SUMS). - changelog.d/1285-uk-exact-k-id-minting.removed.md: "renders a new release's name" in place of "derives a new release's id". None of these texts says that a pointer file, a cut tag or latest-<line>.json publishes a release. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main moved 58 commits past 27e305d, the main this branch last merged: #1579 (NZ walk pins), #1553 (review follow-ups), #1311 (ACS local artifact writer binding) and #1583 (UK event data, PR3). They change 136 files, and this branch changes none of them, so git merged without a conflict: the tree takes each of main's files whole and keeps this branch's 24 files byte for byte. Two of main's changed files feed the fixture writers. microcosm.data.contract moves five SHA-256 literals (the UK gate battery's policy, gates manifest and spec fingerprint, and the release-cut part's two digests), and tools/build_us_fiscal_refresh_release.py rewords one entry of US_EXPORT_INPUT_MASS_REVIEWED_EXCLUSIONS. No golden reads either, so no fixture byte moves: tools/generate_release_contract_fixtures.py --check passes on the merged tree, with nothing regenerated. On the merged tree, one pytest process over this branch's five test files and main's release, loader, registry and releases-record tests gives 401 passed and 2 skipped (main's live-Hub test, which needs credentials), the counts the branch had before the merge. tools/ci_test_plan.py verify reports ok for 942 test files, and ruff passes on the Python files this branch changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ures - docs/release-contract.md describes main at 6c64038 (2026-11-12): every UK and US release that publishes_to_build_folder names publishes into build folders and releases.json, and C5 version 1 takes that shape. No behaviour the document cites changed between 27e305d and 6c64038. - C5 version 1 names a UK local-area release microcosm-uk-2024-25-local-k<N> for each N the registry names; the pull request that authorizes a k's first publication adds its registry entry. A new gap records that publishes_to_build_folder admits every N through _UK_LOCAL_LINE_RELEASE_ID_RE today (microcosm#1586). - The golden-fixtures section describes the committed generator: the ten files and the writers writers.json names, the four globals it replaces in the US builder, what each golden omits and the refusals its test pins, the tests, and what forces a regeneration. - README.md and docs/agent-guide.md say what the release validator, the publication commands and the loaders enforce today; the guide adds that a change to the US builder's manifest layout or its two embedded constants regenerates the fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The US national golden holds what `_build_manifests` writes for the generator's call, which passes only the function's required arguments and a staging block. A real build's `_main` also passes its timing, the ledger artifact's provenance and its optional gate results, which the golden does not freeze. Sentences in three places said the golden froze what the tool writes for every build, or a real build's bytes; they now say this: - docs/agent-guide.md, "The PR-CI / certification boundary": the golden freezes the manifests `_build_manifests` writes when it gets only its required arguments and a staging block (an empty `timing`, a null `ledger_artifact` and the four gate entries it always writes); a real build adds blocks the golden does not freeze; a change to what `_build_manifests` always writes, such as `US_RELEASE_GATE_EVIDENCE_FILES` or `US_DOCUMENTED_ABSENT_INPUTS`, or to the layout `rewrite_release_dir` gives it, regenerates the fixtures. - docs/release-contract.md, C1 "The frozen shape": the US golden freezes the manifests for a run that passes `_build_manifests` only its required arguments and a staging block, and a real build adds blocks it does not freeze. - docs/release-contract.md, "Golden fixtures": each golden holds its writer's bytes for the generator's synthetic inputs; the list of live constants the builder writes into every build no longer holds the defaults, which a new paragraph gives as what the generator's call produces, beside what a real `_main` adds; the regeneration bullet names what the US builder writes for the generator's call and says a change to a block only a real build produces leaves `--check` green. The other changes: - docs/release-contract.md, M3 row: `required_release_files` names `release_certification.json` for `microcosm-uk-2024-25-national` alone, and C1's other certification rule keys on the gate files a directory carries, not on a declared country. - docs/release-contract.md, the UK local-area gap: Max's session owns microcosm#1586's change as a code pull request. - docs/release-contract.md, the tests: on up to 60 generated inputs each run, the Hypothesis property checks that for any valid input `uk_national_release_manifests` meets the contract. - docs/release-contract.md, opening: the document read main's 6c64038. - changelog.d/1285-release-contract.added.md: the document states each contract as the code enforces it on 2026-11-12, and `writers.json` names the writer of every file `SHA256SUMS` lists. Wording only: no code, test or fixture changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module docstring said writers.json names a writer "for every fixture file" and that the US manifests carry what the US builder writes "into every build". writers.json names the files SHA256SUMS lists. The US golden holds what _build_manifests writes for this generator's call, which passes only the required arguments and a staging block; a real build also writes its timing, its ledger provenance and its optional gate blocks, and the fixtures freeze none of those. Docstring only: the module's syntax tree with docstrings stripped is unchanged, and --check still passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
This landed as 7b93dae on 2026-11-13 at 11:55 UTC, at the reviewed head f1a456a. Main's tree equals the tree git computes for merging f1a456a into 89e12fb (4c77e1d96), and #378 closed with it. Main gained #1588 after the last CI run here. On the tree merged with it, all 106 tests in this branch's five files pass. The last review left two wording nits. |
Main moved 122 commits past 27e305d, among them #1311 (the ACS local artifact's writer binding) and #1285 (the release contract). Git merged every file with no conflict. Three files changed on both sides: README.md, tools/build_us_acs_local_release.py and its test. Checks on the merged tree: - For each of the PR's 25 files, the added and removed lines against main match those of 27e305d..9761bb8, and for each of main's 231 files they match those of 27e305d..origin/main, so neither side lost a line. - tools/build_us_target_parity_manifest.py on the pinned feed (consumer_facts_us_e86a83b.jsonl, sha256 24c64c99...) regenerates both manifest files byte for byte. - No line main added names the previous pin (41b2fb2, 1d45a89c) or a US feed, parity or population-target field. - ruff check, ruff format --check on the PR's Python files, and tools/ci_test_plan.py verify pass. #1311's writer binding touches do_calibrate, _write_calibrated_artifact and do_package; the PR changes none of those lines and calls neither function directly from its tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and #1600 Main gained #1588, #1285, #1582, #1532 and #1600 since the last merge (c93419c). One file conflicts, tools/build_us_fiscal_refresh_release.py, in its import block: #1532 widened the input_mass import to four names, right below this branch's immigration import. The merge keeps both. No function is changed by both sides in that tool or in test_us_fiscal_refresh_builder.py (syntax-tree comparison against the merge base), and each side's changed functions carry over whole. Neither tools/repin_us_spec_engine_contracts.py --check nor tools/spec_engine_coverage.py --check moves a pin on the merged tree. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Review pending after merge: Subfleet job |
Max adopted the ARCH-1 end state on 2026-10-15 (cos d1160). This pull request delivers milestone M0 of the 2026-10-09 systems report's plan to reach it: it puts the release contract on paper, freezes C1 and C5 as golden fixtures, and works through the report's retire-now list. It turns no refusal on and changes neither what publishes nor any published number.
Main now publishes every UK and US build into its own folder,
releases/<release>/<build>/, throughmicrocosm-publish-release-build, and records it in the repository'sreleases.json(#1537 for the UK, #1571 for the US). The document describes that shape as C5 today, and C5 version 1 takes it for every country and line. The fixtures freeze one build folder's manifests for each country's national release, and each repository'sreleases.json, from the writers a real build calls.In the end state, publishing refuses non-conforming releases from 2026-11-06. On 2026-11-12 main holds none of the M2 or M3 work that version 1's refusals need, and Max decides when they start. The document's enforcement timeline records what main holds for each milestone.
Closes #378.
What changes
docs/release-contract.md(new). It describes main at 6c64038 (2026-11-12) and cites the function that does each piece of work. It covers:latest*.jsonpointer files survive as read-only legacy, and C5 version 1, which takes that shape for every country and line and names the gaps main still has;It replaces
docs/us-uk-release-path.md, a planning snapshot that never reached main.tools/assemble_uk_release_dir.py. The two manifest dictionaries move intouk_national_release_manifests, a pure function of its inputs, and the list of the six evidence files into the module constant_EVIDENCE._stage_and_finalizekeeps main's signature: it calls the function, writes both documents with_write_jsonand copies the evidence. The assembler writes the same bytes as main's. A scratch test ran main's assembler and this branch's on main's green fixture with a fixed clock, once with an SPI-dependent stage and once without. Both runs gave the same release directory (the two manifests and the six evidence files), calibration NPZ and printed summary, byte for byte.tools/generate_release_contract_fixtures.pywrites the golden fixtures underpackages/microcosm-data/tests/fixtures/release_contract/v1/. Each golden comes from the writer that produces the same file in a real build:c1/microcosm-uk-2024-25-national/build_manifest.jsonandrelease_manifest.jsonuk_national_release_manifests, then_write_json, in the UK assemblerc1/microcosm-us-2024-national/build_manifest.jsonandrelease_manifest.json_build_manifests, then_finish_build_folder_release, in the US fiscal-refresh builder; the second callsmicrocosm.data.build_folder_manifests.rewrite_release_dirc5/uk/releases.jsonandc5/us/releases.jsonadd_build(a publication) andmake_current(a promotion), thendataclasses.replaceto setdefault, thenReleasesRecord.serializec1/inventory.json_c1_inventory, from the constants ofmicrocosm.data.contractc5/registry.json_c5_registry, a snapshot ofREGISTRYwriters.json_writerswriters.jsonnames these writers for every fileSHA256SUMSlists, andSHA256SUMSpins every byte.--checkregenerates into a temporary folder and fails, naming each file that differs.default, so the generator takes the stepbuild_folder_switch._switch_recordtakes:dataclasses.replace. Both records name the national release as the default._runtime_versions,_git_output,datetime(a fixed clock) and_release_gate_failures. The last returns no failures, so the US golden records a passing calibration gate.contract.py. The US golden leaves out the dataset, the weights,calibration_diagnostics.json,us_source_coverage.json,us_ssi_take_up.jsonand the stored-input verdict, which carries a digest of the live stored-column register. No fixture holds a signed certification or a pointer file._build_manifestswrites when it gets only its required arguments and a staging block, in the layoutrewrite_release_dirgives it. Its build manifest carries an emptytiming, a nullledger_artifactand only the four gate entries that the function always writes. It embeds the live constants the builder writes into every build: the gate-evidence keys (US_RELEASE_GATE_EVIDENCE_FILES), the documented-absent inputs (US_DOCUMENTED_ABSENT_INPUTS), the calibration diagnostics' schema version, and the dataset and calibration file names. A real build adds its timing, the ledger artifact's provenance and its optional gate blocks, and the golden freezes none of them. A pull request that changes what_build_manifestsalways writes, one of those constants orrewrite_release_dir's layout regenerates the fixtures.uk_runtime/release_identity.pydropsformat_uk_release_id,UKReleaseIdentityandapply_uk_release_identity, anduk_runtimedrops their re-export. On main, none has a caller outside their own module, their tests and that re-export, and GitHub code search across the PolicyEngine organization's default branches finds them nowhere else. The tier vocabulary and the two constant UK release names stay, and the contract still validates existing exact-k ids.README.md and docs/agent-guide.md point to the document, and two changelog fragments record what this pull request adds and removes.
Invariants the tests hold
tools/generate_release_contract_fixtures.py --checkreproduces every committed byte and fails on any difference (test_release_contract_fixtures_are_reproducible).SHA256SUMSlists every fixture file and no other, and each digest matches its file (test_every_fixture_byte_is_pinned_by_sha256sums).writers.jsonnames a writer for every fileSHA256SUMSlists and for no other, and no golden names the generator among its writers (test_writers_json_names_a_writer_for_exactly_the_pinned_files). Every writer it names exists (test_every_writer_the_fixtures_name_exists). The real build paths still call those writers: the UK assembler's_stage_and_finalizecalls the pure function and_write_json, the US builder's_maincalls_build_manifestsand_finish_build_folder_release, and that function callsrewrite_release_dir(test_each_manifest_golden_names_the_writers_its_real_build_calls).kind, and no fixture document carries anattestationor asignaturekey at any depth (test_no_fixture_holds_a_signed_certification)._check_build_manifest,_check_release_manifestand the cross-manifest check return no failure (test_golden_manifests_pass_the_manifest_checks_directly). Both manifests name the release and the same build as two strings, carry none ofRETIRED_BUILD_FIELDS, and give each artifact its role and no revision (test_golden_manifests_have_the_build_folder_layout).validate_release_dirrefuses the UK golden for its two missing required files,calibration_diagnostics.jsonandrelease_certification.json, and nothing else (test_uk_national_golden_is_refused_only_for_the_files_it_omits). It refuses the US golden for five things and nothing else: the missingcalibration_diagnostics.jsonandus_source_coverage.json, each manifest'snot_evaluatedstored-input entry, and the stored-input artifact the release manifest lacks (test_us_national_golden_is_refused_only_for_the_files_it_omits).test_uk_national_gates_are_the_certifications_part_censuses). The US build manifest records a calibration gate that passed with no failures, and every gate-evidence entry in both US manifests readsnot_evaluated(test_us_national_golden_records_a_passing_calibration_gate).inventory.jsonequals the live contract's constants (test_inventory_matches_the_live_contract) and lists the files the UK manifests ship and no others (test_inventory_files_are_the_files_the_manifests_ship).uk_national_release_manifestsreturns pass the contract's manifest checks and name the national release and one build. They give every artifact its role and no revision, and ship the signed evidence as their only diagnostics. After one publication and one promotion, the loader selects the build throughreleases.jsoninside its own folder, at no revision, with the digest and package versions the inputs gave. The manifests also restate the SPI Public Use Tape marker, copy each part's census, and depend on the inputs alone, key order included (test_national_manifests_satisfy_the_release_contract).test_assembled_release_has_the_release_contract_golden_shape).releases.jsonequals the emitter interface's serialization of one publication and one promotion,defaultapart, and this repository's reader parses the same record (test_each_releases_record_is_the_interface_writers_serialization). Each lists the C1 golden build as its release's current build, gives the release the role its manifest'sdataset_rolemaps to, and names it as the default (test_releases_record_lists_the_golden_build_as_its_releases_current_build). The loader selects each golden build through its record (test_loader_selects_each_golden_build_through_its_releases_record) and refuses it under the other role (test_loader_refuses_a_golden_build_under_the_other_role).registry.jsonequalsREGISTRY(test_registry_snapshot_matches_the_live_registry).test_release_contract_keying.pypins today's name-keyed contract, which C1 version 1 replaces at M3. An unlisted name gets the base file set and no model package, and the US requirements apply to the five names inUS_RELEASESand to thepopulace-us-prefix.publishes_to_build_folderadmits the UK national and dense releases, anymicrocosm-uk-2024-25-local-k<N>and the five US releases, and no unlisted name; the local-k case pins the gap Admit a UK local-area release to build folders only when the registry names its k #1586 tracks. In one test, a release that validates undermicrocosm-nz-2025-nationalfails under apopulace-us-name with nothing else changed.release_identitynoruk_runtimeexports any of the three helpers (test_exact_k_id_minting_is_retired).Gaps the document names
C5 version 1 and the other contracts list what main still lacks on 2026-11-12:
microcosm-publish-releaseandtools/publish_release.sh) joins the retire list and leaves once that refusal lands.release_contract.jsonnameslatest.json, and each country's owner changes its file before that country's first publication.microcosm-uk-2024-25-local-k<N>for eachNthe registry names, and the pull request that authorizes a k's first publication adds its registry entry. Todaypublishes_to_build_folderadmits every positiveNthrough_UK_LOCAL_LINE_RELEASE_ID_RE, while the registry names no UK local-area release. Admit a UK local-area release to build folders only when the registry names its k #1586 tracks the fix, under which the function admits a local-area release only when the registry names its k.latest_release,latest_line_release) andlatest_evidence_releasestill resolve throughlatest*.json, and the plan names no owner or milestone for removing them.tools/run_uk_cut.pystill builds the tagged publisher's arguments for the UK national release, whichprepare_releaserefuses. Moving it tomicrocosm-publish-release-buildfalls to the UK cut's owner.qualified_exact_pairbasis, and M2 settles whether version 1 names that basis or policyengine.py drops it.releases.json'sdefaultagrees with it.microcosm-us-2024-local(M2) or for any UK local-area release._check_local_area_release_manifestchecks no compatible-package list on local-area and dense builds, and C2 version 1 adds that check at M2 (owner: anth-volk). The recertification lane (Recertify a published US release for a newer policyengine-us without a rebuild #1366) writes entries that C2 version 1's rules 2 and 3 refuse. OnceRELEASE_MANIFEST_SCHEMA_VERSIONbecomes 2, no source enrichment and no recertification of a schema-1 parent passes its lane's validator. The plan does not yet say whether the rules exempt those lanes or the lanes change.microcosm-publish-release-buildhas no C3 or C4 rule for a derived build. At M3, version 1 adds the refusal: a derived build carries a pinned reference to its parent and its own step's outcome record, and no staging or Logbook record that another run wrote.uk_local_gates.json, and norelease_certification.json. The plan does not yet say whether that report counts as the dense line's certification.microcosm-us-2024-evidenceto the contract nor retires it, and the retire list names it as an exception.Merges with main
tools/assemble_uk_release_dir.pyby passing the marker throughuk_national_release_manifests.contract.pyand reworded one entry ofUS_EXPORT_INPUT_MASS_REVIEWED_EXCLUSIONSin the US builder. No golden reads either, so--checkpasses with nothing regenerated.Retire list
The document's table records each retire-now item of the 2026-10-09 report as GitHub and main showed it on 2026-10-15, and what a second reading found on 2026-11-11:
tools/build_uk_rowwise_dataset.pystays, because both drivers accept--candidate-clone-countsonly for a dry run.Tests
On 2026-11-12, at 06407f2 (this branch with main 6c64038 merged), unless an item says otherwise:
test_release.py,test_loader.py,test_registry.pyandtest_uk_release_publication.py: 401 passed and 2 skipped of 403. Both skips come from main's live-Hub test, which needs credentials. This branch's five files hold 106 of those tests, and all of them pass.tools/generate_release_contract_fixtures.py --checkexits 0 three times, with nothing regenerated.tools/ci_test_plan.py verifyreports ok for 942 test files.ruff checkandruff format --checkpass on the nine Python files this branch changes.--checkexit 1:built_atorpublisher_labels, and the UK description's wording;rewrite_release_dir's artifact keyrole, and its indent;US_RELEASES, and the role the interface'sadd_buildrecords;build_folder_filename;_release_gate_failuresseam.test_ci_integration_job.py -k agent_entrypoints, the one test that readsdocs/agent-guide.md, passes, and at f1a456a--checkexits 0 again.Review
An independent review of the code, fixtures and tests made 18 single changes to the fixture writers, their serializers, the live constants they embed and the generator, and
--checkfailed on each. It then broke what each of 27 test checks guards, one check at a time, and each of those tests failed. A second review opened the code behind 57 of the document's mechanism sentences and behind the eight sentences an earlier review had found unsupported, and each one held. A third review checked every sentence that the two later wording commits (e3cff13 and f1a456a) changed against the code, and found each one supported.axiom: n/a: release contract documentation and fixtures; no policy rule changes.
🤖 Generated with Claude Code