문제: fixture-node-modules 시험의 F-4는 「개발자 PC에서 설치한
node_modules를 CI=true인 fixture가 다시 설치한다」는 위험을 재현하려고
설치 env에서 CI만 지운다. pnpm은 CI 말고도 GITEA_ACTIONS·
GITHUB_ACTIONS 같은 벤더 변수로 CI를 알아챈다. 그래서 Gitea runner
job에서는 두 설치가 같은 설정이 되어 재설치가 일어나지 않고, 시험이
changed=false로 실패한다. FE-GATE-005와 복사본 안에서 같은 시험을 도는
FE-GATE-020이 runner에서만 빨갛다(run 56·80·81).
고른 방법: 설치 env에 CI=false를 준다. pnpm(ci-info)은 CI가
"false"이면 다른 변수를 보지 않는다. 벤더 변수 목록을 지우는 방법은
버렸다. 목록이 pnpm 버전마다 다르고 새 runner가 나오면 다시 깨진다.
위험·한계: pnpm이 CI=false를 무시하게 바뀌면 다시 실패한다. 그때는
runner에서 같은 모양으로 드러난다.
검증(desktop, 38c0dc7d):
- 수정 전, GITEA_ACTIONS=true GITHUB_ACTIONS=true CI=true: rc=1
- 수정 뒤, 같은 env: rc=0 / CI=true만: rc=0 / CI 없음: rc=0
pnpm verifies the install before a script, and a fixture running it with
CI=true against an install made without CI saw other settings and installed
through the linked .pnpm and .bin, rewriting the shared lock.yaml and shims.
Every fixture pnpm run now turns that check off; a test pins it for all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A copied state file still named the repository as the validated project,
so pnpm inside a fixture re-verified and started an install through the
linked package directories.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Linking every top-level entry also linked .pnpm-workspace-state-v1.json,
so pnpm running inside a fixture rewrote the repository's own install
state. Top-level files are now copied; directories stay symlinks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four fixtures linked the installed dependencies into a throwaway root with a
single directory symlink at <fixture>/node_modules, then ran pnpm inside that
root. pnpm does not recognise the modules directory it finds there and purges
it; with CI=true it does so without a prompt. The purge followed the symlink and
deleted the repository's own node_modules mid-run, so a test suite uninstalled
the workspace it was running in. That is what produced the cascading,
file-unrelated failures a full test:unit run reported, and it happened twice
while running the suites for the adapter re-review.
scripts/lib/fixture-node-modules.ts replaces all four sites: node_modules is a
real directory whose entries are individual symlinks, so a recursive delete
unlinks the fixture's own links instead of walking through one link into the
shared tree. Resolution is unchanged.
tests/unit/fixture-node-modules.test.ts performs the exact recursive delete pnpm
performs and asserts the source tree survives, and check:adapter-inventory now
fails on any reintroduction of the directory-symlink form — verified by putting
the old line back and watching the gate reject it.
A full tests/unit + tests/integration run now leaves the dependencies intact.
removal-fixture, supply-chain and security-followup-archive, the three suites
that had to be excluded before, pass in that run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>