Repository navigation
[P17] ci: one job list for GitHub Actions and Linux at the desk - #354
Merged
Merged
Conversation
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.
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 (previous: P16 (#355) · next: P18 (#353))conformance/p17-ciconformance/p16-version(stacked: GitHub retargets this PR torel/1.0.0when the previous part merges)26245c3ci: one job list for GitHub Actions and Linux at the desk669a380ci: review fixesab49888ci: third-pass review fixesSummary
Lists every CI job once, in
scripts/ci/jobs, and runs them throughscripts/ci/run-jobs.sh, from GitHub Actions and on a Mac, wherescripts/ci-linux.shrunsthe Linux CI in a container. The first Linux runs show where Linux falls short of macOS;
that gap is recorded in
design/linux.mdand left for later. Jobs that Linux fails run asadvisory: they report but do not gate.
Motivation
.github/workflows/ci.yml, and a job added therecould not be run locally the same way.
(
README.md), and its HTTP client has its own code path.Changes
One job list
scripts/ci/jobs<id> <gate|advisory> <script> [args]; the second column says whether a Linux failure gates (on macOS every job gates)scripts/ci/run-jobs.sh--gate,--advisory, id regexes), continues past failures, prints a summary;--strictcounts advisory failures;--timeoutstops a hung job and its process groupscripts/ci/{build-test,docs,conformance-scripts,conformance,interop}.shconformance.shtakesrun-conformance.sh's flags;conformance-scripts.shrunsscripts/tests/run-conformance-test.sh(exit status ofrun-conformance.shand the tier scorer against a fake harness, no network);lib.shholds the shared helpersscripts/ci/deps-linux.shnodejs:22stream, or the package named byDEPS_NODE_DNF_PACKAGE), apt plus upstream downloads on Debian and UbuntuRunners
.github/workflows/ci.ymllinux-advisorywithcontinue-on-error, the static Linux SDK build; Linux inswift:6.1-rhel-ubi9. Replaces the per-leg conformance jobs and their shared fixtures artifact; actions stay pinned by commit SHAscripts/ci-linux.shswift:6.1-rhel-ubi9by default) with Apple'scontainerCLI: 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.mdcompares a run's table rows (cell counts, exampleclient exit codes, failing checks without their detail text) with the recorded report.
scripts/run-interop.sh --checkfails on a difference. CI runs it this way.raw.githubusercontent.comis unreachable, the Python example servers come from ashallow fetch of the pinned commit (
git init,git fetch --depth 1 <commit>). Either waythey 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 thatfail, the Ubuntu hang.
CLAUDE.md: a CI section, and--checkin the Interop section.CONTRIBUTING.md: "CI andLinux".
interop/README.md:--check;RESULTS.mdis recorded on macOS and shared withLinux.
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)"] --> RLinux results
Measured with
scripts/ci-linux.sh allat this commit, on the stack with the review fixes andmainat33a591d(ubi9 Swift 6.1.3, arm64):build-test(839 tests, hello example),docsThe Linux path of
HTTPClientTransportreads a response only after it ends, passes an SSEbody 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 clientalso hangs in
json-schema-ref-no-derefat 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
MCPlibrary.Conformance
Unchanged on macOS. Baselines and
interop/RESULTS.mdare shared with Linux; no entry wasadded 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, whichdoes not see the session's headers on Linux; they are now skipped on Linux like the other
suites that use it.
scripts/ci-linux.sh --image swift:6.1-rhel-ubi9 --gate all(the GitHub Linux image):every gated job passes.
scripts/ci/run-jobs.sh docs 'conformance-2026-07-28-.*'passes;report.py --expectmatches the last macOS interop run and rejects the Linux one.actionlintonci.yml.Review notes
gateinscripts/ci/jobswhen they pass;run-jobs.shreports"now passes: make it gate".
(
scripts/ci-linux.sh --platform linux/amd64runs it under emulation).scripts/ci-linux.shneeds macOS 26 or later on Apple silicon (container).npm_config_registry=https://registry.npmjs.org(asCONTRIBUTING.mdsays).Verification
At the current commit, on macOS: every branch of the stack builds and passes
swift test; onthis branch, 860 swift-testing tests plus XCTest. DocC builds with
--warnings-as-errors. Allconformance 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 --checkpasses. Linux: see Linux results.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.