Skip to content

Add a mitos snapshot-fork sandbox provider + fork-warmed-lease fan-out #529

Description

@stubbi

Summary

Add a mitos backed sandbox provider to crabbox, and a primitive to fork one warmed lease into N clones.

mitos (https://github.com/mitos-run/mitos) is a snapshot-fork microVM engine: it boots Firecracker VMs, keeps pre-warmed pools, and forks them via copy on write snapshots in sub-second, with real microVM isolation. crabbox already abstracts providers (aws, azure, gcp, hetzner, ssh, e2b, modal, daytona, runpod, ...) behind SSH and delegated backends, so this fits the existing seam.

Why

Two gaps this addresses:

  1. Warm box latency. crabbox warms a box and rsyncs the dirty checkout per lease. A mitos provider can hand back a snapshot-restored microVM from a pre-warmed pool, so the box is warm from the first lease instead of provisioned per run.

  2. Isolation for agent use. crabbox's own trust model states it is a developer execution tool, not a security sandbox, and assumes a cooperative trusted team. When the caller is an AI agent running unreviewed code, microVM isolation is the missing boundary. A mitos provider gives crabbox an isolated execution mode without changing its control plane.

Proposal

  • New provider adapter (internal/cli), most likely a delegated-run backend: crabbox calls Warmup / Run against a mitos pool, mitos owns provisioning and isolation.
  • Auth and pool config via the usual provider Spec() declaration.

Bonus: fork-warmed-lease fan-out

mitos's native trick is forking a running VM. Expose a crabbox primitive to fork one warmed lease into N identical clones, then run the same suite across them:

  • matrix builds from one warmed state
  • flaky-test retry without re-warming
  • bisect across many commits in parallel

Each clone inherits the warmed box's memory and filesystem, so fan-out cost is the fork, not a fresh provision per shard.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.help wantedExtra attention is neededimpact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions