docs: vibecode persistence plan (proposal, no code)#3397
Open
rafavalls wants to merge 1 commit into
Open
Conversation
Proposal for adding bundle-based persistence so vibecoded sandboxes (cloneUrl-backed vMCPs from #3361) survive idle/restart without GitHub. Covers a small VibecodeStore abstraction (local FS + S3 IRSA), daemon snapshot routes that produce/consume a `git bundle`, a mesh-side idle poller, and a restore pre-step in VM_START. The restore path feeds the bundle file path as cloneUrl so the existing setup orchestrator handles clone/install/start unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
A proposal/plan for the output half of vibecoding without GitHub. PR #3361 covered the input side (plain
cloneUrl→ sandbox boots from a template); this proposal covers persistence so user edits survive sandbox idle/restart, with no GitHub remote required.No code in this PR — just the markdown plan at
VIBECODE_PERSISTENCE.md. Intended as a spec for review/handoff before implementation starts.TL;DR of the proposal
git bundleof the workspace and streams it through mesh to a blob store.VM_START, mesh checks the store; if a bundle exists, it's staged inside the pod at/tmp/snapshot.bundleand fed to the existing setup orchestrator as thecloneUrl. The orchestrator's existing clone/install/start machinery handles it unchanged.LocalFsStore(writes under<DATA_DIR>/vibecode/...for local dev) andS3Store(SigV4/IRSA, reusing the STS-refresh pattern proven out byconfigmap-s3-sync.yaml).VIBECODE_BUCKET), so the save/restore code is identical in local and prod.Why bundle, not tar
.gitignorefrom the template already excludesnode_modules/.nextetc. — no hand-maintained exclude list.git reset --hard HEAD~1on restore.git remote add gh && git push gh— zero rework.Key reused pieces (no changes needed)
packages/sandbox/daemon/setup/orchestrator.ts— clone-from-bundle works becausegit clone /tmp/snapshot.bundle .is a standard git operation.packages/sandbox/daemon/git/git-sync.ts—gitSync()helper for the commit/bundle commands.packages/sandbox/server/daemon-client.tspostConfig()— delivers the modified config (with bundle path as cloneUrl) to the daemon.deploy/helm/studio/templates/configmap-s3-sync.yaml:29-58— ported to TS forS3Store.Open questions for the dev who picks this up
Listed at the bottom of
VIBECODE_PERSISTENCE.md:Suggested commit boundaries
VibecodeStoreinterface +LocalFsStore→ daemon snapshot routes → restore step inVM_START(local-only) → mesh idle poller →S3Storeadapter → Helm values + IRSA policy. Each step ships independently; full prod path lights up at step 5.Test plan
See "Verification" section in the doc. End-to-end is: click "Build landing page", edit a file, wait for idle, kill the pod, restart, confirm edits restored — runnable both locally (host runner +
LocalFsStore) and on a kind cluster (agent-sandbox +S3Store).🤖 Generated with Claude Code
Summary by cubic
Proposal for bundle-based persistence so vibecoded sandboxes (from plain
cloneUrl, per #3361) keep user edits across idle/restarts without GitHub. No code;VIBECODE_PERSISTENCE.mdoutlinesgit bundlesave/restore, a smallVibecodeStore(local FS or S3 via IRSA, selected byVIBECODE_BUCKET), new daemon snapshot routes, a mesh idle saver, and a VM_START restore that reuses the existing setup orchestrator.Written for commit a8df0da. Summary will update on new commits. Review in cubic