Skip to content

[P17] ci: one job list for GitHub Actions and Linux at the desk - #354

Merged
jeanmatthieu merged 3 commits into
rel/1.0.0from
conformance/p17-ci
Nov 25, 2026
Merged

jeanmatthieu merged 3 commits into
rel/1.0.0from
conformance/p17-ci

Conversation

@jeanmatthieu

@jeanmatthieu jeanmatthieu commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
Part P17 of P0–P35, merged into rel/1.0.0 in order (previous: P16 (#355) · next: P18 (#353))
Branch conformance/p17-ci
Base conformance/p16-version (stacked: GitHub retargets this PR to rel/1.0.0 when the previous part merges)
Commits 26245c3 ci: one job list for GitHub Actions and Linux at the desk
669a380 ci: review fixes
ab49888 ci: third-pass review fixes
Size 17 files, +1149 / -129

Summary

Lists every CI job once, in scripts/ci/jobs, and runs them through
scripts/ci/run-jobs.sh, from GitHub Actions and on a Mac, where scripts/ci-linux.sh runs
the Linux CI in a container. The first Linux runs show where Linux falls short of macOS;
that gap is recorded in design/linux.md and left for later. Jobs that Linux fails run as
advisory: they report but do not gate.

Motivation

  • Each conformance leg had its own job in .github/workflows/ci.yml, and a job added there
    could not be run locally the same way.
  • Conformance and interop had run on macOS only. Linux is a supported platform
    (README.md), and its HTTP client has its own code path.
  • A developer on a Mac needs a way to run the Linux jobs before pushing.

Changes

One job list

Path What
scripts/ci/jobs every job: <id> <gate|advisory> <script> [args]; the second column says whether a Linux failure gates (on macOS every job gates)
scripts/ci/run-jobs.sh runs a selection (--gate, --advisory, id regexes), continues past failures, prints a summary; --strict counts advisory failures; --timeout stops a hung job and its process group
scripts/ci/{build-test,docs,conformance-scripts,conformance,interop}.sh the jobs; conformance.sh takes run-conformance.sh's flags; conformance-scripts.sh runs scripts/tests/run-conformance-test.sh (exit status of run-conformance.sh and the tier scorer against a fake harness, no network); lib.sh holds the shared helpers
scripts/ci/deps-linux.sh installs Node 22, Go 1.25+ and uv: dnf on RHEL (the nodejs:22 stream, or the package named by DEPS_NODE_DNF_PACKAGE), apt plus upstream downloads on Debian and Ubuntu

Runners

Path What
.github/workflows/ci.yml the jobs: tests on macOS and Linux, docs, conformance on both, interop gated on macOS, linux-advisory with continue-on-error, the static Linux SDK build; Linux in swift:6.1-rhel-ubi9. Replaces the per-leg conformance jobs and their shared fixtures artifact; actions stay pinned by commit SHA
scripts/ci-linux.sh runs jobs on a Mac in a Swift Linux image (swift:6.1-rhel-ubi9 by default) with Apple's container CLI: a copy of the working tree, build and package caches in named volumes, a derived image with the tools, a per-job time limit, results in .build/linux/

Interop gate

  • interop/report.py --expect RESULTS.md compares a run's table rows (cell counts, example
    client exit codes, failing checks without their detail text) with the recorded report.
  • scripts/run-interop.sh --check fails on a difference. CI runs it this way.
  • When raw.githubusercontent.com is unreachable, the Python example servers come from a
    shallow fetch of the pinned commit (git init, git fetch --depth 1 <commit>). Either way
    they are checked against examples.sha256 (P15 ([P15] interop: matrix against the Go and Python SDKs #356)).

Docs

  • design/linux.md: the Linux results, the root cause, the scenarios and interop rows that
    fail, the Ubuntu hang.
  • CLAUDE.md: a CI section, and --check in the Interop section. CONTRIBUTING.md: "CI and
    Linux". interop/README.md: --check; RESULTS.md is recorded on macOS and shared with
    Linux.

Diagram

flowchart LR
    J["scripts/ci/jobs"] --> R["scripts/ci/run-jobs.sh"]
    R --> S["scripts/ci/*.sh"]
    GH["ci.yml"] --> R
    DESK["scripts/ci-linux.sh (Mac, container)"] --> R
Loading

Linux results

Measured with scripts/ci-linux.sh all at this commit, on the stack with the review fixes and
main at 33a591d (ubi9 Swift 6.1.3, arm64):

Job Result
build-test (839 tests, hello example), docs pass
conformance server, every leg; 2026-07-28 client; tier 2026-07-28 pass (gate)
2025-11-25 client, bare-leg client: 6 scenarios fail (advisory)
tier 2025-11-25 client: 13/18 (macOS 18/18) fail (advisory)
interop: every Swift-client HTTP row differs (advisory)

The Linux path of HTTPClientTransport reads a response only after it ends, passes an SSE
body verbatim (so it is dropped), and never opens the GET stream. Stdio, the server, and
the Go and Python clients match macOS exactly. On swift:6.1-noble (libcurl 8.5) the client
also hangs in json-schema-ref-no-deref at 2026-07-28, so Linux CI uses RHEL UBI 9 images
(libcurl 7.76). Details: design/linux.md.

API changes

None.

Behavior changes

None in the MCP library.

Conformance

Unchanged on macOS. Baselines and interop/RESULTS.md are shared with Linux; no entry was
added for Linux.

Tests

No test changes. Verified:

  • scripts/ci-linux.sh all (ubi9), at this commit after the rebase: every gated job passes,
    the 4 advisory jobs fail as above (same 6 client scenarios, same tier 13/18, interop rows of
    the Swift client over HTTP), about 18 minutes (10 of them interop). The first run found 6
    unit tests from the review fixes (P4 ([P4] client: connect with server/discover at 2026-07-28 #367) and P12 ([P12] oauth: jwt-bearer grant, token exchange, enterprise-managed authorization #359)) that use IsolatedMockURLProtocol, which
    does not see the session's headers on Linux; they are now skipped on Linux like the other
    suites that use it.
  • Before the rebase:
  • scripts/ci-linux.sh --image swift:6.1-rhel-ubi9 --gate all (the GitHub Linux image):
    every gated job passes.
  • macOS: scripts/ci/run-jobs.sh docs 'conformance-2026-07-28-.*' passes; report.py --expect matches the last macOS interop run and rejects the Linux one.
  • actionlint on ci.yml.

Review notes

  • Advisory jobs move to gate in scripts/ci/jobs when they pass; run-jobs.sh reports
    "now passes: make it gate".
  • Not verified: an actual GitHub Actions run, and Linux x86_64
    (scripts/ci-linux.sh --platform linux/amd64 runs it under emulation).
  • scripts/ci-linux.sh needs macOS 26 or later on Apple silicon (container).
  • With a private npm registry configured, set
    npm_config_registry=https://registry.npmjs.org (as CONTRIBUTING.md says).

Verification

At the current commit, on macOS: every branch of the stack builds and passes swift test; on
this branch, 860 swift-testing tests plus XCTest. DocC builds with --warnings-as-errors. All
conformance legs pass at their baselines; the tier score is 100% for client and server at
2025-11-25 and 2026-07-28. scripts/run-interop.sh --check passes. Linux: see Linux results.

brew install container && container system start
scripts/ci-linux.sh all
scripts/ci-linux.sh --image swift:6.1-rhel-ubi9 --gate all
export npm_config_registry=https://registry.npmjs.org
scripts/ci/run-jobs.sh                  # every job on macOS (interop needs Go and uv)

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.

Lists every CI job once, in `scripts/ci/jobs`, and runs them through
`scripts/ci/run-jobs.sh`, from GitHub Actions and on a Mac, where
`scripts/ci-linux.sh` runs the Linux CI in a container. The first Linux
runs show where Linux falls short of macOS; that gap is recorded in
`design/linux.md` and left for later. Jobs that Linux fails run as
advisory: they report but do not gate.
- ci-linux.sh: --source runs another worktree (one without scripts/ci
  runs `-- <command>`), --build-volume and --seed-from give each worktree
  its own warm build directory copied from a reference volume, --session
  keeps a container up and re-syncs /w each run (only .build kept), and
  `-- <command>` runs any command. A session run is in its own session
  id, so an interrupted run, or what a run leaves behind, is stopped,
  including the test runner swift test starts in its own process group.
- ci-linux.sh: the package caches are a directory on the Mac instead of
  a volume, because a volume can be attached to one running container at
  a time; Go gets -modcacherw since root in the container cannot write
  into read-only directories there.
- ci-linux.sh: a job id that is also a script name (interop, docs) runs
  the job with its arguments from scripts/ci/jobs unless script options
  follow it; `all` accepts --gate/--advisory/--strict after it and
  refuses anything else instead of dropping it.
- ci-linux.sh: conformance and interop results left in the build volume
  by earlier runs are removed before a run, so only its own are copied.
- run-jobs.sh: jobs read /dev/null, not the job list the loop reads.
- ci.yml: the build-test step runs through run-jobs.sh like the others.
- deps-linux.sh: the Node and Go tarballs are checked against their
  published SHA-256 before they are extracted.
- deps-linux.sh, interop.sh: ps is installed for the interop job. The
  time limit of run-interop.sh stops a client's process tree with it, and
  swift:6.1-rhel-ubi9 has no ps.
- report.py: --expect compares row counts, so a duplicated row differs.
- run-interop.sh: the Python SDK clone is refetched when an earlier
  fetch failed and left a repository without a commit.
- design/linux.md: the noble reproduction runs
  conformance-2026-07-28-client; `conformance-2026-07-28` matches no job,
  since run-jobs.sh anchors the pattern to the whole id, and exited 2.
  The summary table names the jobs it covers as `<leg>-*`.
- ci-linux.sh: --clean --session refuses a session that a live run holds
  (`session <name> is busy`) instead of stopping its container and
  removing its lock. The lock owner check is one helper for both places.
- ci-linux.sh: a run with a --build-volume other than the default copies
  its results to .build/linux/<volume>/, so runs in parallel against one
  tree, which need a volume each, do not remove each other's results.
  The volume name is checked like a session name, since it is now a
  directory.

@canarik canarik left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jeanmatthieu

@jeanmatthieu
jeanmatthieu merged commit 3fa4680 into rel/1.0.0 Nov 25, 2026
@jeanmatthieu
jeanmatthieu deleted the conformance/p17-ci branch November 25, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants