Skip to content

fix(roadmap): a Job leaves a stale lock for the agent - #6558

Merged
dan-petty merged 3 commits into
mainfrom
fix/6557-bootstrap-stale-lock
Nov 20, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/6557-bootstrap-stale-lock

Conversation

@dan-petty

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

Copy link
Copy Markdown
Owner

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/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 20, 2026
…lock (#6557)

On an existing branch the bootstrap runs npm install, not npm ci, as the uv sync runs without --locked. The offline seed sync runs only with --locked: the seed hash covers uv.lock only, so a stale lock can fit it, and to lock again uv must resolve online. The spec scenario of a stale staged lock states the one sync that runs.
)

On an existing branch the bootstrap ran uv sync with no --locked and npm install, so a stale uv.lock or package-lock.json was written again. Both are tracked files, and the first step refuses a dirty worktree, so fix-checks returned no fix and the implement Job stopped at group 1. Now the bootstrap of an existing branch runs uv sync --frozen and npm install --no-save, which install each lock as it is and write no tracked file. A stale lock is the work of the agent. --frozen does not resolve, so a seed that fits makes the sync offline in both modes.
…ozen (#6557)

Both callers install the hook environments right after the bootstrap with `uv run pre-commit install-hooks`. On a stale uv.lock a plain `uv run` locks again and writes uv.lock, so the first step still refused the dirty worktree. `pre_commit_command` now starts `uv run --frozen`, so the install and the hook stages write no uv.lock. The fake of the stale-lock tests now writes uv.lock for each `uv sync` or `uv run` with none of --frozen, --locked and --no-sync, and a fix-checks test puts stale locks on the head branch. The seed test that does not fit now runs in both modes. The prose now says that npm install --no-save installs the dependencies of package.json and writes no lock, and that --locked resolves to refuse a stale lock.
@dan-petty
dan-petty force-pushed the fix/6557-bootstrap-stale-lock branch from 7334a54 to 373e824 Compare November 20, 2026 21:02
@dan-petty dan-petty changed the title fix(roadmap): let the bootstrap of an existing branch relock fix(roadmap): a Job leaves a stale lock for the agent Nov 20, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 20, 2026 21:17
@dan-petty
dan-petty merged commit be35253 into main Nov 20, 2026
28 of 29 checks passed
@dan-petty
dan-petty deleted the fix/6557-bootstrap-stale-lock branch November 20, 2026 21:57
dan-petty pushed a commit that referenced this pull request Nov 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.185.1](v0.185.0...v0.185.1)
(2026-11-20)


### Bug Fixes

* **ci:** take the CI job tools from the devtools image
([#6543](#6543))
([2e4188f](2e4188f))
* **roadmap:** a Job leaves a stale lock for the agent
([#6558](#6558))
([be35253](be35253)),
closes [#6557](#6557)
* **roadmap:** a wait keeps only real repository paths
([#6546](#6546))
([165463c](165463c))

---
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>
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/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): let the bootstrap of an existing branch update a stale lock

1 participant