Skip to content

SWE-bench dedicated sandbox pool using the baked OCP image (Plan B Task 4)#128

Merged
pdettori merged 1 commit into
kagenti:mainfrom
pdettori:feat/swebench-pool
Jul 15, 2026
Merged

SWE-bench dedicated sandbox pool using the baked OCP image (Plan B Task 4)#128
pdettori merged 1 commit into
kagenti:mainfrom
pdettori:feat/swebench-pool

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

Plan B Task 4: a dedicated, OCP-only swebench Sandbox-CR pool that runs the baked x86_64 image produced by Task 3 (#124), plus a hermetic structural test. Purely additive / off-by-default — nothing selects this pool until Plan C sets KAGENTI_SANDBOX_POOL_SELECTOR=sh.kagenti.io/sandbox-pool=swebench. No changes to the default pool, service.yaml, the OCP overlay, setup-ocp.sh, or any Plan A/B code.

What's in it

  • deploy/knative/swebench-sandbox-pool.yaml — 3 Sandbox CRs (agents.x-k8s.io/v1beta1, swebench-sandbox-0/1/2, ns default):
    • image = the Task-3 baked ref image-registry.openshift-image-registry.svc:5000/default/swebench-sandbox:ff962cb83fe5c624-15of15 (15 relocated conda envs + 8 bare repo mirrors + git/ripgrep, USER 65532)
    • pool discovery label sh.kagenti.io/sandbox-pool: swebench (distinct from the default pool's default); CR label app: sandbox (queryable — issue setup-ocp.sh: AB2 sandbox-pool readiness poll spins full timeout (queries a podTemplate label on the Sandbox CR) #103 selector gotcha)
    • command: ["sleep","infinity"] (tools baked, no apk), workingDir: /workspace, imagePullPolicy: IfNotPresent
    • 50Gi RWO /workspace PVC (a shared pod time-shares many concurrent large-repo worktrees + per-leaf venvs; baked /repos+/opt/miniconda3 live in image layers, not the PVC)
    • OCP nonroot securityContext + serviceAccountName: serverless-harness-sandbox baked in (canonical shape from overlays/ocp/patch-sandbox.yaml: pod 65532/fsGroup 65532/seccomp RuntimeDefault, container allowPrivilegeEscalation:false/drop ALL)
  • packages/knative-server/test/swebench-sandbox-pool.test.ts — hermetic YAML-parse structural test (28 assertions), mirrors authbridge-manifests.test.ts; no cluster/kustomize, runs in pnpm -r test CI.

Design notes (deviations from the original Kind-centric plan text, recorded)

The baked image is x86_64 and lives only in the OCP internal registry — there is no Kind/dev.local variant (this host's Kind is arm64). So the manifest is OCP-native directly: the securityContext + SA are baked into the manifest (not a Kind base + overlays/ocp JSON6902 patch as the default/-ab2 pools use), and the image tag is a hardcoded content pin.

Live gate (OCP 4.20) — GREEN

Applied to a live cluster: 3 PVCs Bound 50Gi, all 3 pods Ready; in-pod verify confirmed uid 65532, git safe.directory '*', git+ripgrep, 15 env dirs (all relocated pythons run; 11 import numpy, 4 numpy-less as expected), 8 bare repo mirrors, /workspace writable. Cluster restored to baseline afterward.

Assisted-By: Claude Code

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
@pdettori
pdettori merged commit 0f940c7 into kagenti:main Jul 15, 2026
10 checks passed
@pdettori
pdettori deleted the feat/swebench-pool branch July 15, 2026 19:30
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