Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions hooks/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@

set -e

Comment on lines 4 to 6
# ── 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."
Expand Down
16 changes: 0 additions & 16 deletions hooks/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Comment on lines 4 to 9
Expand Down
16 changes: 0 additions & 16 deletions hooks/verify-package.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading