GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Explain and simplify recovery from incomplete Renovate CLI locks · nikzlabs/shipit@849904e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • ci.yml
    • release.yml
  • docs/141-cli-version-strategy
    • checklist.md
    • plan.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,19 @@ jobs:
135135
# lockfile validation here too, but skip extraction of the large platform
136136
# binaries: a split upstream publish can otherwise leave Renovate's lock
137137
# missing optional platform records and fail only during deployment.
138-
- run: npm ci --ignore-scripts --dry-run
138+
- name: Validate agent CLI lockfile
139139
working-directory: docker/agent-cli
140+
run: |
141+
npm ci --ignore-scripts --dry-run || {
142+
status=$?
143+
echo '::error title=Agent CLI lockfile validation failed::See the npm error above. For missing optional platform records on a Renovate PR, wait until those platform releases are at least seven days old, then request Renovate rebase/retry to regenerate the lockfile.'
144+
echo 'If repair is still needed, run from the repository root:'
145+
echo ' npm install --package-lock-only --ignore-scripts --min-release-age=7 --prefix docker/agent-cli'
146+
echo ' npm ci --ignore-scripts --dry-run --prefix docker/agent-cli'
147+
echo 'Review the lockfile change before saving it. A later Renovate rebase can discard a manual repair.'
148+
echo 'See docs/141-cli-version-strategy/plan.md, Axis 2.'
149+
exit "$status"
150+
}
140151
- run: npm run lint
141152
- run: npm run typecheck
142153
- run: npm run check-deps
Collapse file

‎.github/workflows/release.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ jobs:
146146
cache: npm
147147
- run: npm ci
148148
# Keep the nested production-image lock validation in sync with ci.yml.
149+
# Missing platform records: see docs/141-cli-version-strategy/plan.md,
150+
# Axis 2, for the cooldown-safe repair command and rebase warning.
149151
- run: npm ci --ignore-scripts --dry-run
150152
working-directory: docker/agent-cli
151153
- run: npm run lint
Collapse file

‎docs/141-cli-version-strategy/checklist.md‎

Copy file name to clipboardExpand all lines: docs/141-cli-version-strategy/checklist.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Tracks the four-axis rollout from `plan.md`. Order follows the plan's
3838
`npm ci --ignore-scripts` command in dry-run mode. This catches missing
3939
optional platform records before a deployment while avoiding large binary
4040
extraction in the merge gate.
41+
- [x] Explain the optional-package cooldown race and show recovery steps at the
42+
failing CI check, while preserving npm's failure status.
4143
- [ ] (Higher effort, optional) provenance / SBOM verification + image scan.
4244

4345
> Note: with `npm ci` driving freshness deterministically, the per-package
Collapse file

‎docs/141-cli-version-strategy/plan.md‎

Copy file name to clipboardExpand all lines: docs/141-cli-version-strategy/plan.md
+46-5Lines changed: 46 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,52 @@ risk:
217217
`docker/agent-cli/` under Node 24. This exercises npm's production lockfile
218218
validation without downloading and extracting the large platform binaries.
219219
It catches an incomplete lock graph when an upstream package publishes its
220-
optional platform packages at different times. Renovate can retain the
221-
early registry snapshot even after the cooldown; when this check fails on a
222-
bump, regenerate the nested lock with `npm install --package-lock-only
223-
--ignore-scripts --prefix docker/agent-cli` after every platform package is
224-
available.
220+
optional platform packages at different times. Renovate passes npm a
221+
`--before` cutoff calculated as the current time minus `minimumReleaseAge`.
222+
The main package can clear that cutoff before a later platform publish does.
223+
npm then succeeds but omits that optional package. In this incident, the
224+
cause was npm's cutoff, not registry caching or an OS/CPU/libc filter.
225+
It was reproduced byte for byte for PR #2663 with npm 11.15.0: a cutoff of
226+
`2026-08-31T17:20:07Z` produced the incomplete lock; `17:31:00Z` produced
227+
the repaired lock. The main package was published at `17:07:28.168Z`,
228+
ARM64 glibc at `17:30:23.691Z`, and ARM64 musl at `17:05:01.263Z`.
229+
See [the incident analysis](https://github.com/nikzlabs/shipit-planning/issues/523)
230+
and [Renovate's cutoff implementation](https://github.com/renovatebot/renovate/blob/44.69.1/lib/modules/manager/npm/post-update/npm.ts).
231+
232+
**Recovery:** read the npm error first. If it names missing optional platform
233+
records, wait until those platform releases also clear the seven-day cooldown,
234+
then request Renovate's rebase/retry so the bot regenerates its own lock.
235+
Check their publication times with `npm view <package> time --json`.
236+
If a manual repair is still needed, run these commands from the repository root:
237+
238+
```sh
239+
npm install --package-lock-only --ignore-scripts --min-release-age=7 --prefix docker/agent-cli
240+
npm ci --ignore-scripts --dry-run --prefix docker/agent-cli
241+
```
242+
243+
The repair command needs npm 11.10 or newer for `--min-release-age`; the
244+
tested Node 24 toolchain uses npm 11.12.1. This option applies the same
245+
seven-day cutoff to newly resolved packages. If validation still reports
246+
missing records, check their publication times and wait; do not remove the
247+
cooldown option to make the repair pass.
248+
npm 11.12.1 can write an empty optional entry if repair is attempted too early,
249+
then report `Invalid Version:` on validation or retry. Restore only that
250+
attempt's lockfile edits before retrying after the cooldown. npm 11.15.0
251+
omits these empty entries; see [npm's upstream fix](https://github.com/npm/cli/pull/9343).
252+
Review the lockfile change before saving it. A manual commit can stop automatic
253+
rebases; an explicitly requested Renovate rebase can discard it. Keep the
254+
validation gate unchanged so any recurrence still fails.
255+
256+
**Scope:** accept the occasional failed bump and make recovery explicit.
257+
This does not guarantee a complete lock when every PR first opens. Running
258+
npm twice repeats the same cutoff; increasing `minimumReleaseAge` moves the
259+
same race to a later day. The hosted App cannot run `postUpgradeTasks`.
260+
A separate branch-writing repair service would need write credentials and
261+
coordination with Renovate's force pushes. Rebasing whenever the base branch
262+
advances adds CI runs and still depends on a base change after the platform
263+
cooldown. That upkeep is not justified by the two distinct defective updates
264+
found across 38 lockfile-changing commits (including release copies and the
265+
incident PR commits).
225266
5. **Provenance / SBOM (higher effort, diminishing returns).** Verify npm
226267
provenance attestations where available; scan the resulting image.
227268

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.