build: add safe toolchain cleanup and recovery

This commit is contained in:
2026-09-09 06:49:57 +00:00
parent a9aec8d9a8
commit 665901afcd
3 changed files with 172 additions and 15 deletions
+16
View File
@@ -21,6 +21,22 @@ Build all supported binaries without installing `make` or Go on the host:
scripts/build build
```
`scripts/build doctor` reports the exact owned builder image, Go cache volumes,
and ignored `bin/` artifact directory. To reclaim space, cleanup is dry-run by
default and never performs a global Docker prune:
```sh
scripts/build clean --all
scripts/build clean --all --execute --yes
scripts/build recover
```
The second command removes only `bin/`, `rvbox-dev-toolchain:latest`, and the
two named RVBox Go-cache volumes. `recover` rebuilds the pinned toolchain and
all binaries from source. It intentionally does not remove `.test-runs/`, which
may contain resumable environments; use the exact-run `scripts/test-env purge`
workflow for those.
For a native Windows run, create the immutable per-run test bundle with the
pinned toolchain. Supply a test-specific config whose endpoint and CA path are
valid for that run; the command refuses to replace an existing bundle.