From a61ca3f8f6869d19ec4cf81d34eabd43cf98d851 Mon Sep 17 00:00:00 2001 From: joelteply Date: Sat, 31 Oct 2026 06:46:14 -0500 Subject: [PATCH 1/4] CI builds on the runner's scratch disk: the shared target is 24 GB unpacked, restored beside its 5 GiB download on a root disk that ran out (card 27a4a3b0) Warm run 41193606500 (f0f786d19, 2026-10-31) leaves target at 24G after pruning 5.79 GB of test executables. Every Linux crate job restores it, plus its 5 GiB tarball, onto / and builds its tests on top; on 10-31 that hit "No space left on device" mid-setup or mid-build on #5638, #5649 (twice) and #5641 (job 124526077711 died inside rust-ci-setup), each costing a rerun and hiding the real result. rust-ci-setup now puts CARGO_TARGET_DIR on /mnt (the runner's scratch disk), refusing loudly if /mnt is not a separate mount, and logs df for both disks. The cache's restore and save path is /mnt/target in both the setup action and the warm workflow, so they stay one cache. Nothing else names the target dir: the lib-test artifact script and the evidence upload read cargo's own target_directory, and the freshness settle only skips a workspace-local `target`. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --- .github/actions/rust-ci-setup/action.yml | 15 ++++++++++++++- .github/workflows/rust-warm-cache.yml | 5 +++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/actions/rust-ci-setup/action.yml b/.github/actions/rust-ci-setup/action.yml index 22de029b97..14f1553bb7 100644 --- a/.github/actions/rust-ci-setup/action.yml +++ b/.github/actions/rust-ci-setup/action.yml @@ -23,6 +23,19 @@ outputs: runs: using: composite steps: + # The shared target is 24 GB unpacked (warm run 41193606500 at f0f786d19, 2026-10-31: 24G + # after pruning 5.79 GB of test executables), restored beside its 5 GiB download, and a crate + # job builds its tests on top. On the root disk that ran out mid-setup and mid-build (#5638, + # #5649 twice, #5641 on 10-31: "No space left on device"). /mnt is the runner's own scratch + # disk; the build lives there. Not a separate mount means no room for the cache: say so. + - name: Build on the runner's scratch disk + shell: bash + run: | + mountpoint -q /mnt || { echo "::error::/mnt is not a separate disk on this runner; the 24 GB shared target does not fit the root disk"; exit 1; } + sudo install -d -o "$(id -u)" -g "$(id -g)" /mnt/target + echo "CARGO_TARGET_DIR=/mnt/target" >> "$GITHUB_ENV" + df -h / /mnt + - name: Install Rust toolchain from rust-toolchain.toml shell: bash run: | @@ -95,7 +108,7 @@ runs: uses: actions/cache/restore@v4 with: path: | - target + /mnt/target ~/.cargo/registry/index ~/.cargo/registry/cache ~/.cargo/git/db diff --git a/.github/workflows/rust-warm-cache.yml b/.github/workflows/rust-warm-cache.yml index 5d1be187b5..c1943fd4fb 100644 --- a/.github/workflows/rust-warm-cache.yml +++ b/.github/workflows/rust-warm-cache.yml @@ -54,12 +54,13 @@ jobs: core_features=$(node -p 'require("./tools/scripts/ci-change-scope.cjs").TEST_FEATURES["continuum-core"]') cargo test --locked -p continuum-core --bin continuum --profile dev-fast --features "$core_features" --no-run --message-format=json >> warm.jsonl node tools/scripts/ci-cargo-freshness.cjs prune-test-executables warm.jsonl - du -sh target ~/.cargo/registry ~/.cargo/git + du -sh "$CARGO_TARGET_DIR" ~/.cargo/registry ~/.cargo/git + df -h / /mnt - name: Save the shared target cache uses: actions/cache/save@v4 with: path: | - target + /mnt/target ~/.cargo/registry/index ~/.cargo/registry/cache ~/.cargo/git/db From 05ab52c9862698246830d3d233eb89f739160e81 Mon Sep 17 00:00:00 2001 From: joelteply Date: Sat, 31 Oct 2026 06:47:55 -0500 Subject: [PATCH 2/4] ci-cargo-freshness: drop the workspace-local 'target' skips; the build lives on the scratch disk now (Fable on #5650) Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --- tools/scripts/ci-cargo-freshness.cjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/scripts/ci-cargo-freshness.cjs b/tools/scripts/ci-cargo-freshness.cjs index b9734a878e..fdf23d3a87 100644 --- a/tools/scripts/ci-cargo-freshness.cjs +++ b/tools/scripts/ci-cargo-freshness.cjs @@ -124,7 +124,8 @@ function settle({ root, prefix, matchedKey, cargoHome, crateDirs, log = console. return { settled: false }; } const work = plan(entries, { kind: kindOf(root), crateDirs }); - const count = settleTree(root, SETTLED, new Set(['.git', 'target'])); + // The build lives on the runner's scratch disk (CARGO_TARGET_DIR, rust-ci-setup), never in the tree. + const count = settleTree(root, SETTLED, new Set(['.git'])); const touch = p => { const full = path.join(root, p); setTime(full, { isSymbolicLink: () => fs.lstatSync(full).isSymbolicLink() }, now); }; work.files.forEach(touch); work.dirs.forEach(touch); @@ -133,7 +134,7 @@ function settle({ root, prefix, matchedKey, cargoHome, crateDirs, log = console. for (const crate of work.crates) { walk(path.join(root, crate), (full, entry) => { if (!entry.isDirectory() && full.endsWith('.rs')) { setTime(full, entry, now); crateSources++; } - }, new Set(['target'])); + }); } log(`Cache commit ${commit}: settled ${count} workspace entries; ${entries.length} paths differ -> ` + `${work.files.length} files, ${work.trees.length} submodules, ${work.dirs.length} directories of deletions, ` From 19a46ba63606b364258b41f3f2767e01c15b35ad Mon Sep 17 00:00:00 2001 From: joelteply Date: Sat, 31 Oct 2026 06:48:54 -0500 Subject: [PATCH 3/4] rust-ci-setup: log the runner's disks and its largest preinstalled trees (diagnostic: /mnt is not a separate disk on the current ubuntu-latest image) Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --- .github/actions/rust-ci-setup/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/rust-ci-setup/action.yml b/.github/actions/rust-ci-setup/action.yml index 14f1553bb7..06b1d6006d 100644 --- a/.github/actions/rust-ci-setup/action.yml +++ b/.github/actions/rust-ci-setup/action.yml @@ -31,6 +31,8 @@ runs: - name: Build on the runner's scratch disk shell: bash run: | + df -h; lsblk -o NAME,SIZE,MOUNTPOINT; cat /etc/os-release | head -3 + sudo du -sh /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache /usr/share/swift /usr/local/share/powershell /usr/local/share/chromium /opt/microsoft 2>/dev/null || true mountpoint -q /mnt || { echo "::error::/mnt is not a separate disk on this runner; the 24 GB shared target does not fit the root disk"; exit 1; } sudo install -d -o "$(id -u)" -g "$(id -g)" /mnt/target echo "CARGO_TARGET_DIR=/mnt/target" >> "$GITHUB_ENV" From 0c9128d04c5d151268f528c45bfbbef07e954fea Mon Sep 17 00:00:00 2001 From: joelteply Date: Sat, 31 Oct 2026 06:52:05 -0500 Subject: [PATCH 4/4] rust-ci-setup: build where the runner has room, at one path (/ci-target, bind-mounted onto /mnt on the 24.04 image when its scratch disk has more space); the 26.04 image has one 145G disk with 87G free, measured on this PR's run Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --- .github/actions/rust-ci-setup/action.yml | 27 ++++++++++++++---------- .github/workflows/rust-warm-cache.yml | 4 ++-- tools/scripts/ci-cargo-freshness.cjs | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/actions/rust-ci-setup/action.yml b/.github/actions/rust-ci-setup/action.yml index 06b1d6006d..df80857be5 100644 --- a/.github/actions/rust-ci-setup/action.yml +++ b/.github/actions/rust-ci-setup/action.yml @@ -25,18 +25,23 @@ runs: steps: # The shared target is 24 GB unpacked (warm run 41193606500 at f0f786d19, 2026-10-31: 24G # after pruning 5.79 GB of test executables), restored beside its 5 GiB download, and a crate - # job builds its tests on top. On the root disk that ran out mid-setup and mid-build (#5638, - # #5649 twice, #5641 on 10-31: "No space left on device"). /mnt is the runner's own scratch - # disk; the build lives there. Not a separate mount means no room for the cache: say so. - - name: Build on the runner's scratch disk + # job builds its tests on top. Two runner images are in rotation while ubuntu-latest moves to + # 26.04 (from 2026-10-19). The 24.04 image's root disk ran out mid-setup and mid-build on + # 10-31 (#5638, #5649 twice, #5641: "No space left on device"); it has a separate scratch disk + # at /mnt. The 26.04 image has one disk: 145G, 87G free (measured on #5650's run). The build + # goes on whichever disk has more room, at ONE path, so the cache restores and saves the same + # way on both images. + - name: Build where the runner has room shell: bash run: | - df -h; lsblk -o NAME,SIZE,MOUNTPOINT; cat /etc/os-release | head -3 - sudo du -sh /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache /usr/share/swift /usr/local/share/powershell /usr/local/share/chromium /opt/microsoft 2>/dev/null || true - mountpoint -q /mnt || { echo "::error::/mnt is not a separate disk on this runner; the 24 GB shared target does not fit the root disk"; exit 1; } - sudo install -d -o "$(id -u)" -g "$(id -g)" /mnt/target - echo "CARGO_TARGET_DIR=/mnt/target" >> "$GITHUB_ENV" - df -h / /mnt + sudo install -d -o "$(id -u)" -g "$(id -g)" /ci-target + root_free=$(df --output=avail -B1 / | tail -1) + if mountpoint -q /mnt && [ "$(df --output=avail -B1 /mnt | tail -1)" -gt "$root_free" ]; then + sudo install -d -o "$(id -u)" -g "$(id -g)" /mnt/ci-target + sudo mount --bind /mnt/ci-target /ci-target + fi + echo "CARGO_TARGET_DIR=/ci-target" >> "$GITHUB_ENV" + df -h / /ci-target - name: Install Rust toolchain from rust-toolchain.toml shell: bash @@ -110,7 +115,7 @@ runs: uses: actions/cache/restore@v4 with: path: | - /mnt/target + /ci-target ~/.cargo/registry/index ~/.cargo/registry/cache ~/.cargo/git/db diff --git a/.github/workflows/rust-warm-cache.yml b/.github/workflows/rust-warm-cache.yml index c1943fd4fb..61ad9177ce 100644 --- a/.github/workflows/rust-warm-cache.yml +++ b/.github/workflows/rust-warm-cache.yml @@ -55,12 +55,12 @@ jobs: cargo test --locked -p continuum-core --bin continuum --profile dev-fast --features "$core_features" --no-run --message-format=json >> warm.jsonl node tools/scripts/ci-cargo-freshness.cjs prune-test-executables warm.jsonl du -sh "$CARGO_TARGET_DIR" ~/.cargo/registry ~/.cargo/git - df -h / /mnt + df -h / "$CARGO_TARGET_DIR" - name: Save the shared target cache uses: actions/cache/save@v4 with: path: | - /mnt/target + /ci-target ~/.cargo/registry/index ~/.cargo/registry/cache ~/.cargo/git/db diff --git a/tools/scripts/ci-cargo-freshness.cjs b/tools/scripts/ci-cargo-freshness.cjs index fdf23d3a87..a54747e965 100644 --- a/tools/scripts/ci-cargo-freshness.cjs +++ b/tools/scripts/ci-cargo-freshness.cjs @@ -124,7 +124,7 @@ function settle({ root, prefix, matchedKey, cargoHome, crateDirs, log = console. return { settled: false }; } const work = plan(entries, { kind: kindOf(root), crateDirs }); - // The build lives on the runner's scratch disk (CARGO_TARGET_DIR, rust-ci-setup), never in the tree. + // The build lives outside the tree (CARGO_TARGET_DIR=/ci-target, rust-ci-setup). const count = settleTree(root, SETTLED, new Set(['.git'])); const touch = p => { const full = path.join(root, p); setTime(full, { isSymbolicLink: () => fs.lstatSync(full).isSymbolicLink() }, now); }; work.files.forEach(touch);