Repository navigation
Docker fleets: set-up once (prebuild, fast restarts), a model on the same computer, the stricter sandboxes as a choice; release 0.10.0 - #44
Merged
Conversation
…e image); a model server on this computer may be plain http
… a teams mode; docs for set-up once and local models
… new options and runs; release 0.10.0 A default container may not create the isolated area the worker program runs agent commands in, so workspace-write and read-only failed there. They are now refused unless the fleet was created with nestedSandbox: true, which runs its containers without Docker's system-call filter. Refs #42, #43.
Seven runs on Docker Desktop for Windows: Claude Code with real turns from a pre-built image, ten teams of nine workers and a lead with a real turn each, Codex, Claude Code and FLUJO answering through a model served on the same computer, and the workspace-write sandbox for Codex and Claude Code.
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #42. Fixes #43.
Three additions to the Docker fleet from 0.9.0 (#41), each asked for after the first real runs, and each checked with real containers.
1. The set-up runs once
Before, every container installed system packages, the worker program and the SDK itself, at every start: one and a half to seven and a half minutes each.
deploy(plan, { prebuild: true })runs the set-up once, in an image built just in time, and starts every container from it. The image is namedfactory-worker:<program>-<hash>; the hash follows from the base image, the SDK bundle and the worker program, so a later fleet with the same three builds nothing. The build context goes todocker buildas one tar stream.cloudLiteImageSetup(bundleSha256, { workerProgram })is the set-up as a script for an image build;fleet.infrastructure.buildImage(...)builds one without deploying.Measured (Claude Code, 2 containers x 2 agents): image built once in 3 min 43 s; then all agents enrolled 4 s after the deploy and were back 5 s after a stop and start. In the 0.9.0 record a restart took 1 min 27 s (Codex).
2. A model on the same computer
validateModelProvidernow accepts plainhttpfor names of this computer only:localhost,127.0.0.1,[::1]andhost.docker.internal. Every other address still needshttps.http://host.docker.internal:<port>/v1and refuseslocalhostwith the reason (inside a container that is the container itself).factory-lite ... --model-provider) may uselocalhost.3. The stricter sandboxes, as an explicit choice
Found in a real run: with
sandbox: 'workspace-write'every command of a Codex agent in a container failed withbwrap: No permissions to create new namespace. The worker program runs agent commands in an isolated area of its own, and a default container may not create one. In 0.9.0 such a plan was accepted and the agents could then run nothing.workspace-writeandread-onlyand says why.new FactoryDockerLiteFleet({ ..., nestedSandbox: true })allows them: the fleet's containers then run without Docker's system-call filter (--security-opt seccomp=unconfined). The guide states the trade: agent commands are held more tightly, the container as a whole loses one of Docker's own protections. No extra privileges are added.updateRuntimekeeps it.Other changes
scripts/docker-fleet-smoke.mjs:--prebuild,--model-url/--model/--model-api,--reply(for a model too small to use tools),--teams(a real turn of every agent),--sandbox,--cpus,--memory.PUBLIC_SDK.md: the three topics above, whydiskGbhas no effect on Docker, and the new runs.README.md: the Docker example usesprebuild: true.package.json,package-lock.json, install lines).Tests
Six new tests, 310 in the workflow's list (304 before):
test/cloud-lite-docker.test.mjs: the start script's order (bundle checked every time, record written only after every step, runtime started either way) and the image set-up script;prebuild(one build, reuse by a second fleet, a separate image per program, the same name on resume, refused settings, nothing built when Docker does not run); the stricter sandbox refused withoutnestedSandbox, allowed with it and kept across a runtime update; local model addresses on a Docker fleet.test/model-provider.test.mjs: which addresses may be plainhttp, look-alikes refused, and what each worker program is given.test/cloud-lite-provider.test.mjs: the Fly refusal, with nothing recorded.Real Docker runs
Docker Desktop 29.6.1 for Windows 10 (8 CPUs and 19.5 GB for Docker), base image
node:24.22.1-bookworm-slim. Record:evidence/docker-fleet-runs-20261123.json.workspace-write,nestedSandbox: trueworkspace-write,nestedSandbox: trueAbout the model on the same computer: it was
Maykeye/TinyLLama-v0, 9 MB of weights that were already on the computer, served by Ollama 0.32.14. It writes story-like text and cannot use tools. These three runs show that a worker in a container reaches a model on this computer over plainhttpand completes a turn with its answer. They do not show useful work by a local model.Not shown: useful work or board tool calls by a local model, Docker on a Linux host, the
read-onlysandbox, more than ten machines.Earlier attempts, for the record: the first local-model run failed because the tiny model, as first packaged, refused the "thinking" setting Codex sends (fixed in the model's packaging, not in FACTORY). The first sandbox run is the one that exposed the bubblewrap failure. Two short runs were void because a batch I believed stopped was still running against the same folders; both were repeated alone.
Local CI before GitHub
The steps of
.github/workflows/public-sdk.yml, run on commit445c450from a clean source snapshot (git archive) with a cleannpm ci:tar.exeahead of Git's)node:22.17.0-bookworm-slimcontainer, non-root usernode:24.22.1-bookworm-slimcontainer, non-root userEach run:
npm cinpm audit --omit=dev --audit-level=high: passes; it reports 2 moderate findings, the same as onmain(no dependency changed).node scripts/test-temp-guard.mjs <focused list from the workflow>: 31 files, 310 tests, 310 pass, nothing left in the temp location.python -B -m unittest discover -s selfhost/modal -p "test_*.py": 11 tests pass.npm pack, a fresh install offlujo-factory-0.10.0.tgzinto an empty folder,scripts/verify-public-sdk.mjs,--helpoffactory-public,factory-liteandfactory-evidence,factory-selfhost profiles, and the installed MCP stdio test: pass.node scripts/test-temp-guard.mjs test/generic-swarm-evidence.test.mjs: 7 tests pass.A first pass on the commit before this one failed at the package check on Linux: I had listed a constant among the exports it expects to be functions. The last commit fixes that, and the table is for the fixed commit.
The slim Linux images got
python3andgitfrom Debian inside the container first, as the GitHub runner has both. The Linux container is Debian 12, not the runner's Ubuntu image. The Linux snapshot was made withcore.autocrlf=false, so its files have the line endings a Linux checkout has.