DRC
explanation architect public

Architecture

DRC is a data-analysis system with two developer-facing planes:

  1. **Capture plane:** collect execution events and preserve their ordering and source context.
  2. **Analysis plane:** replay captured data, compare executions, trace relationships, and return structured findings.

Core flow


service / dependency
      │
      ├── proxy, SDK, middleware, API, or connector
      ▼
normalized execution events
      │
      ├── local adapter → local storage
      └── hosted adapter → control metadata + artifact storage
                                      │
                                      ▼
                         replay / diff / trace / analysis
                                      │
                         CLI / API / web / MCP result

Components

Component Responsibility
Capture Transparent TCP proxy, SDKs, middleware, API ingestion, Unix socket, and selected connectors.
Ingestion Normalize events, preserve source metadata, apply size bounds, and group events by execution.
Storage Retain execution metadata and event artifacts through the selected local or hosted adapter.
Runtime Replay captured event streams with deterministic controls for time, randomness, I/O, and side effects.
Comparison Produce event-level and field-level differences, semantic normalization, and divergence classifications.
Analysis Trace causal relationships, isolate first divergence, scan related executions, and return structured results.
Product surfaces Rust CLI, versioned HTTP API, web workspace, SDKs, and MCP integration.

Execution lifecycle

  1. A capture source creates or identifies an execution.
  2. Events are normalized with sequence, timestamp, correlation, and source metadata.
  3. The selected storage adapter persists execution metadata and event data.
  4. Replay loads the captured event stream under the requested mode.
  5. Comparison and analysis produce divergences, causal context, and result status.
  6. The caller reviews the structured result and chooses the next application or deployment action.

An event-stream comparison describes the captured representation. It should not be interpreted as an application-level verification when required inputs or side effects were not captured.

Storage adapters

The application depends on storage interfaces rather than requiring callers to manage backend-specific object keys. Tenant authorization and artifact integrity are enforced at the hosted boundary.

Rust implementation

The core implementation is a Rust edition-2021 workspace:

Crate Role
drc-core Core types, lifecycle, errors, capture metadata, security, and evidence primitives.
drc-runtime Deterministic replay runtime and fidelity/completeness checks.
drc-storage Storage adapters, encryption, authentication, and key handling.
drc-control Mutation, diff, semantic comparison, causal tracing, and classification.
drc-ingestion-core / drc-ingestion Normalized events, connector registry, batching, and ingestion adapters.
drc-orchestrator Axum HTTP API, authorization, replay coordination, and health endpoints.
drc-analysis-engine Analysis operations and structured tool boundary.
drc-cli The drc command-line binary.
drc-mcp Model Context Protocol integration.
drc-governance Audit, classification, retention, legal hold, and governance features.

The web application is a separate Next.js/React/TypeScript application under apps/web. SDKs are provided for Node.js/TypeScript, Python, and Go.

Result model

Results should preserve the distinction between captured facts, comparisons, simulations, analytical inferences, and unavailable evidence. Consumers should use the structured status and completeness fields rather than treating a successful HTTP request or empty diff as proof of application behavior.

See CLI reference, HTTP API, SDK integration, and configuration.