From a1811e74a0d3606516b161c28afaaff4a5a160d1 Mon Sep 17 00:00:00 2001 From: Jake Ruesink Date: Thu, 5 Feb 2026 15:39:49 -0600 Subject: [PATCH] fix(ralph): resolve verify-hooks repo root via git --- .devagent/plugins/ralph/tools/verify-hooks-e2e.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.devagent/plugins/ralph/tools/verify-hooks-e2e.sh b/.devagent/plugins/ralph/tools/verify-hooks-e2e.sh index 8f7979a4..ba34d2c6 100755 --- a/.devagent/plugins/ralph/tools/verify-hooks-e2e.sh +++ b/.devagent/plugins/ralph/tools/verify-hooks-e2e.sh @@ -2,15 +2,18 @@ # E2E verification for --on-iteration and --on-complete: run ralph with both hooks # (same script appends all payloads to one file) and verify iteration + completion payloads. # -# Requires (run from repo root): +# Requires: # - Git repo with .git and branch feature/ralph-iteration-hooks # - Beads DB with epic devagent-iteration-hooks and at least one ready task # - RALPH_MAX_ITERATIONS=1 is used (env override) so one iteration + completion run -# Usage: from repo root: .devagent/plugins/ralph/tools/verify-hooks-e2e.sh +# Usage: .devagent/plugins/ralph/tools/verify-hooks-e2e.sh set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../.." && pwd)" +if ! REPO_ROOT="$(git -C "${SCRIPT_DIR}/../../../../.." rev-parse --show-toplevel 2>/dev/null)"; then + echo "Error: Unable to resolve repo root from ${SCRIPT_DIR}" >&2 + exit 1 +fi cd "$REPO_ROOT" OUT_FILE="$(mktemp)"