Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ai/runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ Do not use `completed` when checks were skipped or when the result relies on unv
## Artifact exchange

See [Immutable Artifact Broker](artifacts/README.md) for the standalone content-addressed export, verification and read-only reviewer snapshot CLI. Sandbox-required Orchestrator runs export immutable review evidence after the Agent and sandboxed checks exit; approval and integration re-verify the artifact. Legacy unsandboxed runs do not auto-export. Agents must not exchange files through shared writable directories.

## Sandbox backend decision

See [ADR-001](sandbox/ADR-001-backend-selection.md) for why Linux Rootless Podman is the first full-profile backend and why macOS Seatbelt alone is not treated as full isolation.
4 changes: 4 additions & 0 deletions .ai/runtime/sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ A backend is not production-ready until tests demonstrate denial of:

Record backend/version, host OS, effective profile hash, task ID, start/end, exit/termination reason, resource usage, policy denials and artifact digests. Do not record secret values.

## Backend selection

See [ADR-001: Production Sandbox Backend Selection](ADR-001-backend-selection.md) for the platform decision, Linux Rootless Podman prerequisites, macOS Seatbelt limitations, isolated Git metadata requirement and Credential/Network Broker dependency.

## Launcher implementation status

The current launcher contract is implemented in `scripts/sandbox_runtime.py`. The Orchestrator accepts the trusted control-plane switch `--require-sandbox` (default profile: the stable checkout's `.ai/runtime/examples/sandbox-profile.json`) and passes it to every Agent Runner. The Agent Runner accepts `--require-sandbox --sandbox-profile <file>` and refuses to start when no complete backend is registered. Its handoff records `sandbox_status`, backend ID and profile digest. Legacy runs without `--require-sandbox` are explicitly marked `not-enforced`; they are not considered isolated.
Expand Down
1 change: 1 addition & 0 deletions scripts/validate-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ required_files=(
".ai/runtime/schemas/artifact-manifest.schema.json"
".ai/runtime/artifacts/README.md"
".ai/runtime/sandbox/LAUNCHER-CONTRACT.md"
".ai/runtime/sandbox/ADR-001-backend-selection.md"
".ai/runtime/examples/sandbox-profile.json"
".ai/runtime/schemas/sandbox-profile.schema.json"
".ai/runtime/schemas/task.schema.json"
Expand Down
8 changes: 6 additions & 2 deletions tasks/evolution/M4-sandbox-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ Introduce OS-enforced, task-scoped isolation so multiple cooperating Agents cann
| M4.0 | Sandbox Contract + architecture | Versioned JSON Schema, threat model, trust-zone and fail-closed rules |
| M4.1 | Pi unsafe-write correction | Generated tasks never auto-authorize; explicit CLI override; regression tests; default refusal |
| M4.2a | Launcher contract | Backend interface, profile validation, capability doctor, handoff enforcement evidence, fail-closed Runner integration |
| M4.2b | First OS backend | macOS Seatbelt full-process launcher, sanitized environment, effective-policy doctor and macOS conformance tests |
| M4.2b | Backend decision | Accepted platform ADR; Linux Rootless Podman selected for full profile; shared Git metadata and credential-broker dependencies documented |
| M4.3a | Artifact Broker core | Content-addressed export, manifest/hash verification, read-only reviewer materialization, path/symlink/type/size validation |
| M4.3b | Artifact Broker integration | Sandbox-required Orchestrator exports immutable review artifacts after Agent and checks exit; approval and Integrator verify task/base/fingerprint binding |
| M4.4 | Linux OCI backend | Rootless runtime, namespaces, seccomp, LSM, resource limits, network deny, conformance suite |
| M4.4 | Linux Rootless OCI backend | Rootless Podman, cgroup-v2 delegated limits, namespaces, seccomp/LSM, network deny, private Git metadata, conformance suite |
| M4.5 | Strong isolation backends | gVisor/Kata/Firecracker plugin interface and documented deployment profiles |
| M4.6 | Brokers and audit | Scoped credential/network broker, policy hash, denial evidence, operational guide |

## Backend decision

The platform selection and prerequisites are recorded in [ADR-001: Production Sandbox Backend Selection](../../.ai/runtime/sandbox/ADR-001-backend-selection.md). Linux Rootless Podman is the primary full-profile backend; macOS Seatbelt is a possible weaker local profile, not a full-profile substitute. The first Linux backend must also solve shared Git metadata isolation and use a pinned runtime image. Hosted-model credentials remain blocked until M4.6.

## Execution order

M4.0 is documentation and schema only. M4.1 is merged. M4.2a defines the backend interface and fail-closed launch path, but does not provide OS enforcement. M4.2b adds a real host backend and must not be marked complete until process-tree tests prove that file tools, shell tools, MCP/hooks and descendants share the boundary. M4.3 can be developed independently after the immutable artifact contract is agreed. Linux backend work follows the broker and policy interfaces.
Expand Down