fix(orders): narrow the return-reason escape so a plain arrow survives

`sed 's/--*>/-->/g; s/-->/ /g'` rewrote `->` (ONE dash) into `-->` and then
blanked it, so a reason written the way this repo writes prose - "premise ->
dead" - silently lost its arrow. The intent was only to stop a literal `-->`
from closing the trailer's HTML comment early. Replaced with a single
expression matching two-or-more dashes, `s/---*>/ /g`.

Same over-broad-escaping class as the `$`-pattern bug in
pre-state-line-guard.mjs, and invisible for the same reason: the fixture
reason had no arrow. Two checks added - a plain arrow must survive, a literal
`-->` must still be neutralised - so the escape now has both a known-positive
and a known-negative. orders 97 -> 99.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134iB7ipXGgEpv9imYoVmr2
This commit is contained in:
Kjell Tore Guttormsen 2026-08-17 21:24:37 +02:00
commit 6b26b8e94b
4 changed files with 25 additions and 6 deletions

View file

@ -180,7 +180,7 @@ Note that raising the inbox's priority (Rule 7) deliberately does **not** widen
bash scripts/coord-selftest.sh # 220 checks against a throwaway mailbox
bash scripts/board-selftest.sh # 237 checks against a throwaway repo tree
bash scripts/route-selftest.sh # 69 checks, incl. the route->board round trip
bash scripts/orders-selftest.sh # 97 checks, incl. the 20-way barriered claim race
bash scripts/orders-selftest.sh # 99 checks, incl. the 20-way barriered claim race
bash scripts/state-line-guard-selftest.sh # 40 checks, incl. the Edit replace_all projection and the ratchet
npm test # all five selftests plus the hook tests, via node --test