You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
P2: Shared sandbox pool + harness→sandbox routing #46
P2 — Shared sandbox pool + harness→sandbox routing
Part of the two-tier architecture epic (see epic issue). Depends on P1.
Goal
Scale Archetype A to many leaf harnesses (fresh context each) sharing a smaller pool of sandboxes. Not 1:1 — target ~20 harnesses per sandbox (ratio set empirically in P3). Harnesses sharing a sandbox share one repo copy; each leaf gets an isolated worktree.
Scope
Replace the fixed KAGENTI_SANDBOX_POD env (single sandbox) with pool assignment: a harness selects/loads-balances across M sandbox pods (kubectl exec targets a specific pod, so this needs pod-selection logic — a router or a discovery+pick mechanism, not just a Service).
Within a sandbox: shared repo dir (read-mostly), per-leaf isolated worktrees; concurrency-safe layout under /workspace/<run>/….
Across sandboxes (when M>1): storage topology decision — RWX shared repo vs per-sandbox repo copy. This is where RWX may reappear (on the sandbox tier, not the harness). Decide via P3 experiments; design both paths.
Sandbox tier likely becomes a managed set (StatefulSet / pool controller) with durable storage.
Open questions for brainstorming
Routing mechanism (harness-side pick vs a router service vs a scheduler).
Repo distribution across sandboxes (RWX vs copy vs read-only base + per-sandbox worktree overlay).
Sandbox lifecycle/scaling relative to the harness fleet (who scales sandboxes, on what signal).
Isolation between leaves that share a sandbox (worktree/namespace/uid).
Non-goals
Kata isolation and the ratio experiments (P3, deferred until after P0′).
Delivered by PR #53 (merged) — the P2 shared sandbox pool with N:M lease-based routing. deploy/knative/sandbox-pool.yaml provisions the labeled pool and the harness selects/leases across pool pods via selectPoolSandbox. The issue was left open only because the PR did not carry a closing keyword. Closing as delivered.
Activity
pdettori commentedon Jul 2, 2026
Part of epic #49
pdettori commentedon Jul 6, 2026
Delivered by PR #53 (merged) — the P2 shared sandbox pool with N:M lease-based routing.
deploy/knative/sandbox-pool.yamlprovisions the labeled pool and the harness selects/leases across pool pods viaselectPoolSandbox. The issue was left open only because the PR did not carry a closing keyword. Closing as delivered.Follow-ups tracked separately: #55 (sync-path bounded wait + 503), #56 (empty-pod-list unit test).
Assisted-By: Claude Code