VIBERAVEN ENGINEPostgreSQL 18.6

Find the bugs your users would find first.

Two users at once on real PostgreSQL. Every order, and an exact replay of the one that broke.

npx -y viberaven race --example
Use it in your chat

Free and open source. Runs on your machine.

Proof

Measured on a frozen engine, judged against native PostgreSQL.

122/124PostgreSQL isolation specs
199/200hidden new statement orders
1,500/1,500hidden real-app interleavings
80/80byte-equal replays
240broken orders out of 60 on the example, before and after the fix

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.

How it works

Real sessions, every order, one replay.

Your migrations, verbatim

Loaded into a fresh, pinned PostgreSQL 18.6.

Two real sessions

Independent PostgreSQL backends in one WebAssembly process, with real locks.

Every order, bounded

Statement orders are enumerated and checked against your rule.

Exact replay

The broken order replays byte for byte, so a fix can be confirmed.

In your repo

Check, race, fix.

  1. Check

    Find repository risks before launch.

    npx -y viberaven check
  2. Race

    Write viberaven.race.json: setup, two requests and the SQL that must stay true. Node 24+.

    npx -y viberaven race
  3. Fix, run again, replay

    Use the replay command from the result. Keep the test in the repo.

    • exit 0held
    • exit 1broken
    • exit 2incomplete
$ 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.
Recorded example. Elapsed time varies.
Where it runs

Your terminal and your chat.

Terminal

One rule at a time, free.

npx -y viberaven race
The library

@viberaven/sessions

Several 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.0

Node 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' ] ]
Limitations

What it does not cover.

  • Tests cover the SQL, inputs and bounded statement orders you supply.
  • An incomplete run is not a pass.
  • Rules beyond a simple count limit need an explicit spec.
  • Replay needs the same migrations, spec, options, runtime and deterministic inputs.
  • Omitted roles run as postgres. Review role and claims.
  • Cloud Auth, HTTP, external I/O and nontransactional effects are outside the test.
  • Public misses: 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.
  • Run only SQL you trust. The engine is not a security sandbox.
  • Offline tests, not live provider proof or whole-app certification.
  • No real parallel workers, universal PostgreSQL compatibility or advantage over a plain coding agent in bug finding is claimed.

CLI and MCP: MIT. Sessions: Apache-2.0, with PostgreSQL and third-party notices. Package notices ↗