Repository navigation
[P0] conformance: pin harness 0.2.0-alpha.11 and run per-revision legs - #371
Merged
Merged
Conversation
Pins the MCP conformance harness to `@modelcontextprotocol/[email protected]` and runs it in three legs: one per spec revision (2025-11-25, 2026-07-28) and the harness default wire. Each leg checks its own generated baseline of known failures, and a separate leg scores the frozen requirement set the way `conformance tier-check` does. It changes no SDK code; it records where the SDK stands before the 2026-07-28 work. The harness and its dependency tree are installed from a lockfile with `npm ci`. Every step of a leg checks its exit status, and CI pins its actions by commit and builds the fixtures once for all legs. The baseline generator records a scenario the harness summary marks failed as a bare entry whenever its results hold no failing check, not only when it wrote no results. A server fixture that exits during a run fails the leg: its failures are not re-run alone and not recorded by --update-baseline, which also fails when the harness run did not reach its summary. Only the fixture the selected --mode needs is built and required, the scorer rejects an unknown --role, and the conformance-fixtures job pins Node like the other jobs. The baseline headers are regenerated; no entry changes. The script tests cover the unexpected-failure retry path, a fixture that exits mid-run, an unfinished --update-baseline run, a single-mode run, and the generator's entries directly.
This was referenced Nov 25, 2026
Merged
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.
rel/1.0.0in order (next: P1 (#370))conformance/p0-harnessrel/1.0.08574edbconformance: pin harness 0.2.0-alpha.11 and run per-revision legsSummary
Pins the MCP conformance harness to
@modelcontextprotocol/[email protected]and runs it in three legs: one per spec revision (2025-11-25, 2026-07-28) and the harness default wire. Each leg checks its own generated baseline of known failures, and a separate leg scores the frozen requirement set the wayconformance tier-checkdoes. This PR changes no SDK code; it records where the SDK stands before the 2026-07-28 work in the rest of the stack.The harness and its dependency tree are installed from a lockfile with
npm ci. Every step of a leg checks its exit status, and CI pins its actions by commit and builds the fixtures once for all legs.Motivation
On
main, CI runs themodelcontextprotocol/[email protected]action against thecoresuite at a single wire, with an unpinned package inscripts/run-conformance.sh. That setup cannot tell 2025-11-25 regressions apart from missing 2026-07-28 features, and it cannot reach scenarios added in later harness releases (SEP-2575 stateless requests, SEP-2243 headers, SEP-2322 multi round-trip requests, SEP-2549 caching, extension scenarios). Version alpha.11 also adds awire-schema-validcheck to every scenario, which validates every message the SDK sends against the JSON schema. Each later PR in the stack shrinks these baselines.Changes
Scripts
scripts/run-conformance.sh: rewritten.--spec-version <rev>runs--suite all --spec-version <rev>againstconformance-baseline.<rev>.yml. With no option, the script runs--suite allagainstconformance-baseline.yml.--requirements <rev>runs the frozen requirement set with no baseline.--mode client|server|both,--update-baseline,--bin-path(skipswift build),--port(default 3001),--output-dir(default.build/conformance),--solo-attempts(default 1).http://127.0.0.1:<port>/mcpfor up to 30 s, detects early exit, and refuses to start when the port is in use.--solo-attemptstimes. A stale entry that also passes alone fails the run.scripts/conformance-harness/package-lock.jsonwithnpm ciinto.build/conformance-harness.CONFORMANCE_PKGruns another package withnpxinstead.npm_config_registryselects the npm registry.scripts/conformance-baseline.mjs(new): generates a leg's baseline from harness results. Each FAILURE or WARNING check becomes a<scenario>:<check-id>entry, so the passing checks of a partly failing scenario stay enforced. A scenario that the harness summary marks failed, but whose results hold no failing check, becomes a bare<scenario>entry. A role whose results are not given keeps its existing entries.scripts/conformance-score.mjs(new): scores a--requirementsrun. A scored scenario passes when it has at least one SUCCESS check and no FAILURE check. A scenario without results fails. Exit status 1 when a scored scenario fails or the role has no scored scenario.scripts/conformance-harness/package.json,package-lock.json(new): pin the harness and its dependency tree.Baselines
conformance-baseline.yml(default leg),conformance-baseline.2025-11-25.yml,conformance-baseline.2026-07-28.yml: generated, one per leg.CI (
.github/workflows/ci.yml)conformance-fixturesjob (new): runsscripts/tests/run-conformance-test.sh, buildsmcp-everything-clientandmcp-everything-serveronce and uploads them as an artifact.conformancejob: matrix over the legs2025-11-25,2026-07-28anddefault, withfail-fast: false, Node 22, a timeout raised to 20 minutes, and results uploaded asconformance-<leg>artifacts. Runs the downloaded fixtures with--bin-path.tier-scorejob (new): matrix over2025-11-25and2026-07-28, runs--requirementsagainst the downloaded fixtures. The job is report-only (continue-on-error: true) until every scored scenario passes.Docs
README.md: new "Conformance" section with the three run modes, the baseline rule and the harness lockfile.Review fixes
Scripts
scripts/run-conformance.sh:npx --yes <pkg>resolved the harness's dependencies at run time. The harness now comes fromscripts/conformance-harness/package-lock.json, installed withnpm ci --ignore-scripts(integrity-checked) into.build/conformance-harnessand reinstalled when the lockfile changes.CONFORMANCE_PKGstill runs another version withnpx.run_leg_roleruns asrun_leg_role ... || STATUS=1, where bash ignoresset -e, so a failing baseline generator, requirement listing or scorer did not fail the leg. Each step now checks its own status and fails the leg.server.log, which the harness also writes. It now logs toserver-fixture.log.scripts/conformance-score.mjs: always exited 0. It now exits 1 when a scored scenario fails or the list has no scored scenario for the role.Second review (
8574edb)scripts/conformance-baseline.mjs: a scenario that the summary marks failed was recorded as a bare entry only when it wrote no results, so a scenario that wrote results without a failing check was not recorded at all. It is now a bare entry whenever its results hold no failing check. The baseline headers say so; no entry changes.scripts/run-conformance.sh:--update-baselinerecorded them. When the fixture has exited (server_exited), the leg now fails, without solo re-runs and without writing the baseline.--update-baselinealso fails when the harness run did not reach its summary (SUMMARY ===missing from the log).--modeneeds are built and required:--mode clientno longer needs the server fixture, and--mode serverno longer needs the client fixture.scripts/conformance-score.mjs: a--roleother thanserverorclientis a usage error (exit status 2)..github/workflows/ci.yml: theconformance-fixturesjob sets up Node 22 like the other jobs, for the script tests.CI (
.github/workflows/ci.yml)pull-requests: writepermission is removed.conformance-fixtures) and shared by the conformance and tier jobs.swiftlang/github-workflowswithcurl -sf, not frommain.Tests
scripts/tests/run-conformance-test.sh(new), run in CI.Diagram
flowchart LR S["run-conformance.sh"] --> L{"leg"} L -->|"--spec-version rev"| R["--suite all --spec-version rev"] L -->|"no option"| D["--suite all"] L -->|"--requirements rev"| Q["--requirements rev"] R --> RB["conformance-baseline.rev.yml"] D --> DB["conformance-baseline.yml"] Q --> SC["conformance-score.mjs tier score"] RB --> U{"unexpected failure"} DB --> U U -->|"yes"| SO["solo re-run"]API changes
None.
Behavior changes
scripts/run-conformance.shhas a new command line. The--baselineoption and theBASELINE_FILEandMODEenvironment variables are removed. Each leg selects its baseline file.--update-baselineand--requirementslegs fail when the baseline generator, the requirement listing or the scorer fails.--update-baselinefails when the harness run does not reach its summary; neither writes the baseline.--mode clientand--mode serverbuild and need only their own fixture.npm ci(network access to the npm registry); later runs reuse.build/conformance-harness.Conformance
Baseline entries (server / client) recorded by this PR:
coresuite, harness v0.1.15, empty client listBefore this PR, CI checked one
core-suite baseline at a single wire, so the counts are not comparable.Tier score:
resources-list(wire-schema-valid) and the flakyelicitation-sep1330-enumsscenario.The 2025-11-25 entries are:
elicitation-sep1330-enums:elicitation-sep1330-general: a server-initiated request reaches the standalone GET stream instead of the originating POST stream.resources-list:wire-schema-valid: the fixture lists the template URItest://template/{id}as a concrete resource.json-schema-2020-12-preservation: the client fixture does not handle this scenario.P1 (#370) fixes all three.
Tests
No Swift test changes.
swift test: 565 tests pass.scripts/tests/run-conformance-test.sh(new) checksrun-conformance.sh,conformance-baseline.mjsandconformance-score.mjswith a fake harness and fixtures (Node.js, no network), 15 cases:--update-baselinefails when the generator fails, and when the harness run does not finish;--mode clientneeds only the client fixture;Review notes
0.2.0-alpha.11). It is pinned, with its dependency tree, so that baselines are reproducible. Moving the pin requires regenerating the lockfile and every baseline.tasks-*,auth/dpop*,auth/enterprise-managed-authorization,auth/wif-jwt-bearer). These scenarios are not scored.auth/2025-03-26-oauth-endpoint-fallbackfails in the default leg (backward compatibility). P8 ([P8] oauth: issuer checks, application_type, AS migration (SEP-2468/837/2352) #363) (P8) fixes it.export npm_config_registry=https://registry.npmjs.org.Verification
The
--requirementslegs are expected to fail at this point. They are report-only in CI.Every branch of the stack builds and passes
swift test; at this branch, 565 swift-testing tests, all passed (the package has no XCTest cases). The three conformance legs pass at their baselines.AI usage disclosure: the changes, the tests, the commit messages and this description were written with Claude Opus 5.5 and reviewed by the authors.