Skip to content

ci(publish): repair lockfile and verify --frozen-lockfile after refresh#413

Merged
willwashburn merged 2 commits into
mainfrom
claude/fix-publish-package-uuRyI
May 10, 2026
Merged

ci(publish): repair lockfile and verify --frozen-lockfile after refresh#413
willwashburn merged 2 commits into
mainfrom
claude/fix-publish-package-uuRyI

Conversation

@willwashburn

Copy link
Copy Markdown
Member

Summary

The 2.7.3 release commit (081f3cd) silently dropped @relayburn/sdk-linux-x64-gnu from the @relayburn/sdk importer entry in pnpm-lock.yaml. The other three SDK platform legs and all four CLI legs were bumped cleanly to 2.7.3, but the linux-x64-gnu SDK entry was removed entirely instead of bumped — leaving the lockfile out of sync with packages/sdk-node/package.json's optionalDependencies.

That breaks pnpm install --frozen-lockfile on main, which in turn breaks the napi-build matrix the next publish run gates on. All four Build SDK napi bindings legs of run 25621569797 failed at the Install workspace deps step with:

ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with <ROOT>/packages/sdk-node/package.json

  specifiers in the lockfile don't match specifiers in package.json:
* 1 dependencies were added: @relayburn/sdk-linux-x64-gnu@2.7.3

This PR:

  • Refreshes pnpm-lock.yaml against the published versions, restoring the missing @relayburn/sdk-linux-x64-gnu@2.7.3 entry. Verified locally with pnpm install --frozen-lockfile.
  • Adds a follow-up pnpm install --frozen-lockfile step after the publish workflow's lockfile refresh + amend, so if pnpm install --lockfile-only ever drops an importer entry again, the workflow fails before git push --follow-tags. The npm packages will already have shipped at that point, but the broken lockfile won't reach main, where it would otherwise block every subsequent CI run and the next publish.

Test plan

  • pnpm install --frozen-lockfile succeeds locally on this branch.
  • PR napi build matrix passes (was failing on main for the reason above).
  • PR cli build matrix passes.
  • Other CI checks pass.

https://claude.ai/code/session_01N1uPm9zmHpdGsKgNVJDmAd


Generated by Claude Code

The 2.7.3 release commit dropped `@relayburn/sdk-linux-x64-gnu` from
the `@relayburn/sdk` importer entry in `pnpm-lock.yaml`, leaving the
lockfile inconsistent with `packages/sdk-node/package.json`. Every
subsequent `pnpm install --frozen-lockfile` on `main` fails — including
the napi-build matrix the publish workflow gates on, so the next
publish run can't even produce its SDK artifacts.

Restore the missing `@relayburn/sdk-linux-x64-gnu@2.7.3` entry by
re-running `pnpm install --lockfile-only` against the published
versions, and add a follow-up `pnpm install --frozen-lockfile` step
after the publish workflow's lockfile refresh + amend. If pnpm drops
an entry again, the verification fails before the tag push, so the
broken lockfile never lands on `main`.

https://claude.ai/code/session_01N1uPm9zmHpdGsKgNVJDmAd
@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ff9ce5c6-ad7e-41ce-8969-08a424190d5b

📥 Commits

Reviewing files that changed from the base of the PR and between fb25418 and aae38af.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish.yml

📝 Walkthrough

Walkthrough

The publish workflow now validates lockfile consistency after refresh operations. A gated step runs pnpm install --frozen-lockfile post-amendment with retries to detect pnpm umbrella optionalDependency regressions, failing the workflow if inconsistencies are found during real (non-dry-run) releases.

Changes

Lockfile Validation

Layer / File(s) Summary
Validation Step
.github/workflows/publish.yml
Adds a "Verify refreshed lockfile is consistent" step that runs pnpm install --frozen-lockfile after lockfile amendments; the step is skipped for dry runs and when version is none with custom_version unset, and it retries up to 6 times with 10s backoff before failing to prevent tagging/pushing an inconsistent lockfile.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant PNPM as pnpm
  participant Git as Git remote
  GH->>PNPM: run pnpm install --frozen-lockfile
  PNPM-->>GH: success / failure
  GH->>GH: retry up to 6 times with 10s sleep on failure
  GH->>Git: tag + push (only if PNPM success)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I hop through CI with careful paws,
I run the check to catch lockfile flaws,
Six tries I make with patient beats,
Then guard the tag from broken feats,
A tidy release — nibble, repeat!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: repairing the lockfile and adding verification with --frozen-lockfile after refresh in the publish workflow.
Description check ✅ Passed The description is directly related to the changeset, providing detailed context about the lockfile regression, its impact, and the PR's solution.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-publish-package-uuRyI

Comment @coderabbitai help to get the list of available commands and usage tips.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish.yml:
- Around line 1181-1183: The "Verify refreshed lockfile is consistent" step
currently runs a single networked command `pnpm install --frozen-lockfile` which
can fail transiently; replace that single `run` invocation with the repository's
standard retry-with-backoff pattern (the same approach used earlier in the
workflow) to retry `pnpm install --frozen-lockfile` a few times with
exponential/backoff delays and a non-zero exit only after retries are exhausted,
preserving the step's existing if-condition and name; locate the step by its
name "Verify refreshed lockfile is consistent" and the command `pnpm install
--frozen-lockfile` and implement the bash retry loop (attempt, sleep with
backoff, retry) around that command.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 05ab663c-b945-45f3-8a66-80a30c85a584

📥 Commits

Reviewing files that changed from the base of the PR and between a34bb01 and fb25418.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • .github/workflows/publish.yml

Comment thread .github/workflows/publish.yml Outdated
… flakes

The verification step's `pnpm install --frozen-lockfile` does the
deterministic lockfile-vs-package.json check first, but then actually
hits the npm registry to install. A brief propagation hiccup right
after we push 11 fresh packages can fail the install half of the
command even though the lockfile is fine, and that would abort the
publish workflow before the tag push.

Wrap the call in a retry-with-fixed-backoff loop (6 × 10s) matching
the sparse-index wait pattern used elsewhere in this job.

Suggested by CodeRabbit on PR #413.

https://claude.ai/code/session_01N1uPm9zmHpdGsKgNVJDmAd
@willwashburn willwashburn merged commit 10257d7 into main May 10, 2026
3 checks passed
@willwashburn willwashburn deleted the claude/fix-publish-package-uuRyI branch May 10, 2026 14:03
willwashburn added a commit that referenced this pull request May 10, 2026
…efresh (#414)

The publish workflow's `pnpm install --lockfile-only` step has been
leaving the `packages/sdk-node` importer block pinned to the previous
release after a version bump. The verify step from #413 catches this
and aborts the run with `ERR_PNPM_OUTDATED_LOCKFILE`, but the refresh
itself was unreliable.

Two changes here:

1. Drop `packages/{sdk-node,relayburn}/npm/*` from `pnpm-workspace.yaml`.
   The platform packages have no scripts, no JS deps, and are only
   touched at publish time via direct path operations (npm version,
   npm pack, artifact staging). They were workspace members only by
   reflex, and their presence created same-named local packages for
   each `@relayburn/{sdk,cli}-<platform>` optionalDependency on the
   umbrella — which is the case where pnpm's importer-rewrite
   heuristic in `--lockfile-only` skips work it should be doing.

2. Pass `--force` to the publish refresh so pnpm always re-resolves
   every importer, regardless of what its heuristic thinks.

The verify step stays in place as belt-and-braces. Lockfile only loses
the four empty importer stubs for each removed glob; everything else
is unchanged.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants