Operations

Failure modes and recovery

Which dependencies may degrade, which must fail closed, and what recovery evidence is still missing.
Provisional Ledger class: provisional
Verified 2026-10-21Failure behavior is implemented in bounded local paths; restore, RPO/RTO, and HA drills are not accepted

IBEX separates authority failures from quality failures. Authority failures deny or return a typed dependency error. Quality failures may degrade, queue, or abstain, but cannot broaden visibility or invent a successful mutation.

Failure classes

DependencyClassRequired behavior
Auth, principal, policyAuthorityDeny or typed 503; no provider, context, or tool work
Budget/reservationAuthority/integrityDeny or 503; never claim a hard budget that was not held
Redis on a protected pathIntegrity/coordination503 under the protected profile; no permissive fallback
Context retrievalQualityDirective-only or verified hot-cache context; never wider scope
Embedder/reranker/modelQuality/asyncQueue, fallback, quarantine, or abstain
ProviderExternalTyped error, bounded retry, breaker, optional policy-compatible fallback
Evidence outboxIntegrityDurable buffer or explicit uncertified outcome; never silent loss
ClickHouse/OTelProjectionBuffer or degraded analytics; canonical evidence remains PostgreSQL
Object storageArtifactBlock artifact-dependent action or use a verified retained reference
Queue/workerAsyncRetry, dead-letter, replay, and visible operation status

Service-level behavior

Proxy

FailureBehavior
ValidateToken timeout or outage503 SERVICE_DEGRADED; provider is not called
ValidateAgent outage503 AUTH_UNAVAILABLE; provider is not called
Rate-limit Redis failure outside development503 SERVICE_DEGRADED before provider work
Org model-policy load failure503 SERVICE_DEGRADED; no ungoverned route
Context assembly timeoutProceed with directive-only or history-only context and record fallback
ClickHouse unavailableDrop or buffer traces; chat continues
Provider breaker open503 with Retry-After; optional eligible fallback

The proxy must never call a provider after a security, policy, capability, reservation, or evidence-integrity denial.

Auth

/ready checks PostgreSQL and the gRPC listener. A missing policy-signing key makes IssuePolicySnapshot fail closed outside development. ValidateToken has no caller bearer and must remain on a trusted private network. If Redis is unavailable, revocation propagation and the auth cache are not silently treated as healthy.

Memory and context

Memory requires PostgreSQL/pgvector for durable reads and keyed writes; the embedder is required for vector writes. Redis is optional for hot-cache behavior. Context is a quality dependency: its failure must degrade to directive-only, not block inference.

Workers and evidence

Extraction, embeddings, deletion, billing reconciliation, and audit tasks are asynchronous. Queue delivery is not exactly-once. Every mutation needs an operation ID and idempotent effect. The relay is at-least-once by design; a projection cannot be treated as the authority for deletion or acknowledgement.

Readiness versus liveness

EndpointMeaningMust not mean
/healthProcess is aliveDependencies are usable
/readySelected profile's required dependencies are availableEvery optional quality service is healthy
/metricsTelemetry is exposedA measured SLO exists

A process may be live and not ready. Readiness must not report healthy when security or evidence integrity is unavailable. Optional quality dependencies may be degraded and visibly reported.

Recovery classes

Recovery is planned per data class, not as one database restore:

ClassExamplesRecovery rule
Canonical controlOrganizations, users, agents, tokens, policies, reservations, operations, lifecycleRestore first; authority must be consistent before serving
Evidence/outboxRuns, events, spans, outbox rowsRestore with canonical state; replay must not resurrect tombstoned resources
Object artifactsRedacted payloads, archives, model artifactsRestore with metadata and retention/legal-hold state
Redis projectionsCache, hot memories, rate counters, leasesRebuild; never treat as durable truth
Vector/search projectionsEmbeddings, HNSW, full-textRebuild from canonical rows and pinned embedding profile
QueuesExtraction and audit workReplay only with idempotent effects; otherwise reconcile operation state

A cache or index may be discarded and rebuilt. A deletion tombstone may not be discarded to “repair” a projection.

Migrations

The target sequence is:

expand → dual-read/write → backfill → verify → contract

Every migration needs lock and statement timeouts, throttling/backpressure, restart/resume behavior, abort criteria, and a roll-forward or rollback decision. Mixed-version compatibility must be tested. Embedding or tokenizer profile changes are versioned migrations, never silent replacement of an index.

The repository currently has PostgreSQL migrations through 000047_relay_fence_checker. Migration presence is not restore or HA evidence.

Shutdown and drain

On shutdown, services should:

  1. Stop accepting new admissions.
  2. Drain in-flight streams within the configured deadline.
  3. Cancel bounded work that cannot finish.
  4. Persist worker state and release or expire leases.
  5. Close dependencies after in-flight work completes.

Provider SSE and operator-event SSE have separate deadlines. Do not replace the ASGI server's SIGTERM handling with an incompatible custom handler.

What is not proven

  • No tested RPO/RTO per data class.
  • No hosted backup/restore drill is recorded.
  • No HA failover, multi-zone, or capacity evidence is accepted.
  • Helm is render/lint scaffolding only; it is not a deployable production topology.
  • Object-store purge and full deletion certification remain open.
  • Evidence replay has local PostgreSQL tests, not production ClickHouse or hosted recovery evidence.

Operator checklist

  • Confirm /ready reflects the dependencies required by the selected profile.
  • Confirm the failure is authority or quality before choosing deny versus degrade.
  • Check whether a provider call happened before a deny.
  • Preserve the request ID, trace ID, and operation ID; do not log tokens or content.
  • For deletion or replay incidents, check tombstones before rebuilding projections.
  • Record the profile, artifact digests, and limitations with any recovery result.