research: session drives for deploy-surviving session filesystem state - #509
Closed
ruiconti wants to merge 1 commit into
Closed
research: session drives for deploy-surviving session filesystem state#509ruiconti wants to merge 1 commit into
ruiconti wants to merge 1 commit into
Conversation
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>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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 matchingsha256(deploymentId)[:16]of the deploys that served each turn) and found 55 of 1221 sessions in thevproject 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/workspacemount 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.0while 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.