Context Switch
← All references
Library / 04 Quality, Evals & Reliability
Reviewed Oct 2026

Production Reliability & Observability

Trace the request forward to the first observable divergence.

01 / flow

The production path

Browser + UIAPI validationContext + modelDeterministic checksDatabase + response
02 / table

Where failures hide

BoundaryTypical failureFirst evidence
FrontendStale view, wrong API base, duplicate submitNetwork, console, rendered state
APIBad validation, unsafe retryRequest ID, route logs, response
ModelTimeout, malformed or unsupported outputProvider timing, model ID, tokens
DatabaseConstraint failure, stale versionTransaction, schema, migration
Cross-boundaryLocal differs from deployedEnvironment, commit, target, CORS
03 / cards

Trace / log / metric

Trace

What happened across this specific request, in order?

Log

Which technical event, warning, or error occurred?

Metric

How often, how slow, how costly, how widespread?

04 / table

Safer recovery

SituationAvoidPrefer
Model fails after evidence savedAsk for duplicate submissionRetry against same durable evidence
Stale review races newer stateOverwrite newer factsVersion conflict and re-review
Malformed referencesWrite partial recordsReject deterministically
Provider unavailablePretend successSafe failure without changing authority
05 / list

Production checklist

GOING DEEPER

Latency, durability and safe recovery

Where time goes

SegmentLook for
Frontend / networkRequest duplication, slow connection, stale client render
API orchestrationValidation and coordination, serialization overhead
Model providerInference latency, token volume, model/version changes
Validation / persistenceSchema checks, failed transactions, version conflicts
RehydrationAuthoritative response and deterministic UI refresh, not arbitrary sleeps

Safe recovery examples

FailureBetter pattern
Evidence saved; model call failsKeep durable Evidence and retry interpretation only
Old review races with newer stateReject stale proposals using version checks
Shape-valid output has bad referencesReject deterministically rather than persist partial records
Frontend waits for updateUse server response and authoritative revalidation, not sleep(300ms)
Provider unavailableSafe failure; preserve truth and offer controlled retry
Production checklist: Record deployment commit, model identifier, safe request/correlation IDs, timings, categorized errors, token usage, API base, provider keys, CORS, database target, schema/migrations, and durable records that must survive restarts. Protect idempotency so retries do not duplicate side effects.
PRACTICAL FRAMEWORK / AI PRODUCT WORK

Behavior contracts and upstream changes

Define a behavior contract before selecting a model: task-level quality bar, maximum critical-error severity, p95 latency, cost per successful outcome, required tool support, output structure, permission boundary, and recovery behavior.

Change to watchWhat to verify
Model alias or provider preset changesRecord the resolved model/configuration; rerun critical evals, tool calls, refusal/uncertainty cases and latency/cost checks.
Retrieval or data updatesTest freshness, provenance, access filtering and contradictory sources.
No known deployment or announcementRun small scheduled behavioral canaries; compare outcomes against a known baseline and alert on meaningful drift.
Release rule: A green server status is not evidence that AI behavior is unchanged. Pin what can be pinned, measure the rest, and have a named owner for rollback or constrained fallback.