fix(coord-send): drop the ~/.claude fallback in the skill's own script path
A Bash tool call never has CLAUDE_PLUGIN_ROOT set as a real shell variable --
only the skill's own markdown rendering resolves that bare token -- so the
${CLAUDE_PLUGIN_ROOT:-$HOME/.claude} fallback silently won every time the
engine line was actually executed, routing through whatever the operator's
personal ~/.claude/scripts/coord-send.sh happened to be instead of the
plugin's own bundled script. Same defect class board.sh was already fixed
for; coord-send still had it. Reported live by org-ops (2026-07-31): a
--fyi send hit an old deployed copy lacking the flag.
coord-selftest.sh grows three checks (156 -> 159) pinning the SKILL.md
engine line and ruling the fallback out entirely.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJMJanRHkUhEf9EYxMpbM5
This commit is contained in:
parent
dffc1f5e47
commit
34f263cf28
2 changed files with 32 additions and 5 deletions
|
|
@ -681,6 +681,27 @@ check "done: a named close is deliberate already and stays quiet" $?
|
|||
/bin/rm -rf "$DDIR" 2>/dev/null
|
||||
/bin/rm -rf "$RDIR" 2>/dev/null
|
||||
|
||||
# Section 28: coord-send/SKILL.md's own script-path expression must carry no
|
||||
# fallback, matching the fix board.sh already shipped for the identical defect
|
||||
# class. A Bash tool call never has CLAUDE_PLUGIN_ROOT set (only the harness's
|
||||
# markdown rendering resolves it, and only for the bare ${CLAUDE_PLUGIN_ROOT}
|
||||
# token) - so a `${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}` fallback silently wins
|
||||
# every time the skill's engine line is actually executed, routing through
|
||||
# whatever the operator's personal ~/.claude/scripts/ copy happens to be
|
||||
# instead of the plugin's own bundled script. Reproduced live 2026-07-31: an
|
||||
# org-ops session hit an old deployed coord-send.sh lacking --fyi even though
|
||||
# the plugin cache had it. Fails loud (empty path) instead of failing silent.
|
||||
CSKILL="$DIR/../skills/coord-send/SKILL.md"
|
||||
[ -f "$CSKILL" ]; check "coord-send SKILL.md is where the selftest expects it" $?
|
||||
|
||||
grep -q 'CSEND="\${CLAUDE_PLUGIN_ROOT}/scripts/coord-send.sh"' "$CSKILL"
|
||||
check "coord-send SKILL.md's engine line has no ~/.claude fallback" $?
|
||||
|
||||
# Scoped to the CSEND assignment itself, not the surrounding prose - the fix's
|
||||
# own explanation has to be able to quote the broken pattern to warn against it.
|
||||
if grep -q 'CSEND=.*CLAUDE_PLUGIN_ROOT:-' "$CSKILL"; then rc=1; else rc=0; fi
|
||||
check "coord-send SKILL.md's CSEND assignment carries no fallback" "$rc"
|
||||
|
||||
echo "----"
|
||||
echo "PASS=$PASS FAIL=$FAIL"
|
||||
[ "$FAIL" -eq 0 ]
|
||||
|
|
|
|||
|
|
@ -37,11 +37,17 @@ Coordination content is also private: it never belongs on a public surface.
|
|||
|
||||
## The engine
|
||||
|
||||
Resolve the script path portably — this one expression is correct both when the
|
||||
skill runs bundled inside the plugin and when the scripts are installed as
|
||||
personal scripts under `~/.claude/scripts/`:
|
||||
CSEND="${CLAUDE_PLUGIN_ROOT}/scripts/coord-send.sh"
|
||||
|
||||
CSEND="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}/scripts/coord-send.sh"
|
||||
There is no deployed copy anywhere else and no fallback path. A Bash tool call
|
||||
never has `CLAUDE_PLUGIN_ROOT` set as a real shell variable — only this
|
||||
skill's own rendering resolves the token — so a `${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}`
|
||||
fallback silently wins every time the line above is actually executed,
|
||||
routing through whatever the operator's personal `~/.claude/scripts/` copy
|
||||
happens to be instead of the plugin's own bundled script. That copy is real
|
||||
and intentional (the operator's own terminal aliases point at it) but it is
|
||||
updated on its own schedule, so it can be stale. If this fails to resolve,
|
||||
the fix is this expression — never a restored fallback.
|
||||
|
||||
Interface (body comes from a quoted heredoc so nothing in it is shell-expanded):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue