Skip to content

An API to push local files into an actor sandbox #264

Description

@eliranw

Summary

We need a way to write a client’s own files into a running actor. Other sandbox platforms have this: E2B’s Sandbox.files.write, Anthropic’s container_upload block, Fly Machines’ config.files.

Motivation

A sandboxed code runner should be able to run code on the caller’s files in a fresh isolated sandbox and hand back the result.

Today there’s no way to get the caller’s files into a running actor. An actor runs whatever workload image it was built from, reached over the workload’s own HTTP server, so the only options are:

  1. Bake the files into the image. But images are digest-pinned, so rebuilding on every change is slow and throws away snapshot/warm-start.
  2. Have the workload itself expose an upload endpoint on its HTTP server, so every template author builds and secures the same thing by hand.

Either way there’s no platform-level file ingress: CreateActorRequest is just {actor_id, template_ns, template_name}, the data plane only carries WorkloadSpec{containers}, an ActorTemplate is image + command + env, and the ategcs object store only holds runsc checkpoints today.

One option that would cover this: a files map (path to bytes) written into the actor’s filesystem. From the outside it looks like it could sit on the actor, next to the exec channel proposed in #185, so a running actor could both receive files and run commands through one handle. I don’t know the internals well enough to say where it actually belongs, so this is just a starting point, not a recommendation.

I’m mainly filing this to surface the use case and the gap. Happy to help with an implementation once there’s a direction.

Open Questions

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions