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§
- Buffer
Spec - Exact metadata for one borrowed or writable byte buffer.
- Cleanup
Receipt - Evidence returned by explicit session cleanup or close.
- Durability
Receipt - Caller evidence that a verified terminal result was durably persisted.
- Input
Buffer - One validated read-only buffer borrowed for a synchronous operation.
- Never
Cancel - Cancellation probe that never requests a stop.
- Output
Buffer - One exact caller-owned output allocation for a synchronous operation.
- Provider
Owned Generation Plan - Portable generation semantics whose physical mechanics remain backend-owned.
- Provider
Owned Sampler - Portable caller-selected sampler semantics for a provider-owned backend.
- Whole
Generation Commit Receipt - Evidence that terminal acknowledgement completed after caller durability.
- Whole
Generation Evidence - Bounded opaque backend evidence retained with a terminal result.
- Whole
Generation Output - Verified output held before terminal acknowledgement.
- Whole
Generation Receipt - Backend-neutral terminal receipt before caller durability is committed.
- Whole
Generation Request - One validated, owned, backend-neutral generation request.
Enums§
- Executor
State - Mechanical state of one worker-local executor.
- Failure
Disposition - Downstream handling required after an execution error.
- Whole
Generation Failure - Failure category for a whole-request backend.
- Whole
Generation Plan - 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§
- Cancellation
Probe - Cooperative cancellation state owned by the caller.
- Classified
Execution Error - An error whose effect on resident executor state is explicit.
- Classified
Whole Generation Error - A whole-request error with an explicit failure category.
- Local
Executor - Synchronous, single-owner executor over borrowed storage.
- Local
Executor Factory - Factory that loads one exact worker-local executor from verified artifacts.
- Pending
Generation - A verified terminal result awaiting caller durability and acknowledgement.
- Whole
Generation Backend - Synchronous whole-request generation backend.