What happens when two robots try to update the same memory simultaneously?
Fencing tokens and a write-ahead log. bRRAIn's Consolidator enforces single-writer-per-workspace semantics, with conflict records for multi-writer scenarios.
The concurrent-write problem
When two robots write to the same memory at the same moment, a naive system races them and one write silently clobbers the other. In robotics that silent clobber might be the difference between knowing about a hazard and not. The disciplined approach is to order writes explicitly, detect conflicts, and record both versions for later review. bRRAIn handles this with fencing tokens in the Consolidator, a write-ahead log in the Vault, and structured conflict records when multi-writer scenarios occur.
Fencing tokens prevent lost writes
Every bRRAIn writer holds a fencing token — a monotonically-increasing authority stamp scoped to its workspace. A write arriving with an older token than the current canonical is rejected rather than applied, so a stale robot cannot undo a fresh one. The Auth Gateway issues the tokens, and the Consolidator validates them at write time. This pattern, borrowed from distributed systems literature, is cheap to run and eliminates whole classes of race-condition bugs that otherwise require heavy debugging.
Single-writer-per-workspace semantics
bRRAIn enforces single-writer-per-workspace as the default. One robot, one workspace, one canonical writer for that workspace's state. Other actors contribute through observation events that feed into conflict resolution rather than directly overwriting state. The Workspaces zone is the boundary where this rule lives. The result is a model developers can reason about: concurrent writes within a workspace are disallowed, and concurrent writes across workspaces are reconciled through defined merge rules rather than chance.
Multi-writer scenarios get structured conflict records
Some scenarios legitimately have multiple writers — emergency overrides, shared sensor fusions, collaborative manipulation. When these happen, bRRAIn's Conflict Zone / Integration Layer captures each write as a separate record with full provenance, then adjudicates against policy or escalates to a Sovereign. Nothing is lost; nothing is silently clobbered. The POPE graph retains each version for audit. Conflicts become data, not incidents, and the fleet learns from them rather than covering them up.
Relevant bRRAIn products and services
- Consolidator — validates fencing tokens and enforces single-writer-per-workspace semantics.
- Conflict Zone / Integration Layer — captures multi-writer scenarios as structured conflict records.
- bRRAIn Vault — holds the write-ahead log that makes recovery and replay possible.
- Workspaces — the boundary where single-writer rules are enforced.
- Auth Gateway — issues the fencing tokens that order concurrent writes.
- POPE Graph RAG — retains all versions for audit when conflicts occur.