-
Notifications
You must be signed in to change notification settings - Fork 2k
chore: update spec.types.ts from upstream #2027
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| * | ||
| * Source: https://github.com/modelcontextprotocol/modelcontextprotocol | ||
| * Pulled from: https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/main/schema/draft/schema.ts | ||
| * Last updated from commit: f68d864a813754e188c6df52dcc5772a12f96c63 | ||
| * Last updated from commit: 9a4ff8af92ba00cbddbf94672dfade9279987e66 | ||
|
Check warning on line 6 in packages/core-internal/src/types/spec.types.2026-07-28.ts
|
||
|
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. 🟡 Verified: the fixtures corpus at test/corpus/fixtures/2026-07-28/ is content-current at 9a4ff8af — all 128 vendored files are byte-identical to upstream — so only its manifest's source.commit (f68d864a) is stale. This closes the item the 2026-07-14 status update left unverified and narrows the mandatory rule-4 refresh: the schema twin is the only content-level item; the fixtures need at most a provenance-only manifest bump ('pnpm fetch:spec-examples 9a4ff8af92ba00cbddbf94672dfade9279987e66' should produce a manifest-only diff, leaving directoryCount 87 / fileCount 128 and the specCorpus.test.ts pins unchanged — anything else is itself a signal to investigate). Extended reasoning...What this closesThe 2026-07-14 status update on this PR (the one that established the schema twin is genuinely content-stale at Verification performed (all against the exact commit this diff records)1. Content-currency of every vendored fixture. All 128 files enumerated by 2. Added-file closure via the anchor. Raw hosting has no directory listing, so the added-file question is closed through the anchor itself: the post-sync 3. The example this very hunk references is already consistent with the new prose. Step-by-step consequence for the mandatory rule-4 refresh
Why this mattersThe maintainer performing the mandatory pre-merge refresh is working from a checklist whose last entry says the examples delta is unknown. Recording the verified answer prevents both over-scoping (re-vendoring and re-reviewing 128 fixtures for a content change that does not exist) and the residual doubt that would otherwise justify deferring the refresh again while the nightly force-push keeps rewriting this branch. It also gives the refresh a concrete expected outcome (manifest-only diff) that doubles as a self-check. SeverityNit: there is no code defect and nothing breaks without this — it is a verified status/scoping correction in the same tier as the content-noop verifications and SHA corrections already accepted on this PR. It does not block merge on its own; it refines the already-blocking rule-4 refresh so it is executed at the right scope. |
||
| * | ||
| * DO NOT EDIT THIS FILE MANUALLY. Changes will be overwritten by automated updates. | ||
| * To update this file, run: pnpm run fetch:spec-types 2026-07-28 | ||
|
|
@@ -1333,10 +1333,16 @@ | |
| } | ||
|
|
||
| /** | ||
| * Sent by the server as the first message on a | ||
| * {@link SubscriptionsListenRequest | subscriptions/listen} stream to acknowledge | ||
| * that the subscription has been established and to report which notification | ||
| * types it agreed to honor. | ||
| * Sent by the server to acknowledge that a | ||
| * {@link SubscriptionsListenRequest | subscriptions/listen} subscription has been | ||
| * established and to report which notification types it agreed to honor. | ||
| * | ||
| * This notification MUST be the first message the server sends carrying the | ||
| * subscription's ID in `io.modelcontextprotocol/subscriptionId`. The server MUST | ||
| * NOT send any notification on the subscription before acknowledging it. On | ||
| * stdio, where every subscription shares one channel, this ordering is defined | ||
|
Check warning on line 1343 in packages/core-internal/src/types/spec.types.2026-07-28.ts
|
||
|
Comment on lines
+1336
to
+1343
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. 🟡 The SDK's published JSDoc for Extended reasoning...What the bug isThis sync's only content change rewrites the spec JSDoc for Two SDK doc surfaces copied the superseded wording and become stale the moment this sync lands:
Why it matters
Step-by-step proof
Why nothing catches itNeither How to fixCompanion doc-only edit: update the |
||
| * per subscription ID and not per channel: messages belonging to other | ||
| * subscriptions MAY be interleaved before it. | ||
| * | ||
| * @example Listen acknowledged | ||
| * {@includeCode ./examples/SubscriptionsAcknowledgedNotification/listen-acknowledged.json} | ||
|
Check warning on line 1348 in packages/core-internal/src/types/spec.types.2026-07-28.ts
|
||
|
Comment on lines
+1336
to
1348
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. 🟡 Upstream spec-internal inconsistency introduced by this exact hunk's new MUST prose, to batch with the other schema.ts feedback: (1) the ack is required by prose to carry the subscription ID in Extended reasoning...What the new prose saysThis re-pull rewrites the Inconsistency 1 — the ack is not type-required to carry the ID it is defined byThe MUST presupposes the ack carries the subscription ID — that is the only thing that makes the per-subscription-ID ordering on stdio well-defined at all. But Inconsistency 2 — pre-ack graceful close makes the result the first ID-carrying messageThe MUST says first message, not notification — and the word choice is not accidental redundancy, because the very next sentence covers notifications separately ('MUST NOT send any notification on the subscription before acknowledging it'). So the first sentence's broader scope sweeps in JSON-RPC responses. But the spec REQUIRES the subscription ID on exactly one other message: Step-by-step proof
Why this is concrete, not hypotheticalThe shipped SDK client already encodes the lenient reading of inconsistency 2: the How to fixNo change to this automated sync itself (the file is DO-NOT-EDIT). Batch with the upstream schema.ts feedback already collected on this PR: (a) give the ack params a dedicated required-key meta interface (the |
||
|
|
||
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.
🔴 Unlike the prior two re-pulls (2ffc3fa2, 93671a3f), which were verified content-noops, this re-pull to 9a4ff8af changes the JSDoc body of
SubscriptionsAcknowledgedNotification— and upstream JSDoc becomes thedescriptionfields of the generatedschema.json, so the vendored 2026-07-28 schema twin (still pinned at f68d864a, sha256 14398c3d…/178,613 bytes, vs upstream 670dda8b…/179,002 bytes at 9a4ff8af) is now genuinely stale in content, not just provenance — and nothing in CI catches it. This invalidates the standing close-as-no-op guidance and the pin SHAs in prior comments: any twin/fixtures refresh landed with this PR must runpnpm fetch:schema-twins 9a4ff8af92ba00cbddbf94672dfade9279987e66(2026-07-28 entry only, per the per-revision-pinning caveat), mindful that the nightly force-push wipes extra branch commits.Extended reasoning...
What changed
Every prior re-pull on this PR (
f68d864a→2ffc3fa2→93671a3f) was verified to be a content-noop: upstreamschema/draft/schema.tsandschema.jsonwere byte-identical (or formatting-only), so the vendored conformance oracle stayed content-current and the accepted rule-4 finding (#3485357818) was a provenance-only skew. That is the premise behind the standing guidance in #3487174588 and the 2026-07-05 SHA-correction: "close as no-op or land with a manifest refresh."This re-pull to
9a4ff8af92ba00cbddbf94672dfade9279987e66is different — it is content-bearing. The diff rewrites the JSDoc body ofSubscriptionsAcknowledgedNotification(spec.types.2026-07-28.ts:1335-1345), adding new normative MUST clauses ("This notification MUST be the first message the server sends carrying the subscription's ID… The server MUST NOT send any notification on the subscription before acknowledging it…"). Upstream generatesschema.jsonfromschema.ts, and JSDoc becomes thedescriptionfields of the generated schema — so the twin the SDK vendors as its conformance oracle changed too.Step-by-step proof
schema/draft/schema.jsonat9a4ff8afis 179,002 bytes, sha256670dda8b3f9bd07888f8e7ef02d04357af7e24a4bb0dbbda9fc8d268fb03f0b1(verified live by multiple independent fetches; the new "first message the server sends carrying" prose appears in its description fields, and a structural diff shows the sole changed$defsentry isSubscriptionsAcknowledgedNotification's description — exactly mirroring this diff's JSDoc change).packages/core-internal/test/corpus/schema-twins/manifest.jsonstill pins the 2026-07-28 twin at 178,613 bytes, sha25614398c3d…ba5c4c83,source.commit: f68d864a— andtest/corpus/fixtures/2026-07-28/manifest.jsonalso still recordsf68d864a.schemaTwinConformance.test.ts(~lines 40-56) only hashes the vendored twin bytes against the manifest's ownsha256/bytesentries — both unchanged in this PR, so it stays green — and never cross-checks upstream or the anchor header's commit. A description-only delta also cannot affect Ajv fixture validation, and the type drift guards compare types, not JSDoc. The oracle drifts with zero red.Why this invalidates the standing guidance
mainin the state OPERATIVE lifecycle rule 4 forbids — now substantively, not just in provenance metadata.2ffc3fa2; the 2026-07-05 correction says pin93671a3f. Following either recreates a three-way skew. The correct pin is9a4ff8af92ba00cbddbf94672dfade9279987e66(or whatever the anchor records at merge time).How to fix
Land the twin/fixtures refresh with this PR:
pnpm fetch:schema-twins 9a4ff8af92ba00cbddbf94672dfade9279987e66— 2026-07-28 entry only, per the per-revision-pinning caveat already on record (the script as written applies one SHA to every twin and would re-stamp the frozen 2025-11-25 released-revision oracle from the floating draft commit, contrary toRELEASED_REVISION_PINS). Also re-verify whetherschema/draft/exampleschanged at9a4ff8affor the fixtures manifest. And be mindful of the already-documented workflow behavior: the nightly cron force-recreates this branch and wipes any extra commit, so the refresh must be merged promptly or with the cron paused.Why normal severity
The prior rule-4 finding was accepted at blocking severity for a provenance-only skew; this is the substantive version of the same violation — merging (or closing) without the refresh leaves
mainwith a genuinely stale conformance oracle and lying manifests, with zero CI signal, and the standing remediation instructions on this PR now point at the wrong SHAs.