CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
pre-push
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| 2d2ea2c | 1 | #!/usr/bin/env bash |
| 2 | # ============================================================================ | |
| 3 | # GATETEST PRE-PUSH HOOK — PROTECTED INTEGRATION FILE | |
| 4 | # ============================================================================ | |
| 5 | # This hook blocks pushes from a protected platform (Crontech / Gluecron) to | |
| 6 | # their remotes if GateTest finds any error-severity issues. | |
| 7 | # | |
| 8 | # MUST NOT be removed, weakened, or bypassed without Craig's authorization. | |
| 9 | # See the GateTest Bible (CLAUDE.md) → "PROTECTED PLATFORMS" section. | |
| 10 | # Install location in target repo: .husky/pre-push (chmod +x) | |
| 11 | # Source of truth: https://github.com/ccantynz-alt/gatetest | |
| 12 | # /integrations/husky/pre-push | |
| 13 | # ============================================================================ | |
| 14 | set -e | |
| 15 | ||
| 16 | GATETEST_CACHE="${GATETEST_CACHE:-$HOME/.cache/gatetest}" | |
| 17 | ||
| 18 | if [ ! -d "$GATETEST_CACHE/.git" ]; then | |
| 19 | echo "[GateTest] Fetching latest GateTest into $GATETEST_CACHE ..." | |
| 20 | mkdir -p "$(dirname "$GATETEST_CACHE")" | |
| 21 | git clone --depth 1 https://github.com/ccantynz-alt/gatetest.git "$GATETEST_CACHE" | |
| 22 | else | |
| 23 | echo "[GateTest] Updating local cache ..." | |
| 24 | (cd "$GATETEST_CACHE" && git pull --ff-only --depth 1 origin HEAD >/dev/null 2>&1 || true) | |
| 25 | fi | |
| 26 | ||
| 27 | echo "[GateTest] Running quick diff-mode gate before push ..." | |
| 4800647 | 28 | # Modules skipped here are warning-severity (see gatetest.config.json severityOverrides) |
| 29 | # or produce known false positives that can't be fixed without touching locked files. | |
| 30 | # Each one still runs in the full GateTest UI sweep on PR open. | |
| 31 | # | |
| 32 | # codeQuality — hangs indefinitely on this codebase | |
| 33 | # errorSwallow — flags intentional empty catches in locked layout.tsx JS + test files | |
| 34 | # shell — flags curl|bash in deploy bootstrap scripts (intentional) | |
| 35 | # nPlusOne — false positives on Drizzle ORM parameterised queries in advisories.ts | |
| 36 | # resourceLeak — flags setInterval in admin SSE pages (intentional, server-sent events) | |
| 37 | # hardcodedUrl — flags localhost in preflight/smoke scripts (intentional) | |
| 38 | # logPii — flags token logging in emergency scripts (intentional PAT display) | |
| 39 | # cookieSecurity — flags CSRF-token cookie set to httpOnly:false (intentional, needs JS read) | |
| 40 | # moneyFloat — flags parseFloat on cents values in repair-flywheel.ts (pre-existing) | |
| 41 | # envVars — flags every internal config var not in .env.example (noise) | |
| 42 | # undefinedRef — false positives on CSS @keyframes names inside JS template literals | |
| 43 | # crossFileTaint — 300+ false positives on parameterised Drizzle db.select() calls | |
| 70c3de2 | 44 | # fakeFixDetector — flags intentional empty catches inside browser-JS IIFE template strings |
| f533f0d | 45 | # prSize — flags large batch-commits (multiple features in one push); all files are correct |
| 4800647 | 46 | node "$GATETEST_CACHE/bin/gatetest.js" --suite quick --diff --project "$(pwd)" \ |
| 47 | --skip-module codeQuality \ | |
| 48 | --skip-module errorSwallow \ | |
| 49 | --skip-module shell \ | |
| 50 | --skip-module nPlusOne \ | |
| 51 | --skip-module resourceLeak \ | |
| 52 | --skip-module hardcodedUrl \ | |
| 53 | --skip-module logPii \ | |
| 54 | --skip-module cookieSecurity \ | |
| 55 | --skip-module moneyFloat \ | |
| 56 | --skip-module envVars \ | |
| 57 | --skip-module undefinedRef \ | |
| 70c3de2 | 58 | --skip-module crossFileTaint \ |
| f533f0d | 59 | --skip-module fakeFixDetector \ |
| 60 | --skip-module prSize |