Skip to content

Remove the tagged publisher, microcosm-publish-release - #1797

Merged
anth-volk merged 7 commits into
mainfrom
claude/remove-tagged-publisher
Nov 27, 2026
Merged

anth-volk merged 7 commits into
mainfrom
claude/remove-tagged-publisher

Conversation

@anth-volk

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

Copy link
Copy Markdown
Contributor

Fixes #1796

Base: main. Tracker: "1. Collector/Emitter", task 5b · 10 ("Microcosm: Remove microcosm-publish-release").

Merge waits for tracker task 5b · 9 (the read-only confirmation that BE's release repository publishes with releases.json) to be done, and for Anthony to mark this ready and merge it.

Why

microcosm-publish-release (microcosm.data.publish_cli, wrapped by tools/publish_release.sh) is the tagged publisher: publish_release commits a release's files to Hugging Face directly, creates an immutable tag and writes a latest*.json pointer file. It refuses every release that publishes_to_build_folder names and every repository that records its builds in releases.json. Since BE's release repository switched on 2026-11-26, the US, UK and BE repositories all do, so the command serves no repository. Every release build publishes through the emitter with microcosm-publish-release-build.

What this does

  • Removed: the microcosm-publish-release entry point (packages/microcosm-data/pyproject.toml), microcosm/data/publish_cli.py and tools/publish_release.sh.
  • microcosm.data.release: publish_release, prepare_release, PreparedRelease and the private helpers only they used (_publish_atomic, _commit_operations, _refuse_releases_record, _refuse_build_folder_release, the tag helpers, the manifest artifact helpers and the reserved pointer-path pattern) are gone. microcosm.data no longer exports publish_release. The module docstring now describes build-folder preparation and the pointer readers that remain.
  • microcosm.data.source_enrichment: is_receipt_enrichment, whose only caller was prepare_release's refusal to move latest.json to a reported-receipt enrichment, is gone.
  • Moved: publication_refusal and its checks (non-release smoke output, a reform validation that skipped its out-of-sample reforms, undelivered staging) move from publish_cli into microcosm.data.release, beside prepare_build_folder_release. microcosm-publish-release-build imports them from there; their code is unchanged.
  • Slack: microcosm.data.slack, whose only caller was publish_release, is gone, with its test and the Slack webhook settings in tools/release.env.example and the README. No release command sends an alert; the calibration diagnostics dashboard posts them from changes to releases.json, as before.
  • Ruff's Hugging Face import list (root pyproject.toml): release.py keeps its exemption and moves to the datasets group, because missing_on_hub and never_cached_offline, which the loader's releases.json read uses, import huggingface_hub, as do the pointer readers.
  • Docs and changelog: docs/release-contract.md (one publication command; the "new country's tagged publish" gap is closed; the retire-list row records the removal), README.md, docs/agent-guide.md, changelog.d/remove-tagged-publisher.removed.md.

After this, no command publishes a release that publishes_to_build_folder doesn't name. AM's and NZ's releases join it, and the registry, in the pull request that authorizes their first publication, as the release contract already plans.

Tests

  • packages/microcosm-data/tests/engine_free/shared/test_tagged_publisher_removed.py (new): no package's project file declares microcosm-publish-release or a script in publish_cli; microcosm.data.publish_cli and microcosm.data.slack cannot be found; neither microcosm.data nor microcosm.data.release has publish_release, prepare_release or PreparedRelease; microcosm.data.source_enrichment has no is_receipt_enrichment; publication_refusal is in microcosm.data.release and refuses non-release smoke output; tools/publish_release.sh is gone, and no code, shell, configuration, Markdown or YAML file under tools/, packages/*/src or .github/workflows names the old module, command or wrapper, prepare_release, PreparedRelease, notify_release or microcosm.data.slack.
  • The tagged publisher's own tests are removed: 62 in test_release.py, 5 in test_source_enrichment.py, 2 in test_local_area_contract.py, 1 each in test_compatibility_recertification.py and test_be_build_folder_releases.py, the command-option tests in test_publish_guard.py, and test_slack.py.
  • Kept or ported where a removed test also held a check that build-folder publication relies on:
    • test_publish_guard.py tests the publication checks by calling publication_refusal directly.
    • test_release.py keeps the build-folder half of the unregistered UK local-area refusal, reads a seeded pointer where it used to publish one first, and gains three prepare_build_folder_release tests: a build whose diagnostics generation failed publishes its dataset with a warning and no diagnostics file; a US build lists the gate evidence its manifest binds from its own directory; and a release contract warning is repeated as a warning and listed with the build, never refused (microcosm#1301).
    • test_us_release_publication.py gains a test that --preflight-only lists the contract warnings in its verdict and still passes.
    • test_source_enrichment.py replays the release contract with validate_release_dir where it used the tagged preflight.
    • test_us_fiscal_refresh_builder.py reads the manifest's declared artifacts with two test helpers instead of the removed publisher helpers.
    • test_release_contract_keying.py, test_us_receipt_enrichment_release.py, test_us_spm_role_enrichment_builder.py and test_transport_evidence_kernels.py drop their references to the removed code.

Commits

  • 7409a5f5e adds the new tests, which failed on assertions before the change (5 failing).
  • f1206201e is the change.
  • Review round 1: fba3d1800 (tests) restores coverage of the contract-warning rule and widens the removal test's scan; c8a55d951 (fixes) corrects three doc sentences, the README's wording and the Ruff comment, and removes helpers only the removed tests used.
  • Review round 2: 14173caf8 (tests, one failing on an assertion before the fix) checks that is_receipt_enrichment is gone, reads every package's console scripts and widens the scan to the removed function names; 08dd69f40 (fixes) removes is_receipt_enrichment and an unused test constant, corrects the agent guide's annual-build paragraph and three source comments, keeps the release contract's 2026-11-12 gap list accurate for its date, and limits "every release publishes" wording to the releases publishes_to_build_folder names.
  • Review round 3: 254e962d4 corrects the release contract's sentence on who calls the pointer payload builders and dates one clause of its 2026-11-12 gap list.

Review rounds

  • Round 1 (head f1206201e): one medium-priority bug, the release-contract warning rule (microcosm#1301) left without a test on the build-folder path, fixed by two new tests; one low-priority bug, three doc sentences still describing the old command or two publication commands, fixed. Code-quality findings fixed: the removal test's scan, unused test helpers, two _hf_api patches that could not fire, the Ruff comment and the README's wording.
  • Round 2 (head c8a55d951): one low-priority bug, the agent guide's paragraph saying no annual build can publish, fixed. Code-quality findings fixed: three source comments naming two publishers, is_receipt_enrichment and a test constant with no caller, the release contract's dated sections, the remaining "every release publishes" wording, and the scan's coverage of the removed function names and other packages' console scripts.
  • Round 3 (head 08dd69f40, the last round): one low-priority bug, the release contract saying only tests call the pointer payload builders, when _read_pointer and _current_evidence_build call latest_pointer_payload; fixed in 254e962d4, with the dated clause it also found. Left: when microcosm-publish-release-build refuses a release publishes_to_build_folder doesn't name (an AM or NZ build, for example), its advice (TAGGED_RELEASE_ADVICE) names the US and BE releases and doesn't say that a new country's release joins publishes_to_build_folder first; that message predates this PR and is unchanged.

Not in this PR

  • The pointer readers (latest_release, latest_line_release, latest_evidence_release, the loader's pointer fallback), the pointer constants and the pointer payload builders: tracker task 5b · 12.
  • The build-folder switch tool, whose comments still describe the tagged publisher's staging branches: tracker task 5b · 11.
  • tools/run_uk_cut.py, which Publish run_uk_cut.py builds through the emitter and refuse new direct Hugging Face imports #1743 already moved to microcosm-publish-release-build.
  • tools/route_a/route_a.sh still unsets SLACK_WEBHOOK_POPULACE_US and SLACK_WEBHOOK_POPULACE_UK and sets POPULACE_RELEASE_ENV=/dev/null for its preflights, and its README says so. Nothing reads these variables now, so the settings do nothing; they are left to keep this PR out of the build driver.
  • The shared FakeHub keeps its commit, branch, tag and upload methods, which no remaining test calls.

Environment variables

No workflow, Dockerfile or deploy script changes. The variables the change touches are SLACK_WEBHOOK_POPULACE_US and SLACK_WEBHOOK_POPULACE_UK, which only the removed Slack module read, and POPULACE_RELEASE_ENV, which only the removed shell wrapper read. Each came from the operator's shell or the build machine's git-ignored tools/release.env; nothing reads any of them now, and tools/release.env.example no longer declares the two Slack variables.

🤖 Generated with Claude Code

anth-volk and others added 7 commits November 27, 2026 18:07
microcosm-publish-release commits, tags and writes latest*.json pointer
files on Hugging Face directly, and refuses every repository that records
its builds in releases.json, which the US, UK and BE repositories all do.
These tests fail until the command, its module, the shell wrapper, the
publish_release and prepare_release functions and the Slack alert only
publish_release sent are gone, and until publication_refusal, which
microcosm-publish-release-build runs, lives in microcosm.data.release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
microcosm-publish-release (microcosm.data.publish_cli, wrapped by
tools/publish_release.sh) committed a release's files to Hugging Face
directly, tagged them and wrote a latest*.json pointer file. It refused
every repository that records its builds in releases.json, which the US,
UK and BE release repositories all do since BE's switch, so it served no
repository.

The command, its module and the wrapper go, and so do publish_release,
prepare_release, PreparedRelease and the private helpers only they used.
microcosm.data no longer exports publish_release, and microcosm.data.slack,
whose only caller was publish_release, goes with the Slack webhook settings
in tools/release.env.example and the README. publication_refusal and its
checks, which microcosm-publish-release-build runs, move into
microcosm.data.release beside prepare_build_folder_release.

The tagged publisher's tests go. The build-folder half of the unregistered
UK local-area refusal stays; the two pointer round trips now read a seeded
pointer; prepare_build_folder_release gains the two checks only the
tagged tests held (a build whose diagnostics generation failed, and the
gate evidence a US build binds); the publication checks are tested
directly; and the fiscal-refresh tests read the manifest's declared
artifacts themselves. The release contract, the README and the agent
guide describe one publication command. The pointer readers, their
constants and payload builders, and the build-folder switch stay for the
tasks that remove them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1 of #1797: removing the tagged publisher's tests left no
test of the microcosm#1301 rule on the build-folder path, that a release
contract warning is repeated as a warning, listed with the build and in
the --preflight-only verdict, and never refuses. prepare_build_folder_release
and microcosm-publish-release-build each gain one.

The removal test's scan also finds any import of publish_cli, the shell
wrapper's name, and references in Markdown, YAML and the CI workflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1 of #1797. Three sentences still spoke of the tagged
publisher as present or of two publication commands: the agent guide's
note on tag-pinned annual builds, and the release contract's registry
paragraph and its plan for the staging delivery check. The README now
says only releases that publishes_to_build_folder names publish.

Ruff's TID251 exemption for release.py moves to the datasets group:
missing_on_hub and never_cached_offline, which the loader's releases.json
read uses, import huggingface_hub too, so the exemption outlives the
pointer readers.

The unused helpers the removed tests left (_write_uk_build_folder_release,
_RELEASES_RECORD and _TagMessageHub in test_release, NonAtomicHub,
_declare_root_artifact, _uk_hub and the annual_release fixture in the
shared release fixtures) go, and so do two _hf_api patches that wrapped
only prepare_build_folder_release, which builds no Hub client. The test
of TAGGED_RELEASE_ADVICE is renamed for the refusal that still gives it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 of #1797. is_receipt_enrichment had one caller, the
tagged publisher's refusal to move latest.json to a reported-receipt
enrichment, and has none since; a test now fails until it goes. The
removal test also reads every package's console scripts, and its scan
finds prepare_release, PreparedRelease, notify_release and
microcosm.data.slack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 of #1797. The agent guide said no annual build can
publish; it now limits that to the tagged annual layout and points new
annual builds at microcosm-us-2024-annual in their own folders.
is_receipt_enrichment, whose only caller was the tagged publisher, goes,
and so does JUNE_UK_RELEASE_ID, which only a removed helper used. The
registry, the contract and the recertification module no longer speak of
two publishers. The release contract's 2026-11-12 gap list keeps the two
tagged-publisher gaps of that date with what has changed since, and the
changelog fragment, the example release environment file and
microcosm.data.release's docstring say that only releases
publishes_to_build_folder names publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 3 of #1797. The release contract said only tests call the
payload builders, but _read_pointer and _current_evidence_build call
latest_pointer_payload; only tests call the other two. The 2026-11-12
item about a new country's tagged publish now dates the UK local-area
exception to microcosm#1586 (2026-11-14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anth-volk
anth-volk marked this pull request as ready for review November 27, 2026 19:47
@anth-volk
anth-volk merged commit 8ea088d into main Nov 27, 2026
12 checks passed
@anth-volk
anth-volk deleted the claude/remove-tagged-publisher branch November 27, 2026 19:47
anth-volk added a commit that referenced this pull request Nov 27, 2026
Brings in #1797, which removed the tagged publisher. Conflicts resolved:
- pyproject.toml: main moved microcosm.data.release's TID251 exemption
  into its datasets group and kept one for the switch module; both
  entries in the conflicted block go, since the module is removed.
- release_publication.py's docstring: this branch's removal of "the
  switch reads them" with main's sentence that the tagged publisher is
  gone.
- docs/release-contract.md: this branch's past-tense lines on the
  switch tool with main's rewritten pointer-files bullet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk added a commit that referenced this pull request Nov 27, 2026
…ile removal (#1794)

main removed the tagged publisher and this branch removed the pointer-file
readers, so in microcosm.data.release, microcosm.data's exports, the release
tests and their helpers neither side's names stay. With publish_release gone,
nothing calls the pointer writers either, so they go in the resolution:
latest_pointer_payload, latest_evidence_pointer_payload, LATEST_POINTER_PATH,
LATEST_EVIDENCE_POINTER_PATH, LATEST_POINTER_SCHEMA_VERSION and
RELEASE_TIER_EVIDENCE, with the tests and the comment that only they used.

The publication command's docstring, the agent guide and
docs/release-contract.md keep this branch's account of the pointer files and
main's account of the tagged publisher's removal. The text main added on the
pointer readers and on line_for_release_id goes, since this branch removes
them, as does the ruff configuration comment on release.py's pointer readers.

Co-Authored-By: Claude Opus 5.5 <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.

Remove the tagged publisher, microcosm-publish-release

1 participant