Skip to content

ci: run Tests with pnpm 10 and a frozen lockfile - #41

Merged
holmesworcester merged 1 commit into
mainfrom
fix/ci-pnpm-lockfile
Sep 16, 2026
Merged

holmesworcester merged 1 commit into
mainfrom
fix/ci-pnpm-lockfile

Conversation

@holmesworcester

Copy link
Copy Markdown

Every Tests run on main since early August has failed at Install and build, before any test runs:

packages/crypto postbuild: src/symmetric.ts(150,39): error TS2554: Expected 3-4 arguments, but got 2.
packages/crypto postbuild: src/symmetric.ts(152,32): error TS2339: Property 'tag' does not exist on type
  '(false | { message: Uint8Array; tag: number }) & (false | { message: string; tag: number })'.

Cause

pnpm-lock.yaml is lockfileVersion: '9.0', written by pnpm 10. The workflow installs with pnpm 8, which cannot read that format, so each run silently re-resolves from scratch — the install rewrites the lockfile by +10377/−14965 lines — and picks up libsodium-wrappers-sumo 0.7.16 instead of the locked 0.7.13. 0.7.16's bundled types changed the signature of crypto_secretstream_xchacha20poly1305_pull, and packages/crypto/src/symmetric.ts no longer type-checks against them.

Reproduced locally on a clean copy of release/10.0.0:

node pnpm install resolved sumo pnpm build
18.20.4 8 pnpm install 0.7.16 fails, identical four errors
20.20.1 10 pnpm install --frozen-lockfile 0.7.13 builds

Change

.github/workflows/tests.yaml: pnpm 8 → 10, node 18 → 20, pnpm install → pnpm install --frozen-lockfile (so a stale lockfile fails loudly instead of drifting), and the three actions bumped to their node20 releases.

Nothing in the code changes. Whether symmetric.ts should also be made to compile against sumo 0.7.16 is a separate question — this PR only makes CI test what the lockfile says.

Once this lands, re-running the Tests check on #40 should go green: pull_request runs use the workflow from the merge of head and base.

🤖 Generated with Claude Code

pnpm-lock.yaml is lockfileVersion 9.0, written by pnpm 10. The workflow
installed with pnpm 8, which cannot read that format, so every run has been
re-resolving from scratch and rewriting the lockfile (+10377/-14965 lines).
That pulls libsodium-wrappers-sumo 0.7.16 instead of the locked 0.7.13, whose
types no longer match packages/crypto/src/symmetric.ts, and the build fails in
postbuild:

  symmetric.ts(150,39): error TS2554: Expected 3-4 arguments, but got 2.
  symmetric.ts(152,32): error TS2339: Property 'tag' does not exist on type ...

Reproduced locally with node 18 + pnpm 8 (fails identically) and with
node 20 + pnpm 10 --frozen-lockfile (builds). Every Tests run on main since
August has failed this way.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@holmesworcester
holmesworcester merged commit f8e5e38 into main Sep 16, 2026
1 check passed
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.

1 participant