NFR00 - Non-functional requirements
Purpose: How fast, how small, on which platforms, and how maintainable Wraith Box must be.
Requirements
Section titled “Requirements”- NFR01-startup: Startup. Goals: a warm VM reaches the Claude prompt
in about 4 s and a suspended VM in about 7 s, and no start takes more
than 10 s (p95), excluding first-time project setup and the first boot
after a host restart. V1-M6-release-gateV1-M6-release-gate: Release gateThe Seatbelt profiles of wb-hostd and the sessions, confinement self-checks, warm start and suspend, the full conformance suite and benchmarks, packaging and upgrades. doesn’t pass or fail on these
goals. Performance work is planned later, and until then it’s enough
to know where a goal isn’t met yet (decided on I111I111 (closed): NFR00-index: write the performance requirements as goals, like NFR02-fs-speedX18-vsock-handoff measured a cold boot to wb-guestd at 10.93 s (p50) and 13.48 s (p95), against the 10 s hard ceiling (p95) of NFR01-startup (#86).). Measured so far,
on an Apple M2 host with 16 GB and a 4 vCPU guest that sat idle, and
not yet to the Claude prompt:
- A restore from saved state, with the state file not in the host’s
page cache, answers on the network in 3.7 s (p50) and 3.9 s (p95)
with 4 GiB of guest memory, and in 4.1 s and 4.6 s with 8 GiB
(X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment.).
wb-guestdanswers on vsock 4.1 s (p50) and 4.2 s (p95) after a 4 GiB restore starts (X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest?). - A cold boot, which is how every new VM starts the first time, reaches the guest daemon’s vsock listener in 10.9 s (p50) and 13.5 s (p95), over the 10 s goal (X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest?). I86I86 (open): Cold boot to wb-guestd takes about 11 s, above the NFR01-startup ceilingFound by X18-vsock-handoff (#29). looks at the boot.
- A warm VM, already running, hasn’t been measured.
- A restore from saved state, with the state file not in the host’s
page cache, answers on the network in 3.7 s (p50) and 3.9 s (p95)
with 4 GiB of guest memory, and in 4.1 s and 4.6 s with 8 GiB
(X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment.).
- NFR02-fs-speed: Filesystem. The workspace is on guest-native storage. Goal:
about 80% of host throughput on representative workloads (
npm ci,git statuson a large repo, incremental build), measured by the benchmark suite (S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…). V1-M6-release-gateV1-M6-release-gate: Release gateThe Seatbelt profiles of wb-hostd and the sessions, confinement self-checks, warm start and suspend, the full conformance suite and benchmarks, packaging and upgrades. doesn’t pass or fail on this goal. Results vary more between hosts (FileVault, Endpoint Security agents, load, chip generation) than the gap in question, so a fixed bar would pass on one Mac and fail on the next without saying anything about the design (decided on I19I19 (closed): X05-fs-benchmark: Filesystem benchmarkHow does the data disk perform with default versus relaxed write-through settings, against the host, on the NFR02-fs-speed workloads?). Expected overhead, as measured: disk-heavy agent work (npm ci) runs at 71% of the host on the data disk and 77% on a guest RAM disk, on a loaded host (X05-fs-benchmarkX05-fs-benchmark: Filesystem benchmarkData disk with default versus relaxed write-through settings, against the host, on the NFR02-fs-speed workloads.). CPU-bound and memory-bound overhead hasn’t been measured, so no figure is given for it. - NFR03-footprint: Footprint. Idle VMs suspend after a configurable period. Disk use grows only with divergence from the base image (copy-on-write clones).
- NFR04-host-platforms: Host platforms. First target: Apple Silicon, macOS 27 or later,
because
wb image buildneeds the guest provisioning options that are new in macOS 27 (X17-image-buildX17-image-build: Unattended image buildCan a macOS guest installed from an Apple restore image get past Setup Assistant, with wb-guestd running as a root LaunchDaemon, without SSH, scripted clicks, or MDM?). Later: Windows 11 (Home and Pro) and Ubuntu LTS, with other Linux distributions considered after that. Works on managed (MDM or domain-joined) machines on every host OS. - NFR05-two-macos-vms: Platform limit. macOS permits at most two concurrently running macOS guests per host. The design works within that limit (S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does.). Other guest operating systems are limited only by resources.
- NFR06-explained-refusals: Operability. Every refusal names the rule that caused it and how to change it.
- NFR07-maintainability: Maintainability. Most code is cross-platform Go. Platform-native code (Swift on macOS, and the native toolchain of Windows or Linux only where Go cannot do the job) is confined to small components behind defined contracts (S10-tech-stackS10-tech-stack: Technology ChoicesFix languages, libraries, packaging, and repository layout, with the reason for each choice.). Complexity gates, fuzzing for every parser that faces the guest, Go CI on all three host OSes from the start.
- NFR08-licensing: Licensing. Apache-2.0; dependencies under permissive licenses only.