This project enforces daemon ownership (vz-runtimed) for runtime mutations.
Default runtime path layout is deterministic:
- state DB:
~/.vz/stack-state.db - daemon runtime data dir:
<state-db-parent>/.vz-runtime - daemon gRPC socket:
<runtime-data-dir>/runtimed.sock
Supported env overrides:
VZ_RUNTIME_STATE_DB: override default state DB path used by CLI runtime commands.VZ_RUNTIME_DATA_DIR: override runtime data dir (socket is<dir>/runtimed.sock).VZ_RUNTIME_DAEMON_SOCKET: explicit socket path override (takes precedence over runtime data dir).VZ_RUNTIME_DAEMON_AUTOSTART: enable/disable daemon auto-spawn (1/0,true/false, etc).
Run:
./scripts/check-daemon-only-guardrails.shThe check fails when:
- Runtime CLI command files bypass daemon client wiring.
- Runtime CLI command files open SQLite directly.
vz-apiproduction surfaces open SQLite directly.- Known fail-closed runtime parity gaps are removed without replacement.
- Any Runtime V2 RPC in
runtime_v2.protohas no test invocation in daemon/client/API coverage suites.
Run the RPC coverage gate directly:
./scripts/check-runtime-v2-rpc-test-coverage.shCurrent daemon-backed integration coverage includes:
- Sandbox create stream progress/completion:
cargo test -p vz-runtimed-client create_sandbox_stream_emits_progress_and_completion
- Stack apply/status/events/teardown:
cargo test -p vz-runtimed-client stack_apply_and_teardown_round_trip_via_daemon_client
- API daemon-backed sandbox lifecycle smoke:
cargo test -p vz-api --test server_smoke runtime_api_server_smoke_sandbox_crud_and_file_ops
Default evidence flow for checkpointed spaces combines runtime file/system evidence and git delta:
# Runtime-owned file/system evidence between checkpoints.
vz diff <from-checkpoint-id> <to-checkpoint-id> --mode patch
# Code-level working tree delta in the checked-out project.
git diffAPI transport parity for checkpoint evidence is provided via GET /v1/checkpoints/diff
(from_checkpoint_id + to_checkpoint_id query parameters), and vz diff now uses that
endpoint when VZ_CONTROL_PLANE_TRANSPORT=api-http.
Checkpoint retention now applies lineage-aware behavior for fork trees:
- Tagged checkpoints are protected from GC.
- Ancestors of tagged checkpoints are also protected.
- When a checkpoint is selected for deletion, descendants are deleted via lineage cascade.
Visibility surfaces:
- API checkpoint payload field
retention_gc_reasonmay be:age_limitcount_limitlineage_cascade
- CLI
vz checkpoint listshows the same reason in theGC REASONcolumn. - Maintenance audit records include:
- event type
checkpoint_gc_compacted - receipt operation
checkpoint_gc_compact - reason-bucket arrays in receipt metadata:
deleted_by_age,deleted_by_count,deleted_by_lineage
- event type
Daemon-owned spaces cache state currently uses:
- index file:
<state-store-parent>/space-cache-index.json - artifact root:
<state-store-parent>/space-cache-artifacts/<cache-name>/<digest-hex>/
Lifecycle behavior:
- Cache identity is deterministic from canonical key material (
SpaceCacheKeyschema). - First prepare is expected
local_miss_cold; subsequent prepare with identical key islocal_hit. - Schema-version mismatch invalidates stale index entries during prepare.
- Remote verified artifacts are materialized only through daemon paths.
Portability and storage policy:
- Cache artifact materialization is fail-closed unless daemon state storage is Linux+btrfs.
- Linux non-btrfs daemon state parents are rejected for cache artifact materialization.
- Non-Linux platforms are rejected for cache artifact materialization.
Benchmark/evidence workflow:
./scripts/run-space-cache-benchmark.shArtifacts are written to .artifacts/space-cache-bench/<timestamp>/ with:
run-info.txt(host/profile/test metadata)<test>.log(raw command output)summary.txt(benchmark marker line)
Spaces R1 excludes live host mount features in sandbox lifecycle surfaces.
vz sandbox createdoes not expose--mount/--volumestyle host-mount flags.- API
POST /v1/sandboxescreate contract is workspace/project-dir based and does not accept host mount configuration. - Guardrail checks fail if host-mount flags are introduced on sandbox create paths.
Daemon startup reconcile and post-restart attach semantics are validated with:
cargo test -p vz-runtimed daemon_start_reconciles_non_terminal_executions_to_failedcargo test -p vz-runtimed daemon_start_reconciles_non_terminal_builds_to_failedcargo test -p vz-runtimed --lib stream_exec_output_after_restart_reconcile_returns_terminal_failure_event
Run the complete client integration suite:
cd crates
cargo test -p vz-runtimed-clientCurrent transport note:
VZ_CONTROL_PLANE_TRANSPORT=api-httpis accepted by CLI and must route through API HTTP client helpers (no direct daemon-gRPC fallback shim).- Legacy local-runtime OCI mutation paths (
vz oci run/create/exec/stop/rm). - Legacy local-runtime image build path (
vz image build).