Skip to content

ci: refresh nub.lock with nub install --lockfile-only - #2053

Merged
yamcodes merged 2 commits into
v1from
cursor/renovate-lockfile-refresh-036b
Oct 9, 2026
Merged

yamcodes merged 2 commits into
v1from
cursor/renovate-lockfile-refresh-036b

Conversation

@yamcodes

@yamcodes yamcodes commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Hosted Renovate updates package.json and leaves nub.lock unchanged. CI's frozen nub install then exits 16 with ERR_NUB_OUTDATED_LOCKFILE, so every job on those PRs fails before the tests run.

Autofix now runs nub install --lockfile-only first. That command is allowed to rewrite nub.lock in 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:

#1862 is already green.

Open in Web Open in Cursor 

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]>
@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5cd455b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the github actions Pull requests that update GitHub Actions code label Oct 9, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Lockfile refresh script — new scripts/nub-install-refresh-lockfile.js runs a frozen nub install, detects ERR_NUB_OUTDATED_LOCKFILE (exit 16), then reruns nub install --no-frozen-lockfile so the drift is repaired before autofix.ci commits.
  • Autofix wiring — the autofix job's Install dependencies step now calls the script instead of a bare nub 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.

Pullfrog  | View workflow run | Using 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]>
@cursor cursor Bot changed the title ci: refresh nub.lock when Renovate leaves it behind ci: refresh nub.lock with nub install --lockfile-only Oct 9, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.js and its Vitest spec are removed (-219/-226 on the commit).
  • Native lockfile refresh — the autofix job now runs nub install --lockfile-only in a Refresh lockfile step before the normal nub install, so autofix.ci commits the re-resolved nub.lock.

I verified the load-bearing behavior directly against the pinned Nub 0.9.3:

  • Control: a drifted manifest makes CI=1 nub install exit 16 with ERR_NUB_OUTDATED_LOCKFILE.
  • CI=1 nub install --lockfile-only on that same drift exits 0 and rewrites nub.lock; the following frozen CI=1 nub install then 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/v1 produce no spurious commit.
  • Nub's install docs list --lockfile-only as an accepted pnpm-shaped flag.

The simplification is behaviorally sound and drops ~220 lines of indirection and its tests.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@yamcodes
yamcodes merged commit cd9358c into v1 Oct 9, 2026
17 checks passed
@yamcodes
yamcodes deleted the cursor/renovate-lockfile-refresh-036b branch October 9, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants