Skip to content

Fix Nova E2B checkout and workspace recovery - #362

Merged
yashdev9274 merged 1 commit into
mainfrom
capy/fix-nova-e2b-checkout
Nov 19, 2026
Merged

yashdev9274 merged 1 commit into
mainfrom
capy/fix-nova-e2b-checkout

Conversation

@yashdev9274

@yashdev9274 yashdev9274 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Fixes the E2B archive checkout failure by creating Git’s .git/info directory before writing its attributes file, and adds regression coverage for the clean archive baseline.

Verifies filesystem-only pause results before treating a workspace as stopped, and makes expired-workspace recovery claims exclusive and retryable so one cleanup worker cannot interrupt a newly reopened run. Startup errors now identify the failed phase without exposing provider error details.

Restores the ignored machine-template builder with dry-run and verified, atomic catalog updates, and documents E2B persistence and retention behavior. Disposable live tests confirmed checkout, patch export, filesystem preservation across reboot, process termination, resource sizes, and registry access on the existing templates.

Open in Capy

Summary by CodeRabbit

  • Bug Fixes
    • Improved sandbox pause and recovery handling, including checks that prevent cleanup from proceeding after recovery ownership changes.
    • Setup errors now identify the stage that failed without exposing provider credentials.
  • Documentation
    • Added guidance on workspace persistence, pause and resume behavior, retention limits, template requirements, and template-building commands.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
supercli Ready Ready Preview Nov 19, 2026 12:28pm UTC
supercli-client Ready Ready Preview Nov 19, 2026 12:28pm UTC
supercli-docs Ready Ready Preview Nov 19, 2026 12:28pm UTC
vercel-supercodeai-integration Ready Ready Preview Nov 19, 2026 12:28pm UTC

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The changes update E2B checkout and pause handling, sandbox recovery claims and ownership checks, and workspace setup errors. They also add a machine-template build script and document sandbox and template operations.

Changes

Nova sandbox lifecycle and templates

Layer / File(s) Summary
E2B checkout and pause handling
apps/web/modules/nova/sandbox/e2b-checkout.ts, apps/web/modules/nova/sandbox/e2b.ts, apps/web/modules/nova/sandbox/e2b-baseline.test.ts, apps/web/modules/nova/sandbox/e2b.test.ts
Checkout creates .git/info before writing Git attributes. E2B pause handling checks sandbox state when a pause request returns false. Tests cover checkout output and pause outcomes.
Recovery claims and provider cleanup
apps/web/modules/nova/sandbox/service.ts, apps/web/modules/nova/sandbox/recovery.test.ts
Recovery claims eligible rows with expiring leases and checks claim ownership around provider operations and finalization. Tests cover concurrency, stale claims, cleanup failures, and ownership changes.
Workspace setup stages and errors
apps/web/modules/nova/sandbox/service.ts, apps/web/modules/nova/sandbox/service.test.ts
Workspace preparation records its current stage and includes that stage in setup errors. A test checks that resume errors do not expose credentials.
Machine-template build and documentation
apps/web/scripts/build-nova-machines.ts, apps/web/modules/nova/sandbox/README.md, .gitignore
The script builds and verifies machine templates before updating the catalog. The README documents sandbox and template operations. Ignore rules retain the build script and narrow the .nova-feedback pattern.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Reconciler as reconcileSandboxWorkspaces
  participant Database
  participant E2B as E2B sandbox
  participant Settlement
  Reconciler->>Database: Claim row with recovery lease
  Reconciler->>E2B: List sandboxes and update network policy
  Reconciler->>E2B: Pause running sandbox
  Reconciler->>Database: Check recovery claim ownership
  Reconciler->>Settlement: Recover credits for active lease
  Reconciler->>Database: Finalize while claim is owned
Loading
Merge Risk: Low · up to 6919f

The E2B checkout and recovery changes look sound. Before merging, pin the sandbox provider in the startup-error test so it does not depend on the ambient environment. The machine-template build script can also corrupt or lose catalog entries if two builds run at once, so use a unique temporary file and avoid overlapping runs.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

I’m a rabbit; I hop through the code,
Where sandbox claims take a careful road.
A paused disk keeps its work in place,
And templates pass checks at their own pace.
I nibble a carrot and cheer the flow,
Then tuck in my burrow, pleased to go.

@yashdev9274
yashdev9274 merged commit 2d10f85 into main Nov 19, 2026
6 of 10 checks passed

This branch was successfully deployed

4 active deployments
Preview – supercli — 6919f8fa Deployed Nov 19, 2026 by vercel[bot]
Preview – vercel-supercodeai-integration — 6919f8fa Deployed Nov 19, 2026 by vercel[bot]
Preview – supercli-docs — 6919f8fa Deployed Nov 19, 2026 by vercel[bot]
Preview – supercli-client — 6919f8fa Deployed Nov 19, 2026 by vercel[bot]
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