From 86a749cac99dfa6752472c9d9fd53dac331f3f8f Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sun, 2 Aug 2026 23:27:03 -0700 Subject: [PATCH] fix(ci): disable package-manager-cache on skip-install setup-node actions/setup-node@v5 defaults package-manager-cache:true, so the agent-browser pack fixture still registered a pnpm store path and failed post-job with Path Validation Error after a successful pack/upload. Explicitly set package-manager-cache:false when skip-install is true. --- .github/actions/setup-node-pnpm/action.yml | 8 ++++++++ packages/cli/src/__tests__/ci-workflow.test.ts | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/.github/actions/setup-node-pnpm/action.yml b/.github/actions/setup-node-pnpm/action.yml index dad7948e5d..b8be91b76c 100644 --- a/.github/actions/setup-node-pnpm/action.yml +++ b/.github/actions/setup-node-pnpm/action.yml @@ -39,6 +39,13 @@ runs: # "Path Validation Error: Path(s) specified in the action for caching do(es) # not exist" and marks an otherwise-successful pack job failed. Only enable # the pnpm store cache when this composite will actually install. + # + # FNXC:CI 2026-08-03-06:26: + # Omitting `cache: pnpm` is NOT enough on actions/setup-node@v5+: the default + # `package-manager-cache: true` still auto-detects the workspace lockfile, registers + # the pnpm store path for post-job save, and red-X's skip-install jobs after a green + # pack (agent-browser-install pack-fixture on PR #3307). Explicitly disable it on the + # no-install path; keep the install path on the explicit `cache: pnpm` contract. - name: Setup Node.js if: ${{ inputs.skip-install != 'true' }} uses: actions/setup-node@v5 @@ -52,6 +59,7 @@ runs: uses: actions/setup-node@v5 with: node-version: ${{ inputs.node-version }} + package-manager-cache: false registry-url: ${{ inputs.registry-url }} - name: Install dependencies diff --git a/packages/cli/src/__tests__/ci-workflow.test.ts b/packages/cli/src/__tests__/ci-workflow.test.ts index 780dfc91a3..823539d8f5 100644 --- a/packages/cli/src/__tests__/ci-workflow.test.ts +++ b/packages/cli/src/__tests__/ci-workflow.test.ts @@ -264,6 +264,11 @@ describe("Merge gate (.github/workflows/pr-checks.yml)", () => { skip-install pack jobs never create a pnpm store; setup-node must not enable cache: pnpm on that path or post-job cache save fails the whole job after a successful pack (agent-browser-install pack-fixture). + + FNXC:CI 2026-08-03-06:26: + setup-node@v5+ also defaults package-manager-cache:true, which reintroduces the + same Path Validation Error even when cache is omitted — pin it false on the + no-install path (PR #3307 agent-browser pack fixture post-step). */ it("disables pnpm store cache when skip-install is true", () => { const setupSteps = (compositeAction.runs?.steps ?? []).filter( @@ -276,6 +281,7 @@ describe("Merge gate (.github/workflows/pr-checks.yml)", () => { expect(withoutCache?.if).toContain("skip-install"); expect(withoutCache?.if).toContain("=="); expect(withoutCache?.with?.cache).toBeUndefined(); + expect(withoutCache?.with?.["package-manager-cache"]).toBe(false); }); it("keeps lint as install + lint only, without Bun/setup build coupling", () => {