fix(orders): call the order-verbs by absolute path, not bare PATH names

board.sh's --dispatch --order-id thin starter told a dispatched session
to run `coord-order-claim <id>` / `coord-order-done <id> ...` literally.
Neither is on PATH, so step one was command-not-found - easy to misread
as "the order does not exist" (Verifiseringsloven ansikt 4).

Measuring the denominator beyond the one line the order named found the
same defect in two more emitters that hand a session its own next-step
text: coord-order-inbox.sh's SessionStart injection (every pending/claimed
order, not only dispatched ones) and coord-order-claim.sh's own WHEN DONE
/ IF YOU CANNOT lines. All three now call the verb via $SELFDIR (derived
from $0's directory, correct at emission time), and board.sh's interpolation
of it is shell-clean-guarded like the other two values sharing its
double-quoted position - reachability proven with a copy of board.sh run
from a space-containing path, not asserted.

board-selftest 239->246, orders-selftest 99->104. CLAUDE.md counts and a
new F-paragraph updated to match.

ORDRE 20260817T213139Z-643032142-from-.claude

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019syEQHvw2jf1dTR4bUPKRG
This commit is contained in:
Kjell Tore Guttormsen 2026-08-18 09:16:59 +02:00
commit 393499c3ee
6 changed files with 130 additions and 11 deletions

View file

@ -22,6 +22,14 @@
set -u
export LC_ALL=C
# ORDRE 65 follow-on (.claude, 2026-08-17): the WHEN DONE / IF YOU CANNOT
# lines below are handed directly to the CLAIMING session as its own
# next-step instruction - the same bare-verb-name defect the order named in
# board.sh's dispatch starter. SELFDIR mirrors that fix: derived from where
# THIS script is running FROM ($0's directory), correct at the moment it
# prints, for whichever install location is live then.
SELFDIR="$(cd "$(dirname "$0")" && pwd)"
COORD="${CLAUDE_COORD_DIR:-$HOME/.claude/coord}"
REPO=""; NEXT=0; ORDER_ID=""
@ -98,8 +106,8 @@ echo "coord-order-claim: CLAIMED $ORDER_ID for $REPO. This order is yours until
echo "BEFORE YOU START: read this repo's STATE.md NESTE block and compare it with the order below."
echo "If they are different tasks, say so in your FIRST reply, in one line:"
echo " \"order $ORDER_ID displaces NESTE <what NESTE says>; <that> stands as next after\"."
echo "WHEN DONE: coord-order-done $ORDER_ID --commit <hash> (or --no-commit --reason \"<why>\")"
echo "IF YOU CANNOT: coord-order-done $ORDER_ID --return --reason \"<why>\" - it goes back to the queue."
echo "WHEN DONE: bash $SELFDIR/coord-order-done.sh $ORDER_ID --commit <hash> (or --no-commit --reason \"<why>\")"
echo "IF YOU CANNOT: bash $SELFDIR/coord-order-done.sh $ORDER_ID --return --reason \"<why>\" - it goes back to the queue."
echo "--- order $ORDER_ID ---"
cat "$CLAIMED/$ORDER_ID.md"
echo "--- end of order $ORDER_ID ---"