Degraded

class Degraded(val scope: String, val prompts: List<String>, val operation: DegradedOperation, val policy: EmbedFailurePolicy, val cause: Throwable) : CacheEvent

The Embedder failed and EmbedFailurePolicy.FALL_BACK_TO_COMPUTE stepped aside, so the call ran uncached.

This is the one failure mode that otherwise leaves no trace. A rejected candidate produces a MissReason and moves a counter; a fall-back produces neither, because it is not a miss — no lookup ever happened. A team running with EmbedFailurePolicy.FALL_BACK_TO_COMPUTE and a flapping embedder would watch its hit rate collapse with nothing naming the cause, and would reasonably suspect the part that is instrumented, the guards. Counted in CacheStats.degradedLookups.

A RetryingEmbedder that exhausts its attempts arrives here too: retrying is transparent to the cache, so the final throwable is what cause carries. There is no separate "retries exhausted" event, because the cache cannot see that a retry happened at all.

Constructors

Link copied to clipboard
constructor(scope: String, prompts: List<String>, operation: DegradedOperation, policy: EmbedFailurePolicy, cause: Throwable)

Properties

Link copied to clipboard

The embedder failure that triggered it.

Link copied to clipboard

Which entry point stepped aside.

Link copied to clipboard

The policy that decided to step aside, always EmbedFailurePolicy.FALL_BACK_TO_COMPUTE today.

Link copied to clipboard

The prompts the failed call covered — one element for the single-prompt entry points, the whole batch for SemanticCache.getOrPutAll. Never empty.

Link copied to clipboard
open override val scope: String

The scope the event happened in.

Functions

Link copied to clipboard
open override fun toString(): String