From 27f63e98f5380d1274b5c0126ae2dbc24290d66c Mon Sep 17 00:00:00 2001 From: CL Date: Fri, 27 Nov 2026 11:17:39 +0000 Subject: [PATCH 1/2] Run the published image and .mcpb in the weekly canary The canary installed and ran only the PyPI package. Nothing started the GHCR images or the .mcpb after release: the release's verify job reads the image digests and the .mcpb checksum, but never runs either. The .mcpb is a uv-type bundle, so its dependencies resolve on the user's machine at install time and it can stop installing exactly as the PyPI package can. install-smoke now downloads the newest release's .mcpb, checks it against its .sha256, and starts it with the command manifest.json gives Claude Desktop, plus --version. It runs on the same three runners, reusing the Intel-macOS OpenSSL setup the cryptography source build needs. A new image-smoke job pulls :latest and :no-scout from GHCR and runs each with --version, which must report the newest PyPI release, so an image that no longer starts or a moving tag left on an older build fails. notify waits on it, so its failures file the same deduplicated wf:canary issue. The .mcpb steps were run locally on Apple-silicon macOS against the 2.3.0 release: the checksum verified and the bundle reported 2.3.0. The image steps were not run locally, for want of a Docker daemon. Signed-off-by: CL --- .github/workflows/canary.yaml | 66 +++++++++++++++++++++++++++++++++-- architecture/ci.md | 7 +++- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/.github/workflows/canary.yaml b/.github/workflows/canary.yaml index 230340c2..8e8bcb69 100644 --- a/.github/workflows/canary.yaml +++ b/.github/workflows/canary.yaml @@ -9,7 +9,11 @@ name: Weekly canary # (did an upstream dep pull its wheels out from under an already-shipped version?). This is # exactly the check that would have caught cryptography 49 dropping its x86_64-macOS wheel. # 2. install-smoke (real runners): install the published package with uv and import/run it on -# macos-latest (arm64), macos-15-intel (x86_64), and windows-latest. +# macos-latest (arm64), macos-15-intel (x86_64), and windows-latest, then install and start +# the newest release's .mcpb the way Claude Desktop launches it. A uv-type bundle resolves its +# dependencies on the user's machine, so it drifts exactly as the PyPI package does. +# 3. image-smoke: pull and start both published images, :latest and :no-scout. The release's +# verify job only reads their digests; this is the only thing that runs them after release. # # On failure the notify job files (or comments on) a deduplicated issue labeled # ci-failure + wf:canary — one open issue per stream, so four red Mondays make one thread. @@ -133,12 +137,70 @@ jobs: # Requires the published package to have the --version flag (shipped in v1.9.3). run: uvx --python 3.14 docker-mcp-server --version + - name: Download and verify the newest release's .mcpb + shell: bash + env: + GH_TOKEN: ${{ github.token }} + # No tag: gh downloads from the newest release, the one Claude Desktop users install. + run: | + set -euo pipefail + gh release download --repo "$GITHUB_REPOSITORY" --pattern 'docker-mcp-server-*.mcpb*' --dir mcpb + cd mcpb + # sha256sum on Windows' Git Bash; shasum on macOS, which ships no sha256sum. + if command -v sha256sum >/dev/null; then sha256sum -c ./*.sha256; else shasum -a 256 -c ./*.sha256; fi + + - name: Bundle smoke (.mcpb started as Claude Desktop starts it) + shell: bash + # manifest.json's mcp_config runs `uv run --directory mcpb_run.py`; this is that + # command, plus --version so it exits before any daemon contact. The version printed must + # be the bundle's own, or the resolve picked up something other than the bundle's source. + run: | + set -euo pipefail + bundle="$(ls mcpb/*.mcpb)" + expected="$(basename "$bundle" .mcpb)"; expected="${expected#docker-mcp-server-}" + uv run --no-project --python 3.14 python -m zipfile -e "$bundle" bundle + actual="$(uv run --directory bundle mcpb_run.py --version)" + echo "bundle $expected reports $actual" + if [ "$actual" != "$expected" ]; then + echo "::error::the $expected .mcpb started but reported version $actual" + exit 1 + fi + + image-smoke: + # Pulls and starts the published images, so it never exercises PR content. + if: github.event_name != 'pull_request' + name: Image smoke (${{ matrix.tag }}) + runs-on: ubuntu-latest + # Two pulls of an image of a few hundred MB, and a start that exits at once. + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + tag: [latest, no-scout] + steps: + - name: Pull and start the image + env: + TAG: ${{ matrix.tag }} + # Both moving tags must start and report the newest PyPI release: a tag left on an older + # build, or an image that no longer starts, is what this catches. + run: | + set -euo pipefail + latest="$(curl -fsSL --max-time 30 --retry 3 https://pypi.org/pypi/docker-mcp-server/json | jq -r .info.version)" + image="ghcr.io/l337-org/docker-mcp-server:$TAG" + docker pull --quiet "$image" + actual="$(docker run --rm "$image" --version)" + echo "$image reports $actual; newest PyPI release is $latest" + if [ "$actual" != "$latest" ]; then + echo "::error::$image reports version $actual, not the newest release $latest" + exit 1 + fi + notify: name: File failure issue runs-on: ubuntu-latest # Files or updates a single issue. timeout-minutes: 10 - needs: [resolve-crossplatform, install-smoke] + needs: [resolve-crossplatform, install-smoke, image-smoke] # PR failures are visible on the PR itself; the issue stream is for unattended runs. if: failure() && github.event_name != 'pull_request' permissions: diff --git a/architecture/ci.md b/architecture/ci.md index 866cd092..19daa94c 100644 --- a/architecture/ci.md +++ b/architecture/ci.md @@ -88,7 +88,12 @@ macOS / ARM macOS / Windows against both the repo `pyproject.toml` and the lates release (the check that would have caught cryptography 49 dropping its x86_64-macOS wheel), plus real install smokes of the published package on `macos-latest`, `macos-15-intel` (Intel runner label retires Aug 2027), and `windows-latest` - `import docker_mcp` and `uvx docker-mcp-server ---version`. **PRs into main also run the repo-pyproject resolution leg** (the only part that +--version` - followed on the same runners by the newest release's `.mcpb`, checked against its +`.sha256` and started with the command `manifest.json` gives Claude Desktop (`uv run --directory + mcpb_run.py`, plus `--version`), since a `uv`-type bundle resolves its dependencies on the +user's machine and drifts as the PyPI package does. An image smoke pulls `:latest` and `:no-scout` +from GHCR and runs each with `--version`, which must report the newest PyPI release: the release's +`verify` job only compares their digests, so nothing else starts them after release. **PRs into main also run the repo-pyproject resolution leg** (the only part that exercises PR content), so a dependency change that breaks a platform is caught before merge; the published-package legs and issue filing stay schedule/dispatch-only. Failures on unattended runs file a deduplicated `ci-failure` + `wf:canary` issue via `.github/actions/file-failure-issue`, From 9e770417da162ffd06211fdc47080a97ff9b5651 Mon Sep 17 00:00:00 2001 From: CL Date: Fri, 27 Nov 2026 11:22:28 +0000 Subject: [PATCH 2/2] Correct why the canary runs the .mcpb, and harden its new steps Review found the reason given for the .mcpb leg was wrong. The bundle ships uv.lock, so it installs the locked versions rather than resolving afresh, and does not drift as uvx does. Its real exposure is a locked file pulled from PyPI, a locked version with no wheel for the platform or a newer CPython, or a change in the host's uv. The workflow header and architecture/ci.md now say that, and no longer describe the release's verify job or the runner images, which go stale independently. The .mcpb steps now run even when the uvx smoke fails, so a failure report covers both; strip a trailing carriage return from the Windows output before comparing versions; and the job timeout rises to 30 minutes, since Intel macOS may source-build cryptography twice when the bundle's locked version differs from the one uvx resolves. Signed-off-by: CL --- .github/workflows/canary.yaml | 28 ++++++++++++++++++---------- architecture/ci.md | 9 +++++---- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/canary.yaml b/.github/workflows/canary.yaml index 8e8bcb69..0d1ddd84 100644 --- a/.github/workflows/canary.yaml +++ b/.github/workflows/canary.yaml @@ -1,7 +1,7 @@ name: Weekly canary # Proactive platform/ecosystem drift detection — the class of breakage premerge CI (ubuntu + -# CPython 3.14 only) can't see. Two angles: +# CPython 3.14 only) can't see: # # 1. resolve-crossplatform (ubuntu, no mac/windows hardware needed): wheels-only dependency # resolution for Intel macOS, Apple-silicon macOS, and Windows — against BOTH the repo's @@ -10,17 +10,19 @@ name: Weekly canary # exactly the check that would have caught cryptography 49 dropping its x86_64-macOS wheel. # 2. install-smoke (real runners): install the published package with uv and import/run it on # macos-latest (arm64), macos-15-intel (x86_64), and windows-latest, then install and start -# the newest release's .mcpb the way Claude Desktop launches it. A uv-type bundle resolves its -# dependencies on the user's machine, so it drifts exactly as the PyPI package does. -# 3. image-smoke: pull and start both published images, :latest and :no-scout. The release's -# verify job only reads their digests; this is the only thing that runs them after release. +# the newest release's .mcpb the way Claude Desktop launches it. The bundle installs from its +# own uv.lock on the user's machine, so it breaks differently from a fresh uvx resolve: a +# locked file pulled from PyPI, a locked version with no wheel for that platform or for a newer +# CPython, or a change in the host's uv. +# 3. image-smoke: pull and start both published images, :latest and :no-scout, and check each +# reports the newest release. # # On failure the notify job files (or comments on) a deduplicated issue labeled # ci-failure + wf:canary — one open issue per stream, so four red Mondays make one thread. # # PRs into main also run the repo-pyproject resolution leg — the only part that exercises the # PR's own changes — so a dependency edit that breaks a platform is caught before merge, not the -# following Monday. The published-package legs (PyPI-release resolution, install smokes) and the +# following Monday. The published-package legs (PyPI-release resolution, install and image smokes) and the # issue filing stay schedule/dispatch-only: on a PR they would re-test the already-shipped # release and could block a merge on breakage the PR didn't cause. @@ -100,8 +102,9 @@ jobs: if: github.event_name != 'pull_request' name: Install smoke (${{ matrix.os }}) runs-on: ${{ matrix.os }} - # 20, not 15: macos-15-intel now source-builds cryptography (brew install + Rust compile). - timeout-minutes: 20 + # 30: macos-15-intel source-builds cryptography (brew install + Rust compile), and may do so twice + # when the .mcpb's locked version differs from the one uvx resolves. + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -138,6 +141,8 @@ jobs: run: uvx --python 3.14 docker-mcp-server --version - name: Download and verify the newest release's .mcpb + # Runs even when the uvx smoke failed, so a failure report says whether the bundle broke too. + if: ${{ !cancelled() }} shell: bash env: GH_TOKEN: ${{ github.token }} @@ -146,10 +151,11 @@ jobs: set -euo pipefail gh release download --repo "$GITHUB_REPOSITORY" --pattern 'docker-mcp-server-*.mcpb*' --dir mcpb cd mcpb - # sha256sum on Windows' Git Bash; shasum on macOS, which ships no sha256sum. + # Whichever of sha256sum and shasum the runner has. if command -v sha256sum >/dev/null; then sha256sum -c ./*.sha256; else shasum -a 256 -c ./*.sha256; fi - name: Bundle smoke (.mcpb started as Claude Desktop starts it) + if: ${{ !cancelled() }} shell: bash # manifest.json's mcp_config runs `uv run --directory mcpb_run.py`; this is that # command, plus --version so it exits before any daemon contact. The version printed must @@ -160,6 +166,8 @@ jobs: expected="$(basename "$bundle" .mcpb)"; expected="${expected#docker-mcp-server-}" uv run --no-project --python 3.14 python -m zipfile -e "$bundle" bundle actual="$(uv run --directory bundle mcpb_run.py --version)" + # Windows' Python may end the line with a carriage return that $(...) keeps. + actual="${actual%$'\r'}" echo "bundle $expected reports $actual" if [ "$actual" != "$expected" ]; then echo "::error::the $expected .mcpb started but reported version $actual" @@ -171,7 +179,7 @@ jobs: if: github.event_name != 'pull_request' name: Image smoke (${{ matrix.tag }}) runs-on: ubuntu-latest - # Two pulls of an image of a few hundred MB, and a start that exits at once. + # One image pull and a start that exits at once. timeout-minutes: 10 strategy: fail-fast: false diff --git a/architecture/ci.md b/architecture/ci.md index 19daa94c..a2872737 100644 --- a/architecture/ci.md +++ b/architecture/ci.md @@ -90,10 +90,11 @@ real install smokes of the published package on `macos-latest`, `macos-15-intel` label retires Aug 2027), and `windows-latest` - `import docker_mcp` and `uvx docker-mcp-server --version` - followed on the same runners by the newest release's `.mcpb`, checked against its `.sha256` and started with the command `manifest.json` gives Claude Desktop (`uv run --directory - mcpb_run.py`, plus `--version`), since a `uv`-type bundle resolves its dependencies on the -user's machine and drifts as the PyPI package does. An image smoke pulls `:latest` and `:no-scout` -from GHCR and runs each with `--version`, which must report the newest PyPI release: the release's -`verify` job only compares their digests, so nothing else starts them after release. **PRs into main also run the repo-pyproject resolution leg** (the only part that + mcpb_run.py`, plus `--version`). The bundle installs from its own `uv.lock`, so it breaks +differently from a fresh `uvx` resolve: a locked file pulled from PyPI, a locked version with no +wheel for that platform or a newer CPython, or a change in the host's `uv`. An image smoke pulls +`:latest` and `:no-scout` from GHCR and runs each with `--version`, which must report the newest +PyPI release. **PRs into main also run the repo-pyproject resolution leg** (the only part that exercises PR content), so a dependency change that breaks a platform is caught before merge; the published-package legs and issue filing stay schedule/dispatch-only. Failures on unattended runs file a deduplicated `ci-failure` + `wf:canary` issue via `.github/actions/file-failure-issue`,