pub struct MergeGatePolicy {
pub sandbox: SandboxConfig,
pub mission_dir: PathBuf,
}Expand description
What the merge-gate path needs to wrap its gates (ticket
engine-gates-sandbox-wrapped): the MERGED mission’s worker.sandbox
config (the gates execute that mission’s worker-authored test/build code,
so the worker role’s posture is the right one — the same choice the
sandbox preflight makes for contract-command probes) and the mission dir
the metadata write-denies / authority read-denies derive from. The server
builds one per merge from the folded event state; the gate cwd is only
known per command, so the profile resolution itself happens per command
inside run_bounded_gate_command_sandboxed.
Fields§
§sandbox: SandboxConfig§mission_dir: PathBufImplementations§
Source§impl MergeGatePolicy
impl MergeGatePolicy
Sourcepub fn enforces_on_this_host(&self) -> bool
pub fn enforces_on_this_host(&self) -> bool
Whether resolution on THIS host yields an enforced wrap — the cheap
pre-check callers use to choose between the sandboxed runner and their
pre-existing executor seam. false only for enforce: off (the
byte-identical pre-wrap path). Every requested enforcement returns
true — the process provider on any platform (platform_support
decides the wrap shape), the container provider with or without a
detected runtime (ticket container-gate-wrapper: a runtime wraps the
gate in the mission container; none FAILS CLOSED at resolve), and the
fail-closed postures (a platform
crate::sandbox::platform_support cannot honor, linux WITHOUT
bwrap) — those route INTO the sandboxed runner so they error loudly
at resolve rather than running unsandboxed (13th-pass review, P1).
Sourcepub fn degradation_note(&self) -> Option<String>
pub fn degradation_note(&self) -> Option<String>
The operator-visible note when this policy CANNOT wrap gates despite
enforce != off: provider: container with no container runtime on
PATH (ticket container-gate-wrapper). The merge gates themselves then
FAIL CLOSED at resolve — the server’s merge path has no event log and
MUST log this note so the refusal reads as the operator’s config
problem it is, not a flaky gate. None for enforce: off (nothing
to refuse), for the process provider (which wraps, or fails closed
loudly at resolve — an unsupported platform or linux without bwrap
needs no note because it errors), and for a container policy WITH a
runtime (the gates wrap in the mission container — nothing degraded).