Product trace: FEATURE_SPEC sections 5.1, 5.2, 5.3, 5.4,
5.5, 5.6, 5.7, and 5.8; honors sections 3 and 7. Tracked under initiative #675
(#676, #677, #678, #679).
Roster empowers OpenShell across four native Rust layers in rust/openshell.rs:
compile_task_policy deterministically translates a Roster task scope (read_only
and read_write workspace-relative paths, non-root run_as_user/run_as_group,
and optional binary-bound inference endpoints) into a validated OpenShell
version: 1 policy (OpenShellPolicy):
- Hardened defaults:
version: 1filesystem_policy.include_workdir: false(explicit path grants only; never implicit whole-workdir write access)landlock.compatibility: "hard_requirement"(refuses to start if Landlock ABI v3+ cannot enforce the ruleset)process.run_as_user/process.run_as_group: non-root UID/GID (1..=4294967294) or"sandbox"
- Strict path & surface validation:
- Every sandbox path must be absolute under
/sandbox/workspace/...(or/usr,/lib,/bin,/etc,/tmp), without.., null/control bytes, or/inread_write, and capped at 256 total paths. - Protected Roster surfaces (
agent-policy.yml,.github/workflows/*,vendor/github-agent-contracts/*,.git/*,.roster/*,.env*,*.pem) are unconditionally denied inread_writeand secret surfaces are denied inread_only. - Network rule keys starting with
_provider_are rejected so task policies cannot spoof or override OpenShell provider-contributed rules.
- Every sandbox path must be absolute under
compile_fleet_provider_profile bridges any validated .roster/fleet.yml
profile (Profile) into an OpenShell category: inference provider profile
(OpenShellProviderProfile):
- Host-local endpoint translation:
- Local fleet endpoints (
127.0.0.1,localhost,[::1]) are automatically mapped tohost.openshell.internalon their configured port so sandboxed workloads can reach local vLLM/Ollama servers (such asrtx-3090-qwenon port11435) through the OpenShell supervisor without exposing host loopback sockets. - LAN and remote endpoints (such as
aperture.xen.blackmesaresearch.ai:443or192.168.1.48:8000) preserve their exact host, port, and TLS/REST enforcement.
- Local fleet endpoints (
- Zero-knowledge credential substitution:
- If the fleet profile declares
api_key_env, the OpenShell provider profile declares only the credential key name (env_var) and opaque placeholder binding — never the secret value from the Roster Vault or environment. - Allowed client binaries (
binaries) are explicitly enumerated (e.g./usr/local/bin/roster-worker,/usr/bin/curl,/usr/bin/python3).
- If the fleet profile declares
OpenShellSandboxAttempt manages the host-supervised lifecycle for running
either an external full-agent worker or an isolated verification command inside
OpenShell:
- State machine:
prepared -> running -> stopping -> candidate -> reviewing -> eligible | blocked | failed | cancelled. - Single-link staging (
stage_workspace_files): Exports only task-approved, non-symlink, single-hardlink regular files into a fresh per-attempt staging directory. No.gitindirection,.rosterstate, Vault files, or App keys are staged. - Revocation-first cancellation (
cancel_and_detach): On cancellation or wall-clock deadline, Roster immediately revokes artifact import permission, records provider detachment (openshell sandbox provider detach <sandbox> <provider> --wait), and transitions tocancelled(orfailedif cleanup/detachment is unverified). Late completions after cancellation are rejected. - Candidate inspection, host review & artifact emission (
inspect_candidate,verify_host_review,emit_managed_artifacts): Validates candidate file hashes, scope, and immutable task digests, requires an independent host review (verdict: "pass") bound to the exacttaskDigestandcandidateDigest, and emitsRESULT.mdandREVIEW.mdwithexternal-openshell-sandboxprovenance while preserving"unknown"for any unreported token usage.
- CLI & interactive shell diagnostics:
roster doctor --openshell [--opt-in] [--approve-live] [--runtime PATH] [--prover PATH] [--gateway URL] [--policy PATH] [--provider ID]/doctor openshell [--opt-in] [--approve-live] [--runtime PATH] [--prover PATH] [--gateway URL] [--policy PATH] [--provider ID]- Evaluates declared readiness offline without probing networks, starting containers, or printing secret values, reporting deterministic blocker codes (
OPENSHELL_NOT_OPTED_IN,OPENSHELL_RUNTIME_UNPINNED,OPENSHELL_GATEWAY_UNCONFIGURED,OPENSHELL_POLICY_MISSING,OPENSHELL_PROVIDER_UNBOUND).
- Automatic seat policy emission & network hot-reload (
compile_seat_task_policy,hot_reload_network_policy):- Compiles
TASK.mdandRECIPE.ymlscope into an OpenShellversion: 1policy withenforcement: enforceandbinaries: [{ path: ... }]before coder execution (prepare_delivery_openshell_attempt). - Locks
filesystem_policy,landlock, andprocessrules at sandbox creation time (ROSTER_OPENSHELL_IMMUTABLE_CREATE_POLICY), while allowing boundary-verifiednetwork_policieshot-reloads viaopenshell policy set --policy <PATH> <SANDBOX> --wait.
- Compiles
- Live CLI orchestration & provider lifecycle (
OpenShellSandboxAttempt::execute_live,execute_live_owned):- Drives
openshell sandbox create,openshell sandbox provider attach <sandbox> <provider> --wait,openshell sandbox exec, and revocation-firstopenshell sandbox provider detach <sandbox> <provider> --wait+openshell sandbox delete <sandbox>under Roster's owned process-tree cancellation (crate::process::execute: Windows Job Objects on Windows, process groups on Unix) withOPENSHELL_TELEMETRY_ENABLED=falseand zeroGITHUB_APP_*or Vault secret exposure.
- Drives
- Formal policy boundary prover (
prove_openshell_policy_boundary,prove_openshell_policy_with_external_prover):- Verifies that a candidate
OpenShellPolicyis a strict subset of a boundaryOpenShellPolicyusing the native deterministic prover and, when configured, the upstreamopenshell-prover check --boundary <BOUNDARY> <CANDIDATE> -o json --timeout 10sbinary:- Refuses any Landlock downgrade from
hard_requirementtobest_effort. - Refuses root process identities or UID/GID drift.
- Refuses any
read_writeorread_onlypath outside the boundary's allowed prefixes. - Refuses any network endpoint host/port/method expansion or cloud metadata IP (
169.254.169.254).
- Refuses any Landlock downgrade from
- Verifies that a candidate
- Opt-in operator configuration (
openshell:in.roster/config.yml,--runtime openshell):- Supports
openshell.enabled(defaultfalse),openshell.runtime_path,openshell.gateway_url,openshell.prover_path, andopenshell.sandbox_imagevia.roster/config.yml,/config set openshell.*, androster run ... --runtime openshell.
- Supports
- Multi-model sandbox calibration scorecard (
evaluate_openshell_calibration_scorecard):- Evaluates M1–M3 calibration runs across fleet profiles under OpenShell containment, requiring passing boundary proofs, verified provider detachment/cleanup, and independent host review before marking any gate passed.