Skip to content

docs(crdt): CRDT merge over the reasoning-evidence fabric#130

Open
mdheller wants to merge 4 commits into
mainfrom
docs/crdt-over-evidence-fabric
Open

docs(crdt): CRDT merge over the reasoning-evidence fabric#130
mdheller wants to merge 4 commits into
mainfrom
docs/crdt-over-evidence-fabric

Conversation

@mdheller

@mdheller mdheller commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What

Design doc: CRDT merge over the reasoning-evidence fabric — closes local-first ideals 2 (multi-device) and 4 (collaboration) without regressing 5 (longevity) / 6 (privacy) / 7 (user-control), and adds an eighth ideal — correctness — as a merge precondition.

Key properties (spec-first, conformant to v2)

  • No schema change. CRDT ops ride in EventEnvelope; causal metadata (hash-DAG parents, Lamport, OR-Set tags) rides in the open payload.
  • Reuses SyncCycleReceipt.locus (local | trusted_private | attested_fog | burst_cloud) as the merge gate — the "distance-to-execution" axis already in the spec.
  • Correctness as merge precondition: CRDTs converge everything (nothing lost); the attestation/locus gate decides which converged sub-graph is authoritative. Ops from burst_cloud without a passing correctness receipt land in a quarantine view.
  • Op-based add-wins OR-graph; occurredAt is display-only, never trusted for ordering.

Companion implementation

CRDT Slice 1 (op-emitter) is implemented in prophet-mesh (branch personal-knowledge-graph-spec) — EventEnvelope-conformant, deterministic fold() round-trip, hash-chain verification, 5 tests.

Conforms to: EventEnvelope.json, ReasoningRun.json, ReasoningEvent.json, SyncCycleReceipt.json.

…first ideals 2/4 without regressing 5/6/7

Op-based add-wins OR-graph over EventEnvelope op-log (Fig-18 railroad track).
Causal metadata rides in open payload; no schema change. Merge gate binds to
SyncCycleReceipt.locus + correctness attestation (the eighth ideal). Conforms to
sourceos-spec v2 EventEnvelope/ReasoningRun/ReasoningEvent/SyncCycleReceipt.
mdheller added 3 commits July 2, 2026 11:52
Slices 1 (op emitter), 2 (deterministic materialize), 3 (OR-Set merge) shipped in
prophet-mesh#13 with 14 tests; suite 74 green. Slice 4 (locus/attestation gate) next.
gate() ships in prophet-mesh#13 — canonical vs. quarantine split, fail-closed on
gated loci, untrusted-retract security property, SyncCycleReceipt v2 receipts; 7 tests,
suite 81 green. Only Slice 5 (live second-replica ingester) remains.
Slice 5 (live Replica + anti-entropy sync + HellGraph ingester + persist-only-
canonical) ships in prophet-mesh#13. 27 CRDT tests, suite 87 green. emit →
reconstruct → converge → correctness-gate → live-sync + persist proven-correct only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant