@finalclass ExecResultAn exec’s phase and, once it has one, its outcome.
stdout and stderr are str because the daemon’s Outcome carries them as strings
— the protocol crate’s shape, not a choice made here. exit_code and signal are
None rather than sentinel integers, which is the same distinction models.py makes:
a signal death has no exit code, and zero is not “no signal”.
Constructor
Section titled “Constructor”ExecResult declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.
Properties
Section titled “Properties”done: boolWhether the exec has finished, whichever way.
exec_id
Section titled “exec_id”exec_id: strexit_code
Section titled “exit_code”exit_code: int | NoneNone when the child died to a signal rather than exiting.
notes: list[str]Human-readable annotations, one per condition that changes how the output reads (BIND-7): truncation at the output cap, an expired deadline, writers left alive, a synthesized result. Empty for a clean result; append them to stderr as they are.
ok: boolWhether the command exited zero. False for a signal death and for a still-running exec, since neither is a success.
phase: str"running", "exited", or "acked".
posix_exit_code
Section titled “posix_exit_code”posix_exit_code: int | NoneThe exit code a POSIX shell would report (BIND-6): 124 when a deadline ended the
command (the daemon’s, or run_to_completion’s client deadline), 128 plus the signal
for any other signal death, otherwise exit_code. None only for a running exec.
signal
Section titled “signal”signal: int | NoneThe signal that killed the child, when one did.
stderr
Section titled “stderr”stderr: strstdout
Section titled “stdout”stdout: strsynthesized
Section titled “synthesized”synthesized: boolTrue when run_to_completion synthesized this result because nothing came back
after its client-deadline kill (BIND-10): posix_exit_code is 124 and the output is
unknown, not empty.
timed_out
Section titled “timed_out”timed_out: boolTrue when the daemon execution deadline expired, distinct from cancellation.
truncated
Section titled “truncated”truncated: boolSet when either stream hit the output cap and was cut. A flag rather than a sentinel inside the bytes, which would be indistinguishable from output that happens to contain it.
writers_may_be_alive
Section titled “writers_may_be_alive”writers_may_be_alive: boolSet when the post-exit linger deadline expired with the pipes still open: some grandchild is alive and may write more that nobody will see.
Special methods
Section titled “Special methods”__repr__
Section titled “__repr__”def __repr__() -> strProvenance
Section titled “Provenance”This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.