<< All versions

Skill v1.0.0

currentAutomated scan100/100
alizainx/intelligence-systems-skills/crdt-hlc-causal-consistency
──Details
PublishedNovember 5, 2026 at 08:54 AM
Content Hashsha256:4a835495f640de9a...
Git SHA4446b059cc96
──Files
Files (1 file, 2.1 KB)
SKILL.md2.1 KBactive
SKILL.md · 27 lines · 2.1 KB

name: crdt-hlc-causal-consistency id: ISS-162 token_budget: 700 chain_with: [raft-paxos-consensus-replication, mvcc-ssi-acid-transaction-managers, consistent-hashing-sharding-rebalance] description: "State-based (CvRDT) & Operation-based (CmRDT) Conflict-Free Replicated Data Types, Hybrid Logical Clocks (HLC), Vector Clocks, and Merkle anti-entropy." metadata: version: "1.0.0"


crdt-hlc-causal-consistency (ISS-162)

1. First-Principles Invariant

  • Shapiro Join-Semilattice Law: Every state-based CvRDT merge(a, b) operation must form a bounded join-semilattice satisfying Commutativity ($a \sqcup b = b \sqcup a$), Associativity ($(a \sqcup b) \sqcup c = a \sqcup (b \sqcup c)$), and Idempotence ($a \sqcup a = a$), guaranteeing Strong Eventual Consistency across arbitrary message reordering, duplication, and network partitions.

2. Fast-Pass Low-Token Protocol (Web & Coding Agents)

  • Track causality and wall-clock proximity using Kulkarni Hybrid Logical Clocks (HLC: (l, c, node_id) where $l = \max(l_{\text{prev}}, l_{\text{msg}}, pt_{\text{phys}})$) — never rely on unsynchronized gettimeofday() Last-Write-Wins timestamps alone.

3. Zero-Bug & Zero-Vulnerability Guards

  1. In Observed-Remove Sets (OR-Set / Add-Wins Set), tag each added element with a unique (replica_id, monotonic_seq) dot and remove ONLY the specific set of dots observed by the remover at the time of remove(e).
  2. Bound causal metadata growth by compacting contiguous per-replica dot sequences (1..N) into a single contiguous interval watermark (Dotted Version Vectors).
  3. For operation-based CmRDTs, deliver mutations over a causal broadcast layer equipped with per-sender sequence deduplication so non-idempotent operations (increment) are applied at-most-once.
  4. Reconcile divergent replicas in the background using Merkle-tree hash exchanges (O(log N) delta discovery).
  5. Verify join-semilattice laws (merge(a,b) == merge(b,a), merge(a,a) == a, merge(a, merge(b,c)) == merge(merge(a,b), c)) via property-based randomized fuzzing.

4. Verification Gate

  • python3 -c 'import random; ...'
All versions