Phase 1 delivers the complete durability and storage layer:
- WAL with crash recovery: Append-only journal with BLAKE3 checksums,
fsync guarantees, and proper seek-to-EOF on reopen
- Storage engine: sled-backed KVStore with scan_prefix for range queries
- Content-addressed storage: H:{hash}, V:{hash}, E:{hash} key patterns
- Ingestor: Background worker tailing WAL, writing to KV with 8-byte
aligned record headers for rkyv zero-copy deserialization
- Comprehensive tests: 31 tests covering crash recovery, round-trips,
and multi-cycle durability
New crates: stemedb-wal, stemedb-storage, stemedb-ingest
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
Simulation System ("The Infinite Game")
Last Updated: 2026-01-31 Confidence: High
Summary
The Simulation is an Agent-Based Modeling (ABM) environment that validates StemeDB under emergent, adversarial, and evolutionary pressure. It simulates a society of AI agents with conflicting goals living within the knowledge graph.
Key Facts:
- Codename: "The Arena"
- Purpose: Integration testing via societal stress tests, not unit tests
- Architecture:
stemedb-simbinary orchestrating agent swarms via tokio - Agents communicate only through StemeDB reads/writes
File Pointer: /simulation-vision.md (full vision document)
Agent Personas
| Persona | Goal | Behavior |
|---|---|---|
| Scientist | Converge on truth | High-confidence assertions, cites sources |
| Troll | Sow chaos | Low-confidence contradictions, frequent forks |
| Believer | Amplify consensus | Trusts high-reputation agents |
| Skeptic | Find variance | Reduces confidence of unverified claims |
| Historian | Preserve context | Resurrects dormant truths with new evidence |
The Gameplay Loop
- Assertion: Agent reads ground truth, creates assertion
- Fork: Adversarial agent forks reality with contradiction
- Lens Resolution: Query agent applies Lens (e.g., Consensus)
- Reputation Update: TrustRank adjusts agent reputations
- Decay: Unverified assertions fade via Dormancy Protocol
Success Criteria
- Truth survives: High-reputation assertions outlive spam
- Lenses work: Consensus lens filters Troll noise
- Performance: 1000 concurrent agents without locking
- Emergence: Trust clusters form without hardcoded rules
Metrics
Tracked via Prometheus/Grafana:
global_truth_convergence- Entropy of the graphagent_reputation_distribution- Reputation spreadfork_depth_max- Deepest branch depth
Related Topics
- TrustRank - Reputation algorithm
- Branching - Fork mechanics
- Lens System - Query resolution