Skip to content

Add sandbox-orchestrator: request-per-sandbox service on agent-sandbo… - #6

Merged
michaelliav merged 1 commit into
hermes/foundry-hardening-starterfrom
hermes/sandbox-orchestrator
Jun 9, 2026
Merged

Add sandbox-orchestrator: request-per-sandbox service on agent-sandbo…#6
michaelliav merged 1 commit into
hermes/foundry-hardening-starterfrom
hermes/sandbox-orchestrator

Conversation

@michaelliav

Copy link
Copy Markdown
Owner

…x SDK

Sandbox-native successor to the Go session-router. Instead of label-patching a warm agent pod, the orchestrator provisions one agent sandbox per request via the agent-sandbox Python SDK (create -> run -> teardown), with the controller-side TTL as a safety net.

  • FastAPI service (POST/GET/DELETE /v1/sandboxes, /healthz, /stats)
  • SandboxManager: admission control (global + per-dev caps), state machine, guaranteed teardown in finally, background record reaper
  • Backend abstraction with real SDK backend + in-memory fake for tests
  • 17 pytest cases covering full lifecycle, failure paths, concurrency caps (no cluster required via the fake backend)
  • Multi-stage non-root Dockerfile (read-only-rootfs friendly)
  • Helm template: Deployment/Service/SA/RBAC(scoped to sandbox CRDs)/NetworkPolicy
    • values entries + workload-identity SA
  • Python, not Go; aligns with the Python-first src/code_forge codebase

…x SDK

Sandbox-native successor to the Go session-router. Instead of label-patching
a warm agent pod, the orchestrator provisions one agent sandbox per request
via the agent-sandbox Python SDK (create -> run -> teardown), with the
controller-side TTL as a safety net.

- FastAPI service (POST/GET/DELETE /v1/sandboxes, /healthz, /stats)
- SandboxManager: admission control (global + per-dev caps), state machine,
  guaranteed teardown in finally, background record reaper
- Backend abstraction with real SDK backend + in-memory fake for tests
- 17 pytest cases covering full lifecycle, failure paths, concurrency caps
  (no cluster required via the fake backend)
- Multi-stage non-root Dockerfile (read-only-rootfs friendly)
- Helm template: Deployment/Service/SA/RBAC(scoped to sandbox CRDs)/NetworkPolicy
  + values entries + workload-identity SA
- Python, not Go; aligns with the Python-first src/code_forge codebase
@michaelliav
michaelliav merged commit 394ef32 into hermes/foundry-hardening-starter Jun 9, 2026
@michaelliav
michaelliav deleted the hermes/sandbox-orchestrator branch June 9, 2026 05:47
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