fix(mcp): link the public repository from the registry manifest - #14
Merged
Merged
Conversation
server.json omitted `repository` because the server's source was private. 0.2.0 shipped one pointing at a repo that 404'd for everyone outside the org, and the field was dropped rather than publish a link nobody could open. ShiplightAI/shiplight-cli is public now and holds this source, so the premise is gone and registry readers have no way to reach the code. Both the url and `subfolder: apps/mcp-server` come from the instructions the existing tests left for this moment; the url returns HTTP 200 to an anonymous request, and `mcp-publisher validate` accepts the manifest with subfolder included. Two tests pinned the field absent and each documented how to invert it. Both now assert the link, and both fail against the pre-change manifest. The well-formedness guard in server-json-registry-manifest.test.ts was written to be vacuous while the field was missing, so it activates on its own. The publish preflight already fetches the url anonymously and blocks on a 4xx, so a regression to a private or wrong repo fails the release rather than shipping another broken link. This reaches the registry with 0.2.4; the published 0.2.3 entry keeps the manifest it was published with.
There was a problem hiding this comment.
Review: fix(mcp): link the public repository from the registry manifest
Verdict: Approve — no blocking issues found.
Overview
Adds the repository field to apps/mcp-server/server.json now that ShiplightAI/shiplight-cli is public. Two tests that previously asserted the field was absent are inverted to assert the correct value. Two TypeScript files receive comment-only updates correcting now-stale history. No logic changes.
Findings
| # | Severity | Location | Finding |
|---|---|---|---|
| 1 | LOW | apps/mcp-server/scripts/repositoryLink.test.ts:107 |
The new assertion checks only manifest.repository?.url, not the full object (source, subfolder). The structural completeness check lives in server-json-registry-manifest.test.ts:122 via deepEqual, so nothing is unguarded — the asymmetry is intentional and matches the PR description. Not a defect. |
No CRITICAL, HIGH, or MEDIUM issues found.
Additional notes
server.jsonkeepsversion: "0.2.3"— correct; the bump to 0.2.4 belongs to the publish workflow, not this PR.- The previously vacuous well-formed guard at
scripts/__tests__/server-json-registry-manifest.test.ts:129(if (!manifest.repository) return) now actively runs itsassert.match/assert.okchecks, giving free coverage uplift. - The publish preflight independently fetches
repository.urlanonymously and blocks on 4xx (repositoryLink.ts), providing a runtime safety net against future regression. - All files follow the project's ESM conventions; no
anyintroduced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/mcp-server/server.jsonomitted the optionalrepositoryfield, so the MCP registry entry gives readers no way to reach this server's source.That omission was correct when it was made. 0.2.0 shipped a
repositorypointing at a repo that returned 404 to everyone outside the org, so every reader of the registry entry got a broken link, and the field was dropped rather than publish one. ShiplightAI/shiplight-cli is public now and holds this server's source, so the premise is gone.The url and the
subfolderboth come from the instructions the existing tests left behind for this exact moment (scripts/__tests__/server-json-registry-manifest.test.ts).This reaches the registry with the next release, 0.2.4. The published 0.2.3 entry keeps the manifest it was published with.
Test plan
mcp-publisher validateaccepts the manifest withsubfolderincluded (run via the preflight:✅ server.json is valid).publicly reachable (HTTP 200)instead ofomitted, so thereachablepath is exercised rather than the empty one.server.json— 1 failure in each suite):scripts/__tests__/server-json-registry-manifest.test.tsapps/mcp-server/scripts/repositoryLink.test.tsserver-json-registry-manifest.test.tswas deliberately written to be vacuous while the field was missing, so it activates on its own and needed no change.Why this can't regress quietly
publish-mcp-registry.tsalready fetchesrepository.urlanonymously and blocks the release on a 4xx that means "you cannot see this" (repositoryLink.tsdeliberately does not block on 5xx, 408, 425 or 429, which are runner- or GitHub-side noise). So a change back to a private or wrong repo fails the release rather than shipping another broken link.Stale comments in
repositoryLink.tsandpublish-mcp-registry.tsasserting the field is "deliberately absent" are corrected; the reasoning they carried still governs the verdict rules, so it is kept rather than deleted.🤖 Generated with Claude Code