Driver¶
Drive one node through a sandbox end to end: stage its inputs, run it, collect its outputs, and map
the raw exit into a typed outcome. drive_node is the high-level entry; drive_node_raw exposes the
un-mapped result; run_node_in_sandbox is the low-level single-shot runner.
resoluto.sandbox.drive_node
async
¶
drive_node(
runtime,
store,
spec,
*,
admit=None,
on_event=None,
poll_interval_s=2.0,
dead_after_s=120.0,
clock=monotonic,
)
Drive one node and read its work product from result.json as a NodeResult.
Source code in src/resoluto/sandbox/driver.py
resoluto.sandbox.drive_node_raw
async
¶
drive_node_raw(
runtime,
store,
spec,
*,
admit=None,
on_event=None,
result_ready=None,
poll_interval_s=2.0,
dead_after_s=120.0,
unstartable_polls=15,
external_gone_polls=15,
clock=monotonic,
)
Launch, tail telemetry, and reap; returns a NodeOutcome. Optional result_ready completes as soon as the work product appears.
Source code in src/resoluto/sandbox/driver.py
resoluto.sandbox.NodeOutcome
dataclass
¶
Substrate-level disposition of one driven node: 'completed', 'unstartable', 'external', or 'silent'.
resoluto.sandbox.NodeResult
¶
Bases: BaseModel
Typed work product the in-sandbox runner writes to <prefix>/result.json.
resoluto.sandbox.run_node_in_sandbox
async
¶
run_node_in_sandbox(
*,
store,
prefix,
run_id,
node_id,
workload_argv,
workspace_dir=None,
output_paths=None,
setup_argv=None,
cleanup_argv=None,
heartbeat_interval_s=5.0,
clock=time,
canary_probe_host="1.1.1.1",
canary_probe_port=80,
run_canary=None,
)
Run one node's workload (with optional setup/cleanup hooks and input/output staging), self-report telemetry to the store, and return the NodeResult (also written to <prefix>/result.json). run_canary overrides the egress-isolation canary (tests inject a stub); the canary always runs.