Converge Ledger

An optional, distributed, append-only runtime substrate for Converge

What This Is

Converge Ledger is a supporting runtime component for the Converge engine.

It exists to externalize ephemeral context from a running Converge process when scale, distribution, or observability demands it — without ever becoming a source of semantic truth.

Convergence happens in Rust. Anything distributed only exists to remember what already happened.

The ledger does not decide, coordinate, or validate anything. It cannot cause convergence. It cannot break convergence.

If Converge Core did not exist, this system would be meaningless.

What This Is Not

To avoid architectural drift, this is explicit:

Converge Ledger is derivative, optional, and replaceable.

Why This Exists

Converge Core is designed around:

In many cases, a single Rust process is sufficient.

However, some deployments benefit from:

Converge Ledger exists only to support these cases — as a runtime substrate, not a conceptual pillar.

Design Principle

The ledger never knows why something happened. It only knows that it happened.

All meaning lives in Converge Core.

The Data Model

The ledger stores append-only entries, grouped by context ID.

Each entry is:

┌─────────────────────────────────────────────────────────┐
│ Context: growth-strategy-001                             │
├──────────┬────────────┬─────────────────────────────────┤
│ seq=1    │ facts      │ market_size: 2.4B               │
│ seq=2    │ intents    │ objective: increase_demand      │
│ seq=3    │ traces     │ agent:analyst started           │
│ seq=4    │ proposals  │ strategy: partnership_model    │
│ seq=5    │ evals      │ confidence: 0.73                │
│   ⋮      │    ⋮       │        ⋮                        │
└─────────────────────────────────────────────────────────┘

There are no updates, deletes, or rewrites.

Consistency Model

Replication exists to mirror state, not to resolve meaning.

Why Elixir / OTP

Converge Ledger is implemented in Elixir on OTP because it provides:

Lightweight Concurrency

Millions of isolated processes with minimal overhead.

Fault Isolation

Failures restart locally without corrupting state.

Distribution

Node discovery, clustering, and replication are built-in.

In-Memory Performance

Reads and writes operate at microsecond scale.

Operational Simplicity

This is solved infrastructure — not a research problem.

Durability Model

The ledger is not authoritative.

Mnesia supports:

Use durability when needed — but never rely on it for semantics.

API (Minimal by Design)

The ledger exposes exactly five operations:

Operation Purpose
Append Add an entry to a context
Get Retrieve entries
Snapshot Serialize a context
Load Restore a context
Watch Stream new entries

Deliberately missing:

If you need those, you're using the wrong system.

Architecture

┌─────────────────────────────────────────────────────────────┐
│               Converge Core (Rust – Authority)               │
│                                                             │
│  • Root intent                                               │
│  • Convergence logic                                         │
│  • Invariant enforcement                                    │
│  • HITL gating                                               │
└───────────────────────────────┬─────────────────────────────┘
                                │ gRPC
                                ▼
┌─────────────────────────────────────────────────────────────┐
│             Converge Ledger (Elixir – Substrate)              │
│                                                             │
│  • Append-only storage                                      │
│  • Replication & catch-up                                   │
│  • Watch streams                                            │
│  • Snapshot / restore                                       │
│                                                             │
│   No decisions • No validation • No authority               │
└─────────────────────────────────────────────────────────────┘

When to Use This

Use Converge Ledger when you need:

Do not use it:

The Contract

This repository obeys one rule:

Nothing in this system may influence convergence semantics.

If a proposed change violates that rule, it does not belong here.

Documentation

License

MIT

Final Note

Converge is built on the idea that systems should halt, explain themselves, and resume safely.

This ledger exists only to make that practical at scale — never to make it ambiguous.