Repository navigation
ci: refresh nub.lock with nub install --lockfile-only - #2053
Conversation
Hosted Renovate updates package.json and leaves nub.lock behind, so CI dies in nub install with ERR_NUB_OUTDATED_LOCKFILE. Autofix now reinstalls with --no-frozen-lockfile and commits the lockfile. Co-authored-by: Yam Borodetsky <[email protected]>
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Lockfile refresh script — new
scripts/nub-install-refresh-lockfile.jsruns a frozennub install, detectsERR_NUB_OUTDATED_LOCKFILE(exit 16), then rerunsnub install --no-frozen-lockfileso the drift is repaired beforeautofix.cicommits. - Autofix wiring — the autofix job's
Install dependenciesstep now calls the script instead of a barenub install. - Tests — unit coverage for the detection/refresh paths plus a guard that the workflow keeps invoking the script.
I verified the load-bearing assumption directly against Nub 0.9.3 in a sandbox: a drifted manifest makes CI=1 nub install exit 16 and print ERR_NUB_OUTDATED_LOCKFILE, and running the script against that fixture refreshes nub.lock and exits 0. (The raw binary only carries ERR_AUBE_OUTDATED_LOCKFILE in its string table — Nub rewrites the prefix at display time, so the ERR_NUB_ spelling in the script is correct.) A healthy full-repo install captured ~12 KB, well under spawnSync's default buffer, and left the tree clean. biome check on both new files is clean.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Drop the dedicated refresh script. Autofix runs Nub's own lockfile-only install, which is allowed to rewrite nub.lock in CI, then the normal frozen install. TODO(2057) tracks removing the extra step once renovatebot/renovate#44422 is on the hosted app. Co-authored-by: Yam Borodetsky <[email protected]>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the delta since the prior pullfrog review (8e8aeff), which had approved a wrapper-script approach:
- Dropped the refresh wrapper —
scripts/nub-install-refresh-lockfile.jsand its Vitest spec are removed (-219/-226on the commit). - Native lockfile refresh — the autofix job now runs
nub install --lockfile-onlyin aRefresh lockfilestep before the normalnub install, soautofix.cicommits the re-resolvednub.lock.
I verified the load-bearing behavior directly against the pinned Nub 0.9.3:
- Control: a drifted manifest makes
CI=1 nub installexit 16 withERR_NUB_OUTDATED_LOCKFILE. CI=1 nub install --lockfile-onlyon that same drift exits 0 and rewritesnub.lock; the following frozenCI=1 nub installthen exits 0 ("skipped node_modules linking" on the lockfile-only pass).- A healthy tree is no-churn ("Lockfile is up to date, resolution step is skipped"), so healthy PRs and pushes to
dev/v1produce no spurious commit. - Nub's install docs list
--lockfile-onlyas an accepted pnpm-shaped flag.
The simplification is behaviorally sound and drops ~220 lines of indirection and its tests.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Hosted Renovate updates
package.jsonand leavesnub.lockunchanged. CI's frozennub installthen exits 16 withERR_NUB_OUTDATED_LOCKFILE, so every job on those PRs fails before the tests run.Autofix now runs
nub install --lockfile-onlyfirst. That command is allowed to rewritenub.lockin CI, and autofix.ci commits it when it changes. The following CI run installs from that file.TODO(2057)on that step tracks removing it once renovatebot/renovate#44422 is on the hosted Mend app. Tracking issue: #2057.After this merges, re-run the autofix workflow on the open Renovate PRs so each one picks up its lockfile:
@testing-library/jest-dom@ark/util@types/react#1862 is already green.