colibri/scripts/pre-push
Sam & Claude 4f5876a7ea
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
CI / port (pull_request) Has been cancelled
CI / agent-jail-pkgs (pull_request) Has been cancelled
feat(wiki): mother-hive decisions page + strict lint gate + pre-push hook
- New docs/wiki/mother-hive.md — thin decisions page covering forced-command
  SSH boundary, single-home-in-colibri, hive_nodes rationale, peer auth,
  key-on-seed, and daemon-user design. Links to MOTHER-SETUP.md for setup
  instructions; never duplicates them.
- Flip wiki-lint to --strict in ci-checks.sh — drift failures now block the
  gate the same as clippy warnings. 42 PASS / 0 FAIL, clean since merge.
- New scripts/pre-push — runs ci-checks.sh on every git push to main. Install
  once: ln -sf ../../scripts/pre-push .git/hooks/pre-push. Bypass only with
  --no-verify. Closes the gap that let pi_binary reach main (gate existed but
  nobody was forced through it).
- Updated AGENTS.md, quality-gates.md, and index.md to reflect all three.
2026-06-24 13:26:57 +02:00

30 lines
812 B
Bash
Executable file

#!/bin/sh
# Pre-push hook — run the full gate before allowing a push to main.
#
# Install: ln -sf ../../scripts/pre-push .git/hooks/pre-push
#
# This runs the same checks as ci-checks.sh + wiki-lint --strict.
# If either fails, the push is rejected. The gate is deterministic,
# has no network calls, and completes in under 2 minutes on a warm build.
#
# Bypass (emergency only): git push --no-verify
set -eu
REPO_ROOT="$(git rev-parse --show-toplevel)"
echo "=== pre-push gate ==="
echo ""
cd "$REPO_ROOT"
# Full CI gate (fmt, clippy, test, markdown, wiki-lint --strict)
if ! ./scripts/ci-checks.sh; then
echo ""
echo "PRE-PUSH REJECTED: ci-checks.sh failed."
echo "Fix the failures above, or push with --no-verify (emergency only)."
exit 1
fi
echo ""
echo "=== pre-push gate: PASS ==="