Skip to content

Fix CI setup and remove the expiring GitHub Packages token - #366

Merged
rsslldnphy merged 2 commits into
mainfrom
fix-ci-pnpm-store-path
Oct 1, 2026
Merged

rsslldnphy merged 2 commits into
mainfrom
fix-ci-pnpm-store-path

Conversation

@rsslldnphy

@rsslldnphy rsslldnphy commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

CI has been red since 3 May, for two independent reasons. This fixes both, and removes the need to ever rotate GH_PACKAGES_TOKEN again.

CI is green on this branch — run 36929994407, the first passing build since May. Publish Preview Packages passes too.

1. The build died during setup

##[error]Unable to process file command 'env' successfully.
##[error]Invalid format '/home/runner/setup-pnpm/node_modules/.bin/store/v3'

pnpm store path --silent now resolves under PNPM_HOME and emits output >> $GITHUB_ENV won't accept. This started with the actions/setup-node v6 → v7 bump in 6334e95.

The step set STORE_PATH, which nothing in any workflow reads — leftover from a cache step that no longer exists, since cache: "pnpm" on setup-node handles the store itself. Removed rather than repaired.

Why it wasn't caught: CI only triggered on packages/**, and both action bumps touched only .github/**, so CI never ran on the change that broke it. .github/workflows/ci.yml is now in the trigger paths, so the workflow validates its own changes.

2. Install failed on an expired PAT

ERR_PNPM_FETCH_401  GET https://npm.pkg.github.com/download/@casekit/unindent/... Unauthorized

@casekit/unindent was the only non-workspace @casekit dependency, pinned to a GitHub Packages preview build (0.0.0-gh-packages.634dab0). GitHub Packages' npm registry requires a token for every download, public or private — unlike the container registry, there is no anonymous access. So that single dependency put an expiring PAT in the path of every install, in CI and locally.

It is also published to public npm, and 1.0.5 is byte-identical to the pinned preview (index.js, unindent.js and both .d.ts files diff clean). So this repoints the registry rather than changing the version:

  • the four deps move to ^1.0.5
  • the @casekit scope registry comes out of .npmrc, so the scope resolves from npmjs
  • NODE_AUTH_TOKEN comes out of the install step in all three workflows
  • packages: read comes off the CI job, which no longer reads packages

Verified locally by installing with NODE_AUTH_TOKEN and NPM_TOKEN stripped from the environment: --frozen-lockfile succeeds, no npm.pkg.github.com tarballs remain in the lockfile, and tests, typecheck and lint all pass.

Publishing is unaffected. Each package carries its own publishConfig.registry, and publish-preview authenticates its publish step with GITHUB_TOKEN, which is minted per run and never expires. Only the install steps ever used the PAT.

Action for the maintainer

GH_PACKAGES_TOKEN is now referenced nowhere and can be deleted rather than rotated.

One thing worth checking before merge

This moves the monorepo from a build of casekit/unindent@634dab0 to npm 1.0.5. The outputs are identical today, so nothing changes — but if that commit carries unreleased work, cut a real release first and bump to it here.

Unblocks #365, which was red only because of these two failures.

🤖 Generated with Claude Code

The build job has failed at "Get pnpm store directory" since
actions/setup-node was bumped to v7: `pnpm store path --silent` now
resolves under PNPM_HOME and emits output that `>> $GITHUB_ENV` rejects
with "Invalid format".

The step sets STORE_PATH, which nothing in any workflow reads — it is
left over from a cache step that no longer exists, since `cache: "pnpm"`
on setup-node handles the store itself. Removing it rather than
repairing it.

CI also only triggered on `packages/**`, so it never ran on the action
bumps that broke it. Adding its own path so changes to the workflow are
validated by it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: cc2baa12-e586-44e0-88b1-29432b3c97b2

📥 Commits

Reviewing files that changed from the base of the PR and between 6334e95 and 7051696.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • .github/workflows/deploy-docs.yml
  • .github/workflows/publish-preview.yml
  • .npmrc
  • packages/orm-cli/package.json
  • packages/orm-migrate/package.json
  • packages/orm/package.json
  • packages/sql/package.json
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@rsslldnphy

Copy link
Copy Markdown
Member Author

Verified on this PR's own CI run (36928282099):

  • CI ran at all on a workflow-only change, which it would not have before the path addition.
  • Setup Node.js now completes and the job reaches Install dependencies — the Get pnpm store directory failure is gone.
  • Install dependencies fails with the expected ERR_PNPM_FETCH_401 on @casekit/unindent.

So the workflow bug is fixed and the remaining red is solely the expired GH_PACKAGES_TOKEN, which needs rotating in repo settings before CI can go green.

CI's install failed with ERR_PNPM_FETCH_401 on @casekit/unindent because
secrets.GH_PACKAGES_TOKEN had expired. GitHub Packages npm requires a
token for every download, public or private, so that one dependency put
an expiring PAT in the path of every install — in CI and locally.

unindent was the only non-workspace @casekit dependency, pinned to a
GitHub Packages preview build. It is also published to public npm, and
1.0.5 is byte-identical to the pinned preview, so this repoints the
registry rather than changing the version.

Dropping the @casekit scope registry from .npmrc lets the scope resolve
from npmjs, and the PAT comes out of all three workflows' install steps.
Publishing is unaffected: each package carries its own
publishConfig.registry, and publish-preview authenticates its publish
step with GITHUB_TOKEN, which is minted per run and never expires.

GH_PACKAGES_TOKEN is now referenced nowhere and can be deleted rather
than rotated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

  • orm-cli: 96.85%
  • orm-migrate: 94.02%
  • orm: 98.41%
  • sql: 97.03%
  • toolbox: 100%

@rsslldnphy rsslldnphy changed the title Fix CI build setup failing at pnpm store path Fix CI setup and remove the expiring GitHub Packages token Oct 1, 2026
@rsslldnphy
rsslldnphy merged commit a086fbd into main Oct 1, 2026
15 checks passed
@rsslldnphy
rsslldnphy deleted the fix-ci-pnpm-store-path branch October 1, 2026 21:51
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