Verifier isolation backends
How AIWG picks and live-probes the sandbox that checks worker output, with per-OS support.
Verifier isolation backends
Prompt-first procedure: Describe the outcome you want in your agent conversation. The agent should select and load the appropriate AIWG assets, explain material changes, request any needed approval, and report verification evidence. Exact commands and flags appear only in the CLI reference.
the agent-owned ralph-external operation executes conductor-defined checks against worker-controlled content. Before a check starts, its selected backend must live-prove write confinement, home-read protection, private temporary storage, network isolation, host tmp write confinement, and no-new-privileges. A missing executable, failed spawn, timeout, malformed probe output, or missing required capability returns `ISOLATION_UNAVAILABLE`. The CLI reports `blocked` and exits 2. There is no degraded override, including for callers of the older `allowDegradedIsolation` API option.
Platform support and qualification
| Platform | Backend preference | Qualification in #4610 |
|---|---|---|
| Linux, Ubuntu | `/usr/bin/bwrap`, then `systemd-run the user option` | Ubuntu 26.04.1, bubblewrap 0.11.1, userns restriction set to 1: live required-capability probe passed on 2026-12-02. Good/mutated artifact CLI checks recorded in the implementation work report. No executor AppArmor profile or sysctl change was made. |
| Linux, other distributions | Same live selection | Unqualified on a real non-Ubuntu host. Injected-probe tests cover systemd fallback and refusal; these tests do not establish distro support. |
| macOS | No qualified backend; specific Seatbelt diagnostic | Unqualified on a real macOS host. Injected platform tests prove refusal only. |
| Windows | No qualified native/WSL bridge; specific Windows diagnostic | Unqualified on a real Windows host. Injected platform tests prove refusal only. |
Install `bwrap` from the distribution package so it exists at `/usr/bin/bwrap`. This is the only additional Linux package prerequisite. Bundled binaries and PATH substitutes are deliberately not considered: Ubuntu's executable-specific policy covers the distro path. The implementation neither edits nor requests changes to AppArmor profiles, sysctls, or host services. If local policy blocks both backends, verification stays blocked with the observed reasons.
WSL2 is not silently selected from a Windows process. Operators running the entire verifier inside a Linux WSL distribution get the Linux live probe; that does not qualify the Windows launcher or cross-OS path/environment handling.
Backend contract and diagnostics
The existing `probeVerificationIsolationCapabilities()` entry point selects the first backend that proves all required capabilities. Each implementation exposes `probe(options)` and `wrap(argv, {worktree, outputDir, scratch, ...})`. `probe` returns the existing `enforced`/`degraded` vocabulary with structured evidence; `wrap` returns a confined absolute launch argv. Selection includes `backend`, `selectedBackend`, `evidence`, and `rejectedBackends`. No selected backend is reported when all candidates fail. Each rejection retains the prerequisite or probe failure and its missing capabilities. Failed selection is retried on the next call; successful selections expire after five minutes and are keyed to platform, home, conductor PATH, and spawn identity.
Inspect the full probe without executing a worker check (from the installation):
node the input-type option=module -e '
import { probeVerificationIsolationCapabilities } from "./tools/ralph-external/lib/verification-isolation.mjs";
console.log(JSON.stringify(probeVerificationIsolationCapabilities({force:true}), null, 2));
'
The verifier CLI also includes the backend and rejected alternatives in its `isolation` diagnostics, including blocked results. Worker launcher and confined conductor profiles retain their existing systemd behavior; this feature selects backends only for verification.
Capability mapping
| Capability | bwrap probe | systemd probe/profile |
|---|---|---|
| `writeConfinement` | Read-only `/` bind; root mount reports `ro`; granted write observed outside; outside-scope sentinel absent | Existing `ReadOnlyPaths=/` and `BindPaths`/`ReadWritePaths` grants; root mount `ro` and outside sentinel checks |
| `homeReadIsolation` | Private home tmpfs; planted readable host sentinel hidden; private home writes never reach host | `ProtectHome=tmpfs`; planted host sentinel hidden and home entry count zero |
| `tmpIsolation` | Private `/tmp` and `/var/tmp`; planted host sentinels hidden, successful private writes absent outside | `PrivateTmp=yes`; positive private marker write absent on host |
| `networkIsolation` | the unshare-net option; numeric netns identity differs from independently read host baseline | `PrivateNetwork=yes`; numeric netns differs from checked host baseline |
| `noNewPrivileges` | bwrap drops capabilities; `/proc/self/status` confirms NNP | Existing `NoNewPrivileges=yes`; status measured inside unit |
| `tmpWriteConfinement` | Private tmp markers cannot reach host | Outside checks detect `/tmp` and `/var/tmp` write leaks |
| `arbitraryPathReadIsolation` | Degraded: host paths outside home/tmp remain readable | Same explicit residual read exposure |
bwrap creates private PID, IPC and UTS namespaces, mounts private `/proc`, `/dev` and `/run`, then restores only canonical worktree/output/scratch directory grants. Mount order preserves grants under home or tmp. Environment values cross through the existing allowlist/bootstrap-control rules; HOME and TMPDIR point to private storage. Node installed under home receives one explicit read-only executable bind, also exercised by the probe. Other tools hidden by home isolation may be unavailable; their checks fail rather than widening home visibility. bwrap uses the caller's bounded spawn timeout; it does not claim systemd's cgroup ceilings.
Seatbelt was evaluated as a candidate only: deny-network and write allowlists would need measured equivalents for private home and temporary mounts. A `sandbox-exec` executable or a generated profile alone cannot establish those capabilities. No Seatbelt profile is enabled without real-host qualification. Windows AppContainer and restricted-token/job-object designs likewise need measured file-read hiding, private storage, and network restrictions; job/process limits alone prove none of those. Neither platform has a qualified implementation in this change. Both remain fail-closed with their own documented reasons.