Skip to content

fix: repair the dead websiteUrl and guard the registry entry - #83

Merged
a-essawy merged 1 commit into
mainfrom
chore/registry-guards
Jul 26, 2026
Merged

fix: repair the dead websiteUrl and guard the registry entry#83
a-essawy merged 1 commit into
mainfrom
chore/registry-guards

Conversation

@a-essawy

Copy link
Copy Markdown
Contributor

The registry publish step is continue-on-error by design, since npm is the source of truth. The side effect is that anything wrong with server.json degrades to a warning in a log nobody reads.

What that already cost us

websiteUrl pointed at https://rendobar.com/docs/mcp/. That page moved to /docs/mcp-server when rendobar/docs#59 consolidated the MCP docs, and the old path now answers 405:

https://rendobar.com/docs/mcp/          HEAD=308  GET=405
https://rendobar.com/docs/mcp-server    HEAD=200  GET=200

That dead URL is live in published registry version 1.7.1 right now, and it is what aggregators show. package.json homepage had the same stale value. Both fixed here.

Nothing in CI would have caught it, and nothing would have caught the next one either.

The guard

scripts/check-registry-entry.mjs, its own CI job on every PR. It checks the things that break a publish after npm has already gone out:

  • server.json name vs package.json mcpName — a mismatch is a hard publish rejection
  • the three version fields release-please bumps via extra-files, against each other
  • packages[0].identifier vs the npm package name
  • description against the registry's 100-char cap
  • a remotes entry exists, so the hosted server cannot silently vanish from the listing again
  • every URL in the entry resolves

The URL check matters most for icons: they point at the brand CDN, synced from the monorepo, so this repo would never notice them going dead.

No dependencies. Node has fetch, and the failures that actually happen here are cross-file drift and dead URLs, not exotic schema violations — those get caught below.

Post-publish verification

release.yml now polls the registry after publishing until the released version is present and marked isLatest, failing the job if it never is. That routes into the existing rollback-on-failure job, which opens an issue. npm has already published at that point, so the fix is always forward — re-run once the cause is addressed.

Test plan

Guard, negative-tested by mutating a scratch copy. Baseline passes; every branch fails:

case result
baseline passes
version drift exit 1
name != mcpName exit 1
description 101 chars exit 1
remotes removed exit 1
non-https icon exit 1

Verification step, extracted from the workflow and run against the live registry:

case result
1.7.1 (live, latest) exit 0
1.7.0 (present, superseded) exit 1
9.9.9 (absent) exit 1

Also: all three workflow files parse as YAML, tsc --noEmit clean, eslint clean, 72/72 tests pass.

Two bugs found and fixed while testing the guard itself — a missing fetch timeout that hung the run past 120s, and process.exit() firing with a pending AbortSignal timer, which trips a libuv assertion on Windows and returns 127 instead of 1.

The registry entry is published by a step that is continue-on-error, so
anything wrong with it degrades to a warning in a log nobody reads. That
is how the docs restructure in rendobar/docs#59 went unnoticed here:
websiteUrl still pointed at /docs/mcp/, which now answers 405, and that
URL is live in published registry version 1.7.1. The page moved to
/docs/mcp-server. package.json homepage carried the same stale value.

Adds scripts/check-registry-entry.mjs, run as its own CI job on every
PR. It cross-checks the fields that break a publish after npm has
already gone out - server.json name against package.json mcpName, the
three release-please version fields against each other, the package
identifier - enforces the registry's 100-char description cap, asserts a
remotes entry exists, and fetches every URL in the entry. The icon URLs
are the fragile ones: they resolve to the brand CDN, which is synced
from a different repo, so nothing in this repo would otherwise notice
them going dead.

Also adds a post-publish verification step to release.yml that polls the
registry until the released version is present and marked latest, and
fails the job if it never is. That failure routes into the existing
rollback-on-failure job, which opens an issue. npm has already published
by then, so the fix is always forward.

The script takes no dependencies. Node has fetch, and the failures that
actually occur here are cross-file drift and dead URLs rather than
exotic schema violations, which the post-publish check catches anyway.
const signal = () => AbortSignal.timeout(15_000);
// Some hosts reject HEAD (Mintlify answers 405); fall back to a ranged
// GET rather than pulling the whole asset.
let res = await fetch(url, { method: "HEAD", redirect: "follow", signal: signal() });
// GET rather than pulling the whole asset.
let res = await fetch(url, { method: "HEAD", redirect: "follow", signal: signal() });
if (!res.ok) {
res = await fetch(url, {
@a-essawy
a-essawy merged commit 4056a53 into main Jul 26, 2026
8 checks passed
@a-essawy
a-essawy deleted the chore/registry-guards branch July 26, 2026 08:32
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.

2 participants