From 1da906aef61ae692133aae611e71ed576b08d30f Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 19:37:41 +0200 Subject: [PATCH] job4: fix toggle-external logical cd (BLK-006 class) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPO resolution changed from a logical `cd` to `cd -P` (BLK-006 class: direct invocation via a symlinked path โ€” the real ~/.claude/lib -> /lib layout โ€” was resolving REPO to the symlink's logical parent instead of the physical repo root). Combined with the REPO seam (ยง3.2): TOGGLE_EXTERNAL_REPO_OVERRIDE env var, same pattern as the other SEAMS-bundle files, zero other logic change (diff is one line). Closes J4-20 (UNTESTABLE + latent bug). Previous commit ("test toggle-external logical cd (red)") proved the bug live via the new lib/tests/toggle-external-repo-resolution.test.sh: `status emil-design-eng` through a symlinked path reported "missing" instead of "enabled". This commit turns that test green. Verified: shellcheck clean, bash -n clean, `bash lib/toggle-external.sh list` against the real repo unchanged (gstack/emil-design-eng/ darwin-skill/magic enabled, find-skills missing โ€” matches prior state). GREEN: full `make test` exit 0, including the new test (1/1). --- lib/toggle-external.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/toggle-external.sh b/lib/toggle-external.sh index 44e5023..23bfefb 100755 --- a/lib/toggle-external.sh +++ b/lib/toggle-external.sh @@ -31,7 +31,7 @@ # ============================================================ set -euo pipefail -REPO="$(cd "$(dirname "$0")/.." && pwd)" +REPO="${TOGGLE_EXTERNAL_REPO_OVERRIDE:-$(cd -P "$(dirname "$0")/.." && pwd)}" SKILLS_DIR="$REPO/skills" DISABLED_DIR="$REPO/skills-disabled"