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
2 changes: 1 addition & 1 deletion docs/architecture/01-system-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ One sandbox may host several concurrent runs, up to explicit policy. Its data pe

SDK/executor versions are pinned together with platform prerequisites, source and package hashes, licenses, schema and capability receipts. No compatibility-by-version inference, private SDK fork, generic plugin registry or speculative extension interfaces. There are exactly the Windows and Linux adapters required by current profiles. Backend differences are visible in inspect, including memory metric type, terminal and network capabilities.

The architecture can be implemented only after the [engine experiments](../verification/mxc-experiments.md) prove its combinations. Capability-dependent code may be developed without claiming support; final release cannot skip a required experiment.
The [engine experiments](../verification/mxc-experiments.md) qualify the mandatory native composition for each profile. Development and release follow the declared acceptance matrix. Windows external selected egress and combinations that need it stay outside the required MVP matrix. Capability reporting retains their unverified status.
19 changes: 10 additions & 9 deletions docs/architecture/02-mxc-integration.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# 02 — Microsoft MXC integration

Status: V2 design adopted; composed native behavior awaits P1 qualification. Owners: `AFV2-MXC-01` through `AFV2-MXC-04`. Evidence: [V-MXC-01–07 and A-MXC-01/02](../verification/platform-capabilities.md), [source research](../research/mxc-research.md), [source pins](../research/mxc-sources.json), and [native experiment protocol](../verification/mxc-experiments.md).
Status: V2 design adopted. P1 uses the [official MXC wrapper boundary](../decisions/AD-0022-cli-sandbox-platform-pivot.md#official-mxc-wrapper-boundary--2026-11-18-amendment). Owners: `AFV2-MXC-01` through `AFV2-MXC-04`. Evidence: [V-MXC-01–07 and A-MXC-01/02](../verification/platform-capabilities.md), [source research](../research/mxc-research.md), [source pins](../research/mxc-sources.json), and [native experiment protocol](../verification/mxc-experiments.md).

ArcForges uses official stable MXC for contained execution and security policy. ArcForges owns Sandbox persistence, Run identity, authorization, terminal sessions, host budgets, resource enforcement/readback, and recovery. Local CLI and Center requests enter the same Sandbox Core. No remote request can select an unvalidated backend, pass an arbitrary host executor, or bypass local policy.
Official stable MXC runs the payload and enforces its native policy. ArcForges translates the requested policy through documented official APIs and reports their actual results. ArcForges owns Sandbox persistence, Run identity, authorization, terminal sessions, host budgets, resource enforcement/readback, and recovery. Local CLI and Center requests enter the same Sandbox Core. No remote request can select an unvalidated backend, pass an arbitrary host executor, or bypass local policy.

## 1. Supported implementation profiles

Initial dependency pin: `Microsoft.Mxc.Sdk` **1.0.1** and official native artifacts from **v1.0.1**, with exact Windows JSON schema **1.0.0**. The package version is not the schema version. A dependency upgrade requires reviewed source/package pins and reruns of affected profile experiments. Floating `main`, development JSON, experimental launch flags, private FFI entrypoints, and privately patched MXC builds are outside these profiles. **V-MXC-01/02/07.**

| Profile ID | Official execution surface | Terminal mode | Required resource boundary | Admission state |
|---|---|---|---|---|
| `windows-process-executor-v1` | Unchanged official `wxc-exec.exe`, stable exact JSON, explicit `processcontainer`; native BaseContainer/PSEC with native denied-path support | C# Native AOT RunSupervisor owns ConPTY; executor inherits it; separate pipes are also an explicit mode | ArcForges Windows parent Job established before worker/executor execution; MXC owns its inner Job | Design adopted/source supported; full combination UNPROVEN under A-MXC-01 / F-MXC-01. |
| `linux-bubblewrap-sdk-v1` | `.NET Microsoft.Mxc.Sdk.V1.MxcContainer`, explicit `Containment.Bubblewrap` | `SpawnWithPty` or explicitly selected `Spawn` pipes | RunSupervisor starts in an already configured delegated cgroup v2/systemd boundary | Design adopted/source supported; full combination UNPROVEN under A-MXC-02 / F-MXC-02. |
| `windows-process-executor-v1` | Unchanged official `wxc-exec.exe`, stable exact JSON, explicit `processcontainer`; native BaseContainer/PSEC with native denied-path support | C# Native AOT RunSupervisor owns ConPTY; executor inherits it; separate pipes are also an explicit mode | ArcForges Windows parent Job established before worker/executor execution; MXC owns its inner Job | Official source support. Local MVP qualification pending under A-MXC-01 / F-MXC-01. External selected egress and dependent combinations unverified. |
| `linux-bubblewrap-sdk-v1` | `.NET Microsoft.Mxc.Sdk.V1.MxcContainer`, explicit `Containment.Bubblewrap` | `SpawnWithPty` or explicitly selected `Spawn` pipes | RunSupervisor starts in an already configured delegated cgroup v2/systemd boundary | Scoped H-22 native PASS under A-MXC-02 / F-MXC-02. Product admission remains separate. |

Windows uses the official executor adjunct because stable .NET V1 does not expose ProcessContainer PTY/inherited-console creation or `fallback.allowDaclMutation`. The unchanged executor's inherited-console behavior is used by Microsoft's published stable Node adapter; ArcForges does not ship Node.js or copy that adapter. Direct stable .NET ProcessContainer pipes cannot be substituted for the default Windows profile because the same policy-authoring gap remains. **V-MXC-02.**

No automatic fallback to IsolationSession, AppContainer tiers, WSLc, Windows Sandbox, LXC, MicroVM, Hyperlight, host execution, plain pipes, shared host networking, or weaker resource control is permitted. A future stable .NET release may replace the executor adjunct only through an explicit profile revision and the combination gate. A labeled pipes-only development build is not full V2 terminal delivery.

## 2. Capability negotiation and admission

Discovery returns structured capabilities for the installed profile, rather than a single `mxcAvailable` boolean. The response includes profile revision, managed/native versions, artifact identity, architecture, OS build/kernel, native backend/tier, discovered network modes, terminal modes, resource-controller availability, probe time, and qualification evidence identifier. Represent each capability as `supported`, `unsupported`, or `unproven`; do not convert an unrun test to support.
Discovery returns structured capabilities for the installed profile. The response includes profile revision, managed/native versions, artifact identity, architecture, OS build/kernel, native backend/tier, discovered network modes, terminal modes, resource-controller availability, probe time, and qualification evidence identifier. Keep official contract support distinct from a local probe or receipt. A locally demonstrated capability carries its exact evidence identifier. A capability without the relevant local observation carries `UNVERIFIED` and a bounded reason. `UNSUPPORTED` denotes an actual lack of support for the relevant profile or request.

For every Start request, the core validates the complete combination of terminal mode, filesystem policy, network policy, environment, resource requirements and recovery policy. Discovery is advisory; request validation and execution can still fail on a changed host. Persist the selected immutable Sandbox configuration revision, compiled policy hash, actual profile and owner identity with the Run before executing user code. **V-MXC-02/03/04.**

| Condition | Required response |
|---|---|
| MXC, official executor, native library, required controller or helper missing | Fail admission with the concrete dependency/capability reason; no workload started. |
| Requested feature is unsupported by the profile | `UnsupportedCombination` naming profile, feature and failed requirement. |
| Relevant native combination has not been qualified | Mark unproven; P1 experiment route only. Do not advertise normal product support. |
| Mandatory local safety composition has not been qualified | Keep the affected local profile unproven and fail closed for that profile. |
| Windows external selected-egress mode has no local end-to-end receipt | Report that capability as `UNVERIFIED`. Submit an explicit request that the product contract permits and the official backend supports with its policy intact. Apply usual native preflight and report the actual MXC result. When locally verified behavior is required, this mode does not satisfy that assurance. Its evidence status applies only to the affected mode. |
| Windows probe chooses fallback tier or native deny is unavailable | Reject; do not auto-run host prep or ask the workload to proceed with relaxed security. |
| Linux requests host/public ingress or available IPv6 connectivity unsupported by stable Bubblewrap | Reject the unsupported request; retain the user's intended policy unchanged. |
| Policy/native launch changes after preparation | Fail launch and reconcile all created resources; do not retry through another backend. |
| Official preflight or launch rejects safe execution, or policy/native launch changes after preparation | Return the applicable existing typed capability or launch error and reconcile created resources. |
| Resource settings cannot be installed and read back before launch | Fail admission/launch; do not run with a merely desired limit. |

Windows uses the exact request in `wxc-exec --probe --config <private-file>` to inspect native tier and capability diagnostics before the launch attempt. `MxcContainer.Probe` can supplement general discovery but cannot author the full fallback prohibition in typed 1.0.1. The profile always includes a deny for its existing private control directory and `fallback.allowDaclMutation=false`. In stable source, every AppContainer DACL tier needs consent, and AppContainer BFS needs it for nonempty denies. This provides request-level rejection on a changed host as well as preflight detection. This source-derived property must be demonstrated with the shipped official binary; it is not a new MXC tier-selector API. **V-MXC-02/03; A-MXC-01.**
Expand Down Expand Up @@ -116,6 +117,6 @@ A root exit ends the one-shot execution and MXC terminates leftover children. Lo

The admitted profile is a tuple of stable package/runtime, protected distribution, OS/architecture, backend/tier, policy capabilities, resource composition and terminal mode. A profile upgrade does not migrate an active Run's native handles. Drain or retain its installed version until existing owners finish; new Runs use the newly qualified revision. Never delete the installed native unit while a live supervisor depends on it.

P1 requires `MXC-AOT-01`, `MXC-WIN-01` through `MXC-WIN-06`, and `MXC-LNX-01` through `MXC-LNX-05` as applicable. The [protocol](../verification/mxc-experiments.md) supplies evidence and bounded negative cases. `AFV2-MXC-04` accepts a profile only when the same native environment satisfies the mandatory terminal/filesystem/network/resources/recovery combination. Complete profile compositions remain **NOT_RUN / UNPROVEN**; MXC-AOT-01 passed fresh isolated win-x64/linux-x64 cohort revalidation at9a9378bc under the amended local process boundary; historical observations remain intact. This does not qualify a complete profile.
P1 uses `MXC-AOT-01`, the Windows local MVP cases in `MXC-WIN-01` through `MXC-WIN-06`, and `MXC-LNX-01` through `MXC-LNX-05`. The [protocol](../verification/mxc-experiments.md) defines the required native evidence and refusal cases. `AFV2-MXC-04` records the profile matrix and limitations. Windows admission requires native evidence that the terminal, filesystem/control boundary, resources and lifetime/recovery operate together under the exact local policy. External selected TCP/UDP egress and its dependent Run combinations retain their actual results and unverified status outside that required matrix. The isolated win-x64/linux-x64 MXC-AOT-01 receipt at `9a9378bc` and the scoped H-22 Linux composition receipt remain separately attributable.

If the unchanged official executor cannot support the required composition, record a stable upstream capability blocker. The Plan then requires a supported stable remedy or an explicit product decision; it does not implement a private fork, quietly drop the terminal requirement, relax limits, or mark a pipes demonstration as full acceptance. Preserve currently necessary execution/resource assets until this gate proves their replacement.
An observed failure of a mandatory property blocks the affected profile until a supported remedy or explicit product decision resolves it. Record a stable upstream blocker only when evidence identifies one. Preserve currently necessary execution/resource assets until the replacement passes its required native acceptance.
2 changes: 1 addition & 1 deletion docs/architecture/03-sandbox-run-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Configuration is versioned as a whole: backend profile; environment allowlist; default work directory; read-only/writable host grants; network policy; max concurrent runs; resource weight/priority/ceilings and pressure action; terminal/output retention. Store a canonical digest, not credentials or raw inherited host environment. Secrets are explicit user injections from protected local storage and are redacted from stored snapshots and logs.

`Create` validates the complete profile, transactionally reserves ID and path, creates owner-only directories with a manifest, then commits READY. Partial creation becomes ERROR with an owned cleanup record; never recursively delete an unverified path. `Configure(expected_rev)` validates the full replacement and optional display name; name-only edits supply the unchanged config and never move data. Explicit local `repair_error=true` repairs ERROR only after exact ownership, no-use and no-unresolved-effect checks; it is not a general RECOVERY_REQUIRED override. Path/network/identity changes require no nonterminal Run, preventing an existing process from retaining revoked host grants. Live resource changes use `ResourceService.SetPolicy` and commit requested versus applied/read-back state separately. A failed OS apply is not advertised as enforcement.
`Create` validates the whole requested configuration against the [profile and official policy boundary](02-mxc-integration.md#2-capability-negotiation-and-admission), transactionally reserves ID and path, creates owner-only directories with a manifest, then commits READY. Partial creation becomes ERROR with an owned cleanup record; never recursively delete an unverified path. `Configure(expected_rev)` validates the full replacement and optional display name; name-only edits supply the unchanged config and never move data. Explicit local `repair_error=true` repairs ERROR only after exact ownership, no-use and no-unresolved-effect checks; it is not a general RECOVERY_REQUIRED override. Path/network/identity changes require no nonterminal Run, preventing an existing process from retaining revoked host grants. Live resource changes use `ResourceService.SetPolicy` and commit requested versus applied/read-back state separately. A failed OS apply is not advertised as enforcement.

`List` is owner-filtered and cursor-paginated. `Inspect` returns current revision, capabilities and limitations, active Run IDs, private usage and excluded host mounts. Remote callers see only grant-visible fields. `PlanDelete` gives a short-lived revision-bound plan, active-run refusal and exact owned subtree/bytes; `Delete` consumes that plan only if identity, revision and no-use guards still hold. External grants are never deletion targets. Quarantine/journal cleanup is recoverable; concurrent Run starts are blocked under the same ownership lock. A preview may be abandoned before Delete. Accepted deletion is not cancellable; a local Delete with resume_command_id is a fresh, journal-linked authorization for the same original intent under the exact guards in the API conventions.

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/06-local-node-cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Local Node, CLI and terminal sessions

Status: current V2 design. AFV2-CORE-01 through AFV2-CORE-03 implement the common core and Run owner; AFV2-CLI-01/02 deliver Core/admin commands and terminal behavior; AFV2-FILE-01/02 add data and deletion commands with their actual implementations; AFV2-CENTER-02 adds typed Center control. SDK/profile qualification is a prerequisite, not an assertion of present terminal compatibility. [Resource](04-resource-management.md), [filesystem](05-filesystem-data.md) and [lifecycle](07-lifecycle-recovery.md) define the shared behavior.
Status: current V2 design. AFV2-CORE-01 through AFV2-CORE-03 implement the common core and Run owner. AFV2-CLI-01/02 deliver Core/admin commands and terminal behavior, AFV2-FILE-01/02 deliver data and deletion commands, and AFV2-CENTER-02 adds typed Center control. The [MXC integration matrix](02-mxc-integration.md) governs which behaviors require native qualification. [Resource](04-resource-management.md), [filesystem](05-filesystem-data.md) and [lifecycle](07-lifecycle-recovery.md) define the shared behavior.

## 1. First-class local use

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/09-go-center.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Reuse the implemented browser loopback/PKCE flow and device-code flow. Keep one-

Connect either resumes an admitted connection or returns an asynchronous sign-in flow; cancel affects only that pending flow. Disconnect disables the link and cancels its flow while retaining credentials for an explicit reconnect. Signout ends local credentials and reports remote revocation uncertainty separately when the Center cannot acknowledge. None of these actions stops local Runs or deletes Sandbox data. All six methods are owner-authenticated local IPC and are excluded from the Center's remote allowlist.

The V2 channel uses a separate protocol version and signature-domain strings. It does not reinterpret `relay.v1` task enums as Sandbox operations. Capability negotiation states the protocol/cohort, OS/backend, supported operations and terminal/resource restrictions. It reports proof status for the complete admitted backend/profile combination: individual MXC and OS features do not establish that their composition works. Unknown mandatory capabilities fail with `upgrade_required`; unsupported or unproven combinations disable the affected operation with a precise reason and no weaker fallback. Platform capabilities, including ingress limitations, are independent of hosted/self-hosted subscription mode. The final V2 runtime serves no old Task/Fleet file routing endpoint.
The V2 channel uses a separate protocol version and signature-domain strings. It does not reinterpret `relay.v1` task enums as Sandbox operations. Capability negotiation states the protocol/cohort, OS/backend, supported operations, terminal/resource restrictions and scope of local profile evidence. Unknown mandatory protocol capabilities fail with `upgrade_required`. The Node applies the same [MXC policy and evidence rules](02-mxc-integration.md#2-capability-negotiation-and-admission) for local and authorized remote requests. An unverified optional mode cannot establish a verified guarantee and leaves other operations available. Platform capabilities, including ingress limitations, are independent of hosted/self-hosted subscription mode. The final V2 runtime serves no old Task/Fleet file routing endpoint.

| Channel condition | Center behavior | Node behavior |
|---|---|---|
Expand Down
Loading