promote: test → main (@vercel/sandbox v2 bump)#504
Conversation
Phase 2 prerequisite. Aligns api with the version open-agents uses, so a
later PR can absorb open-agents' packages/sandbox into api/lib/sandbox/
without a dep mismatch.
The v1 -> v2 API change relevant to api: Sandbox.sandboxId is renamed
to Sandbox.name, and Sandbox.get's params likewise take { name } instead
of { sandboxId }. api's internal vocabulary keeps "sandboxId" — it's in
the public HTTP response shape (SandboxCreatedResponse, the JSDoc on
app/api/sandboxes/route.ts) and in lib/trigger/triggerPromptSandbox's
own argument schema. The translation only happens at the v2 boundary
inside lib/sandbox/:
sandbox.sandboxId -> sandbox.name
Sandbox.get({ sandboxId }) -> Sandbox.get({ name })
Sandbox["sandboxId"] type -> Sandbox["name"]
10 production-code edits across 6 files; tests updated to mock Sandbox
objects with `name` and to assert `Sandbox.get({ name })`.
Verification:
- pnpm install: clean
- pnpm exec tsc --noEmit: clean for lib/sandbox/ (preexisting unrelated
type errors elsewhere left untouched, since the api repo's CI runs
eslint not tsc)
- pnpm lint:check: clean
- pnpm test lib/sandbox: 152/152 pass
- pnpm test (full): 2362/2362 pass
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (8)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR updates sandbox identity handling across six sandbox utility functions to source sandbox IDs from the ChangesSandbox Identity Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: Turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value). 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Promotes #503 (@vercel/sandbox 1.3.1 → 2.0.0-beta.11) from `test` to `main`.
Contents
Verification
PR #503 was manually verified end-to-end on its preview deployment — see #503 (comment) for full results: real Vercel Sandbox created via POST /api/sandboxes, listed via GET, all v1→v2 SDK surface changes round-trip correctly.
Why this lands as part of the migration
Phase 2 prerequisite — open-agents' `packages/sandbox` is built on @vercel/sandbox v2; api needed to be on v2 first before the upcoming code-merge PR can absorb open-agents' sandbox runtime into `api/lib/sandbox/`.
Summary by cubic
Promotes the
@vercel/sandboxv2 upgrade fromtesttomain. Updates our sandbox integration to the v2 API while keeping public responses unchanged and preparing for the open-agents sandbox merge.Dependencies
@vercel/sandboxto2.0.0-beta.11.Migration
sandboxIdtoname, andSandbox.get({ sandboxId })toSandbox.get({ name }).sandboxIdin our HTTP responses and trigger payloads; translate tonameat the lib boundary.nameand assertSandbox.get({ name }).Written for commit 6e4242b. Summary will update on new commits.
Summary by CodeRabbit