From c862cbd731b3650a4d0042a521c9d3cf4c55d254 Mon Sep 17 00:00:00 2001 From: Maleick Date: Sun, 10 May 2026 23:12:30 -0500 Subject: [PATCH] fix: remove hook auto-sync --- hooks/init.sh | 16 ---------------- hooks/stop.sh | 16 ---------------- hooks/verify-package.sh | 16 ---------------- 3 files changed, 48 deletions(-) diff --git a/hooks/init.sh b/hooks/init.sh index 2c1621e..a1311ce 100644 --- a/hooks/init.sh +++ b/hooks/init.sh @@ -4,22 +4,6 @@ set -e -# ── Auto-sync: pull latest plugin code before init ── -if [ -z "${AUTORESEARCH_NO_SYNC:-}" ]; then - repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" - if [ -n "$repo_root" ]; then - cd "$repo_root" || exit 1 - # Only sync if we have a valid git remote (skip temp/policy-test repos) - if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then - sync_gap="$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)" - if [ -n "$sync_gap" ] && [ "$sync_gap" -gt 0 ] 2>/dev/null; then - echo "[autoresearch-sync] $sync_gap commit(s) behind origin/main — pulling..." - git pull origin main >/dev/null 2>&1 || echo "[autoresearch-sync] WARN: git pull failed, continuing with local code" - fi - fi - fi -fi - checklist() { echo "Auto Research checklist:" echo "- If this is a fresh managed run, baseline first, then initialize results/state artifacts." diff --git a/hooks/stop.sh b/hooks/stop.sh index 4f3b375..9717de4 100644 --- a/hooks/stop.sh +++ b/hooks/stop.sh @@ -4,22 +4,6 @@ set -e -# ── Auto-sync: pull latest plugin code before stop ── -if [ -z "${AUTORESEARCH_NO_SYNC:-}" ]; then - repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" - if [ -n "$repo_root" ]; then - cd "$repo_root" || exit 1 - # Only sync if we have a valid git remote (skip temp/policy-test repos) - if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then - sync_gap="$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)" - if [ -n "$sync_gap" ] && [ "$sync_gap" -gt 0 ] 2>/dev/null; then - echo "[autoresearch-sync] $sync_gap commit(s) behind origin/main — pulling..." - git pull origin main >/dev/null 2>&1 || echo "[autoresearch-sync] WARN: git pull failed, continuing with local code" - fi - fi - fi -fi - STATUS_FILE="${AUTORESEARCH_STATE:-.autoresearch/state.json}" WORKSPACE_ROOT="$(pwd -P)" diff --git a/hooks/verify-package.sh b/hooks/verify-package.sh index c8fb93f..f06fab4 100755 --- a/hooks/verify-package.sh +++ b/hooks/verify-package.sh @@ -1,22 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -# ── Auto-sync: pull latest plugin code before verify ── -if [[ -z "${AUTORESEARCH_NO_SYNC:-}" ]]; then - repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" - if [[ -n "$repo_root" ]]; then - cd "$repo_root" || exit 1 - # Only sync if we have a valid git remote (skip temp/policy-test repos) - if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then - sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true) - if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then - echo "[autoresearch-sync] $sync_gap commit(s) behind origin/main — pulling..." - git pull origin main >/dev/null 2>&1 || echo "[autoresearch-sync] WARN: git pull failed, continuing with local code" - fi - fi - fi -fi - TMP_DIR="$(mktemp -d)" trap 'rm -rf "$TMP_DIR"' EXIT