viberaven

v1.10.0
io.github.ohad6k/viberaven Checked 1 hour ago Published 11 days ago

Runs your Supabase SQL with two users at once to find double bookings; checks RLS, keys, webhooks.

Catch double bookings before release VibeRaven tests overlapping PostgreSQL writes and shows what committed. It also checks Supabase migration files for missing RLS and Data API grants. Website · Engine · Connect your chat · Docs · Discord The synthetic event has one seat left. The unguarded booking flow exceeded capacity in 24 of 60 tested statement orders. The booking fixture shows the guard-row fix and how to rerun the assertion.

Summary extracted from the README.

Quick start

Reproduce a PostgreSQL booking race

Start in an empty folder with Node 24:

npx -y viberaven@1.12.1 race --example

The synthetic event has one seat left. The unguarded booking flow exceeded capacity in 24 of 60 tested statement orders. The booking fixture shows the guard-row fix and how to rerun the assertion.

Inside your chat

Add https://viberaven.dev/mcp as a custom connector in ChatGPT, Claude, Codex, Cursor or Lovable, then ask: "Can two users book the last seat?" Setup for each agent.

In your repo

npx -y viberaven@1.12.1 check   # what is risky before launch
npx -y viberaven@1.12.1 race    # what breaks when two users act at once
  1. check reads migrations, client code and env files, and names the file and line for each gap.
  2. race runs the rule in your viberaven.race.json: setup, two requests and the SQL that must stay true. Spec template.
  3. Fix, run race again, and replay the reported order. Exit 0: no order broke. Exit 1: broken. Exit 2: incomplete.

race needs Node 24+ (the CLI enables JSPI). check runs on Node 20+.

Proof

Frozen-engine check Result
PostgreSQL isolation specs 122/124
Hidden new statement orders 199/200, native PostgreSQL 200/200
Hidden real-app interleavings 1,500/1,500, native PostgreSQL 1,500/1,500
Byte-equal replays 80/80
Leaks between sessions 0 in 60 isolation cases

Method and limitations

How it works

  1. Your supabase/migrations load verbatim into a fresh, pinned PostgreSQL 18.6.
  2. Two independent sessions run in one PGlite WebAssembly instance, with real locks.
  3. Bounded statement orders are enumerated and checked against your rule.
  4. A broken order replays byte for byte, so a fix can be confirmed.

The engine is @viberaven/sessions.

Agents

Agent Setup
Claude Code npx -y viberaven@1.12.1 init --agents claude
Codex npx -y viberaven@1.12.1 init --agents codex
Cursor npx -y viberaven@1.12.1 init --agents cursor
ChatGPT, Claude, Lovable Add https://viberaven.dev/mcp as a custom connector

Local MCP tools: npx -y @viberaven/mcp@1.10.0. Details in the agent hub.

Building an agent that answers provider errors? The AI SDK provider-context example adds search_guides and recent_provider_changes from the hosted MCP endpoint.

Local Studio

npx -y viberaven@1.12.1 opens the local Studio: chat with your coding agent, the provider board, versions and diffs, and a Race test tab that runs race and replays a broken order.

VibeRaven local Studio

Packages

Package Purpose License
viberaven The npx entry MIT
@viberaven/cli Studio, check and race MIT
@viberaven/mcp Local repository tools over MCP stdio MIT
@viberaven/sessions Several PostgreSQL sessions in one process Apache-2.0

Limitations

  • check reads the repository. It does not show which policies are live in Supabase or Vercel, and a clear result is not a security audit.
  • race covers the SQL, inputs and bounded statement orders you supply. Rules beyond a simple count limit need an explicit spec. Omitted roles run as postgres.
  • An incomplete run is not a pass. Replay needs the same migrations, spec, options and runtime.
  • Cloud Auth, HTTP and external I/O are outside the test. Run only SQL you trust; the engine is not a security sandbox.
  • No universal PostgreSQL compatibility, and no advantage over a plain coding agent in bug finding, is claimed.

License

CLI and MCP: MIT. @viberaven/sessions: Apache-2.0, with PostgreSQL and third-party notices. Contributing · Security · Changelog