Skip to content

fix(nova): avoid deserializing advisory lock void results - #361

Merged
yashdev9274 merged 1 commit into
mainfrom
capy/avoid-deserializing-advisory
Nov 19, 2026
Merged

yashdev9274 merged 1 commit into
mainfrom
capy/avoid-deserializing-advisory

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Fix Nova cloud workspace startup failing with Failed to deserialize column of type 'void'.

Use $executeRaw for pg_advisory_xact_lock instead of $queryRaw. The same parameterized, transaction-scoped organization lock still runs before the concurrency check, without asking Prisma to deserialize PostgreSQL's void return value.

Add a regression test that rejects result-reading queries and verifies the lock SQL, bound organization key, and lock-before-quota ordering. Update the pinned-checkout mock to use the execution-only method.

Verified: 11 focused tests, web TypeScript, scoped ESLint, and git diff --check passed. No migration required. Production database execution was not exercised.

Open in Capy

Summary by CodeRabbit

  • Bug Fixes
    • Improved sandbox reservation concurrency checks by acquiring an organization-scoped lock before counting active sessions, helping enforce session limits reliably.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
supercli Ready Ready Preview Nov 19, 2026 11:56am UTC
supercli-client Ready Ready Preview Nov 19, 2026 11:56am UTC
supercli-docs Ready Ready Preview Nov 19, 2026 11:56am UTC
1 Skipped Deployment
Project Deployment Actions Updated
vercel-supercodeai-integration Skipped Skipped Nov 19, 2026 11:56am UTC

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The sandbox reservation transaction now executes its organization-scoped advisory lock with $executeRaw. Tests verify the lock call, its order before the session count, and the concurrency-limit rejection.

Changes

Sandbox reservation

Layer / File(s) Summary
Advisory lock and reservation validation
apps/web/modules/nova/sandbox/service.ts, apps/web/modules/nova/sandbox/service.test.ts, apps/web/modules/nova/sandbox/github-checkout.test.ts
The transaction uses $executeRaw to acquire the organization-scoped advisory lock. Tests verify the lock SQL and parameter, confirm the lock runs before the session count, and check rejection at the concurrency limit. Database mocks use $executeRaw.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to a28a4

Sandbox workspace startup now takes the organization advisory lock without asking Prisma to read the void result. The lock still runs before the concurrency check. No actionable merge risk remains.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

I’m a rabbit; I hop by the lock,
Then count each session in the flock.
$executeRaw takes its turn,
Tests check the limit we discern.
I nibble a carrot and bound from the block.

@yashdev9274
yashdev9274 merged commit d3324ae into main Nov 19, 2026
6 of 10 checks passed

This branch was successfully deployed

3 active and 1 inactive deployments
Preview – supercli — a28a4305 Deployed Nov 19, 2026 by vercel[bot]
Preview – supercli-client — a28a4305 Deployed Nov 19, 2026 by vercel[bot]
Preview – supercli-docs — a28a4305 Deployed Nov 19, 2026 by vercel[bot]
Preview – vercel-supercodeai-integration — a28a4305 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant