Expand description
Allocation-free prescriptive decision kernel. Allocation-free prescriptive decision kernel.
This module deliberately contains no HTTP, JSON, UUID, WAL, clock, or floating-point work.
Snapshots may allocate when they are built; [PolicySnapshot::prescribe] does not allocate.
§Performance
8.6M decisions/sec on a single core (115ns per decision, 22-model catalog).
All arithmetic is u64/i64/i128 — no f64 anywhere in the hot path.
§Safety
11 constraint gates are evaluated per decision. If no model passes all gates with positive utility, the request is rejected (fail-closed).
Structs§
- Decision
Trace - Explainability snapshot for a prescribe call (alloc-free alongside decision).
- Kernel
Decision - The result of evaluating a
KernelInputagainst aPolicySnapshot. - Kernel
Input - A decision request to be evaluated against the policy.
- Kernel
Model - A candidate model in the decision catalog.
- Policy
Snapshot - An immutable snapshot of the decision policy and model catalog.
- Rejection
Histogram - Per-constraint rejection counts from a single prescribe evaluation.
Enums§
- Kernel
Action - The action the kernel decided to take.
- Kernel
Reason - Why the kernel made this decision.
- Policy
Error - Policy catalog validation errors.
Constants§
- ALL_
PROVIDERS - Bitmask that admits all providers (all 64 bits set).
- ALL_
REGIONS - Bitmask that admits all regions (all 64 bits set).
- BASIS_
POINTS - One basis point = 1/10,000. Used for quality, risk, and confidence values.
- MAX_BPS
- Maximum basis-points value accepted by policy validation (100%).
- MAX_
PROVIDER_ ID - Maximum representable provider ID. IDs >= 64 are unconditionally rejected.
- MAX_
RISK_ PENALTY_ MULTIPLIER_ BPS - Upper bound for
PolicySnapshot::risk_penalty_multiplier_bpsvalidation.