Skip to content

Commit 40328e7

Browse files
committed
ci: pin conformance harness by tarball URL + sha256, not version spec
Registry version specs and dist-tags are movable, so keep the fetch-and-verify machinery from the previous pin and point it at the published 0.2.0-alpha.10 registry tarball with its digest, rather than switching to a bare @modelcontextprotocol/conformance@0.2.0-alpha.10 spec. Digest computed from the registry tarball and verified locally; the server active leg passes against the verified local copy via the same file: repoint the workflow step performs. Also restores the --compile-bytecode rationale comment that the previous commit deleted alongside the adjacent fetch-and-verify step. No-Verification-Needed: CI-config pin change; no runtime surface
1 parent 3774e8d commit 40328e7

1 file changed

Lines changed: 37 additions & 4 deletions

File tree

.github/workflows/conformance.yml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ permissions:
1515

1616
env:
1717
# Pinned conformance harness package spec (passed verbatim to `npx --yes`).
18-
# Use a published version, e.g. @modelcontextprotocol/conformance@0.2.0-alpha.7.
19-
# Bump deliberately and reconcile both
20-
# .github/actions/conformance/expected-failures*.yml files in the same change.
21-
CONFORMANCE_PKG: "@modelcontextprotocol/conformance@0.2.0-alpha.10"
18+
# Pinned to the published release tarball by registry URL, with
19+
# CONFORMANCE_PKG_SHA256 pinning the bytes (registry version specs and
20+
# dist-tags are movable; the digest is not) — the fetch-and-verify step
21+
# below downloads, checks the digest, and repoints CONFORMANCE_PKG at the
22+
# verified local copy. Bump deliberately: update both values and reconcile
23+
# both .github/actions/conformance/expected-failures*.yml files in the same
24+
# change.
25+
CONFORMANCE_PKG: "https://registry.npmjs.org/@modelcontextprotocol/conformance/-/conformance-0.2.0-alpha.10.tgz"
26+
CONFORMANCE_PKG_SHA256: "fd3795fd3f55ee7c3395710282c3f9739ec8bffe98898bd36eca0c142e2a4234"
2227

2328
jobs:
2429
server-conformance:
@@ -34,6 +39,19 @@ jobs:
3439
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3540
with:
3641
node-version: 24
42+
- name: Fetch and verify conformance harness
43+
# Only when CONFORMANCE_PKG is a URL: download, check the recorded
44+
# sha256, and re-point CONFORMANCE_PKG at the verified local tarball.
45+
# When CONFORMANCE_PKG is a registry spec, this step is a no-op (npm's
46+
# own integrity check applies).
47+
run: |
48+
case "$CONFORMANCE_PKG" in
49+
https://*)
50+
curl -fsSL "$CONFORMANCE_PKG" -o /tmp/conformance.tgz
51+
echo "$CONFORMANCE_PKG_SHA256 /tmp/conformance.tgz" | sha256sum -c -
52+
echo "CONFORMANCE_PKG=file:/tmp/conformance.tgz" >> "$GITHUB_ENV"
53+
;;
54+
esac
3755
- run: uv sync --frozen --all-extras --package mcp-everything-server
3856
- name: Run server conformance (active suite)
3957
run: >-
@@ -93,6 +111,21 @@ jobs:
93111
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
94112
with:
95113
node-version: 24
114+
- name: Fetch and verify conformance harness
115+
# Only when CONFORMANCE_PKG is a URL: download, check the recorded
116+
# sha256, and re-point CONFORMANCE_PKG at the verified local tarball.
117+
# When CONFORMANCE_PKG is a registry spec, this step is a no-op (npm's
118+
# own integrity check applies).
119+
run: |
120+
case "$CONFORMANCE_PKG" in
121+
https://*)
122+
curl -fsSL "$CONFORMANCE_PKG" -o /tmp/conformance.tgz
123+
echo "$CONFORMANCE_PKG_SHA256 /tmp/conformance.tgz" | sha256sum -c -
124+
echo "CONFORMANCE_PKG=file:/tmp/conformance.tgz" >> "$GITHUB_ENV"
125+
;;
126+
esac
127+
# --compile-bytecode: without it, ~40 concurrently spawned interpreters
128+
# race to byte-compile site-packages during the timing-sensitive window.
96129
- run: uv sync --frozen --all-extras --package mcp --compile-bytecode
97130
- name: Pre-compile bytecode (editable sources)
98131
run: uv run --frozen python -m compileall -q src .github/actions/conformance

0 commit comments

Comments
 (0)