Repository navigation
feat(agents): support Kubernetes Gators with reusable tooling images - #4744
johntmyers wants to merge 2 commits into
Conversation
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
Signed-off-by: John Myers <johntmyers@users.noreply.github.com>
|
Label |
PR Review StatusThe independent code review found no blocking findings across all 13 changed files. @johntmyers, I checked the reusable-tooling and runtime-assignment behavior you described, including image compatibility checks, Docker/Podman selection, and the updated README and launch skill. Action required: A maintainer must open Branch E2E Checks run 39409836733 and select Re-run all jobs with Blocking findings: None. Carried findings: None. Non-blocking suggestions: None. Gator metadata
|
purp
left a comment
There was a problem hiding this comment.
Reviewed at c8afb7321. The design is solid, and the five launcher suites (run_test.sh, image_test.sh, launch_test.sh, supervisor_test.sh, codex/exec_test.sh) all pass locally. Nothing blocking; one unverified Podman risk is below.
Key design decisions
- No guessing which cluster: a Kubernetes gateway with no delivery option fails with guidance. A loopback endpoint isn't treated as local, because it could be a port-forward (
scripts/agents/image.sh:57). - Task kept out of the image: runtime placeholders survive the build as
{{…}}(run.sh:635). The supervisor fills them in once, in memory, and fails if any are missing (supervisor.sh:34). It then unsets the task variable and feeds the prompt to every cycle on stdin (supervisor.sh:55,:312). A cycle that modifies the prompt file can't change what later cycles receive. - Compatibility check before startup: the build writes a small
tooling.jsonwith the agent ID and payload version (run.sh:597). Sandboxes now start through a newlaunch.sh, which checks it before handing off toentrypoint.sh. An old image doesn't havelaunch.sh, so it can't silently run its baked-in task. - Launches by digest, never by tag:
--imagemust include@sha256:(image.sh:22), and registry delivery looks up the pushed digest and refuses a tag-only launch (image.sh:86). --build-onlystops early: it exits after delivering the image (run.sh:734), before settings, providers or sandbox creation.
Potential concern
--publish-imagewith Podman may launch a digest that doesn't exist in the registry (unverified). The registry digest comes fromimage inspect … RepoDigests(scripts/agents/image.sh:86). Podman can recompress or convert the manifest during a push, so the pushed digest may differ from the local one; that's whypodman pushhas a--digestfileoption. If that happens, the launcher prints aTooling image:reference that nodes can't pull. The tests cover Podman only through a Docker stub symlinked topodman, and the PR body says a live Podman gateway wasn't exercised.mainhas no registry push path, so this path is new here.
Context (not blocking)
- Remote Kubernetes is demonstrated on this very PR. Gator, running from this PR's payload-13 image on a remote Kubernetes gateway, posted the PR Review Status comment on this PR. (obligatory gif) That run produced two issues: #4884 (pushes aren't retried) and #4885 (
*.oaiusercontent.comis denied, and only the first proposal chunk gets auto-approved). - On shared gateways, the launcher writes gateway-global settings; #4888 fixes it. This PR lets the launcher run on Kubernetes gateways, which are usually shared. There it still runs
settings set --globalforproposal_approval_mode=autoandagent_policy_proposals_enabled=true(scripts/agents/run.sh:742), so every other sandbox on the gateway gets auto-approved proposals too. #4888 applies the settings per sandbox instead, and the two PRs merge cleanly in either order. - CI doesn't run any of the
scripts/agentstests. That was already true before this PR, so the new suites only run when someone invokes them by hand.
|
Follow-up on the Podman concern: confirmed with Podman 6.1.4 against a local |
Summary
Enable the agent launcher to run Gator on Kubernetes gateways, using explicit local k3d imports, registry publishing, or reusable digest-pinned images. Separate per-run assignments from immutable tooling so different PRs no longer require task-specific image contents.
Related Issue
Related to #3469.
Changes
--k3d-clusterfor Docker builds imported into an explicitly selected running k3d cluster with a matching kube context. Do not infer cluster locality from a loopback gateway endpoint.--publish-imagefor registry delivery with digest resolution,--imagefor trusted digest-pinned tooling reuse, and--build-onlyfor building/delivering without provider configuration or sandbox creation.Unlike the original issue's prompt-baking assumption, the image now contains only task-independent instructions and tooling. PR assignments and operator test authorization travel in the runtime startup command, not Docker build inputs. Runtime command metadata can contain the assignment; credentials must continue to use providers. Prompt isolation is not a security boundary.
Release Notes
Gator can run through Kubernetes-backed gateways with explicit image delivery or a reusable tooling image. Per-run tasks are no longer baked into its images.
Testing
Passed all nine focused suites: launcher/build-context isolation, image transport, tooling-image compatibility, supervisor, Codex harness, feedback ledger, GitHub write guard, thread resolution, and finding validation. Shell syntax,
git diff --check, and Markdown lint also pass.Manual validation on an ARM64 local k3d/Helm deployment:
--reset-refresh, gateway-owned token rotation succeeded. The agent verified authenticated GitHub access, fetched the published payload version, confirmed the merged PR, and exited 0 withmerged_pr_connectivity_smoke_passed. No PR comments, reviews, labels, or workflows were changed. Initial Codex stream reconnects recovered. The completed sandbox was retained intentionally with--keep.A remote Kubernetes deployment and a live Podman gateway were not exercised; registry/prebuilt paths and Docker/Podman selection have mocked coverage. Builds use the local builder's platform, and registry pull access remains deployment configuration.
Checklist