Skip to main content

Module complete

Module complete 

Source
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§

ClientDeadline
What the client did when its own deadline expired (BIND-9, BIND-10).
CompletionOptions
The knobs of a run-to-completion call.
CompletionPlan
A validated run-to-completion call, separable from the start request it was planned for.

Enums§

KillAnswer
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§

OutputFlow
What an OutputSink answers: a boxed future of continue-or-stop, named so a caller needs no futures crate to spell it.
OutputSink
A callback for output. Only ExecEvent::Output is delivered; the result carries the exit status. Answering std::ops::ControlFlow::Break stops delivery, and the call still waits for and acks the exec, so nothing is left running unobserved (BIND-8).