Skip to content

research: session drives for deploy-surviving session filesystem state - #509

Closed
ruiconti wants to merge 1 commit into
mainfrom
rui/research-session-sandbox-drives
Closed

research: session drives for deploy-surviving session filesystem state#509
ruiconti wants to merge 1 commit into
mainfrom
rui/research-session-sandbox-drives

Conversation

@ruiconti

@ruiconti ruiconti commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Research plan for #508.

Session sandbox names embed the deployment id, so any deploy points a resumed session at a fresh sandbox and orphans everything it wrote to /workspace. We traced the #276 incident to exactly this (two sandboxes for one session, scope hashes matching sha256(deploymentId)[:16] of the deploys that served each turn) and found 55 of 1221 sessions in the v project with sandboxes under multiple deployment hashes. #507 keeps the turn alive when attachment bytes are missing; this plan keeps the bytes.

The proposal: leave sandbox naming deployment-scoped (a deployment ships a specific template, and resuming an old filesystem under new bootstrap output has no migration story) and move session-owned data onto a Vercel Sandbox drive named from the session id. Phase one mounts at /workspace/attachments, which is framework-owned and append-only, so staging and hydration change nothing. A /workspace mount needs a template-seed sync policy and stays a follow-up.

Authoring surface is one option, vercel({ sessionDrive: "attachments" }), default off. The plan covers the single-writer attach conflict (stop the previous holder, retry, else run unmounted and let #507 degrade), the two availability gates (drives are private beta; SDK support only exists in @vercel/sandbox@2.2.0-beta.0 while eve vendors stable 2.3.0), and dev-run drive pruning. Production drive GC is an open question on #508 and blocks the "workspace" follow-up.

Doc only, no changeset.

Session sandbox names embed the deployment id, so every deploy orphans
every durable session's /workspace (verified on the v project: 55 of
1221 sessions, incident traced in #276/#508). Plan: keep the sandbox
deployment-scoped and mount session-owned data on a Vercel Sandbox
drive named from the session id, starting with /workspace/attachments.
Gated on drives leaving private beta and landing in a stable
@vercel/sandbox release.

Signed-off-by: Rui Conti <ruiconti@gmail.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
eve-docs Ready Ready Preview, Comment, Open in v0 Jul 2, 2026 6:59pm

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