Expand description
Run one command to exactly one result: Session::run_to_completion.
The composition every harness wrote for itself (issue #222): start with a caller-minted
exec id, stream output to a callback when there is one, fall back to wait-and-ack when the
stream ends without its terminal exit event, and on a client-side deadline kill the
process group, ack within a short grace, and synthesize exit code 124 when even that
fails. crates/model/src/run.rs is the checked specification of this module; BIND-6 through
BIND-10 in verify/spec/core.symspec.json are its requirements.
Structs§
- Client
Deadline - What the client did when its own deadline expired (BIND-9, BIND-10).
- Completion
Options - The knobs of a run-to-completion call.
- Completion
Plan - A validated run-to-completion call, separable from the start request it was planned for.
Enums§
- Kill
Answer - The daemon’s answer to the kill the client sent when its deadline expired.
Constants§
- DEFAULT_
CLIENT_ GRACE - The default
CompletionOptions::client_grace: how long past the daemon’s own deadline the client waits before it kills, and how long it then waits for the killed exec’s result. - NO_
TIMEOUT_ CEILING - The client deadline of a request with no
timeout_sec: the longest a MicroVM can live (MAX_DURATION_SEC), since no command outlives the VM it runs in.
Type Aliases§
- Output
Flow - What an
OutputSinkanswers: a boxed future of continue-or-stop, named so a caller needs nofuturescrate to spell it. - Output
Sink - A callback for output. Only
ExecEvent::Outputis delivered; the result carries the exit status. Answeringstd::ops::ControlFlow::Breakstops delivery, and the call still waits for and acks the exec, so nothing is left running unobserved (BIND-8).