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:
parent
2928c28044
commit
393499c3ee
6 changed files with 130 additions and 11 deletions
|
|
@ -863,7 +863,30 @@ dispatch() {
|
|||
# double quotes of the pasted command, so a quote, a $ or a backtick here
|
||||
# would be evaluated by the operator's shell. The order BODY has no such
|
||||
# restriction - it never passes through a shell at all.
|
||||
d_full="$d_cmd \"ORDRE $D_ORDER ligger i dette repoets ordrekoe. Gjor dette i rekkefolge: (1) claim den - coord-order-claim $D_ORDER - claim skriver ut hele ordreteksten, som bare bor der. (2) Sammenlign ordren mot STATE.md sin NESTE-blokk og uttal avviket i ditt FORSTE svar. (3) Utfor ordren. (4) Lukk den - coord-order-done $D_ORDER --commit HASH - eller gi den tilbake med --return --reason hvis den ikke kan utfores.\""
|
||||
#
|
||||
# ORDRE 65 (.claude, 2026-08-17): `coord-order-claim`/`coord-order-done`
|
||||
# are not on PATH - only coord-send.sh/coord-inbox.sh/coord-done.sh have
|
||||
# ever been documented as bare names, and only in prose a human reads. This
|
||||
# string lands in argv and a SESSION executes it literally, so the bare
|
||||
# name was command-not-found on step 1, misreadable as "the order does not
|
||||
# exist" (Verifiseringsloven ansikt 4). The fix calls both verbs by the
|
||||
# absolute path SIBLING TO THIS SCRIPT ($SELFDIR, derived from `$0` at
|
||||
# line ~197 - the SAME variable ROUTE already uses), not a literal version
|
||||
# string - so it is correct at EMISSION time for whichever cache path is
|
||||
# actually live then. It does not survive a version bump that lands
|
||||
# between generation and paste: a plan-file form held across a release
|
||||
# can still go stale, exactly like any other path baked into a plan file.
|
||||
#
|
||||
# $SELFDIR lands in the exact same double-quoted position as $D_PROMPT and
|
||||
# $D_ORDER above, both of which are shell-clean-checked before use - an
|
||||
# untrusted value there would let a quote/$/backtick escape the operator's
|
||||
# paste. $SELFDIR is not operator input, but the same guard is cheap
|
||||
# insurance against a mis-installed path with a space in it, so it gets
|
||||
# the identical check rather than a documented exemption.
|
||||
case "$SELFDIR" in
|
||||
*[!A-Za-z0-9/._-]*) echo "board: this script's own directory is not shell-clean, refusing to emit an order-id starter that would break the pasted command: $SELFDIR" >&2; exit 2 ;;
|
||||
esac
|
||||
d_full="$d_cmd \"ORDRE $D_ORDER ligger i dette repoets ordrekoe. Gjor dette i rekkefolge: (1) claim den - kjor bash $SELFDIR/coord-order-claim.sh $D_ORDER - claim skriver ut hele ordreteksten, som bare bor der. FULL STI ER MED VILJE: det bare navnet coord-order-claim er ikke i PATH. (2) Sammenlign ordren mot STATE.md sin NESTE-blokk og uttal avviket i ditt FORSTE svar. (3) Utfor ordren. (4) Lukk den med bash $SELFDIR/coord-order-done.sh $D_ORDER --commit HASH - eller gi den tilbake med --return --reason hvis den ikke kan utfores.\""
|
||||
fi
|
||||
|
||||
if [ "$D_PANE" = "no" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue