From 0ec1c643fa5cfcb996266423013de2b553eb0c95 Mon Sep 17 00:00:00 2001 From: sol Date: Mon, 2 Nov 2026 05:03:54 +0000 Subject: [PATCH] sol: fix CHECK gate path resolution --- .../sol/CHECK-working-tree-triage-2026-11-02 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wizard-work/sol/CHECK-working-tree-triage-2026-11-02 b/wizard-work/sol/CHECK-working-tree-triage-2026-11-02 index 5c803a0..d123255 100755 --- a/wizard-work/sol/CHECK-working-tree-triage-2026-11-02 +++ b/wizard-work/sol/CHECK-working-tree-triage-2026-11-02 @@ -1,9 +1,14 @@ #!/usr/bin/env bash # CHECK -- sol: working-tree triage (modified tracked files vs HEAD). -# Exit 0 iff the committed manifest re-derives from each recorded path and every -# frozen path still exists as a real file under the repo. +# Exit 0 iff the committed manifest re-derives from each recorded path and +# every frozen path still exists as a real file under the repo. set -u -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -REPO_ROOT="$(cd "$SCRIPT_DIR" && pwd)" -cd "$REPO_ROOT" || exit 2 + +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# Resolve the repo root (this script may live inside wizard-work/sol/ or at the +# repo root, so walk up to the directory that holds .git). +ROOT="$(git -C "$HERE" rev-parse --show-toplevel 2>/dev/null)" \ + || { echo "CANNOT GRADE: no git toplevel above $HERE" >&2; exit 2; } +cd "$ROOT" || { echo "CANNOT GRADE: cannot cd to $ROOT" >&2; exit 2; } + exec python3 wizard-work/sol/verify_working_tree_triage_2026_11_02.py