openvibers/openvibe.games Commits

Untrack committed nodemodules symlinks and ignore them in git

OP OpenVibers committed 3 Oct 2026 · 67bcdb731c · 10 files, +35 −8

Asked: OpenVibe.Games PR #1 ("Run Games' vitest files through test/run.js so ov test can shard them"). Its head was 1cae50b, and GitHub CI was green 3/3 on it. Then 882f831 was pushed to this branch (around 10:14 UTC today), and GitHub CI's `test / test` job now fails after 15 s on 882f831 (gitleaks and t…
Harness job task-Games-openvibe-games-pr-1-run-102420.

Changes

ddiff --git a/.gitignore b/.gitignore
iindex d18be7d..8ed0853 100644
---- a/.gitignore
++++ b/.gitignore
@@@ -1,4 +1,7 @@
--node_modules/
++# No trailing slash: pnpm can leave a project's node_modules a symlink, and git does not call a
++# symlink a directory, so `node_modules/` would not ignore it — `git add -A` then commits it and
++# CI checks it out dangling, where pnpm install dies before any test runs.
++node_modules
dist/
dist-types/
*.tsbuildinfo
ddiff --git a/apps/client/node_modules b/apps/client/node_modules
ddeleted file mode 120000
iindex 0b556b4..0000000
---- a/apps/client/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/apps/client/node_modules
\\ No newline at end of file
ddiff --git a/apps/server/node_modules b/apps/server/node_modules
ddeleted file mode 120000
iindex 3496642..0000000
---- a/apps/server/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/apps/server/node_modules
\\ No newline at end of file
ddiff --git a/apps/server/scripts/repoHygiene.test.ts b/apps/server/scripts/repoHygiene.test.ts
nnew file mode 100644
iindex 0000000..1e82f28
---- /dev/null
++++ b/apps/server/scripts/repoHygiene.test.ts
@@@ -0,0 +1,28 @@
++import { execFileSync } from 'node:child_process'
++import { existsSync } from 'node:fs'
++import { dirname, join } from 'node:path'
++import { fileURLToPath } from 'node:url'
++import { describe, expect, it } from 'vitest'
++
++/**
++ * Repository hygiene: no `node_modules` is tracked.
++ *
++ * pnpm can leave a project's `node_modules` as a symlink — the agent worktrees point theirs at a
++ * sibling checkout. `.gitignore` spells the rule without the trailing slash because git does not
++ * treat a symlink as a directory, so `node_modules/` would leave those symlinks visible to
++ * `git add -A`. One committed by accident reaches CI as a dangling link, and
++ * `pnpm install --frozen-lockfile` then dies in linkDirectDepsOfProject with ENOENT before a single
++ * test runs. The ignore rule keeps them out; this is what fails if one is tracked anyway.
++ */
++
++const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..')
++
++describe('repository hygiene', () => {
++ it('tracks no node_modules', () => {
++ if (!existsSync(join(ROOT, '.git'))) return // an exported copy has no index to check
++ const tracked = execFileSync('git', ['ls-files', '-z'], { cwd: ROOT, encoding: 'utf8' })
++ .split('\0')
++ .filter(Boolean)
++ expect(tracked.filter((path) => path.split('/').includes('node_modules'))).toEqual([])
++ })
++})
ddiff --git a/packages/content/node_modules b/packages/content/node_modules
ddeleted file mode 120000
iindex 44a09a9..0000000
---- a/packages/content/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/packages/content/node_modules
\\ No newline at end of file
ddiff --git a/packages/gameplay/node_modules b/packages/gameplay/node_modules
ddeleted file mode 120000
iindex f8f4113..0000000
---- a/packages/gameplay/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/packages/gameplay/node_modules
\\ No newline at end of file
ddiff --git a/packages/persistence/node_modules b/packages/persistence/node_modules
ddeleted file mode 120000
iindex 9357878..0000000
---- a/packages/persistence/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/packages/persistence/node_modules
\\ No newline at end of file
ddiff --git a/packages/physics/node_modules b/packages/physics/node_modules
ddeleted file mode 120000
iindex d899574..0000000
---- a/packages/physics/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/packages/physics/node_modules
\\ No newline at end of file
ddiff --git a/packages/protocol/node_modules b/packages/protocol/node_modules
ddeleted file mode 120000
iindex edc90fd..0000000
---- a/packages/protocol/node_modules
++++ /dev/null
@@@ -1 +0,0 @@
--/mnt/120gb/openvibe-worktrees/OpenVibe.Games-agent-games-follow-up-of-https-github-com-open-081839-mus4ed3w-finish/packages/protocol/node_modules
\\ No newline at end of file
ddiff --git a/test/apps__server__scripts__repoHygiene.test.js b/test/apps__server__scripts__repoHygiene.test.js
nnew file mode 100644
iindex 0000000..d08029b
---- /dev/null
++++ b/test/apps__server__scripts__repoHygiene.test.js
@@@ -0,0 +1,3 @@
++// file: 'apps/server/scripts/repoHygiene.test.ts'
++// covers: 'apps/server/scripts'
++// Generated by node test/run.js --index; do not edit.