test: harden harness reproducibility and cleanup

This commit is contained in:
2026-09-11 06:05:52 +00:00
parent 51fa88d05b
commit e7b9625210
5 changed files with 523 additions and 77 deletions
+13 -10
View File
@@ -34,8 +34,8 @@ 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.
may contain resumable environments; use the exact-run
`scripts/test-env purge --run-id ID --execute --yes` 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
@@ -104,6 +104,7 @@ respective durability or wire boundary:
scripts/test-env doctor
scripts/test-integration --suite sample --run-id my-sample
scripts/test-integration --list
scripts/test-integration --suite all --run-id integration-all
scripts/test-integration --suite store --case '^TestStore' --run-id store-one-case
scripts/test-env status --run-id my-sample
scripts/test-env collect --run-id my-sample
@@ -111,19 +112,19 @@ scripts/test-env reset --run-id my-sample
scripts/test-env reuse --run-id my-sample
scripts/test-integration --suite sample --run-id my-sample --resume
scripts/test-env reset --run-id my-sample
scripts/test-env purge --run-id my-sample
scripts/test-env purge --run-id my-sample --execute --yes
scripts/test-integration --suite store --run-id store-smoke
scripts/test-env logs --run-id store-smoke
scripts/test-env collect --run-id store-smoke
scripts/test-env reset --run-id store-smoke
scripts/test-env purge --run-id store-smoke
scripts/test-env purge --run-id store-smoke --execute --yes
scripts/test-integration --suite server-session --run-id session-smoke
scripts/test-env logs --run-id session-smoke
scripts/test-env collect --run-id session-smoke
scripts/test-env reset --run-id session-smoke
scripts/test-env purge --run-id session-smoke
scripts/test-env purge --run-id session-smoke --execute --yes
scripts/test-e2e --scenario smoke --run-id e2e-smoke
scripts/test-e2e --list
@@ -132,7 +133,7 @@ scripts/test-env status --run-id e2e-smoke
scripts/test-env recover --run-id e2e-smoke
scripts/test-e2e --scenario smoke --run-id e2e-smoke --resume
scripts/test-env reset --run-id e2e-smoke
scripts/test-env purge --run-id e2e-smoke
scripts/test-env purge --run-id e2e-smoke --execute --yes
```
The client runtime unit lane also exercises a real child process through the
@@ -159,10 +160,12 @@ never removes the shared Go module or build-cache volumes.
Each run owns only `.test-runs/<run-id>` and resources explicitly recorded in
that run's versioned manifest. The journal is append-only and fsynced. `purge`
validates the run ID and manifest identity, refuses symlink targets or manifests
that still list runtime resources, and then removes only that exact run. Purged
artifacts are not recoverable. Dependency cache volumes are never part of run
cleanup.
first prints the exact validated target and is dry-run by default. It requires
`--execute --yes`, refuses symlink targets or manifests that still list runtime
resources, and then removes only one completed/reset run (or eligible runs
selected by `--all`). `gc --older-than DURATION` uses the same explicit
execution confirmation. Purged artifacts are not recoverable. Dependency cache
volumes are never part of run cleanup.
`test/coverage.toml` is the incremental requirement-to-test inventory. The
`make verify` lint stage checks unique stable IDs and verifies every implemented