Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ci): accept python 3.10 with tomli in runner verification

Steven Enamakel69169c95b660
diff --git a/.github/workflows/ci-lanes.yml b/.github/workflows/ci-lanes.yml
index c6e695eea7..57b3c3605c 100644
--- a/.github/workflows/ci-lanes.yml
+++ b/.github/workflows/ci-lanes.yml
@@ -80,7 +80,7 @@ jobs:
filters: .github/ci-paths-filter.yml
base: ${{ inputs.base-ref }}
- # The guest contract supplies Python >= 3.11 and jq. Lanes continue
+ # The guest contract supplies Python with a TOML parser and jq. Lanes continue
# independently after failures, in order within this single private job.
- name: Start lanes
id: lanes
diff --git a/docs/ci-self-hosted.md b/docs/ci-self-hosted.md
index 3916520612..884b161b5e 100644
--- a/docs/ci-self-hosted.md
+++ b/docs/ci-self-hosted.md
@@ -115,7 +115,7 @@ for any commit without posting it.
`target/ci-private-coverage`. Neither is restored as an Actions artifact cache.
- `scripts/ci/self-hosted/guest-image.txt` pins the guest OCI digest. Before
validation, `verify-runner.sh` compares `/etc/ohci/build-info` with that pin,
- checks preinstalled tools, and selects `rust-toolchain.toml` explicitly.
+ checks preinstalled tools (Python 3.10 with tomli, or stdlib tomllib), and selects `rust-toolchain.toml` explicitly.
Missing metadata, tools, or the compiler fail; CI does not install replacements.
- The pinned shared checkout action fetches the PR merge ref with full root
history, recursive build dependencies, and the `wiki` exclusion.
diff --git a/scripts/ci/self-hosted/verify-runner.sh b/scripts/ci/self-hosted/verify-runner.sh
index ede1ff4873..88b8234f7a 100644
--- a/scripts/ci/self-hosted/verify-runner.sh
+++ b/scripts/ci/self-hosted/verify-runner.sh
@@ -17,14 +17,22 @@ for tool in rustup cargo rustc clang readelf tinymold python3 node pnpm jq; do
done
linker=/usr/local/bin/rust-mold-linker
[[ -x "$linker" && -x /opt/mold/bin/mold ]] || { echo '::error::Missing pinned mold linker' >&2; exit 1; }
-channel="$(python3 -c 'import tomllib,sys; print(tomllib.load(open(sys.argv[1], "rb"))["toolchain"]["channel"])' "$root/rust-toolchain.toml")"
+channel="$(python3 - "$root/rust-toolchain.toml" <<'PYTHON'
+import sys
+try:
+ import tomllib
+except ModuleNotFoundError:
+ import tomli as tomllib
+assert sys.version_info >= (3, 10)
+print(tomllib.load(open(sys.argv[1], "rb"))["toolchain"]["channel"])
+PYTHON
+)"
# rustup run --install is deliberately absent: an image without this toolchain fails.
rustup run "$channel" rustc --version
rustup run "$channel" cargo clippy --version
rustup run "$channel" cargo fmt --version
rustup run "$channel" cargo nextest --version
rustup run "$channel" cargo llvm-cov --version
-python3 -c 'import sys,tomllib; assert sys.version_info >= (3,11)'
tinymold --version
/opt/mold/bin/mold --version
for key in TINYMOLD_REMOTE_URL TINYMOLD_REMOTE_AUTH TINYMOLD_REMOTE_SIGNING_KEY TINYMOLD_REMOTE_TRUSTED_KEYS; do