You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build(release): check publish credentials before packing (#22)
* chore(release): authenticate both registries before packing
A stale credential used to surface at the very end of a publish. The last
release spent several minutes on tests, the engine-asset probe and the pack
before `npm publish` failed on an expired session, and `mcp-publisher` failed
after that - so every one of those steps had to be repeated.
Both logins now run first. Each has to succeed for the publish to happen
anyway, so checking them up front costs nothing and turns a late failure into
an immediate one.
Gated on --publish. Packing needs no credentials, and this script also runs as
a plain build step and inside the validation gate, where prompting for a login
would hang it. npm is only prompted for when `npm whoami` already fails, so an
existing session is left alone; it stays interactive because the account has
2FA.
The mcp-publisher login uses `gh auth token` because the MCP Registry decides
which namespaces a token may publish to by calling GET /user/memberships/orgs,
which needs the read:org scope. Its own device flow mints a token without that
scope, GitHub answers 403, and the registry treats the 403 as "no admin orgs"
rather than an error - so publishing silently degrades to io.github.<user>/*
and then fails on io.github.codegraph-ai/* with a message blaming organization
membership, which is not the cause. That cost a release cycle to diagnose, so
the reasoning is recorded next to the call. CODEGRAPH_MCP_TOKEN overrides it
for anyone preferring a PAT scoped to read:org alone, since gh's token also
carries repo and workflow.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rVbt7rENTwXkdHt3Bpgb5
* no-mistakes(review): mint MCP token at publish, preflight GitHub org ownership
* no-mistakes(document): document --publish credential prerequisites; fix shellcheck tr classes
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments