VibeRaven: the raven mark and the PostgreSQL elephant. Two users at once, on real PostgreSQL.

# VibeRaven **Two users, same moment, real PostgreSQL.** VibeRaven loads your Supabase migrations into a real PostgreSQL that runs inside the Node process, opens two sessions with real locks, and tries the statement orders a normal test never hits: the last seat sold twice, a late Stripe webhook that turns a cancelled plan back on, a write lost under load. When an order breaks, it replays byte for byte, so the same order proves the fix. It also reads your repo for missing RLS, Data API grants and Stripe webhook problems, from the terminal or on every pull request. - **No Docker, no database server.** PostgreSQL 18.6 in WebAssembly, several sessions in one process ([`@viberaven/sessions`](https://www.npmjs.com/package/@viberaven/sessions)). - **Not a flaky test.** Statement orders are enumerated within a bound. A failure comes back as a replayable trace, and a scene finding counts only after it fails twice. - **Evidence, not guesses.** Findings point to the file and line when available, and anything the engine could not settle is reported as incomplete, never as a pass. | Where you work | How to run it | | --- | --- | | GitHub pull requests | Install the [VibeRaven PR Check](https://github.com/apps/viberaven-pr-check) app. Each PR gets a check run, and findings arrive as one comment with file and line. Free on public repositories. | | Terminal or coding agent | `npx -y viberaven@1.20.2 check` | | Browser or phone | Sign in at [viberaven.dev/app](https://viberaven.dev/app), connect a public GitHub repo and press **Check now**. Nothing to install. | | ChatGPT, Claude or another MCP client | Add `https://viberaven.dev/mcp` | ## Fixes merged upstream Bugs VibeRaven reproduced in open-source apps, fixed and merged by the maintainers: - [supabase-community/nextjs-subscription-payments#8](https://github.com/supabase-community/nextjs-subscription-payments/pull/8): two first checkouts at once could lose a Stripe customer mapping. Merged December 1, 2026. - [octree-labs/octree#452](https://github.com/octree-labs/octree/pull/452): a late Stripe `subscription.updated` event could reactivate a cancelled plan. Without the fix 10 of 20 event orders broke, with it 0 of 20. Merged November 25, 2026. Run the synthetic booking example in an empty folder with Node 24 or later: ```sh npx -y viberaven@1.20.2 race --example ``` The unguarded example oversold the last seat in **24 of 60 tested statement orders** and exits with code 1. The [booking fixture](https://github.com/ohad6k/VibeRaven/tree/de6208df5a777358251fa87e7457ad5989c33922/examples/race-capacity) shows the guard-row fix and how to rerun the assertion.

Recorded booking race: two users book the last seat at once. The broken statement order replays exactly.

[Use with Claude Code, Codex or Cursor](#use-with-claude-code-codex-or-cursor) · [Check your Supabase migrations](#in-your-repo) · [Connect an MCP client](https://viberaven.dev/connect/mcp)

npm version MIT license GitHub stars

Website · Engine · Connect your chat · Docs · Discord

## In your repo ```sh npx -y viberaven@1.20.2 check # what is risky before launch npx -y viberaven@1.20.2 race # what breaks when two users act at once ``` 1. `check` reviews Supabase migrations, application code and configuration. Findings include the file and line when available. Use `check --replay` to test supported Stripe handlers locally with repeated or out-of-order events. 2. `check --scene ` runs a route, job or webhook with two or three actors on a local PostgreSQL. It checks that an effect happens once (`exactly_once`), that acknowledged writes are kept (`no_lost_write`), and that an older event cannot overwrite a newer one (`latest_wins`). A failure must replay twice before it is reported. 3. `race` runs the rule in your `viberaven.race.json`: setup, two requests and the SQL that must stay true. [Spec template](https://github.com/ohad6k/VibeRaven/blob/main/docs/race.md#explicit-spec). 4. 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+. **Current release** · [VibeRaven 1.20.2 on npm](https://www.npmjs.com/package/viberaven/v/1.20.2) · [Changelog](./CHANGELOG.md) · [GitHub Releases](https://github.com/ohad6k/VibeRaven/releases) Version 1.20.2 fixes npm configuration in the feedback workflow generated by `init --github`. It includes the 1.20.1 fix that sets up the local race engine automatically on a cold install when a race check needs it. ## 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](https://github.com/ohad6k/VibeRaven/blob/main/docs/race.md#frozen-engine-proof) ## 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`](https://www.npmjs.com/package/@viberaven/sessions). ## Use with Claude Code, Codex or Cursor From the root of your app, run the row for your agent to add project instructions. Append `--dry-run` to preview the changes. | Agent | Setup | | --- | --- | | Claude Code | `npx -y viberaven@1.20.2 init --agents claude` | | Codex | `npx -y viberaven@1.20.2 init --agents codex` | | Cursor | `npx -y viberaven@1.20.2 init --agents cursor` | Then ask: “Review my Supabase migration files for missing RLS and Data API grants. Show the relevant file and line, and tell me what I should verify against my deployed project.” For ChatGPT, Claude or another remote MCP client, add `https://viberaven.dev/mcp`. The hosted server can review supplied migration SQL or migrations in a supported public GitHub repo. Local MCP tools are available via `npx -y @viberaven/mcp@1.20.2`. See the [agent hub](./AGENTS-HUB.md) for setup and scope. Building an agent that answers provider errors? The [AI SDK provider-context example](./examples/ai-sdk-provider-context/) adds `search_guides` and `recent_provider_changes` from the hosted MCP endpoint. ## Local Studio `npx -y viberaven@1.20.2` 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](https://raw.githubusercontent.com/ohad6k/VibeRaven/main/assets/studio-3d.png) ## Packages | Package | Purpose | License | | --- | --- | --- | | [`viberaven`](https://www.npmjs.com/package/viberaven) | The `npx` entry | MIT | | [`@viberaven/cli`](https://www.npmjs.com/package/@viberaven/cli) | Studio, `check` and `race` | MIT | | [`@viberaven/mcp`](https://www.npmjs.com/package/@viberaven/mcp) | Local repository tools over MCP stdio | MIT | | [`@viberaven/sessions`](https://www.npmjs.com/package/@viberaven/sessions) | Several PostgreSQL sessions in one process | Apache-2.0 | ## Limitations - By default, `check` uses repository evidence. With `--db`, it can compare live schema metadata with your migrations. A clear result covers the checks that ran. - `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](https://github.com/ohad6k/VibeRaven/tree/main/notices). [Contributing](./CONTRIBUTING.md) · [Security](./SECURITY.md) · [Changelog](./CHANGELOG.md) ## Gemini CLI ```sh gemini extensions install https://github.com/ohad6k/VibeRaven --ref v1.20.2 ``` Run `/viberaven-check` in your repo to review a migration change with the pinned local CLI. For a public GitHub repo URL, use the hosted VibeRaven MCP check from the same command.