Repository navigation
feat(sandbox): add Vercel Sandbox provider - #216
Merged
Merged
Conversation
Resolve conflicts with the Tensorlake provider that main added: - pyproject.toml: keep both the vercel and tensorlake extras; the dev extra takes both, plus main's fastmcp pin. - sandbox_provider.py: keep SandboxNotFoundError beside main's Accepts, and register both built-in providers. - teardown.py: take main's imports with SandboxNotFoundError added. - tst/util/capabilities.py, tst/unit/test_capabilities.py: both providers in the capability gate; main's parametrized configured-provider tests plus the Vercel credential tests. - egress_hosts_test.py, network_policy_stamping_test.py: both providers. - uv.lock: main's lock, relocked with the vercel extra. Fix what main changed under the PR: - teardown.py: main's take_down reads handle.ON_THIS_MACHINE, and _terminate now returns None for a sandbox that is already gone. - vercel_sandbox_test.py: a context-only image now has to record its Dockerfile (main's load_problem). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main added the Tenki provider and moved teardown of typed records to SandboxProvider.terminate_sandbox. The base terminate_sandbox now treats SandboxNotFoundError as already terminated, as its docstring says, so a Vercel sandbox that is already gone tears down cleanly; untyped records keep main's live-handle path, where "not found" is not proof it's gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- Name the Docker readiness attempts, delay, dockerd log tail and setup error tail used by wait_for_vm's script. - Drop an unused import in vercel_sandbox_test.py that fails ruff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Closes #144. Supersedes #148 by @erulkey, carrying that PR's three commits unchanged with their authorship, and merging
maininto them. #148's head lives onvercel-labs/agentenv-framework, and a ruleset there requires signed commits. Mergingmainbrings in its unsigned version-bump commits, so that branch can't be brought up to date. This branch is onscaleapi, which doesn't have that rule.This PR adds the optional
vercelsandbox provider, which runs Docker workloads in Vercel Sandbox, with network policies, artifact transfers, reconnect and teardown. To use it, install thevercelextra and selectvercelin[sandbox]. CPU and memory are minimum requests, rounded up to supported sizes. Disk is fixed at 64 GB. It covers ephemeral runs. Persistent resume and credential brokering are follow-ups.Changes in the merges since #148
mainin the meantime: both extras, both providers registered, egress hosts, network-policy stamping and the capability gates.SandboxProvider.terminate_sandbox(new onmain, now used to tear down records that name their backend) treatsSandboxNotFoundErroras already terminated, as its docstring says. Main's teardown no longer callsget_sandboxfor those records, so without this, a Vercel sandbox that was already gone would be reported as failed. Records that don't name a backend keep main's live-handle path, where "not found" doesn't prove the sandbox is gone.teardown.pyreadhandle.ON_THIS_MACHINEon theNonereturned for a gone sandbox.vercel_sandbox_test.pypassesdockerfile_path, whichmainnow requires.How it was tested
make unit-teston the merged tree: 8216 passed, 20 skipped.hellobundle onvercel, and the full deploy-env → load → deploy-agent → prompt → verify demo. The demo scored 1.0, and all three sandboxes were removed afterwards.terminate_sandboxon an already-destroyed sandbox returns cleanly, andget_sandboxraisesSandboxNotFoundError.Still open
_allow_download_hoststakes the policy lock and calls the API before checking whether there are any hosts to add._reapsleeps after its last attempt, retries 401 and 403, and logs "Destroyed" on a 404.vercel-labsfork and says the provider isn't in a published release. It should also say that Hobby plans cap sandbox timeouts at 45 minutes, while the default TTL is 2 hours.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge, with the earlier non-blocking output-buffer concern still open.Fix with agent prompt
Summary
Adds the optional
vercelprovider for ephemeral Docker workloads, with public routes, network policies, artifact transfers, reconnect, and cleanup.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Select vercel provider] --> B[Check resources and network policy] B --> C[Create ephemeral Vercel Sandbox] C --> D[Prepare Docker and Compose] D --> E[Load images and files] E --> F[Run workload through public routes] F --> G[Destroy sandbox and orphan snapshots] C --> H[Interrupted creation] H --> GReviews (2) · Last reviewed commit: "fix(vercel): address greptile review fin..." · Reviewed by Greptile