Host space: real tests

The native suite is tests/space_reclaim/ in the Stado repository, registered as space-reclaim and space-reclaim-evidence in stado-rs/Cargo.toml. On macOS each case attaches its own 256 MB sparse APFS volume as the isolated home, so the real Stado executable crosses the declared disk-full threshold without touching the machine's files. A case fills that volume in blocks of its own allocation size until it keeps less free than the rule's reserve, and goes on only once stado host gates reads it as full. The promise case runs the host's space-reclaim watch at a 2-second health interval. It covers success and refusals for local and fleet reclaim, lock ownership on the janitor's shared lock and hold names, symlink protection, promises, editor build holds, both Probierz evidence prefixes and preserved user data. Run cargo test --manifest-path stado-rs/Cargo.toml --test space-reclaim --test space-reclaim-evidence -- --test-threads=1. Reports stay under build/real-tests/space-reclaim/<case>-<uuid>/report.json.

The sourcekit case starts the real BSP server, exchanges framed protocol requests before and after a reclamation pass, and acquires the kernel reclaim lock while the editor is alive, which shows the editor holds no cleanup lock. With the janitor's turn request standing behind the live test process it verifies that a build is refused before anything is exported or built, naming that request, and that a damaged turn request refuses the build naming its path. It then fills only the isolated volume, checks that tagged cache is deleted and user data survives, and closes the client. A build that waits for an exclusive pass and runs once it lets go is covered by tests/space_reclaim/guards/product_hold.rs. The fixture retains source identity, commands, statuses, protocol responses and persisted state. The release manifest's macOS editor-reclaim gate runs this case.

The release manifest runs space-reclaim-evidence as a macOS post-build gate. It exercises the real local reclaim CLI against both evidence prefixes and a linked results root, retaining the command/status report in the isolated build directory.

The isolated launchd cutover journey is node tests/service/retired_command.mjs. It requires STADO_BIN, STADO_SERVICE_TEST_HOME, STADO_SERVICE_TEST_CONFIG and STADO_SERVICE_TEST_HOST for a dedicated running host whose managed unit file lives under this checkout's ignored .build. It records the source revision, command exit statuses, stderr and final launchd state in .build.

Source: this website