---
library: "bootstrap"
slug: "Bubble"
name: "Bubble"
ref: "Bubble#dd4e"
hash: "sema:Bubble#mh:SHA-256:dd4e6be4e6d2751c5ebbed88908b85ad05bc2ca5071d252cb2f883eb71b29968"
type: "Strategy"
layer: "Mind"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Bubble"
---

# Bubble

Sandboxed coordination trial with rollback on commit refusal

Mind · Strategy

## Mechanism

Isolated sandbox where coordination is tried before committing to reality. Creator sends BUBBLE_CREATE: {participants, ttl (time-to-live), isolation_level, parent_bubble (for nesting)}. Participants JOIN to enter isolated context. Inside bubble: state changes are copy-on-write (snapshot isolation), resource acquisitions are soft-reservations (intent, not actual), messages to non-participants are queued (not sent). [Work](https://semahash.org/vocabularies/bootstrap/patterns/Work.md) proceeds normally but nothing affects real world. When ready, creator calls PREPARE (2-phase commit). Each participant responds READY (can commit) or ABORT (cannot). If ALL READY: COMMIT—queued messages sent, state changes applied atomically, reservations converted to hard acquisitions. If ANY ABORT or TTL expires: ROLLBACK—all tentative work discarded silently, no compensation needed. Nested bubbles commit to parent context, not real world; parent commit makes all nested work real. It enforces a [ConstraintFirst](https://semahash.org/vocabularies/bootstrap/patterns/ConstraintFirst.md) approach around the simulation context to ensure no side effects leak into the production environment.

## Invariants

- Information within bubble is isolated from outside
- Internal consistency maintained

## Preconditions

- Group of agents
- Shared context

## Postconditions

- Bubble dissolved or merged
- Local consensus reached

## Failure modes

- Participant crashes after READY but before COMMIT (blocking—use timeout and recovery).
- Long-running bubbles hold soft-reservations too long (resource starvation).
- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) snapshot becomes stale (external world changed during bubble).
- Nested bubble complexity (multiple isolation levels, commit ordering).
- Commit overhead (2PC protocol is expensive).
- Bubble escape (agent accidentally affects real world from inside bubble—discipline required).

## Where this came from

—

## Builds on

- [ConstraintFirst](https://semahash.org/vocabularies/bootstrap/patterns/ConstraintFirst.md) (references)
- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (references)
- [Work](https://semahash.org/vocabularies/bootstrap/patterns/Work.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Bubble#dd4e
- Hash: sema:Bubble#mh:SHA-256:dd4e6be4e6d2751c5ebbed88908b85ad05bc2ca5071d252cb2f883eb71b29968

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Bubble
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Bubble.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
