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
|
|
@ -66,7 +66,13 @@ r2="$("$READ" --repo fake-repo)"; rc=$?
|
|||
printf '%s' "$r2" | grep -q "2 pending"; check "read reports the pending count" $?
|
||||
printf '%s' "$r2" | grep -q "order one"; check "read shows the subject" $?
|
||||
printf '%s' "$r2" | grep -q "dispatcher"; check "read shows the sender" $?
|
||||
printf '%s' "$r2" | grep -q "coord-order-claim $oid1"; check "read gives a per-order claim hint" $?
|
||||
# ORDRE 65 follow-on (2026-08-17): this is the SessionStart injection - the
|
||||
# same bare-name defect the order named in board.sh's dispatch starter also
|
||||
# lived here, and arguably worse: it fires on every session with a pending
|
||||
# order, not only a dispatched one (this is the literal text this session saw
|
||||
# at its own start). Pinned by absolute path, exactly like board.sh's fix.
|
||||
printf '%s' "$r2" | grep -qF "bash $DIR/coord-order-claim.sh $oid1"; check "read gives a per-order claim hint by an ABSOLUTE script path, not a bare PATH name" $?
|
||||
printf '%s' "$r2" | grep -Eq "(^|[^./])coord-order-claim $oid1"; [ $? -ne 0 ]; check "read: no bare, un-pathed coord-order-claim invocation survives the injection" $?
|
||||
# The order body is deliberately NOT injected: an order can be a full session
|
||||
# prompt, and the queue view has to stay readable at session start. The text
|
||||
# arrives at claim time, from the one place it lives.
|
||||
|
|
@ -94,6 +100,12 @@ c3="$("$CLAIM" --repo fake-repo "$oid1" 2>&1)"; rc=$?
|
|||
[ "$rc" -eq 0 ]; check "claim exits 0" $?
|
||||
printf '%s' "$c3" | grep -q "do the thing"; check "claim prints the full order body" $?
|
||||
printf '%s' "$c3" | grep -q "NESTE"; check "claim instructs the D-check against STATE's NESTE" $?
|
||||
# ORDRE 65 follow-on: the claim's own "WHEN DONE"/"IF YOU CANNOT" lines are the
|
||||
# THIRD live emitter of the same bare-name defect - the text handed directly
|
||||
# to the claiming session as its own next-step instruction.
|
||||
printf '%s' "$c3" | grep -qF "WHEN DONE: bash $DIR/coord-order-done.sh $oid1 --commit"; check "claim's WHEN DONE line calls coord-order-done.sh by an ABSOLUTE script path" $?
|
||||
printf '%s' "$c3" | grep -qF "IF YOU CANNOT: bash $DIR/coord-order-done.sh $oid1 --return"; check "claim's IF YOU CANNOT line calls coord-order-done.sh by an ABSOLUTE script path" $?
|
||||
printf '%s' "$c3" | grep -Eq "(^|[^./])coord-order-done $oid1"; [ $? -ne 0 ]; check "claim output: no bare, un-pathed coord-order-done invocation" $?
|
||||
[ ! -e "$of1" ]; check "claimed order leaves the pending queue" $?
|
||||
[ -f "$CLAUDE_COORD_DIR/fake-repo/orders/claimed/$oid1.md" ]; check "claimed order lands in orders/claimed" $?
|
||||
|
||||
|
|
@ -109,7 +121,8 @@ check "re-claiming an already claimed order exits 1" $?
|
|||
r3="$("$READ" --repo fake-repo)"
|
||||
printf '%s' "$r3" | grep -q "1 claimed"; check "read reports the claimed count" $?
|
||||
printf '%s' "$r3" | grep -q "CLAIMED"; check "read shows a claimed order as in flight" $?
|
||||
printf '%s' "$r3" | grep -q "coord-order-done $oid1 --return"; check "read gives the return hint for a claimed order" $?
|
||||
printf '%s' "$r3" | grep -qF "bash $DIR/coord-order-done.sh $oid1 --return"; check "read gives the return hint for a claimed order by an ABSOLUTE script path" $?
|
||||
printf '%s' "$r3" | grep -Eq "(^|[^./])coord-order-done $oid1 --return"; [ $? -ne 0 ]; check "read: no bare, un-pathed coord-order-done invocation survives the in-flight hint" $?
|
||||
|
||||
# --next takes the oldest pending order, so a session never has to parse the
|
||||
# queue to obey it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue