pub struct SandboxLimits {
pub arm: Option<SandboxArm>,
pub container: Option<ContainerLimits>,
pub shell: bool,
pub interpreter: Interpreter,
pub fuel: u64,
pub mounts: Vec<Address>,
pub env_passthrough: Vec<EnvVarName>,
pub trusted: Vec<ServerLabel>,
}Expand description
What a run’s execution boundary allows. Resolved as one value rather than field by field: a layer that speaks about the sandbox speaks about all of it, so an under-specified layer can only ever reduce what a run may do, never silently grant something the layer above it never mentioned.
Host facts are deliberately absent — where the Python artifact lives and which shell binary exists belong to the machine, not to the city, and a city carried to another machine must not carry its paths.
Fields§
§arm: Option<SandboxArm>A named arm refuses when unavailable; absence preserves the platform default.
container: Option<ContainerLimits>Explicit container policy; absence uses the existing platform confinement.
shell: boolWhether the shell arm may be offered at all. Off by default: a shell line is the one arm whose reach cannot be read off its arguments.
interpreter: InterpreterWhich interpreter the shell arm runs a line under: a name, never a path.
fuel: u64Instruction budget for one sandboxed call.
mounts: Vec<Address>Extra readable paths, relative to the city root. The write domain is decided elsewhere; this only widens what may be read.
env_passthrough: Vec<EnvVarName>Environment variable names a child process started by this scope may inherit, on top of the four every run gets.
Declared name by name rather than widened once for everybody: a build chain that needs to find its linker needs a handful of names this machine happens to set, and a longer built-in list would hand every run in every city whatever those names hold.
trusted: Vec<ServerLabel>Which connector servers this floor lets reach effects nothing in the city can take back — today, this machine’s own desktop.
Named server by server, and empty by default, for the reason
env_passthrough is: a run that presses keys on somebody’s
keyboard is doing something no checkpoint puts back, so the floor
says which connector may, in the one file a person edits.
Implementations§
Source§impl SandboxLimits
impl SandboxLimits
Sourcepub fn selected_arm(&self) -> Result<Option<SandboxArm>, AxError>
pub fn selected_arm(&self) -> Result<Option<SandboxArm>, AxError>
Resolves the explicit sandbox choice, rejecting contradictory input.
§Errors
Refuses a selected container without limits or limits on another explicit arm.
Sourcepub fn trusts(&self, label: &ServerLabel) -> bool
pub fn trusts(&self, label: &ServerLabel) -> bool
Whether this floor lets label reach what nothing here can
undo. The one reader of the trusted list, so the answer cannot
be spelled two ways.