summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Ritter <drew@ritter.dev>2026-09-17 15:48:31 -0700
committerGitHub <noreply@github.com>2026-09-17 15:48:31 -0700
commita2b2d1d5efdc9c24c2faf5577077be152be67cdd (patch)
tree999c39abff49b500c95a780a81c404323cdfa96b
parentb61242d8d030b9f7ac267e8d00d2955663b1b2fb (diff)
parent0be49879b1c51a479d2013a14fe42ed9bd10ce32 (diff)
Merge pull request #2134 from obra/fix/sdd-helpers-no-exec-bit
fix(sdd): invoke sdd-workspace via bash so helpers survive stripped exec bits
-rwxr-xr-xskills/subagent-driven-development/scripts/review-package4
-rwxr-xr-xskills/subagent-driven-development/scripts/task-brief4
-rwxr-xr-xtests/claude-code/test-sdd-workspace.sh15
3 files changed, 21 insertions, 2 deletions
diff --git a/skills/subagent-driven-development/scripts/review-package b/skills/subagent-driven-development/scripts/review-package
index 7af8dbe..fa7625f 100755
--- a/skills/subagent-driven-development/scripts/review-package
+++ b/skills/subagent-driven-development/scripts/review-package
@@ -30,7 +30,9 @@ git merge-base --is-ancestor "$base" "$head" || { echo "HEAD is not a descendant
if [ $# -eq 4 ]; then
out=$4
else
- dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
+ # Invoke via bash rather than direct exec: some extractors (Python zipfile)
+ # strip Unix exec bits when unpacking marketplace packages (#2040).
+ dir=$("${BASH:-bash}" "$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
out="$dir/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
fi
diff --git a/skills/subagent-driven-development/scripts/task-brief b/skills/subagent-driven-development/scripts/task-brief
index 612e14a..b49fc54 100755
--- a/skills/subagent-driven-development/scripts/task-brief
+++ b/skills/subagent-driven-development/scripts/task-brief
@@ -21,7 +21,9 @@ n=$2
if [ $# -eq 3 ]; then
out=$3
else
- dir=$("$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
+ # Invoke via bash rather than direct exec: some extractors (Python zipfile)
+ # strip Unix exec bits when unpacking marketplace packages (#2040).
+ dir=$("${BASH:-bash}" "$(cd "$(dirname "$0")" && pwd)/sdd-workspace" "$plan")
out="$dir/task-${n}-brief.md"
fi
diff --git a/tests/claude-code/test-sdd-workspace.sh b/tests/claude-code/test-sdd-workspace.sh
index 681cba0..b5a4155 100755
--- a/tests/claude-code/test-sdd-workspace.sh
+++ b/tests/claude-code/test-sdd-workspace.sh
@@ -213,6 +213,21 @@ PLAN
echo " status: $wt_status"
fi
+ # --- helpers survive a mode-stripping extractor dropping exec bits (#2040) ---
+ local stripped="$TEST_ROOT/stripped-scripts"
+ mkdir -p "$stripped"
+ cp "$SDD_SCRIPTS/sdd-workspace" "$SDD_SCRIPTS/task-brief" "$SDD_SCRIPTS/review-package" "$stripped/"
+ chmod -x "$stripped"/*
+ local noexec_out noexec_rc=0
+ noexec_out="$(cd "$repo" && bash "$stripped/task-brief" plan-b.md 1 2>&1)" || noexec_rc=$?
+ if [[ "$noexec_rc" -eq 0 && -f "$repo/.superpowers/sdd/plan-b/task-1-brief.md" ]]; then
+ pass "task-brief works with no exec bit on sdd-workspace"
+ else
+ fail "task-brief works with no exec bit on sdd-workspace"
+ echo " rc: $noexec_rc"
+ echo " output: $noexec_out"
+ fi
+
echo ""
if [[ "$FAILURES" -ne 0 ]]; then
echo "FAILED: $FAILURES assertion(s)."