Skip to content

feat(roadmap): bootstrap the dev env with uv in each Job - #6537

Merged
dan-petty merged 5 commits into
mainfrom
build/6517-runner-dev-bootstrap
Nov 20, 2026
Merged

dan-petty merged 5 commits into
mainfrom
build/6517-runner-dev-bootstrap

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

The runner image of the implement and fix-checks Jobs installed the dev group into /app/.venv, first on PATH, so a check could run an image tool and not the checkout's. The owner asked for no dev dependency in the image and one uv command that builds the coder environment.

The image now holds the runtime and the review extra only, with UV_COMPILE_BYTECODE=0. bootstrap_checkout in runner_tools.py runs uv sync --group dev (--locked on a new branch, offline from the uv seed of #4814 when it fits) and npm ci --ignore-scripts for a root package-lock.json. The implement Job calls it before the hooks and fix-checks before its model fix, so tier 1 still repairs a stale lock. The stage Job runs in the Service image and waits for #6417. The agent shell and the checks get the checkout tools first on PATH, no token child does. The smoke test bootstraps a copy of the checkout.

Closes #6517

Change: openspec/changes/archive/2026-11-20-6517-runner-dev-bootstrap/

@dan-petty dan-petty added type/infra Type infra: the build, CI, images or cluster scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 20, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Local proof of task 3.3 (rootless Podman with podman-docker, devcontainer, 2026-11-20), on the image built from the first commit of this branch with docker build --target runner (exit 0, 6 min 36 s with an empty cache):

  • docker image inspect --format '{{.Size}}': 6016162058 bytes (the bound is 7000000000; docs/CLUSTER.md records 6.38 GB before this change).
  • docker run --rm --entrypoint sh <image> -c 'ls /app/.venv/bin | grep -E "^(ruff|mypy|pytest|pre-commit)$"': no line, exit 1. The image venv holds devops and the runtime programs only.
  • docker run --rm --entrypoint sh <image> -c 'echo $UV_COMPILE_BYTECODE': 0.
  • docker run --rm --entrypoint id <image> -u: 1000, exit 0. docker run --rm <image> --version: devops-cli 0.182.3, exit 0.
  • docker run --rm --entrypoint python <image> -m devops_cli.roadmap.runner_tools: "All 32 runner tools are on PATH and run.", exit 0.
  • The changed checkout command of the smoke step (read-only root, tmpfs /tmp and home, no capability): exit 0 in 53 s in all. The bootstrap with no seed (online uv sync --locked --group dev, no bytecode compile) and the check of the 8 tools of the checkout took 32 s, then ruff 0.17.6, pytest 9.2.0 and mypy 2.4.1 printed their versions. perf(k8s): seed the uv cache of a runner pod from the image #4814 measured 110 s for the first uv run of a Job with the bytecode compile on.

Scoped checks before the push: devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,actionlint,zizmor exit 0; devops ci test of tests/roadmap/implement, tests/roadmap/steps, the stage Job modules, tests/roadmap/test_roadmap_runner_tools.py, tests/invariants/test_runner_hooks.py, tests/invariants/test_runner_image.py and tests/commands/test_roadmap_step_fix_checks.py: 2418 passed, exit 0; mypy of the 7 changed source files: no issue.

@dan-petty dan-petty changed the title build(roadmap): bootstrap the dev env with uv in each Job feat(roadmap): bootstrap the dev env with uv in each Job Nov 20, 2026
@dan-petty dan-petty added type/feature Type feature: a new function and removed type/infra Type infra: the build, CI, images or cluster labels Nov 20, 2026
The runner image holds the runtime of devops-cli and its review extra, and no dev group. Each stage, implement and fix-checks Job runs uv sync --locked --group dev (from the uv seed of #4814 when it fits) and npm ci --ignore-scripts in its checkout before its first agent step, and the agent and the checks get the tools of the checkout first on PATH.
@devops-cli-service

devops-cli-service Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Pull request #6537 has merge conflicts with main at commit d98ecfe4e1b6. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

The stage Job runs in the Service image, which holds no uv, so it runs no bootstrap until it moves to the runner image (#6417, #6528). The fix-checks Job bootstraps at the start of its model fix, so tier 1 still repairs a stale uv.lock. An existing branch syncs without --locked, as the uv run of the hook install did. The container-image-layers spec drops the dev requirements of the lock stage.
@dan-petty
dan-petty force-pushed the build/6517-runner-dev-bootstrap branch from e8fe17a to d98ecfe Compare November 20, 2026 18:40
@dan-petty
dan-petty marked this pull request as ready for review November 20, 2026 19:30
@dan-petty
dan-petty merged commit a0c0e4e into main Nov 20, 2026
34 checks passed
@dan-petty
dan-petty deleted the build/6517-runner-dev-bootstrap branch November 20, 2026 19:47
dan-petty pushed a commit that referenced this pull request Nov 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.185.0](v0.184.0...v0.185.0)
(2026-11-20)


### Features

* **roadmap:** bootstrap the dev env with uv in each Job
([#6537](#6537))
([a0c0e4e](a0c0e4e)),
closes [#6517](#6517)


### Bug Fixes

* **roadmap:** an open tracker holds back no item
([#6548](#6548))
([016b681](016b681))

---
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>
dan-petty added a commit that referenced this pull request Nov 20, 2026
On an existing branch, the coder bootstrap of #6517 (PR #6537) ran `uv
sync` with no `--locked`, and the install of the hook environments ran
`uv run pre-commit install-hooks`. On a stale `uv.lock`, both lock again
and write it, and `npm ci` refuses a stale `package-lock.json`. The
locks are tracked files, so the first step refused the dirty worktree:
fix-checks returned no fix, and the implement Job stopped at group 1.
Now the bootstrap of an existing branch runs `uv sync --frozen`, which
installs `uv.lock` as it is, and `npm install --no-save
--ignore-scripts`, which writes no lock. The Job starts each
`pre-commit` command with `uv run --frozen`. A new branch keeps
`--locked` and `npm ci`. A stale lock is the work of the agent, whose
shell can lock again and commit. `--frozen` does not resolve, so a seed
that fits makes the sync offline in both modes.

Closes #6557

Change: `openspec/changes/archive/2026-11-20-6557-bootstrap-stale-lock/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build(runner): bootstrap the dev env with uv in each Job

1 participant