Deploy the FS-free harness on OpenShift with a durable sandbox (P0′) - #51
Merged
Merged
Conversation
added 8 commits
July 2, 2026 16:23
Reframes the pre-P1, never-applied OCP overlay + setup-ocp.sh to the Sandbox-CR world: fix the stale leaf-pvc.yaml ref, patch the Sandbox CR (not a Pod) for a non-root/fsGroup nonroot-v2 pod, keep the durable RWO PVC (drop the emptyDir override), add ripgrep to the sandbox image, and install the agent-sandbox v0.5.0 controller + Sandbox readiness poll. Definition of done: full leaf smoke on live OCP 4.20.8 via the Route. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
Six tasks: ripgrep image fix; reframe the OCP overlay onto the Sandbox CR (JSON6902, durable PVC, non-root 65532/fsGroup/nonroot-v2 SA); wire the agent-sandbox v0.5.0 controller install + Sandbox readiness poll + sandbox SA/SCC + llm-credentials tolerance into setup-ocp.sh; README refresh; then a Stage-1 walking-skeleton propagation gate and the Stage-2 full leaf smoke on live OCP 4.20.8. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
The agent's find/grep tools shell out to rg inside the sandbox; the OCP image omitted ripgrep, so the full leaf smoke would crash on the first search. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
P1 deleted leaf-pvc.yaml and moved the sandbox working set to the Sandbox CR's volumeClaimTemplates. The pre-P1 overlay still referenced leaf-pvc.yaml (kustomize build failed), patched a non-existent Pod, and overrode /workspace to emptyDir (defeating durability). Patch the Sandbox CR podTemplate via JSON6902 instead: non-root 65532 + fsGroup + nonroot-v2 SA + pre-baked image, PVC intact. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
…ocp.sh Adds the missing agent-sandbox v0.5.0 controller install, the sandbox SA + nonroot-v2 grant, and the Sandbox .status.selector -> pod-Ready poll (mirrors setup-kind.sh). Tolerates a pre-provisioned llm-credentials secret. Retires the post-P1 leaf-work PVC wording. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
Replace the removed leaf-work PVC with the durable sandbox /workspace PVC (Sandbox CR volumeClaimTemplates) and document the agent-sandbox controller step. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
…curls dispatch_item and the claim-5 malformed-envelope curl targeted $BASE/runs without $CURL_OPTS, so in Route mode (KSVC_URL set) they hit the OpenShift Route over HTTPS without -k and failed TLS verification (curl rc=60) against the router's cert. turn() in lib.sh already threaded $CURL_OPTS; these two call sites were missed. Mirror lib.sh: add $CURL_OPTS and the guarded CURL_HDR array so the leaf smoke passes through the OCP Route. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
The sandbox /workspace PVC (workspace-sandbox-0) is provisioned StatefulSet-style from the Sandbox CR volumeClaimTemplates and is NOT reclaimed when the CR is deleted, so the prior teardown left an orphaned EBS volume. Add an explicit 'oc delete pvc workspace-sandbox-0' step (final-review finding). Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <paolo.dettori@example.com>
This was referenced Jul 3, 2026
This was referenced Jul 6, 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.
Summary
P0′ of the two-tier FS-free harness epic (#47) — the P1 slice: make the merged FS-free harness deploy and pass its full leaf smoke on the live OpenShift 4.20.8 cluster with a durable RWO sandbox, by reframing the never-applied pre-P1 OCP overlay +
setup-ocp.shonto the agent-sandboxSandbox-CR world.Spec:
docs/specs/2026-07-02-p0prime-ocp-fs-free-deployment-design.mdPlan:
docs/superpowers/plans/2026-07-02-p0prime-ocp-fs-free-deployment.mdWhat changed
sandbox.Dockerfile— bakeripgrepinto the pre-baked OCP sandbox image (the agent's find/grep tools shell out torginside the sandbox).overlays/ocp/patch-sandbox.yaml— rewritten as a JSON6902 patch onto theSandboxCRpodTemplate: non-rootrunAsUser/fsGroup65532, seccompRuntimeDefault, drop ALL caps,serviceAccountName: serverless-harness-sandbox,command: [sleep infinity], pre-baked internal-registry image. Durable PVC preserved — the patch deliberately does not touchvolumeClaimTemplates/volumeMounts, so/workspacestays on the RWO EBS PVC (noemptyDir).overlays/ocp/kustomization.yaml— drop the deletedleaf-pvc.yamlresource, retarget the patch toSandbox/sandbox-0, remove the deadalpineimage transform, refresh header comments.setup-ocp.sh— install the agent-sandbox v0.5.0 controller (before the overlay apply), create +nonroot-v2-grant the sandbox SA, poll the Sandbox.status.selector→ pod Ready (after the apply), tolerate a pre-provisionedllm-credentialssecret, and retire the post-P1leaf-workwording.README-ocp.md— replaceleaf-workPVC references with the durable Sandbox/workspacePVC, document the controller-install step, and add explicitoc delete pvcto teardown (StatefulSet-style PVCs are not GC'd on CR deletion).leaf-smoke.sh— thread$CURL_OPTS(-k) + the guardedCURL_HDRarray throughdispatch_itemand the claim-5 curl, mirroringlib.sh's existing Route handling (these two call sites were the only ones missing it). This file was outside the original 5-file plan scope; the edit was made after live debugging and with explicit approval.Verification (live, OpenShift 4.20.8)
podTemplatesecurityContext/fsGroup/serviceAccountName+volumeClaimTemplateson OCP; pod non-root uid=65532, PVCBoundgp3-csiRWO,/workspacewritable.setup-ocp.shend-to-end: SUCCESS — controller present, in-cluster sandbox build withripgrep 14.1.0confirmed in the running pod, overlay applied, Sandbox pod Ready (non-root, durable PVC), ksvc Ready, Route printed.leaf-smoke.shvia the Route (SH_MODEL=claude-haiku-4-5): 10 passed / 0 failed — FS-free envelope, workspace isolation on the durable PVC, parallel fan-out (i1→FLAGGED / i2→CLEAR / i3→CLEAR), per-call model routing, malformed→HTTP 400, idempotent re-invoke, crash/resume from Redis (durable-PVC survival), and scale-to-zero.Notes / follow-ups
api.anthropic.comkey was used for verification;base-url/auth-tokenare optional secret keys).oc delete pvc), and Task 2'semptyDirgrep expecting 0 (the render legitimately has 1 — the harness's own/tmpmount).ripgrep, switch the OCP overlay to pull it and drop the in-cluster BuildConfig.Assisted-By: Claude Code