#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Pre-Push Hook: Validate Critical Infrastructure
# Runs before pushing to remote to catch deployment-breaking issues

echo "🔍 Running pre-push validation checks..."

# Run smoke tests for critical paths
echo "💨 Running critical path smoke tests..."
if ! npm run test:smoke 2>&1 | grep -q "PASS"; then
  echo "❌ Smoke tests failed - fix before pushing"
  exit 1
fi
echo "✓ Smoke tests passed"

echo "✅ All pre-push validation checks passed!"
exit 0
