sandbox-lifecycle-debug

द्वारा vercel

वर्सेल-ओपनक्लॉ के लिए सैंडबॉक्स जीवनचक्र डिबगिंग: बनाना, फिर से शुरू करना, रोकना, स्नैपशॉट लेना, रीसेट करना, पुराने-चल रहे पुनर्संयोजन, लगातार सैंडबॉक्स v2 व्यवहार, हॉट…

npx skills add https://github.com/vercel-labs/vercel-openclaw --skill sandbox-lifecycle-debug

Sandbox Lifecycle Debug

Use this skill when the sandbox state machine is the primary suspect.

For Sandbox v2 truth-model work, also load sandbox-v2-lifecycle. Official Vercel Sandbox v2 docs override older repo guidance that treats manual snapshots as the normal restore source.

Start Here

Read lat.md/sandbox-lifecycle.md sections Status State Machine, Triggers -- What Causes State Transitions, and the specific trigger involved. Run lat locate "Sandbox Lifecycle" or lat search "sandbox lifecycle <symptom>" when unsure.

Collect before edits:

  • GET /api/status and any UI state that triggered the action.
  • GET /api/admin/sandbox-diag.
  • GET /api/admin/logs filtered for sandbox., gateway., watchdog., proxy..
  • Local git rev-parse HEAD, remote git ls-remote origin main, and live deployment proof.

Split The State

Report these separately:

  • metadata status in SingleMeta.status
  • Vercel Sandbox SDK status
  • gateway readiness on port 3000
  • persistent auto-saved state availability
  • manual snapshot/checkpoint availability when relevant
  • lifecycle lock and start lock state when visible
  • UI polling status

Do not use running as shorthand for gateway-ready or user-ready.

Common Paths

  • Admin ensure: /api/admin/ensure -> ensureSandboxRunning() / ensureSandboxReady().
  • Gateway request: auth -> ensureSandboxRunning() -> token refresh -> touchRunningSandbox() -> proxy.
  • Stop/auto-save: stopSandbox() -> cleanup -> cron persistence -> sandbox.stop({ blocking: false }) -> snapshotting host metadata while v2 persists state.
  • Status polling: GET /api/status -> stale running or snapshotting reconciliation.
  • Reset: resetSandbox() destroys active sandbox and snapshots, clears cron and token metadata.

Sandbox v2 Rules

  • Main OpenClaw sandbox is one named persistent sandbox.
  • Normal resume uses the persistent name and auto-saved state, not manual snapshotId.
  • Observation of stopped/snapshotting state must use resume:false.
  • Manual snapshot() is explicit/debug/checkpoint only and shuts the sandbox down.
  • Worker/debug sandboxes are short-lived and must use persistent:false.

Fix Boundaries

  • Primary: src/server/sandbox/lifecycle.ts, src/server/sandbox/controller.ts.
  • Routes: src/app/api/admin/{ensure,stop,snapshot,reset,status}/** and src/app/api/status/route.ts.
  • Tests: lifecycle and harness tests under src/server/sandbox/**.test.ts and src/test-utils/harness.
  • Docs: lat.md/sandbox-lifecycle.md, docs/lifecycle-and-restore.md.

Verification

Use the narrowest command that covers the path, then run the repo verifier when the change has broad lifecycle impact:

node scripts/verify.mjs --steps=test,typecheck
lat check

For live lifecycle incidents, include before/after /api/status, /api/admin/sandbox-diag, and relevant log events.

vercel की और Skills

benchmark-sandbox
vercel
Vercel Sandboxes में vercel-plugin eval परिदृश्य चलाएँ, स्थानीय WezTerm पैनलों के बजाय। Claude Code + प्लगइन पूर्व-स्थापित के साथ अस्थायी microVMs प्रदान करता है,…
official
emil-design-eng
vercel
यह कौशल एमिल कोवाल्स्की के UI पॉलिश, कंपोनेंट डिज़ाइन, एनिमेशन निर्णयों और उन अदृश्य विवरणों पर दर्शन को एनकोड करता है जो सॉफ्टवेयर को शानदार महसूस कराते हैं।
official
vercel-react-best-practices
vercel
React और Next.js प्रदर्शन अनुकूलन दिशानिर्देश Vercel Engineering से। इस कौशल का उपयोग React/Next.js कोड लिखने, समीक्षा करने या रीफैक्टर करते समय किया जाना चाहिए…
official
vercel-react-best-practices
vercel
React और Next.js प्रदर्शन अनुकूलन दिशानिर्देश Vercel Engineering से। इस कौशल का उपयोग React/Next.js को लिखने, समीक्षा करने या रीफैक्टर करने के दौरान किया जाना चाहिए…
official
write-guide
vercel
एक तकनीकी गाइड तैयार करें जो प्रगतिशील उदाहरणों के माध्यम से एक वास्तविक दुनिया के उपयोग के मामले को सिखाता है। अवधारणाओं को केवल तब पेश किया जाता है जब पाठक को उनकी आवश्यकता होती है।
official
release
vercel
वर्सेल-प्लगइन जारी करें — गेट्स चलाएं, संस्करण बढ़ाएं, आर्टिफैक्ट्स उत्पन्न करें, कमिट करें और पुश करें। जब "रिलीज़ करें", "शिप करें", "बंप और पुश करें" या "कट अ रिलीज़" कहा जाए तो इसका उपयोग करें।
official
deepsec
vercel
dev3000 से Vercel प्रोजेक्ट चेकआउट पर DeepSec चलाएँ। एक-क्लिक DeepSec सेटअप, प्रोजेक्ट संदर्भ बूटस्ट्रैपिंग, सीमित प्रथम-पास प्रसंस्करण, और… के लिए उपयोग करें।
official
backport-pr
vercel
किसी मर्ज किए गए Next.js पुल रिक्वेस्ट को canary से पिछली रिलीज़ ब्रांच जैसे next-16-2 पर बैकपोर्ट करें। तब उपयोग करें जब उपयोगकर्ता बैकपोर्ट, चेरी-पिक, या खोलने के लिए कहे…
official