RIFT ARCHITECTURE DEEP DIVE

Engineered for mathematical determinism.

Rift is an enterprise-grade reconciliation and discrepancy investigation engine written in compiled native Rust. It decouples high-throughput record alignment from underlying storage, enabling deterministic verification without full-table diffs.

1. Dual Execution Engines

Rift features two execution models: an ultra-fast in-memory reference engine for datasets fitting comfortably into available RAM, and an external sort/merge engine for massive datasets. The external reconciler sorts datasets into streaming chunk files on disk and executes a K-way merge, strictly respecting the user-configured --memory-limit-mb sorter allocation budget.

Throughput: ~490K rows/s · Memory ceiling: ~97 MB RSS

2. Canonical Type Normalization

Differing database representations are mapped to Rift’s canonical type model: exact fixed-point decimals (preventing binary float inaccuracies), microsecond-precision ISO timestamps, bit-preserving IEEE-754 floats, UTF-8 strings, booleans, and explicit typed nullability. Normalization of Unicode, zero-values, and NaNs is policy-controlled.

Zero silent decimal drift · Precise financial rounding

3. PGDS Automated Investigation

Parameterized Graph Discrepancy Search (PGDS) transforms reconciliation from mere discrepancy reporting into automated triage. When records diverge, PGDS discovers candidate transformation rules (such as constant fee deductions, tax rate additions, or status remappings) and evaluates them via an authoritative D1 verification pass to isolate true anomalies.

Discovers mathematical invariants · Leaves unexplained residuals

4. Machine-Readable Audit Outputs

Rift avoids proprietary black-box formats. Every run emits structured JSON artifacts detailing total processed records, exact match counts, delta attributes, and candidate verification reports. Exit codes (0 for clean match, 1 for discrepancies detected, 2 for operational errors) allow instant orchestration inside Airflow, cron, or GitHub Actions.

Native stdout JSON · CI/CD exit code conventions

Execution in Practice

Explore how Rift CLI commands run against sample datasets.

rift-cli v0.1.1 (x86_64 / aarch64)
$rift compare source.parquet target.csv --schema schema.json --key id --engine external --memory-limit-mb 64
[INFO] Rift v0.1.1 — Deterministic Exact Reconciliation Engine
[INFO] Loading canonical schema: schema.json (5 fields, PK: id)
[INFO] Engine mode: External Sort/Merge (Sorter budget: 64 MB, Disk limit: 50 GB)
[INFO] Source A: source.parquet (1,000,000 records)
[INFO] Target B: target.csv (1,000,000 records)
.............................................................. [100%]
 
--- RECONCILIATION SUMMARY ---
Total records processed: 1,000,000
Exact matches: 997,659 (99.77%)
Discrepancies detected: 2,341 ( 0.23%)
- Modified values: 1,902
- Missing in target: 310
- Extra in target: 129
 
--- EXECUTION METRICS ---
Total elapsed time: 2.03s
Engine throughput: 492,610 rows/s
Peak Resident Memory (RSS): 97.3 MB
Spill disk written: 48.2 MB
 
[RESULT] Discrepancies detected. Exit code: 1
Exit status: 1Deterministic execution · No LLM required for reconciliation
AUDITED CAPABILITY & EVIDENCE MATRIX

Strict Engineering Verification & Boundaries

In accordance with Eagle Eye’s rigorous scientific standards, we clearly separate what the RIFT engine demonstrates today from external integration boundaries and future engineering goals.

System AreaImplemented & Verified BehaviorOperational Boundary & LimitationsStatus
Input Formats & ReadersNative readers for JSONL, NDJSON, JSON array, CSV, TSV, Parquet, and PostgreSQL tables/views.Warehouses (Snowflake, BigQuery, ClickHouse) are supported via approved exports or custom adapter development; not shipped native direct connectors.Verified
Exact Record MatchingPrimary & composite keys, explicit duplicate-key policies, unkeyed multiset comparison, column-level delta.Schema and comparison policy must be explicitly specified; no implicit financial materiality or business tolerance is assumed.Verified
Canonical Data TypesExact decimals (fixed-point), typed ISO timestamps, bit-preserving IEEE-754 floats, strings, booleans, and typed nulls.Unicode, NaN, and negative-zero normalization is policy-controlled, not silently universal.Verified
Execution EnginesIn-memory reference engine and external sort/merge engine with strict sorter budget (--memory-limit-mb).Bounded to single machine / container host; no distributed multi-node cluster execution.Verified
PGDS InvestigationParameterized Graph Discrepancy Search candidate rule discovery, contrastive classification, and witness cache verification.Discovers and independently verifies mathematical transformation rules; does not claim historical causation.Verified
Runtime & IntegrationRead-only access, immutable captures, local outbox delivery, CLI exit codes (0, 1, 2), and machine-readable JSON payloads.Single-customer state boundary; no multi-tenant cloud SaaS or direct remote administration.Verified
Repository: github.com/JEDIx420/rift · Crate: rift-cli / rift-coreAudit Ref: ENTERPRISE-CONSOLIDATION-REPORT.md

Validate Rift on your infrastructure

We provide structured, read-only proof-of-concept evaluations for qualified enterprise engineering and settlement teams.