Cognitive OS — M1 Smoke Test

Direct-bypass test of the DOM bridge. Each button calls CognitiveOS._applyPatchDirect(...) (no AILANG REPL needed). Replay-equality is checked via regionHash after each operation.

Replay engine (M3 Day 6)

Reads the IndexedDB event log in canonical (clock, sender) order and reconstructs the DOM. The strategic claim: same event log → same DOM across page reloads + across machines.

Workflow: (1) Enable IndexedDB sink, (2) do some operations to build a log, (3) Capture DOM hashes (snapshots the current state), (4) Replay from IndexedDB (resets + replays), (5) Verify byte equality (compares before/after hashes).

IndexedDB event log (M3)

Opt-in cognitive event log. Once enabled, every applyPatch / send / recv writes a structured event to IndexedDB. Survives reloads. The "Reload tab" workflow is the M3 replay-determinism story.

Cross-tab BroadcastChannel test (M2)

Open this page in a second browser tab on the same origin. Click "Await message" in one tab and "Send greeting" in the other — the listening tab logs the envelope with the sender's tab ID + Lamport clock. BroadcastChannel spec: the sending tab does not receive its own posts.

Click "Run all assertions" to begin.