Skip to main content

Module terminal

Module terminal 

Source
Expand description

Operation terminals (spec §7.12).

A terminal is the opposite of an effect: it requires no resolution, is allocated no effect id, and an operation commits at most one for its whole life. Both facts are expressed in the types rather than left to convention:

  • StepDisposition makes “a committed step publishes effects or a terminal” a union instead of a (Vec<KernelEffect>, Option<KernelTerminal>) pair that can hold both;
  • TerminalSlot makes “exactly once” an API a second commit cannot pass, rather than an invariant each of four hosts re-implements (recovery-chain distortion R-C2 #6: terminal deduplication currently relies on host convention).

The usage report is committed inside the terminal and nowhere else, so there is no second place a run’s accounting can disagree with itself.

Structs§

AgentTerminal
CancelledTerminal
EffectsDisposition
FailedTerminal
KernelFailure
A kernel-side failure, as opposed to a host effect failure. This is what a HostEffectFailure escalates into after the kernel has made its one policy decision (DEC-5) and decided it cannot continue.
LoopResult
What an agent loop produced.
PaceDecision
TerminalAlreadyCommitted
A second terminal was offered for an operation that already has one.
TerminalDisposition
TerminalSlot
The operation’s single terminal slot.
UsageReport
Resource accounting for one operation. No wall clock and no duration: elapsed time is a host observation, derivable from the envelope times already in the journal.
WorkflowOutcome
WorkflowTerminal

Enums§

KernelFailureCode
KernelTerminal
How an operation ended.
PaceAction
StepDisposition
What a single committed step publishes.
TerminationReason
Why the loop stopped.
WorkflowStatus