Skip to content

Commit 1f63e43

Browse files
authored
ci: simplify conformance while running against both spec versions (#1060)
1 parent 2047ae4 commit 1f63e43

4 files changed

Lines changed: 22 additions & 62 deletions

File tree

.github/workflows/conformance.yml

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15-
# Pinned for reproducible runs; bump deliberately when the suite updates.
16-
CONFORMANCE_VERSION: "0.1.16"
17-
# When updating DRAFT_CONFORMANCE_VERSION, diff
18-
# `conformance list --spec-version 2026-07-28`
19-
# and update #977
20-
DRAFT_CONFORMANCE_VERSION: "0.2.0-alpha.9"
15+
CONFORMANCE_VERSION: "0.2.0-alpha.9"
2116

2217
jobs:
2318
server:
@@ -33,15 +28,13 @@ jobs:
3328

3429
- uses: Swatinem/rust-cache@v2
3530

36-
# Build the whole package (server + client bins): the conformance crate is
37-
# excluded from the workspace default-members.
3831
- name: Build conformance binaries
3932
run: cargo build -p mcp-conformance
4033

4134
- name: Test conformance server
4235
run: cargo test -p mcp-conformance --bin conformance-server
4336

44-
- name: Start 2025-11-25 server
37+
- name: Start conformance server
4538
run: |
4639
PORT=8001 ./target/debug/conformance-server &
4740
echo $! > server.pid
@@ -58,45 +51,19 @@ jobs:
5851
run: |
5952
npx -y "@modelcontextprotocol/conformance@${CONFORMANCE_VERSION}" server \
6053
--url http://127.0.0.1:8001/mcp \
54+
--suite all \
6155
--spec-version 2025-11-25 \
62-
-o conformance-results
63-
64-
# These pass today but are excluded from the default "active" suite;
65-
# run them explicitly so regressions are still caught.
66-
- name: Run 2025-11-25 pending scenarios
67-
run: |
68-
for scenario in json-schema-2020-12 server-sse-polling; do
69-
npx -y "@modelcontextprotocol/conformance@${CONFORMANCE_VERSION}" server \
70-
--url http://127.0.0.1:8001/mcp \
71-
--scenario "$scenario" \
72-
-o conformance-results
73-
done
56+
-o conformance-results/2025-11-25
7457
75-
- name: Start draft server
58+
- name: Run 2026-07-28 server suite
7659
run: |
77-
STATELESS=1 PORT=8002 ./target/debug/conformance-server &
78-
echo $! > draft-server.pid
79-
for _ in $(seq 1 30); do
80-
if curl -s -o /dev/null http://127.0.0.1:8002/mcp; then
81-
exit 0
82-
fi
83-
sleep 1
84-
done
85-
echo "draft conformance server did not become ready" >&2
86-
exit 1
87-
88-
- name: Run 2026-07-28 versioned-spec server suite
89-
run: |
90-
npx -y "@modelcontextprotocol/conformance@${DRAFT_CONFORMANCE_VERSION}" server \
91-
--url http://127.0.0.1:8002/mcp \
60+
npx -y "@modelcontextprotocol/conformance@${CONFORMANCE_VERSION}" server \
61+
--url http://127.0.0.1:8001/mcp \
9262
--suite all \
9363
--spec-version 2026-07-28 \
94-
-o conformance-results
64+
-o conformance-results/2026-07-28
9565
96-
# Extension scenarios are excluded by the --spec-version filter and
97-
# are informational for tiering. Run them explicitly so their gaps remain
98-
# visible and newly passing scenarios make the strict baseline fail stale.
99-
- name: Run Tasks extension server suite (informational)
66+
- name: Run extension server scenarios (informational)
10067
run: |
10168
scenarios=(
10269
tasks-lifecycle
@@ -110,20 +77,17 @@ jobs:
11077
tasks-required-task-error
11178
tasks-mrtr-composition
11279
)
113-
11480
for scenario in "${scenarios[@]}"; do
115-
npx -y "@modelcontextprotocol/conformance@${DRAFT_CONFORMANCE_VERSION}" server \
116-
--url http://127.0.0.1:8002/mcp \
81+
npx -y "@modelcontextprotocol/conformance@${CONFORMANCE_VERSION}" server \
82+
--url http://127.0.0.1:8001/mcp \
11783
--scenario "$scenario" \
11884
--expected-failures conformance/expected-failures-extensions.yaml \
11985
-o conformance-extension-results
12086
done
12187
122-
- name: Stop conformance servers
88+
- name: Stop conformance server
12389
if: always()
124-
run: |
125-
kill "$(cat draft-server.pid)" 2>/dev/null || true
126-
kill "$(cat server.pid)" 2>/dev/null || true
90+
run: kill "$(cat server.pid)" 2>/dev/null || true
12791

12892
- name: Upload results
12993
if: always()
@@ -156,19 +120,19 @@ jobs:
156120
--command "$(pwd)/target/debug/conformance-client" \
157121
--suite all \
158122
--spec-version 2025-11-25 \
159-
-o conformance-client-results/full
123+
-o conformance-client-results/2025-11-25
160124
161-
- name: Run 2026-07-28 versioned-spec client suite
125+
- name: Run 2026-07-28 client suite
162126
run: |
163-
npx -y "@modelcontextprotocol/conformance@${DRAFT_CONFORMANCE_VERSION}" client \
127+
npx -y "@modelcontextprotocol/conformance@${CONFORMANCE_VERSION}" client \
164128
--command "$(pwd)/target/debug/conformance-client" \
165129
--suite all \
166130
--spec-version 2026-07-28 \
167-
-o conformance-client-results/draft
131+
-o conformance-client-results/2026-07-28
168132
169133
- name: Run extension client suite (informational)
170134
run: |
171-
npx -y "@modelcontextprotocol/conformance@${DRAFT_CONFORMANCE_VERSION}" client \
135+
npx -y "@modelcontextprotocol/conformance@${CONFORMANCE_VERSION}" client \
172136
--command "$(pwd)/target/debug/conformance-client" \
173137
--suite extensions \
174138
--expected-failures conformance/expected-failures-extensions.yaml \

conformance/expected-failures-extensions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Known failures for informational extension scenarios in
2-
# @modelcontextprotocol/conformance DRAFT_CONFORMANCE_VERSION.
2+
# @modelcontextprotocol/conformance CONFORMANCE_VERSION.
33
#
44
# Extensions are not selected by a `--spec-version` run and do not count toward
55
# SDK tiering. CI runs them separately so a green versioned-spec suite does not
@@ -9,7 +9,7 @@
99
# - an unlisted failure fails the build
1010
# - a listed scenario that starts passing fails the build as a stale entry
1111
#
12-
# When bumping DRAFT_CONFORMANCE_VERSION, review the available extension and
12+
# When bumping CONFORMANCE_VERSION, review the available extension and
1313
# pending scenarios and update this file deliberately.
1414

1515
# The SEP-2663 Tasks Extension server scenarios (tracked in #868) all pass and

conformance/src/bin/client.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,7 @@ fn preferred_protocol_versions() -> Vec<ProtocolVersion> {
943943
preferred_versions
944944
}
945945

946-
/// Runs draft stateless scenarios through the public discover lifecycle and
947-
/// Streamable HTTP transport.
946+
/// Runs scenarios through the discover lifecycle and Streamable HTTP transport.
948947
async fn run_discover_client(server_url: &str) -> anyhow::Result<()> {
949948
let preferred_versions = preferred_protocol_versions();
950949
let transport = StreamableHttpClientTransport::from_uri(server_url);

conformance/src/bin/server.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,10 +1740,7 @@ async fn main() -> anyhow::Result<()> {
17401740
tracing::info!("Starting conformance server on {}", bind_addr);
17411741

17421742
let server = ConformanceServer::new();
1743-
let stateless = std::env::var_os("STATELESS").is_some();
1744-
let config = StreamableHttpServerConfig::default()
1745-
.with_legacy_session_mode(!stateless)
1746-
.with_json_response(stateless);
1743+
let config = StreamableHttpServerConfig::default();
17471744
let service = StreamableHttpService::new(
17481745
move || Ok(server.clone()),
17491746
LocalSessionManager::default().into(),

0 commit comments

Comments
 (0)