Skip to main content

Mission rehearsal

Before an agent formation acts on a workspace, you often want to know what it would do without letting it do anything. Mission rehearsal answers that: it runs an agent plan against a copy-on-write clone of the workspace inside an egress-denied sandbox, records every effect the plan would have had, and returns an attested "what it would have done" diff. The real workspace is never written, and no packet leaves the box.

Not the disaster-recovery drill

This is a different thing from the DR drill. A DR drill derives the real failover plan and runs it dry to prove a workspace can recover a site within its RPO/RTO. Mission rehearsal previews the effects of an agent plan against a throwaway clone of the workspace. One proves recovery readiness; the other previews agent behavior. Both are "rehearsals" in plain English, this page always means the agent-plan sense.

What it is​

A rehearsal takes a workspace and a plan, a declared set of effects the formation would attempt (writes, egress calls, tool calls, token cost), and replays that plan against real substrate in a contained way. The output is an AttestedRehearsalDiff: a journal of every would-be effect plus a tamper-evident SHA-256 attestation over the whole diff. An operator reads back what the plan would have changed, what it would have tried to send, and what it would have cost, with cryptographic evidence that the preview is exactly what ran.

The contained path​

The runtime wires five real mechanisms so the preview exercises the production path rather than a mock, while guaranteeing containment at each step.

Figure: the rehearsal path. The plan is applied only against a copy-on-write clone (cyan) of the workspace; the sandbox spec denies network structurally and every planned egress is refused under the shadow posture (amber); writes are diffed out of the clone and token cost is metered; the whole thing is folded into a SHA-256-attested diff (green). The real workspace (green) is never a write target.

Table equivalent

StepMechanismContainment guarantee
Clonecow_clone_workspace reflinks every file (the same FICLONE the data-plane shard clone uses; a full copy where reflinks are unavailable)The clone is the only write target; the real workspace is untouched
Sandbox specA sandbox specification (SandboxSpec) pointed at the clone with no broker socketEgress denied structurally, asserted against the emitted bwrap argv (--unshare-net)
EgressEvery planned egress decided by the live egress broker under the shadow postureUnconditional DENIED_POSTURE; a non-denied verdict raises and fails the rehearsal closed
WritesPlanned writes applied into the clone, then a real before/after walk + content-hash diffOne WRITE effect per changed file (cost is O(changed), not O(tree)); a write escaping the clone root is refused
Token costRecorded into the live compute meterJournaled as a TOKEN_COST effect

Two details make the containment trustworthy rather than asserted. Egress denial is structural: the sandbox is spun up with the network unshared and no broker socket bound, and the runtime asserts exactly that against the sandbox's own launch arguments, there is no network for a plan to leak to. And the egress check is fail-closed: if a planned egress ever returns anything other than a denial under the shadow posture, the rehearsal raises rather than recording a result, because a rehearsal that cannot prove it contained the plan is not evidence.

Stronger when air-gapped

Egress denial is strictest in the sovereign / air-gapped corner: with no broker socket and the network unshared, there is simply no network present to leak to. The capability does not weaken where the product is sold hardest.

An ephemeral artifact​

A rehearsal diff is an ephemeral artifact of a just-run rehearsal, read back by the operator who triggered it, within the run's lifetime, through the compute process that produced it. It is held in a bounded, process-scoped store keyed by run_id and tagged with the owning workspace or clean room for read confinement, the same house pattern the compute meter and the sub-agent lineage index use. The durable evidence is the SHA-256 attestation; the full diff needs no new table, so there is no extra classification, audit, or erasure surface to carry.

The API​

Mission rehearsal is a governed, deny-closed surface under the compute private API, reached in the console through the node proxy at /api/v1/rehearsals.

RouteDoes
POST /api/private/v1/rehearsalsRehearses a declared plan against a COW clone of the caller's own workspace under the shadow posture, and returns the attested diff.
GET /api/private/v1/rehearsals/{run_id}Returns a previously-attested diff, confined to a workspace the caller is authorized for.

Deny-closed auth and confinement​

Both handlers authenticate first, then authorize: an unidentified caller is answered 401 before any permission is consulted, and a caller lacking the grant is 403. The trigger requires a compute-rehearsal write grant and the read a read grant; the demanded permission is recorded on the dependency so a test can assert which grant each route requires.

The workspace is resolved from the caller's auth-derived scope: a client-named workspace_id is honored only when it matches an authorized one, an omitted one resolves to the single authorized workspace, and anything else is 403, so a rehearsal can only ever touch a workspace the caller owns. The read returns the same 404 as a missing run when the stored diff belongs to a workspace the caller is not authorized for, so the route is no cross-tenant existence or scope oracle.

The surface is fail-closed: when no rehearsal runner is bound it answers 503 rather than a hollow success, the established compute private-surface pattern, so the API never returns a fabricated result.

Across the deployment matrix​

The clone, sandbox spec, egress broker, and meter are all cell-local Python and run single-cell and multi-cell, sovereign and cloud-enabled. Egress denial is stronger air-gapped (no broker socket, no network), as noted above. The day-one test exercises the single-cell sovereign corner directly.

What rehearsal gives an operator​

The full rehearsal runtime runs on the core (cell, Python): the COW clone, the egress-denied sandbox spec, structural and fail-closed egress denial, the clone-diff of writes, token metering, and the attested diff, all behind the governed, deny-closed POST / GET /rehearsals surface and confined to a workspace the caller owns. An operator hands the formation a declared plan and reads back an attested preview of exactly what it would have changed, sent, and cost, with the real workspace never touched.