Products

Crucible Protocols And Semantics

Source

Crucible owns protocol-neutral lifecycle, queueing, event correlation, consensus, and endpoint completion. A protocol becomes available only when its endpoint feature registers an adapter alongside the endpoint-comparison feature.

Adapter Layout

The implementation has one shared runtime and one small adapter boundary per protocol:

  • eden_gateway/core/src/endpoint_comparison.rs owns lifecycle, bounded asynchronous dispatch, consensus, safe evidence, and completion-facing counters.
  • Each endpoint owns an endpoint_comparison.rs module for registration, eligibility metadata, target dispatch, and response evidence.
  • The native processor supplies only the serving request and response lifecycle. PostgreSQL uses processor/direct_channel.rs, MySQL and MongoDB use processor/wire.rs, Redis uses processor/runtime.rs, and LLM uses src/lib.rs.

This keeps protocol-specific safety rules close to their wire implementation without duplicating Crucible lifecycle logic.

Release Matrix

ProtocolFeature pairFamilyComparison semanticsCurrent operation behavior
PostgreSQLendpoint-comparison,postgresSQLCanonical where safeSimple-query reads and writes are eligible. Transactions, prepared statements, and session-affine operations are skipped.
MySQLendpoint-comparison,mysqlSQLCanonical where safeIndependent COM_QUERY reads and autocommit writes are compared. Protocol housekeeping, pinned sessions, transactions, multi-statements, prepared execution, and migration-owned traffic are skipped.
MongoDBendpoint-comparison,mongoDocumentCanonical where safeSingle-batch data reads and independent writes use stable BSON canonicalization. Topology, health, administrative, session-affine, cursor, and migration-owned traffic is skipped.
Redisendpoint-comparison,redisKey-valueOutcome-onlyEligible commands and pipelines produce latency, availability, counts, and safe errors. MULTI/EXEC state, WATCH state, pinned sessions, and migration-owned traffic are skipped.
LLM gatewayendpoint-comparison,llmLLMPerformance-onlySafe chat and response invocations record availability, latency, streaming time to first token, token units, and estimated cost. Tool-capable, stored, background, and side-effecting requests are skipped.

Endpoint features do not enable endpoint comparison by themselves, and endpoint comparison does not enable endpoint features. An endpoint-comparison-only build exposes no protocol adapter.

Canonical Evidence

Canonical adapters normalize protocol framing that is safe to ignore, then calculate a process-keyed HMAC digest. Only the digest, response byte count, result count, timing, and safe status fields are persisted.

Two successful canonical observations require exact digest agreement. Three or more use majority consensus. No majority is no_consensus. A latency winner is selected only from successful members of the consensus group.

Outcome-Only Evidence

Redis currently uses a drain-only response profile, so Crucible does not retain successful values for comparison. It reports success, safe errors, counts, queue delay, dispatch latency, and total latency without claiming that returned values match.

Performance-Only Evidence

LLM outputs are nondeterministic and can contain sensitive content. Crucible never compares or stores generated text. It records provider performance and usage evidence only. Requests that could execute server-side tools or cause provider-side effects are deliberately excluded.

Writes And Session Safety

Eligible writes use the same asynchronous queue as reads. They are never awaited by the serving response. Every adapter reuses its existing gateway safety classifier so transactions, pinned state, streaming operations, and unsupported session semantics are either handled explicitly or skipped with a safe reason.

Write mirroring can reduce drift but is not replication. Expected protocol, sampling, and pause skips are reported separately from delivery gaps. Any known delivery gap must be reconciled outside Crucible before endpoint completion.

Future Grouped Comparisons

Current arenas require one endpoint kind and an identity dispatch plan. Run snapshots already persist protocol family, endpoint kinds, adapter version, and dispatch-plan version so future SQL-to-SQL and vector-to-vector evidence runs can use translated plans without changing historical semantics.

Mixed-kind runs and cross-kind endpoint completion are not available in this release.

Help improve Eden Docs

Find something unclear or incomplete? Review the source and propose an update.

View on GitLab Updated September 15, 2026