Skip to content

Put the release contract on paper and freeze C1 and C5 as golden fixtures (M0) - #1285

Open
MaxGhenis wants to merge 9 commits into
mainfrom
release-contract-m0
Open

MaxGhenis wants to merge 9 commits into
mainfrom
release-contract-m0

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Milestone M0 of the ARCH-1 end state Max ruled on 2026-10-15 (cos d1160). It puts the release contract on paper, freezes C1 and C5 as golden fixtures, and clears the 10-09 systems report's retire-now items that are still open. It turns no refusal on. Enforcement starts 2026-11-06 per the ruling; nothing here changes what publishes or any published number.

What changes

  • docs/release-contract.md (new). It covers:

    It replaces the branch-only us-uk-release-path.md. The emitter section follows what merged in Delegate local telemetry and graph publication to microcosm-emitter (deferred) #1153 (external microcosm-emitter), as d1162's note records.

  • tools/assemble_uk_release_dir.py. The two manifest dicts move into uk_national_release_manifests, a pure function. Output is byte-for-byte unchanged: I ran the old and new assembler on the green fixture with a fixed clock, and the manifests were identical in key order and the evidence files identical in bytes, apart from the NPZ digest, which changes on every run because zip entries carry timestamps.

  • tools/generate_release_contract_fixtures.py writes the golden fixtures under packages/microcosm-data/tests/fixtures/release_contract/v1/, following the staging-fixture pattern:

    • C1: the UK national build_manifest.json and release_manifest.json, written by the assembler's own function, plus inventory.json, read from the contract's constants (required files, the files shipped, the certification's kind, schema, fields, parts and signing-key variable).
    • C5: latest.json and latest-national.json, serialized exactly as publish_release uploads them, and registry.json.
    • SHA256SUMS and a --check mode.

    The fixtures carry no gate report or signed certification, on purpose: those embed the live UK gate-spec digests. uk/gates.json changed 94 times since 2026-09-01, so byte-frozen copies would churn almost daily.

  • Retired: format_uk_release_id, UKReleaseIdentity and apply_uk_release_identity. None had a caller outside its own tests and the re-export, in this repository or in policyengine.py, microcosm-dynamics or the benchmark, runs or emitter repositories. The line ids and tier vocabulary stay, and the contract still validates existing exact-k ids.

  • Changelog fragments, and pointers from README.md and docs/agent-guide.md.

Invariants the tests hold

  • Freeze: generate_release_contract_fixtures.py --check reproduces every committed byte. A change to the assembler's manifests, the contract's required files or certification fields, the pointer payloads or the registry fails it until the fixtures are regenerated. Mutation checks: rewording the manifest description failed --check, and renaming a registry file failed the C5 test.
  • C1 validity, for every input: a Hypothesis property (60 examples) holds that for any valid inputs, uk_national_release_manifests output:
    • passes _check_build_manifest, _check_release_manifest and the cross-manifest check;
    • pins every artifact to the one cut tag;
    • ships exactly the signed evidence files;
    • resolves through the registry's national spec in the loader;
    • is deterministic.
  • Golden validity: validate_release_dir on the golden UK directory raises exactly two failures, the two files the fixture omits (calibration_diagnostics.json, release_certification.json).
  • Differential, producer against consumer: the C5 pointers equal latest_pointer_payload / line_pointer_payload byte for byte and read back through latest_release / latest_line_release. The line pointer names the C1 release at its cut tag. registry.json equals REGISTRY.
  • Executable gap pins (test_release_contract_keying.py): today's id-string keying, which M3 flips deliberately. One test shows the same release bytes validate under microcosm-nz-2025-national and fail under a populace-us- id.

Retire list (checked 2026-10-15)

Review

  • Independent GPT-6.1 Sol review: queued (Subfleet job 20261015-061558-m0-1285-review). The Codex lanes reopen at about 14:53Z.
  • An Opus review is running in parallel.
  • Verdicts will be posted here.

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits October 15, 2026 06:01
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>
MaxGhenis and others added 3 commits October 15, 2026 06:13
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>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 15, 2026 10:16
- 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>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Opus 5.5 review of c2d50d8: REQUEST_CHANGES (0 blockers, 3 majors, 16 minors and nits). All 19 are addressed at 47389ec.

Majors:

  1. US Logbook writers. The doc wrongly listed tools/us_bundle_generation/core.py as a writer; it only reads and verifies logbook/us.jsonl. Corrected.
  2. Required lists. The "whatever the id" list overstated the compatible_model_packages requirement for ids the contract does not recognise. Now qualified.
  3. gates shape. The C1 golden carried a gates shape the national line never ships: a map from gate id to status, where the certifier writes a status census, {"passed": N}. Fixed in the generator and the property strategy. A new assembler test, test_assembled_release_has_the_release_contract_golden_shape, now holds a real assembly to the golden key for key and type for type, and holds its directory to the inventory's file list.

Design points, now settled in the doc:

  • C2 v1 generalizes the source-enrichment rule. Core stays exactly pinned, claims are bounded, admission uses PEP 440 equality, and the basis is attributed to the first matching claim.
  • Grandfathering is by published (release id, revision), not by id alone, because the UK lines keep constant ids across cuts.
  • Every id-keyed check (about 35 sites) and the pointer readers move to the declared country.
  • Remote staging delivery stays required as the pre-publication review, with a re-delivery path so an outage doesn't force a rebuild. The delivery gate moves into prepare_release.
  • The staging terminal document and the Logbook row ship inside the release directory, because the publisher can't see the build host.

Also: runtime is now copied rather than aliased, and the determinism property compares serialized bytes.

Local runs: 67 tests pass across the touched files, and generate_release_contract_fixtures.py --check passes. The review is at _reviews/microcosm-1285/opus-review-c2d50d8.md.

The independent GPT-6.1 Sol review is re-queued on 47389ec (Subfleet job 20261015-063645-m0-1285-review-b) and starts when the Codex lanes reopen, about 14:53Z. It will check each of these fixes and then review independently.

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>

This branch has not been deployed

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