Skip to content

Commit e4cb304

Browse files
committed
fix(release): publish the MCP registry entry after the release is public
v0.10.3 published, then failed: MCPB package '...codebase-memory-mcp-darwin-amd64.mcpb' is not publicly accessible (status: 404) publish-mcp-registry and publish-final both needed only publish-registries, so they ran in PARALLEL — and publish-final is the job that un-drafts the release. The registry validates every package URL it is handed by fetching it, and a draft release's assets are not publicly readable. The registry lost the race by five seconds; the identical URL served 200 once the release went public, and the job passed on a plain re-run. The registry now needs publish-final. This keeps the documented intent exactly: publish-final still does NOT depend on the registry, so a registry-preview outage can never block shipping — the registry simply runs after the assets it validates exist to the outside world. The gate-chain contract now pins BOTH directions, because either one alone is a bug: the registry must depend on publish-final, and publish-final must never depend on the registry. Verified by reverting the ordering — the contract goes red with the exact v0.10.3 failure, and green again with it restored. This is the second latent defect the .mcpb path produced on its first real release (after the security-strings audit treating a manifest as a binary). Both were invisible until a stable release ran; an end-to-end bundle gate is worth adding before the next one. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 1649fa8 commit e4cb304

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,23 @@ jobs:
409409
# product, the registry entry is metadata. A registry-preview outage
410410
# must never block shipping. Re-run this job alone to retry — it does
411411
# not touch npm/PyPI, so retries are safe.
412+
#
413+
# It DOES depend on publish-final, which is the job that un-drafts the
414+
# release. Both used to need only publish-registries, so they raced: the
415+
# registry validates every package URL it is given by fetching it, and a
416+
# DRAFT release's assets are not publicly readable. In v0.10.3 the registry
417+
# ran 5s before the un-draft and was told its own .mcpb URL was a 404:
418+
# MCPB package '...codebase-memory-mcp-darwin-amd64.mcpb' is not publicly
419+
# accessible (status: 404)
420+
# The same URL served 200 once the release went public, and the job passed on
421+
# a plain re-run. Depending on publish-final keeps the documented intent
422+
# exactly — the registry still cannot block the release, it just runs after
423+
# the assets it validates actually exist to the outside world.
412424
publish-mcp-registry:
413-
needs: [publish-registries]
425+
needs: [publish-registries, publish-final]
414426
# Skipped for prereleases: the MCP Registry has no channel concept, so an
415427
# RC would present itself as the current version to every registry consumer.
416-
if: ${{ !cancelled() && !failure() && needs.publish-registries.result == 'success' && !contains(inputs.version, '-') }}
428+
if: ${{ !cancelled() && !failure() && needs.publish-registries.result == 'success' && needs.publish-final.result == 'success' && !contains(inputs.version, '-') }}
417429
runs-on: ubuntu-latest
418430
permissions:
419431
id-token: write # GitHub OIDC auth to the MCP Registry

‎tests/test_release_gate_chain_contract.sh‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,31 @@ if "needs.soak.result" not in draft:
8484
" legitimately skipped soak (soak_level=none) is distinguishable\n"
8585
" from a soak that never ran.")
8686
87+
# The MCP registry validates every package URL it is handed by FETCHING it, and
88+
# a DRAFT release's assets are not publicly readable. publish-final is the job
89+
# that un-drafts. Both jobs used to need only publish-registries, so they raced
90+
# and the registry was told its own .mcpb URL was a 404 (v0.10.3). The registry
91+
# must therefore run AFTER the release is public — while still never gating it.
92+
def needs(job):
93+
"""The job's `needs:` list as a single line."""
94+
m = re.search(r"^ needs:\s*(.*)$", blocks.get(job, ""), re.M)
95+
return m.group(1).strip() if m else ""
96+
97+
if "publish-mcp-registry" not in blocks:
98+
failures.append("publish-mcp-registry: job missing from release.yml — update this contract")
99+
elif "publish-final" not in needs("publish-mcp-registry"):
100+
failures.append(
101+
"publish-mcp-registry: must `needs:` publish-final. The registry fetches\n"
102+
" the .mcpb URLs it validates, and a draft release's assets 404 —\n"
103+
" running it in parallel with the un-draft is a race it loses.")
104+
105+
# ...and the reverse must NEVER hold: a registry outage must not block shipping.
106+
if "publish-final" in blocks and "publish-mcp-registry" in needs("publish-final"):
107+
failures.append(
108+
"publish-final: must NOT depend on publish-mcp-registry. The binary\n"
109+
" release is the product and the registry entry is metadata; a\n"
110+
" registry-preview outage must never hold up a release.")
111+
87112
if failures:
88113
for f in failures:
89114
print("FAIL: " + f, file=sys.stderr)

0 commit comments

Comments
 (0)