Skip to content

chore(ci): commit pnpm-lock.yaml and install frozen - #12

Merged
saby1101 merged 1 commit into
fix/filestore-contractfrom
chore/pnpm-lockfile
Aug 14, 2026
Merged

saby1101 merged 1 commit into
fix/filestore-contractfrom
chore/pnpm-lockfile

Conversation

@saby1101

Copy link
Copy Markdown
Member

Stacked on #10 (fix/filestore-contract), since that is still unmerged. Retarget to main once #10 lands.

The gap

.gitignore excluded package-lock.json, pnpm-lock.yaml and yarn.lock, and all three CI jobs ran npm install — never npm ci. So nothing pinned what this package shipped:

  • every test run, build and publish resolved dependencies fresh from the registry
  • the published artifact was never built from a tree anyone had reviewed
  • a broken or hostile transitive release would land silently, with no lockfile diff to catch it in review

This package is loaded by every wms service in production, which is what makes it worth fixing first.

Change

pnpm-lock.yaml is now committed (4,972 lines, 344 resolutions) and CI installs --frozen-lockfile, so a dependency change has to show up as a reviewable diff.

Standardised on pnpm rather than npm: it matches wms and the rest of the org, the repo already carried pnpm-workspace.yaml, and .claude/skills/release/SKILL.md already documented pnpm commands. The version is pinned via packageManager in package.json, which pnpm/action-setup reads — so CI and local use the same pnpm.

Also folded in, since both were touched anyway:

  • The Node version was hardcoded in three places across two workflows and could drift independently; it now comes from one env: NODE_VERSION per workflow.
  • actions/setup-node gets cache: pnpm, which the lockfile makes possible.
  • CONTRIBUTING.md said "Add tag for a minor/major release by npm version minor" — wrong on two counts. It contradicted .claude/skills/release/SKILL.md ("Do NOT create git tags") and misidentified the publish trigger, which is release: created, not a push. That contradiction is what sent PR chore(deps): fastify-plugin 6, lazy-load cloud SDKs, 100% coverage #6 wrong originally, so leaving it in place would keep costing. Rewritten to describe setup, the review rules on main, and how releases actually work.
  • .gitignore also carried service-template cruft (config/*, !config/dev.yml, data, bin, env) for directories a plugin library does not have.

Deliberately not included

--provenance on publish. It is the natural companion to a lockfile, but GitHub Packages does not accept provenance attestations — adding it would break the publish job, which is the one workflow that cannot be safely tested before it runs for real. Left alone, with a comment recording why.

Verification

rm -rf node_modules && pnpm install --frozen-lockfile succeeds from the committed lockfile, build is clean, and the suite is unchanged at 127 tests, 100% coverage on statements, branches, functions and lines.

Note the workflows take no input from github.event or github.head_ref, so there is no injection surface in the changed files.

Nothing pinned what this package shipped. .gitignore excluded every lockfile and all
three CI jobs ran npm install, so each test run, build and publish resolved fresh from
the registry — the published artifact was never built from a reviewed tree, and a bad
transitive release would land with no diff to show for it. This package runs in every
wms service, so that reproducibility gap matters.

Standardises on pnpm to match the rest of the org, pinned by packageManager, and moves
CI to pnpm install --frozen-lockfile. Node version comes from one env value per
workflow instead of being repeated three times.

CONTRIBUTING said to tag releases with npm version, contradicting the release skill and
the actual publish trigger; rewritten to match how releases really work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@saby1101
saby1101 merged commit 2bc6a6f into fix/filestore-contract Aug 14, 2026
@saby1101
saby1101 deleted the chore/pnpm-lockfile branch August 14, 2026 10:42
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