Repository navigation
fix(mcp-registry): Ignore empty values the registry drops when verifying a listing - #971
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
…ing a listing The MCP Registry stores server.json with Go omitempty, so fields such as isRequired: false or isSecret: false are missing from the listing. The strict comparison then reported a mismatch right after a successful publish, and a retry failed the same way because the version is now listed.
7 tasks done
This branch has not been deployed
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.
The
mcp-registrytarget compares the registry listing withserver.jsonby strict deep equality. The MCP Registry serializes servers with Goomitempty(model), so values such asisRequired: falseandisSecret: falseare missing from the listing. The publish succeeds, then verification throws "does not match the published manifest".A retry fails the same way, because the version is now listed and the existing-listing check uses the same comparison.
This broke getsentry/publish#10288 (
getsentry/toolkitCLI 0.49.0, run). The toolkitserver.jsonsetsisRequired: falseandisSecret: false. The liveio.github.getsentry/sentry-mcp@0.49.0listing is active and omits exactly those fields.The fix drops
false,"",null,[]and{}from both sides before comparing (recursively in objects), next to the existing$schemaremoval. Real differences still fail.Tests: added a case where the manifest has
isRequired: false,value: ""andpackageArguments: []and the listing omits them. It fails without the change. I also checked the normalized comparison against the real 0.49.0 listing and the release branchserver.json: they match now, and the strict comparison fails.via automation
evt_7eb3514757568b8678df9b5c7d9caa7b· Run IDdispatch_7466a9540a78c06dd3a2a9817de28c82.--
View Session [Sentry]