Expand description
Bounded, caller-clocked primitives for decisions with delayed feedback.
The ledger intentionally knows nothing about product actions or reward meaning. Callers provide identifiers, timestamps, generations, contexts, and actions. Pending decisions are never evicted implicitly.
Structs§
- Completed
Decision - Completed decision retained as a bounded replay tombstone.
- Decision
Id - Opaque, caller-assigned decision identifier.
- Decision
Ledger - Bounded pending decisions plus bounded completed tombstones.
- Decision
Ledger Config - Capacity limits for a
DecisionLedger. - Decision
Outcome - Delayed outcome submitted by a caller.
- Decision
Receipt - Result of registering a decision.
- Pending
Decision - Immutable facts recorded at decision time.
Enums§
- Decision
Ledger Error - Validation and capacity failures. Every failure leaves the ledger intact.
- Feedback
Status - Result of accepted feedback.
- Registration
Status - Registration/idempotency status.
Constants§
- DECISION_
LEDGER_ STATE_ VERSION - Version of the serialized ledger state introduced with the Preview API.
- DEFAULT_
MAX_ ACTION_ BYTES - Default maximum serialized-equivalent action size per decision.
- DEFAULT_
MAX_ CONTEXT_ BYTES - Default maximum serialized-equivalent context size per decision.
Traits§
- Bounded
Decision Value - Caller-extensible validation hook that makes per-decision memory bounded.
Functions§
- apply_
contextual_ outcome bandit - Atomically apply a validated outcome to both a ledger and LinUCB model.
Type Aliases§
- Delayed
Contextual Decision bandit - LinUCB-oriented decision facts; the generic ledger remains algorithm-free.