From d1aaaf69c9ffdc9217c9fc15c54670544908a8eb Mon Sep 17 00:00:00 2001 From: donghyeon-ka Date: Sun, 27 Sep 2026 13:20:12 +0900 Subject: [PATCH] test(ci-runner): run fixture gates without pnpm's install check (F-12) The freshness fixtures have a package.json but no node_modules. Started outside pnpm, the gate's pnpm run began an install there and failed with ERR_PNPM_IGNORED_BUILDS instead of testing the gate runner. Co-Authored-By: Claude Opus 5.5 --- tests/system/ci-runner/ci-evidence-freshness.test.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/system/ci-runner/ci-evidence-freshness.test.ts b/tests/system/ci-runner/ci-evidence-freshness.test.ts index f7057563..56d67614 100644 --- a/tests/system/ci-runner/ci-evidence-freshness.test.ts +++ b/tests/system/ci-runner/ci-evidence-freshness.test.ts @@ -6,6 +6,12 @@ import path from "node:path"; import { afterEach, describe, expect, it } from "vitest"; import { loadCiGateContract } from "../../../scripts/contracts/ci-gates.ts"; +import { FIXTURE_PNPM_ENVIRONMENT } from "../../../scripts/lib/fixture-node-modules.ts"; + +// F-12. The temp roots have a package.json but no node_modules or lockfile. +// Run directly (not under pnpm), pnpm's pre-script install check started an +// install there and failed with ERR_PNPM_IGNORED_BUILDS; the gate runner has +// to run the scripts as they are. const temporaryRoots: string[] = []; @@ -58,7 +64,7 @@ describe("CI-runner command-generated evidence freshness", () => { const result = spawnSync( process.execPath, [path.resolve("scripts/run-ci-gate.ts"), "FE-GATE-004"], - { cwd: root, encoding: "utf8", env: { ...process.env, CI: "false" } }, + { cwd: root, encoding: "utf8", env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT, CI: "false" } }, ); expect(result.status).toBe(1); @@ -112,7 +118,7 @@ describe("CI-runner command-generated evidence freshness", () => { const result = spawnSync( process.execPath, [path.resolve("scripts/run-ci-gate.ts"), "FE-GATE-004"], - { cwd: root, encoding: "utf8", env: { ...process.env, CI: "false" } }, + { cwd: root, encoding: "utf8", env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT, CI: "false" } }, ); expect(result.status).toBe(0); @@ -165,7 +171,7 @@ describe("CI-runner gate output budget", () => { { cwd: root, encoding: "utf8", - env: { ...process.env, CI: "false" }, + env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT, CI: "false" }, timeout: 15_000, }, );