diff --git a/.githooks/pre-push b/.githooks/pre-push index 212a5eba998..73b9011cd90 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -1,6 +1,6 @@ # Agent-only ship gate (humans: no-op). See scripts/agent-pre-push.mjs. # Draft / no PR: free agent push. Ready PR: vp check + typecheck + tests. -# Publish: pnpm pr:ready (not raw gh pr ready). Agent gh shim: .tools/bin/gh. +# Publish: pnpm pr:ready, or raw `gh pr ready` — the shim runs the same gate first. # # Humans: SKIP_AGENT_PREPUSH=1 git push # Agents: never SKIP_AGENT_PREPUSH / never --no-verify @@ -9,4 +9,8 @@ for name in $(git rev-parse --local-env-vars); do unset "$name" done -pnpm exec node scripts/agent-pre-push.mjs +# Plain `node`, not `pnpm exec node`: pnpm runs a dependency-status check first +# and will try to purge node_modules when the lockfile moved (a rebase does it), +# which aborts without a TTY — the hook then fails with a pnpm error instead of +# anything about the gate. The gate puts node_modules/.bin on PATH itself. +node scripts/agent-pre-push.mjs