Repository navigation
feat(roadmap): run the implement job as a cluster Job - #2698
Conversation
…ce (#2667) The model lane gets an implement row. A round reports the runner Jobs that ended, waits while a Job of the repository runs, and else creates one Job for the first Staged item. A Job that leaves its item eligible stops the item. The Kubernetes fake takes equality label selectors.
k8s/README.md and docs/ROUTINE_TASKS.md describe the runner image, the template, the Role, the network rule and what the sandbox does and does not guarantee. CONTEXT.md names the runner exactly. The generated documents follow the new option, setting and variable.
…gMap (#2667) The ConfigMap of the Service must not name one repository for its tokens, because the Service works for every repository in service.repos. The tests that counted the devops manifests, the rendered section and the variables of the GitHub App now include the new items.
) The runner stage forbids a Python download, and the .python-version of a checkout names a patch release that the pinned base image can lack. So uv run found no interpreter in the Job. The stage now sets UV_PYTHON to the image interpreter, the step shell gets it, and the CI smoke test runs uv run in a copy of the checkout.
…pository (#2667) The one-repository token scope was fail-open: a Job made by devops k8s run-job set no token repository, so it got a token for every repository of the installation. The implement job now runs no step unless it acts as the GitHub App and service.github_app.token_repository equals the repository of the plan. run-job needs --repo for the runner template and sets the variable.
…gh with the token (#2667) A git or gh child of the job holds the session token in its environment, which a process of the same user can read through /proc. The agent shell can leave such a process behind. A pod cannot hide the token from it: a user namespace for the shell needs unshare, which the RuntimeDefault seccomp profile refuses. So the job now adopts orphans, and ends every descendant when a step ends, before it runs any program with the token. A survivor stops the item.
…t a Job with no log (#2667) A round recorded the Job after it created it. If the record failed and the Job died early, its item stayed eligible and every round made another Job. The record now comes first, and a refused create takes it back. A log that the API refuses no longer blocks the report of an ended Job. A test shows that apply_implement itself refuses when the kernel refuses to clear the dumpable flag.
…usions (#2667) A step could write without limit into /tmp and fill the disk of its node. The tmp volume now has a size limit, and the container has ephemeral-storage requests and limits that cover both volumes. The public-HTTPS rule of the default perimeter now also excludes the shared address space, the link-local range and the IETF protocol and benchmarking ranges.
…2667) Describe the order that keeps a step process away from the token, the open hook risk with its follow-ups, the runner Job name, the storage limits and the required --repo of run-job. Re-wrap two module docstrings to 100 columns. Regenerate the command reference.
…2667) Fix the spec, design, proposal and tasks of the archived change for the findings of the review: the interpreter of uv in the image, the token scope, the order that keeps a step process away from the token, the Job record before the create, the storage limits and the egress exclusions. Name the follow-up issues for the shell sandbox and the admission policy.
|
Test results: Review findings fixed, each test first:
Declined:
New dependency: |
…r image (#2667) The scan of the runner image reported HIGH findings in the npm that the builder bundles (undici, brace-expansion) and in the wheels that pip vendors (certifi, urllib3, msgpack). A Job installs no tool, so the runner stage deletes them, as the service stage deletes pip.
|
Update after the first CI run: the check Runner Image failed at the Trivy scan, not at the smoke test. The scan found HIGH findings in the npm that the builder bundles ( |
🤖 I have created a release *beep* *boop* --- ## [0.20.0](v0.19.0...v0.20.0) (2026-10-29) ### Features * **roadmap:** run the implement job as a cluster Job ([#2698](#2698)) ([b4669f6](b4669f6)), closes [#2667](#2667) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
What
The implement job now runs as a Kubernetes Job in a runner pod, not in the Service pod.
runnerstage inDockerfilewith git and the dev tools.release.ymlandci.ymlbuild, test, scan and publish it. The stage setsUV_PYTHON, souv runfinds an interpreter.devops-cli-runner.devops k8s run-job --template runner --repo owner/namemakes a Job from it.implementmakes one Job for each repository at a time, and reports each Job that ended on its item. It runs no step. A narrow Role, a ServiceAccount with a one-hour token, and one egress rule to the API server let it do this.gitorghwith the token./tmpand ephemeral storage, and the public-HTTPS egress rule excludes more non-public ranges.Why
The step of the agent needs tests,
ruff,mypyand OpenSpec. The Service image has none of them, and the Service pod has no way to create a Job. The pod of the runner Job is the sandbox, because the shell policy of a step is no security boundary.Known limits are in
k8s/README.md(Runner Jobs, Guarantees). A hook that a step writes can still run with the token. A sandbox for the shell is planned in #2695. An admission policy for the Jobs of the Service is planned in #2696.Closes #2667