Skip to content

[upstream pr #515] docs(512): propose a VM Sandbox backend (Sandboxes as namespaces in one VM per Store) #47

Open

Description

@mengmengmengqiang

[upstream PR Ephemeral-AI-Lab#515] docs(512): propose a VM Sandbox backend (Sandboxes as namespaces in one VM per Store)

Original body (excerpt)

Proposal only, for Ephemeral-AI-Lab#512. Nothing is implemented, and owner decisions V1–V10 are open.

What it proposes (core/docs/issues/512/README.md):

  • One Linux VM per Store. Inside it, the existing worker runs the SDK with the Store opened in-process on the VM's ext4 disk, which is today's Linux topology.

  • A namespace backend replaces Docker inside the VM:

    • each Sandbox gets its own mount, PID and IPC namespaces and a cgroup;
    • its daemon runs as root with /dev/fuse;
    • commands run as a nonroot uid:gid with no capabilities and no-new-privs.

    It uses safe nix calls from one small helper binary, with no unsafe Rust and no util-linux.

  • Provider adapters in @layerfs/runtime. Each one creates the VM, attaches the Store disk, starts the worker and opens one private stream to it. The first candidates are Microsandbox and any Linux host over SSH, such as EC2.

  • Docker stays the default. The new backend is a second variant of a concrete Runtime enum.

Evidence: the Ephemeral-AI-Lab#512 experiment, 2026-10-30.

  • Every local environment hosted real LayerFS.
  • A test-only stand-in ran the unchanged SDK and daemon with no Docker in an Apple Container VM; all 15 calls passed.
  • Every platform needs a user-namespace block; none blocks user namespaces by default.

Decisions needed (§10):

  • the shape (V1);
  • widening the worker route to VM placements from any host OS (V2);
  • which adapters first (V3);
  • the sysctl or a seccomp filter for user namespaces (V4);
  • per-Sandbox networking (V5);
  • nix features (V6);
  • the image format (V7);
  • Store durability (V8);
  • setting names (V9);
  • whether to keep the stand-in (V10).

Production LOC: 102831 -> 102831 (delta 0), docs only.

🤖 Generated with Claude Code

Sync note

这是只读镜像,不是上游仓库的替代。上游 issue/PR 仍是唯一真源;本镜像不复制评论、不复制代码分支。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream-prMirrored upstream pull request as an issueupstream-syncMirror of Ephemeral-AI-Lab/layerfs upstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions