-
Notifications
You must be signed in to change notification settings - Fork 0
Guard the MCP Registry entry in CI and document republishing [sc-146582] #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -325,6 +325,16 @@ async function validateRegistryManifest() { | |
| } | ||
| } | ||
|
|
||
| if (typeof manifest.description === "string" && manifest.description.length > 100) { | ||
| addError( | ||
| `server.json "description" is ${manifest.description.length} characters; the registry schema caps it at 100.`, | ||
| ); | ||
| } | ||
|
|
||
| if (typeof manifest.version === "string" && !semverPattern.test(manifest.version)) { | ||
| addError(`server.json "version" ("${manifest.version}") must be semver (e.g. 1.0.0).`); | ||
| } | ||
|
Comment on lines
+334
to
+336
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
schema_url='https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json'
curl -fsSL "$schema_url" |
jq -e '.definitions.ServerDetail.properties.version.description
| contains("Non-semantic versions are allowed")'Repository: IFTTT/ifttt-plugins Length of output: 162 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- validator context ---'
sed -n '300,355p' scripts/validate.mjs
printf '%s\n' '--- repository policy references ---'
rg -n -i --glob '!node_modules' --glob '!dist' \
'semver|semantic version|non-semantic|version.*policy|version.*format|contribut|server\.json' \
README.md CONTRIBUTING.md .github scripts package.json 2>/dev/null || true
printf '%s\n' '--- version declarations and validator usage ---'
rg -n --glob '!node_modules' \
'"version"\s*:|semverPattern|manifest\.version|validate\.mjs' . 2>/dev/null | head -250Repository: IFTTT/ifttt-plugins Length of output: 6703 Document the
🤖 Prompt for AI Agents |
||
|
|
||
| if (!Array.isArray(manifest.remotes) || manifest.remotes.length === 0) { | ||
| addError('server.json "remotes" must be a non-empty array.'); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: IFTTT/ifttt-plugins
Length of output: 193
🏁 Script executed:
Repository: IFTTT/ifttt-plugins
Length of output: 5425
🏁 Script executed:
Repository: IFTTT/ifttt-plugins
Length of output: 30025
🌐 Web query:
JSON Schema validation maxLength Unicode code points UTF-16 code units official specification💡 Result:
In the official JSON Schema specification, the validation keywords maxLength and minLength are defined based on the number of Unicode code points in a string [1][2][3]. While older drafts of the specification referred to the "number of its characters" as defined by relevant IETF RFCs for JSON (such as RFC 8259) [4][5][6], current specifications explicitly clarify this as the count of Unicode code points [1]. It is important to note that this is distinct from UTF-16 code units [7]. Because many programming environments (such as JavaScript/Node.js) count length by UTF-16 code units, a discrepancy can arise when handling characters outside the Basic Multilingual Plane (BMP), such as certain emojis or complex symbols [7]. For example, a single character consisting of a surrogate pair in UTF-16 counts as two code units but only one Unicode code point [7]. Consequently, developers should be aware that implementation-specific string length properties—often based on UTF-16 code units—may not align with the JSON Schema requirement of counting Unicode code points [7].
Citations:
Count Unicode code points for the 100-character cap.
String.prototype.lengthcounts UTF-16 code units. UseArray.from(manifest.description).lengthfor both the comparison and the error message.🤖 Prompt for AI Agents