Your migrations, verbatim
Loaded into a fresh, pinned PostgreSQL 18.6.
Two users at once on real PostgreSQL. Every order, and an exact replay of the one that broke.
npx -y viberaven race --exampleFree and open source. Runs on your machine.
122 of 124 PostgreSQL isolation specs pass. Native PostgreSQL scores 200/200 and 1,500/1,500 on the same hidden sets. Replays match down to the protocol bytes, and 60 isolation cases leaked nothing between sessions.
Loaded into a fresh, pinned PostgreSQL 18.6.
Independent PostgreSQL backends in one WebAssembly process, with real locks.
Statement orders are enumerated and checked against your rule.
The broken order replays byte for byte, so a fix can be confirmed.
Find repository risks before launch.
npx -y viberaven checkWrite viberaven.race.json: setup, two requests and the SQL that must stay true. Node 24+.
npx -y viberaven raceUse the replay command from the result. Keep the test in the repo.
$ npx -y viberaven race --example
At most 2 bookings per event: 60 orders, 24 broken, 0 waiting
read committed 12/20 broken
repeatable read 12/20 broken
serializable 0/20 broken
First broken order 001101 (read committed)
COMMIT A=true, B=true
✓ Replay record is byte-identical.One rule at a time, free.
npx -y viberaven raceChatGPT, Claude, Codex, Cursor and Lovable.
https://viberaven.dev/mcpSeveral real PostgreSQL 18.6 sessions in one PGlite WebAssembly instance. PostgreSQL handles transactions and locks; you control the statement order.
npm install @viberaven/sessions@0.1.0Node 24+ with --experimental-wasm-jspi, or a Chrome Worker with JSPI. Apache-2.0. API and example ↗
import { createHost } from '@viberaven/sessions';
const db = await createHost({ children: [43, 44] });
await db.query(42, 'CREATE TABLE ticket (id int PRIMARY KEY, claimed_by text); INSERT INTO ticket VALUES (1, NULL)');
await db.query(43, "BEGIN; UPDATE ticket SET claimed_by = 'A' WHERE id = 1 AND claimed_by IS NULL");
const second = db.query(44, "BEGIN; UPDATE ticket SET claimed_by = 'B' WHERE id = 1 AND claimed_by IS NULL");
await db.waitUntilParked(44); console.log('B waits for A');
await db.query(43, 'COMMIT'); await second;
await db.query(44, 'COMMIT');
console.log((await db.query(42, 'SELECT claimed_by FROM ticket')).results.at(-1).rows);
await db.close();// output
B waits for A
[ [ 'A' ] ]postgres. Review role and claims.deadlock-parallel completion order and insert-conflict lock introspection, which native PostgreSQL also fails through the judge. The hidden miss is async-notify queue usage.CLI and MCP: MIT. Sessions: Apache-2.0, with PostgreSQL and third-party notices. Package notices ↗