Skip to content

After the UK switch, publish UK national, dense and local-area builds only through the emitter - #1537

Merged
anth-volk merged 20 commits into
mainfrom
uk-assemblers-publish-through-emitter
Nov 9, 2026
Merged

anth-volk merged 20 commits into
mainfrom
uk-assemblers-publish-through-emitter

Conversation

@anth-volk

@anth-volk anth-volk commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1536 (tracker 2c · 2). Do not merge before the UK switch. This PR must merge straight after the switch commit in policyengine/populace-uk-private (tracker 2c · 4), which writes releases.json and deletes the latest*.json pointer files. Merged earlier, UK releases would have no working publication path: the emitter command refuses a repository that has pointer files, and after this PR the tagged publisher refuses UK releases.

Based on main at f85c46970; main has since gained three US-only commits, and the PR still merges without conflicts. Independent of #1534 (the switch tool), which makes the switch commit. Nothing in code enforces the order; the draft status and this description do.

What changes

After the switch, the UK national, dense and local-area releases publish and change their current build only through the emitter:

  • Assemblers. The UK national and dense assemblers write build-folder manifests:
    • the build is the calibration attempt ID;
    • build_id, attempt_id and cut_tag are gone, and both assemblers' --cut-tag option with them.
    • They print the microcosm-publish-release-build publication and promotion commands.
  • Release contract. It checks those releases in the build-folder layout only, and refuses the tagged one.
  • Tagged publisher. microcosm-publish-release and tools/publish_release.sh refuse those releases and lose --promote-line and line promotion. They keep publishing every US release with tags and latest.json.
  • Refusals. microcosm-publish-release-build refuses a release that does not publish into build folders, as build_folder_identity does, with one message: US releases publish through tools/publish_release.sh, and the June 2023 and populace-uk-<year>-<tier>-k<N> UK releases take no new builds once the UK repository records its builds in releases.json. The tagged publisher's refusal of a repository with releases.json says that only releases that publish into build folders publish there, through microcosm-publish-release-build, and that any other takes no new builds there. The emitter command's own pointer-file refusal says, in a repository without releases.json, that the switch has not run and to keep the files.
  • The June 2023 UK build. The switch moves the build latest.json names, populace-uk-2023-dd68c73-4aa4b14-20260619T023711Z, into its own folder as the only and current build of release populace-uk-2023 (Anthony's decision, tracker 2c · 4). The ("uk", 2023) registry entry now names that release, so microcosm.data.load("uk", 2023) reads it from releases.json after the switch and follows latest.json until then.

How it follows the tracker's recipe

Reverting #1505's split commits, newest first. The pairs are reverted in this order:

  • the docs (392deaaea);
  • the assemblers (42bb85771, ea2310c13);
  • the tagged publisher (fc324c8a8, 900a927a2);
  • the contract (666dfbd90, 660873b3a).

Within each pair I reverted the test commit before the code commit, so that each pair's failing tests are committed before the change that passes them. The two commits of a pair touch different files, so the final tree is the same in either order.

Keeping dataset_role_for_line. The contract revert would remove it, and microcosm.data.loader imports it, so without it import microcosm.data fails. It stays, with its docstring no longer saying that the publisher uses it. Only release.py's import of it goes, with the line promotion.

Stubbing the file listing in round 1's assembler publication test. test_an_assembled_national_build_publishes_through_the_emitter lists the repository's files from memory: one switched repository, with releases.json and no pointer files. So it never queries the private UK repository, and it checks that it listed only policyengine/populace-uk-private.

Dropping the UK promotion refusal test. test_the_tagged_publisher_refuses_a_uk_promotion_once_releases_json_exists (from ae0e3271a) is dropped:

  • the publisher has no line promotion any more, which test_the_tagged_publisher_has_no_pointer_promotion_option checks;
  • test_the_tagged_publisher_refuses_a_repository_with_releases_json still covers the refusal of a repository that has releases.json.

Resolving the microcosm-data README conflict with 0592245b2. The README takes the post-switch text and keeps two sentences of 0592245b2 that stay true after the switch:

  • an entry whose repository has no releases.json follows its pointer file, as US releases do;
  • a repository with releases.json refuses unverified_root.

Two edits inside revert commits, neither changing behavior. 519f0f069 reads the manifests' release and build with .get(), so a test fails on its assertion rather than a KeyError, and adds the in-memory file listing described above. 888dc521c rewrites the alert sentence in the comments of tools/publish_release.sh and tools/release.env.example.

Keeping two test fixtures. test_support/microcosm_data/release.py keeps _as_uk_national_line_release and _uk_hub, which reverting fc324c8a8 would remove, because tests added after it use them:

  • the emitter command's refusal of a tagged UK release (a7a039ec0);
  • the tagged publisher's refusal of a UK build-folder release (ae0e3271a).

The June 2023 release, beyond the recipe. The ("uk", 2023) entry names release populace-uk-2023; the README, the microcosm-data README, the agent guide, the national runbook, the comments of tools/publish_release.sh and tools/release.env.example and the 1536 fragment say where that build is after the switch, and no longer say that it keeps tags and latest.json. test_resolve_uk_2023_still_uses_latest_json becomes test_uk_2023_follows_latest_json_until_its_repository_has_releases_json: the loader now asks for releases.json first and, finding none, follows latest.json.

Rewriting the README section and changelog fragment that outlive the reverts.

  • README.
    • It describes the UK releases publishing only through the emitter, and every US release keeping tags and latest.json.
    • The June 2023 release and populace-uk-<year>-<tier>-k<N> releases have no publication path in the UK repository after its switch.
    • The "Build folders, after a repository's switch" section goes.
    • The restored text no longer says that release alerts stop until the dashboard posts them, since the calibration diagnostics dashboard now posts them from changes to releases.json.
  • Other docs. The national and dense runbooks, the agent guide, tools/publish_release.sh, tools/release.env.example and the dense assembler's docstring and comment no longer say that a promotion waits until the pointer files are deleted, since the switch deletes them in its own commit.
  • Changelog.

Changing the POINTER_FILES_PRESENT advice.

  • The emitter's refusal. The emitter refuses with POINTER_FILES_PRESENT when a latest*.json file appears after the command checked. The advice now says that nothing writes those files after a repository's switch, so find the commit that added it, remove it and run the command again. It no longer says to publish through tools/publish_release.sh, which refuses these releases.
  • The command's own refusal. The refusal the command makes when its own listing finds a pointer file said the same thing, and now gives the same advice. This one was not in the recipe; I changed it because otherwise the two commands would each send the operator to the other. Since review round 1 it gives that advice only in a repository with releases.json: without it, the repository has not switched, the loader follows its pointer files and the switch reads them, so the refusal says to run the switch and keep them.

Red-green

Every run selects tests by node ID, with HF_HUB_OFFLINE=1.

Change Failing tests committed Run before the change Change commit Run after it
Assemblers 519f0f069 4 failed on assertions: three equality assertions on the manifests and the summary, and one pytest.raises for the removed --cut-tag d76914774 4 passed
Tagged publisher 07ddeb20d 4 failed on assertions, 4 passed (tag-reuse tests moved to a US release, which pass either way) 888dc521c 8 passed
Contract 4bfce3b41 2 failed on assertions, 38 passed (tests rewritten to build-folder fixtures, which the both-layouts contract accepts) cd7ee53db 40 passed
POINTER_FILES_PRESENT advice 9efd12b11 1 failed on its assertion 5fcb30aad 1 passed
The command's listing refusal 993052e5b 6 failed on assertions 5fcb30aad 7 passed
The June 2023 release in the registry 1f4187a33 5 failed on assertions 66228be12 5 passed
Review round 1: refusals name each release's path 25f68d279 7 failed on assertions (the not-switched refusal twice, the June 2023 refusal, the tagged publisher's releases.json refusal three times, build_folder_identity), 8 passed 7220406d9 15 passed
Review round 1: stronger tests 18b998e81 (tests only) the --promote-line and --cut-tag checks now assert argparse's unrecognized-argument error; a new test hands an assembled dense build to the in-memory emitter none 3 passed
Review round 2: a tagged UK local-area release manifest cace6fcf2 (test only) the contract refuses its build object and per-artifact revisions none 1 passed

All 77 selected tests, from 49 node IDs, pass at cdbc10db3.

Node IDs (49, some parametrized)
packages/microcosm-build/tests/engine_free/shared/test_gate_battery_contract_pins.py::TestDenseLineMirrors::test_release_id_mirrors_the_build_shard
packages/microcosm-build/tests/engine_free/uk/test_uk_dense_release_assembler.py::test_an_assembled_dense_build_publishes_through_the_emitter
packages/microcosm-build/tests/engine_free/uk/test_uk_dense_release_assembler.py::test_assembler_stages_a_contract_valid_dense_release
packages/microcosm-build/tests/engine_free/uk/test_uk_release_assembler.py::test_an_assembled_national_build_publishes_through_the_emitter
packages/microcosm-build/tests/engine_free/uk/test_uk_release_assembler.py::test_assemble_green_release_dir
packages/microcosm-build/tests/engine_free/uk/test_uk_release_assembler.py::test_assemble_takes_no_cut_tag
packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py::test_pointer_files_refuse_a_build_made_current
packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py::test_the_command_refuses_a_release_that_still_publishes_with_tags
packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py::test_the_command_refuses_a_repository_that_has_not_switched_without_advising_removal
packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py::test_the_command_refuses_a_repository_with_pointer_files_before_an_emitter
packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py::test_the_command_refuses_a_tagged_uk_release
packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py::test_the_command_says_the_other_uk_releases_take_no_new_builds
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_artifact_paths_are_bare_file_names
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_build_must_be_a_safe_name
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_manifests_must_name_the_same_build
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_manifests_name_the_release_and_the_build
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_names_each_artifact_role
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_records_build_details_at_the_top_level
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_refuses_an_artifact_revision
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_refuses_the_retired_build_fields
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_refuses_the_tagged_manifest_shape
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_build_folder_release_must_be_the_directory
packages/microcosm-data/tests/engine_free/shared/test_contract.py::test_uk_national_release_requires_policyengine_uk_model_pin
packages/microcosm-data/tests/engine_free/shared/test_loader.py::test_resolve_uk_default_is_the_national_release
packages/microcosm-data/tests/engine_free/shared/test_loader.py::test_uk_2023_follows_latest_json_until_its_repository_has_releases_json
packages/microcosm-data/tests/engine_free/shared/test_loader.py::test_uk_2023_loads_the_june_build_from_its_folder_after_the_switch
packages/microcosm-data/tests/engine_free/shared/test_local_area_contract.py::test_uk_local_area_bundle_publishes_in_the_build_folder_layout
packages/microcosm-data/tests/engine_free/shared/test_local_area_contract.py::test_uk_local_area_bundle_refuses_a_tagged_release_manifest
packages/microcosm-data/tests/engine_free/shared/test_local_area_contract.py::test_uk_local_area_bundle_refuses_the_tagged_layout
packages/microcosm-data/tests/engine_free/shared/test_registry.py::test_only_the_uk_registry_entries_name_a_release
packages/microcosm-data/tests/engine_free/shared/test_registry.py::test_uk_2025_national_release_is_the_default_variant
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_build_folder_identity_says_where_a_tagged_release_publishes
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_prepare_build_folder_release_publishes_the_checksum_ledger
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_prepare_build_folder_release_refuses_a_tagged_release
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_publication_refuses_a_tag_that_describes_another_release
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_publish_then_promote_reuses_the_immutable_tag
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_retry_after_a_failed_pointer_commit_reuses_the_tag
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_the_tagged_publisher_has_no_pointer_promotion_option
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_the_tagged_publisher_refuses_a_repository_with_releases_json
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_the_tagged_publisher_refuses_every_build_folder_release
packages/microcosm-data/tests/engine_free/shared/test_release.py::test_transient_errors_while_checking_an_existing_tag_propagate
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_a_build_manifest_with_a_retired_build_field_is_rejected
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_a_dense_release_keeps_the_local_area_package_checks
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_a_dense_release_records_its_build_details_at_the_top_level
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_a_pinned_revision_is_rejected
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_a_release_manifest_naming_another_build_is_rejected
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_build_manifest_without_its_build_is_rejected
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_dense_bundle_names_its_release_and_build_in_both_manifests
packages/microcosm-data/tests/engine_free/uk/test_uk_dense_release_contract.py::test_other_local_area_ids_keep_the_generic_contract

Review round 1

A fresh reviewer read the PR at 66228be12. It found one bug and five code-quality points.

  • Bug: the command's listing refusal advised deleting pointer files before the switch. Fixed test-first in 25f68d279 → 7220406d9 (see the refusals bullet above).
  • Docstrings and messages that called the June 2023 and populace-uk-<year>-<tier>-k<N> releases tagged publications, and sent their operators from microcosm-publish-release-build to tools/publish_release.sh, which refuses the switched UK repository and sent them back. The messages are fixed in 7220406d9; the publishers' module docstrings, the loader docstring and the registry's release field docstring in 2741d54a5.
  • The national runbook's minimum emitter version (0.11.9; the command starts nothing older than 0.13.0) and the 1536 fragment's claim that only the national assembler lost --cut-tag. Fixed in 2741d54a5.
  • Comments about the dense commands and the tagged layout. The dense registry comment, a dense assembler test comment, the docstring of test_the_command_refuses_a_tagged_uk_release and a loader test comment are fixed in 2741d54a5.
  • Tests that passed on the old code. Fixed in 18b998e81, which also adds the dense end-to-end publication test.
  • Environment variables. See the next section. tools/release.env.example no longer asks for the UK webhook (2741d54a5); the wrapper's warning, which fires only when both webhooks are unset, is unchanged.

The reviewer could not check, from this repository, that the calibration diagnostics dashboard posts these releases' Slack alerts from changes to releases.json. Its main branch does: the Hugging Face webhook route compares releases.json before and after each update and posts the change, and its tests (frontend/app/api/hf-webhook/route.test.ts) cover that.

Review round 2

A fresh reviewer read the PR at 2741d54a5 and found no bugs; it checked round 1's fix and the June 2023 build's load before and after the switch. Its five code-quality points are addressed in cace6fcf2 and cdbc10db3:

  • the changelog fragment and this description said both publishers give the same refusal; they now say which gives which;
  • the publish CLI docstring, the comment on TAGGED_RELEASE_ADVICE and a test docstring said the June 2023 release keeps the tagged layout;
  • the dense registry, release-identity and contract comments called the dense release tag-only, and the per-build tag pattern's comment named the assembler, which no longer makes those tags; it now names the pointer-file reader and writer, which still use it;
  • the dense runbook lacked the Hugging Face token and emitter prerequisites, the signing key is also read by the release contract during publication, and the variables come from the shell (above);
  • test_uk_local_area_bundle_refuses_the_tagged_layout checks only a retired build field; cace6fcf2 adds a test of a tagged local-area release manifest.

The command's refusal in a repository that has not switched now names the switch tool's copy and switch steps.

Environment variables

No CI workflow, image, Terraform or Modal code changes. The variables the changed scripts and commands read all come from the operator's shell, or from the gitignored tools/release.env that tools/publish_release.sh sources; no GitHub Actions secret, Secret Manager secret or Modal secret is involved. Whether each is set on the build machine is not verified.

Variable Read by Provider
SLACK_WEBHOOK_POPULACE_US microcosm.data.slack.notify_release, through microcosm-publish-release operator's shell or tools/release.env
SLACK_WEBHOOK_POPULACE_UK the same; no publication reaches it after the UK switch operator's shell or tools/release.env
HF_TOKEN, then HUGGINGFACE_TOKEN, then the token saved by hf auth login microcosm-publish-release-build's file listing, and the emitter it starts, which inherits its environment operator's shell or saved login

UK publication no longer goes through tools/publish_release.sh, which sources tools/release.env, so microcosm-publish-release-build takes its variables from the operator's shell only; both runbooks now say to source tools/release.env first if the values are kept there.
| MICROCOSM_UK_TERMINAL_GATE_SIGNING_KEY | the assemblers and the release contract, which microcosm-publish-release-build runs, to verify the copied certification (unchanged by this PR) | operator's shell |

Open, and not in this PR

🤖 Generated with Claude Code

anth-volk and others added 12 commits November 6, 2026 21:03
This reverts commit 392deaa, so the docs describe UK releases publishing
into build folders through the emitter after the UK switch. The conflict in
microcosm-data's README with 0592245 is resolved to the post-switch text,
keeping 0592245's sentences that stay true after the switch: an entry
whose repository has no releases.json follows its pointer file, and a
repository with releases.json refuses unverified_root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d commands"

This reverts commit 42bb857, so the UK assembler tests expect build-folder
manifests and the emitter publication and promotion commands again. They
fail until the next commit reverts ea2310c. Two changes beyond the revert:

- The national publication test lists the repository's files from memory
  (one switched repository, with releases.json and no pointer files), so it
  never queries the private UK repository.
- The tests read the manifests' and summaries' new fields with .get(), and
  the publication test checks that the manifest names its build before
  publishing, so that against the tagged assemblers they fail on their
  assertions rather than on a missing key or the publication's refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit ea2310c. The UK national and dense assemblers write
build-folder manifests again (release and build as strings, the build
details at the top level, a role on each artifact and no revision) and
print the emitter's publication and promotion commands, for use once the
UK repository has switched to releases.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he pointer files"

This reverts commit fc324c8, so the tests expect the tagged publisher to
refuse every UK build-folder release and to have no pointer promotion
option, and the tests of tag reuse run on a US release again. They fail
until the next commit reverts 900a927. Beyond the revert:

- test_support keeps _as_uk_national_line_release and _uk_hub, which tests
  added after fc324c8 use (the emitter command's refusal of a tagged UK
  release, and the tagged publisher's refusal of a UK build-folder one).
- The UK promotion refusal test that ae0e327 added,
  test_the_tagged_publisher_refuses_a_uk_promotion_once_releases_json_exists,
  is dropped: the publisher loses its line promotion, and
  test_the_tagged_publisher_refuses_a_repository_with_releases_json still
  covers its refusal of a repository that has releases.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… files"

This reverts commit 900a927. The tagged publisher (microcosm-publish-release
and tools/publish_release.sh) refuses every UK national, dense and
local-area release, which publish into build folders through the emitter
after the UK switch, and loses its --promote-line option and line
promotion. dataset_role_for_line stays in the contract, which the loader
uses; only this module's import of it goes.

Beyond the revert, publish_release.sh and release.env.example say that the
calibration diagnostics dashboard posts those releases' Slack alerts from
changes to releases.json, which it now does, instead of that they send none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… switch"

This reverts commit 666dfbd, so the contract tests expect the UK
national, dense and local-area releases in the build-folder layout only,
and the tagged layout refused for them. Two of them fail until the next
commit reverts 660873b: the national refusal of the tagged manifest
shape, and the dense contract's lack of a tag pattern. The others pass on
both layouts' contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 660873b. The release contract checks the UK
national, dense and local-area releases in the build-folder layout only
and refuses the tagged one, as they publish after the UK switch.

dataset_role_for_line stays: the loader imports it to check a manifest that
reached a latest-<line>.json pointer, so without it `import microcosm.data`
fails. Its docstring no longer says the publisher uses it, since the
tagged publisher's line promotion is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…agged publisher

After the UK switch the tagged publisher refuses the UK national, dense
and local-area releases, so when the emitter refuses a change with
POINTER_FILES_PRESENT (a latest*.json file that appeared after the
command's own check), the advice must say to remove that file rather than
to publish through tools/publish_release.sh. It fails until the next
commit changes the advice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iles

The command lists the repository's files and refuses, before any emitter
starts, while a latest*.json file is there. After the UK switch the tagged
publisher refuses these releases, so the refusal must say to remove the
file rather than to publish through tools/publish_release.sh, as the
emitter's POINTER_FILES_PRESENT advice now does. It fails until the next
commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After the UK switch the tagged publisher refuses the UK national, dense
and local-area releases, so neither refusal may send operators to
tools/publish_release.sh:

- the emitter's POINTER_FILES_PRESENT refusal (a latest*.json file that
  appeared after the command checked) now says that nothing writes those
  files after a repository's switch, so find the commit that added it,
  remove it and run the command again;
- the command's own refusal, while its listing finds a pointer file, says
  the same.

The module docstring describes the switch deleting the pointer files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs the reverts restored, and the parts of 0592245 that outlive
them, described a world before the switch: the README's "Build folders,
after a repository's switch" section, release alerts that stop until the
dashboard posts them, and promotions that wait until the pointer files are
deleted. The switch deletes them in its own commit, and the dashboard
posts alerts from changes to releases.json, so:

- the README describes the UK releases publishing only through the
  emitter, every US release keeping tags and latest.json, and the June
  2023 and populace-uk-<year>-<tier>-k<N> releases having no publication
  path in the UK repository after its switch; the section from 0592245
  goes;
- the national and dense runbooks, the agent guide and the dense
  assembler's docstring and comment say that the switch deleted the pointer
  files, and that the command refuses only if one appears again;
- #1505's changelog fragment no longer says UK releases stay on the
  pointer files, and a new fragment describes this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk and others added 2 commits November 6, 2026 22:49
…1536)

The UK switch moves the build latest.json names into release
populace-uk-2023 and deletes latest.json. The ("uk", 2023) registry entry
must name that release, read its current build from releases.json once the
repository has one, and follow latest.json until then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The UK switch moves the build latest.json names into its own folder as the
only and current build of release populace-uk-2023, under its old release
ID, and deletes latest.json. The ("uk", 2023) registry entry now names that
release, so load("uk", 2023) reads it from releases.json after the switch
and follows latest.json until then. The docs, the publish script's and the
release alert template's comments, and the changelog fragment no longer say
that the June 2023 release keeps tags and latest.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk and others added 6 commits November 7, 2026 01:05
Before its switch a repository's pointer files are what the loader follows
and what the switch reads, so the command's own listing refusal must say the
repository has not switched instead of advising their removal. The June 2023
UK release keeps the tagged layout, but neither publisher takes its builds
once the UK repository records them in releases.json, so the refusals must
say so instead of sending the operator from one publisher to the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The command's own pointer-file refusal now checks for releases.json: without
it the repository has not switched, so the refusal says to run the switch
and keep the files, which the loader follows and the switch reads. Both
publishers' refusals of a release that does not publish into build folders
share one message: US releases publish through tools/publish_release.sh,
and the June 2023 and populace-uk-<year>-<tier>-k<N> UK releases take no
new builds once the UK repository records its builds in releases.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1536)

The checks that --promote-line and --cut-tag are gone now assert argparse's
unrecognized-argument error, which the old options could not produce; the
bare SystemExit also passed on the old code. An assembled dense build is
handed to the in-memory emitter, as the national build already is, with its
release, build, role and every file's role.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ter the switch (#1536)

The publishers' module docstrings now say the June 2023 and
populace-uk-<year>-<tier>-k<N> UK releases take no new builds after the UK
switch, instead of publishing with tags and latest.json. The loader and the
registry's release field account for the UK 2023 entry, whose one build the
switch moves into a folder. The dense registry comment and test comment say
a dense build becomes current by promotion or --make-current. The national
runbook's minimum emitter is 0.13.0, the version the command starts; the
changelog fragment says both assemblers lost --cut-tag and records the new
refusals; the alert settings template no longer asks for the UK webhook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1536)

The existing test of the tagged layout adds only a retired build field to
the build manifest. This one gives the release manifest the tagged layout's
build object and per-artifact revisions, and checks that the contract
refuses both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…comments (#1536)

The publish CLI docstring, the comment on TAGGED_RELEASE_ADVICE and a test
docstring no longer say the June 2023 release keeps the tagged layout; the
switch moves its build into a build folder of release populace-uk-2023. The
dense registry, release-identity and contract comments no longer call the
dense release tag-only, and the per-build tag pattern's comment says what
reads it now: the pointer-file reader and writer. The not-switched refusal
names the switch tool's copy and switch steps. The changelog fragment says
which publisher gives which refusal. Both runbooks say the publication
command's contract check reads the signing key and that the command reads
its variables from the shell, not tools/release.env; the dense runbook gains
the Hugging Face token and emitter prerequisites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anth-volk
anth-volk marked this pull request as ready for review November 9, 2026 13:53
@anth-volk
anth-volk merged commit 1acd884 into main Nov 9, 2026
11 checks passed
@anth-volk
anth-volk deleted the uk-assemblers-publish-through-emitter branch November 9, 2026 13:54
DTrim99 added a commit that referenced this pull request Nov 9, 2026
Main brings #1533/#1536/#1537 (UK build-folder switch and publication
through the emitter), #1518 and #1549. No conflicts; none of the 46 files
overlaps this branch. repin_us_spec_engine_contracts --check,
generate_us_bundle_from_constants --check (spec_sha256 23366c65),
spec_engine_coverage --check (42451/42451 fields, 41/41 checks) and
repin_us_pool_engine_contracts --check are clean; the release input
coverage manifest and the H3 parity fixture regenerate unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Nov 12, 2026
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>
MaxGhenis added a commit that referenced this pull request Nov 12, 2026
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>
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.

After the UK switch, publish UK national, dense and local-area builds only through the emitter

1 participant