Skip to main content

Crate logit_loom_executor

Crate logit_loom_executor 

Source
Expand description

§logit-loom-executor

logit-loom-executor defines two synchronous, policy-neutral execution seams:

  • a worker-local borrowed-buffer executor for hosts that already own transport, admission, artifact verification, and resource policy; and
  • an owned whole-request backend for execution boundaries that may place those mechanics behind a transport or scheduler.

The crate provides:

  • bounded, serializable buffer identities;
  • borrowed input and writable output views suitable for mapped storage;
  • cooperative cancellation probes at backend-declared safe boundaries;
  • explicit executor lifecycle and failure dispositions; and
  • cleanup receipts that distinguish confirmed cleanup from uncertainty.

The whole-request contract adds:

  • exact input, selected plan authority, output, backend, and evidence identities;
  • bounded owned request, output, and opaque evidence bytes;
  • cooperative cancellation with classified deadline and protocol failures; and
  • a two-phase terminal result that is acknowledged only after the caller supplies a durable-record identity.

It does not open listeners, schedule jobs, select devices, download artifacts, or define model behavior. Backends remain single-owner unless their own contract explicitly says otherwise.

An output view exposes the complete caller-owned allocation but separately tracks its initialized prefix. On failure, callers must ignore storage beyond the last explicitly recorded prefix; the trait does not promise transactional rollback of arbitrary output memory. Rejected, Cancelled, and Poisoned describe whether a resident executor may be reused. They do not authorize an automatic retry.

Whole-request backends expose no token-step IPC, per-token transforms, observers, or checkpoints. WholeGenerationPlan::Exact requires every selected generation mechanic to be represented exactly. WholeGenerationPlan::ProviderOwned carries only portable output, seed, and optional temperature/top-p semantics; the backend owns all omitted physical mechanics and must bind the selected backend and actual execution evidence into the terminal result. These authority modes are domain-separated and cannot be silently reinterpreted. Dropping or aborting a pending result must not acknowledge successful completion.

Structs§

BufferSpec
Exact metadata for one borrowed or writable byte buffer.
CleanupReceipt
Evidence returned by explicit session cleanup or close.
DurabilityReceipt
Caller evidence that a verified terminal result was durably persisted.
InputBuffer
One validated read-only buffer borrowed for a synchronous operation.
NeverCancel
Cancellation probe that never requests a stop.
OutputBuffer
One exact caller-owned output allocation for a synchronous operation.
ProviderOwnedGenerationPlan
Portable generation semantics whose physical mechanics remain backend-owned.
ProviderOwnedSampler
Portable caller-selected sampler semantics for a provider-owned backend.
WholeGenerationCommitReceipt
Evidence that terminal acknowledgement completed after caller durability.
WholeGenerationEvidence
Bounded opaque backend evidence retained with a terminal result.
WholeGenerationOutput
Verified output held before terminal acknowledgement.
WholeGenerationReceipt
Backend-neutral terminal receipt before caller durability is committed.
WholeGenerationRequest
One validated, owned, backend-neutral generation request.

Enums§

ExecutorState
Mechanical state of one worker-local executor.
FailureDisposition
Downstream handling required after an execution error.
WholeGenerationFailure
Failure category for a whole-request backend.
WholeGenerationPlan
Authority boundary selected by a whole-generation request.

Constants§

MAX_EXECUTION_BUFFERS
Maximum buffers presented to one local execution.
MAX_MEDIA_TYPE_BYTES
Maximum bytes in a buffer media-type label.
MAX_WHOLE_GENERATION_EVIDENCE
Maximum opaque evidence objects attached to one terminal result.
MAX_WHOLE_GENERATION_EVIDENCE_BYTES
Maximum bytes in one opaque backend evidence object.
MAX_WHOLE_GENERATION_INPUT_BYTES
Maximum exact input bytes owned by one whole-generation request.
MAX_WHOLE_GENERATION_OUTPUT_BYTES
Maximum output bytes accepted from one whole-generation backend.

Traits§

CancellationProbe
Cooperative cancellation state owned by the caller.
ClassifiedExecutionError
An error whose effect on resident executor state is explicit.
ClassifiedWholeGenerationError
A whole-request error with an explicit failure category.
LocalExecutor
Synchronous, single-owner executor over borrowed storage.
LocalExecutorFactory
Factory that loads one exact worker-local executor from verified artifacts.
PendingGeneration
A verified terminal result awaiting caller durability and acknowledgement.
WholeGenerationBackend
Synchronous whole-request generation backend.