Skip to main content

Module decision

Module decision 

Source
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§

CompletedDecision
Completed decision retained as a bounded replay tombstone.
DecisionId
Opaque, caller-assigned decision identifier.
DecisionLedger
Bounded pending decisions plus bounded completed tombstones.
DecisionLedgerConfig
Capacity limits for a DecisionLedger.
DecisionOutcome
Delayed outcome submitted by a caller.
DecisionReceipt
Result of registering a decision.
PendingDecision
Immutable facts recorded at decision time.

Enums§

DecisionLedgerError
Validation and capacity failures. Every failure leaves the ledger intact.
FeedbackStatus
Result of accepted feedback.
RegistrationStatus
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§

BoundedDecisionValue
Caller-extensible validation hook that makes per-decision memory bounded.

Functions§

apply_contextual_outcomebandit
Atomically apply a validated outcome to both a ledger and LinUCB model.

Type Aliases§

DelayedContextualDecisionbandit
LinUCB-oriented decision facts; the generic ledger remains algorithm-free.