Skip to content

feat(runtime): execute docker environment recipes#1676

Merged
christso merged 1 commit into
mainfrom
environment-docker-runtime
Jul 5, 2026
Merged

feat(runtime): execute docker environment recipes#1676
christso merged 1 commit into
mainfrom
environment-docker-runtime

Conversation

@christso

@christso christso commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Docker environment recipes now prepare a local Docker image/context and run generic CLI targets inside that environment with environment.workdir as the command cwd. The environment recipe remains separate from target/provider selection: Docker setup builds or pulls the image, produces a sandbox runtime for compatible CLI targets, and unsupported provider combinations return structured sandbox-infra results instead of falling back to host execution.

Implementation Notes

  • Supports type: docker recipes with image, context, dockerfile, workdir, env, secrets, mounts, resources.cpus, resources.memory, and setup.command/setup.args/setup.env.
  • Uses the existing Docker workspace/provider plumbing for image availability and the existing sandbox runner for execution, with resource limits and the Docker host cwd threaded through.
  • Adds a temp-dir mount so CLI {PROMPT_FILE} and {OUTPUT_FILE} paths remain available across the host/managed Docker boundary.
  • Keeps host environment behavior unchanged and delays provider creation until after environment setup so Docker-derived runtime config is applied only when needed.

Validation

  • bunx biome check packages/core/src/evaluation/environment/docker.ts packages/core/src/evaluation/workspace/setup.ts packages/core/src/evaluation/providers/sandbox-runner.ts packages/core/src/evaluation/orchestrator.ts packages/core/test/evaluation/environment/docker.test.ts packages/core/test/evaluation/orchestrator.test.ts
  • bun test packages/core/test/evaluation/environment/docker.test.ts packages/core/test/evaluation/orchestrator.test.ts packages/core/test/evaluation/providers/cli.test.ts packages/core/test/evaluation/providers/sandbox-runtime.test.ts
  • bun run typecheck
  • git diff --check

Dogfood Evidence

Controlled Docker CLI target:

  • Command: bun apps/cli/src/cli.ts eval /tmp/agentv-docker-env-dogfood/docker-env.eval.yaml --targets /tmp/agentv-docker-env-dogfood/targets.yaml --target docker-cli --workers 1
  • Run ID: 2026-07-05T10-52-06-267Z
  • Result path: .agentv/results/2026-07-05T10-52-06-267Z
  • Result: PASS 1/1, target provider cli, runtime sandbox, command cwd /app.

Live LLM grader with Docker CLI target:

  • Command: bun apps/cli/src/cli.ts eval /tmp/agentv-docker-env-dogfood/docker-env-live-grader.eval.yaml --targets /tmp/agentv-docker-env-dogfood/targets-live-grader.yaml --target docker-cli-live-graded --workers 1
  • Run ID: 2026-07-05T10-53-51-519Z
  • Result path: .agentv/results/2026-07-05T10-53-51-519Z
  • Provider/target: target provider cli; grader target OpenAI-compatible provider via GitHub Models.
  • Result: PASS 1/1, score 1.0, runtime sandbox, command cwd /app, exit code 0.

Private evidence was published to agentv-private:evidence/av-noh3-2-4-docker-environment-runtime at commit bd0f659.

Post-Deploy Monitoring & Validation

After merge, validate the first environment docs/example PR against this behavior with one Docker recipe that uses an image and one that builds from context/dockerfile. Watch CI failures around sandbox runtime tests and CLI output-file handling, because those paths depend on the host temp-dir mount being available inside Docker.

Related

Bead: av-noh3.2.4


Compound Engineering
GPT--5

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4ea20c5
Status: ✅  Deploy successful!
Preview URL: https://2ffca2c9.agentv.pages.dev
Branch Preview URL: https://environment-docker-runtime.agentv.pages.dev

View logs

@christso christso merged commit 64579d8 into main Jul 5, 2026
8 checks passed
@christso christso deleted the environment-docker-runtime branch July 5, 2026 11:23
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