Skip to main content

Module execution_control

Module execution_control 

Source
Expand description

Completed-token lifecycle, snapshot reservation and branch accounting policy. Shared completed-token lifecycle and non-rewindable snapshot reservations.

Structs§

GenerationBoundary
Quiescent, rewindable lifecycle component of a complete generation snapshot. It is not native completion evidence or a substitute for a complete snapshot.
GenerationLifecycle
One portable lifecycle shared by all native implementations. A Running state includes native completion and record delivery, not just host submission.
ManagedTextContinuation
Ordinary continuation plus its logical branch-retention ownership. Moving or swapping native slots must keep this lease with the logical child, including while that child is installed in the shared executable.
SamplingOverride
Supported changes to future sampling only. Omitting reseed retains the exact inherited RNG stream. Sampler strategy, adaptive counters, penalties and token history remain unchanged; incompatible strategy transitions are not exposed.
SamplingStateFacts
Native facts consumed by shared validation; contains no mutable native handle.
SnapshotBudget
Shared logical reservation owner for retained snapshots, child states and provisional restore copies. It deliberately lives outside rewindable state.
SnapshotReservation
Retention lease held alongside an opaque snapshot or child state. Cloning the lease is only for handles sharing that same object; copying native state needs another reservation. Final drop releases retained resources, not cumulative work.
TextBranchRequest
Explicit child admission and logical storage bounds. Future model/host growth must be priced by the owning composition before creating a runnable branch.
TextContinuationBranch
Independently prepared branch slot. Exchange is serial and moves the previous installed continuation into this slot; immutable weights stay in one runtime.
TextContinuationSnapshot
Opaque reusable model/sampler/input/controller/capture checkpoint. The facade pairs this with its semantic/output/lifecycle checkpoint before exposing a full generation snapshot. Native state is never serialized or shallow-cloned.
TokenChoiceController
Adds a one-decision restriction to an existing canonical constraint owner. Native sampling, penalties, history and RNG still use the ordinary path. A forced decision consumes exactly that sampler’s one-candidate decision: at nonzero temperature RNG advances as usual, and Mirostat observes probability one. It does not edit an already committed prefix or replay text.
ValidatedSamplingOverride
Validated native action. Only the shared policy constructs this value.

Enums§

SamplingOverrideError
Invalid policy is rejected before any native operation or state change.
TextSnapshotError
Failure before or during native/portable snapshot composition.
TokenChoiceError
Rejected canonical choice or error from the original grammar controller.

Traits§

SnapshotTokenController
Explicit independent-copy contract for the canonical constraint owner. A shallow Clone of grammar or mutable handles does not provide this guarantee.
TextSamplingControlBackend
Minimal native mechanism; ordinary sampling and snapshot state keep their existing owners. Errors must preserve the previous logical sampling state.
TextSnapshotBackend
Native ordinary-generation mechanisms used by the portable snapshot driver. Capture/intervention ownership stays in the shared CaptureSession; adapters expose that owner and perform native copying, never duplicate its bookkeeping.

Functions§

apply_prepared_sampling_override
Validates a prospective change on detached, independently prepared generation state. Used during branch construction under its copy reservation, while the loaded runtime is quiescent. Native installation must preserve the installed model state and cooperate with its existing submission/completion owner.
apply_sampling_override
Validates and applies one future sampling change at a proven native and record boundary. Stochastic-to-greedy retains RNG; switching back resumes that stream. A run created without an RNG needs an explicit seed to become stochastic.
intervention_plan_storage_bytes
Logical owned storage of the audited serialized intervention request DTO. Native estimators and admitted handles are deliberately excluded.