Skip to content

feat(env-setup): add free_disk_space toggle for disk-constrained runners#26

Merged
AndriiTsok merged 1 commit intomainfrom
feat/free-disk-space
Apr 18, 2026
Merged

feat(env-setup): add free_disk_space toggle for disk-constrained runners#26
AndriiTsok merged 1 commit intomainfrom
feat/free-disk-space

Conversation

@AndriiTsok
Copy link
Copy Markdown
Contributor

Why

mcpg-dev/source-code PR #22 hit "No space left on device" during the build step after tests completed. Cold full-rebuild of 28 crates + llvm-cov instrumentation + sccache local cache + wasm32-wasip2 target tree + redis/nats binaries exceeds the ~14 GB runner ceiling.

Fix

New .environment.yml field:

free_disk_space: true

When set (Linux only), runs jlumbroso/free-disk-space@v1.3.1 right after the config parser — before any install/compile step — with a conservative profile:

Target Size freed
android SDK ~11 GB
.NET ~2 GB
Haskell ~5 GB
Docker pre-pulled images ~3 GB
tool-cache (Node/Python/Go pre-installs) kept
swap storage kept (Rust linker benefits)
large apt packages kept (slow removal, marginal gain)

Expected ~18–20 GB free after the step vs ~14 GB baseline.

Opt-in — default false — so existing consumers don't pay the ~30–60s cleanup cost they don't need.

🤖 Generated with Claude Code

GitHub-hosted ubuntu runners start with ~14 GB free but ship pre-loaded
with Android SDK, .NET, Haskell, and several GB of Docker images that a
typical Rust/Nx build never touches. On the mcpg workspace the cold
full-rebuild hit disk-full during the build step (tests + llvm-cov
instrumentation + sccache staging + 28-crate target/debug + wasm target
exceeded the ceiling) even after dropping redundant build targets.

Opt-in via `free_disk_space: true` in `.environment.yml`. When set,
runs jlumbroso/free-disk-space@v1.3.1 right after the parser — before
any install/compile step — with a conservative profile:

  android: true            ~11 GB
  dotnet: true             ~2 GB
  haskell: true            ~5 GB
  docker-images: true      ~3 GB
  tool-cache: false        keep Node/Python/Go pre-installs
  swap-storage: false      keep swap (Rust linker still benefits)
  large-packages: false    slow, marginal gain

Expected: ~18–20 GB free after the step vs ~14 GB baseline — more than
enough headroom for the mcpg workload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AndriiTsok AndriiTsok merged commit d9f6eac into main Apr 18, 2026
6 checks passed
@AndriiTsok AndriiTsok deleted the feat/free-disk-space branch April 18, 2026 19:03
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.

1 participant