Skip to content

fix(release): retry connection-level and expired-JWT MCP publish failures - #181

Merged
Mearman merged 2 commits into
mainfrom
fix/mcp-registry-retry-gap
Sep 17, 2026
Merged

Mearman merged 2 commits into
mainfrom
fix/mcp-registry-retry-gap

Conversation

@Mearman

@Mearman Mearman commented Sep 17, 2026

Copy link
Copy Markdown
Member

Closes #180

Two more failure modes of the Release job's MCP-registry publish step weren't recognised as retryable by isRetryablePublishFailure, so the release failed outright instead of retrying, leaving a git tag with no matching npm package or GitHub release.

  • A raw connection-level failure with no HTTP status (dial tcp / i/o timeout / connection refused).
  • A 401 caused by the login JWT expiring mid-retry-window (mcp-publisher login github-oidc runs once before the retry loop starts).

isRetryablePublishFailure now recognises both. For the JWT case, scripts/publish-mcp-registry.ts also re-runs the login step before every retry attempt (not just the JWT-expiry retries), since retrying with the same expired token would just 401 again and a fresh login before any other retryable failure is harmless.

…lures

isRetryablePublishFailure only recognised npm-propagation-lag and 5xx
failures, so a raw connection timeout (no HTTP status at all) or a 401
caused by the login JWT expiring mid-retry-window failed the release
job outright instead of retrying, leaving a git tag with no matching
npm package or GitHub release.

Add isConnectionError to match Go net-error text (dial tcp, i/o
timeout, connection refused, connection reset, no such host) from
mcp-publisher's own HTTP client. Add isExpiredJwt to match a 401 whose
body specifically says the token is expired, deliberately excluding a
401 from a genuine authorisation failure, which retrying can never
fix regardless of how fresh the token is.
mcp-publisher only logged in once, before the retry loop started, so
a retry attempt late enough in the 15-minute budget presented a JWT
that had since expired. Retrying with the same expired token just
401s again, so the classifier alone can't fix this: run the login
step again before every retry attempt, mint a fresh token, and let
the next publish attempt use it.
@Mearman
Mearman marked this pull request as ready for review September 17, 2026 17:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-17T17:19:43.921917Z 46ebbb3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 9f77176 into main Sep 17, 2026
6 checks passed
@Mearman
Mearman deleted the fix/mcp-registry-retry-gap branch September 17, 2026 17:20
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release job's MCP registry publish retry doesn't cover connection timeouts or expired JWT

1 participant