[object Object]

← back to Terminal Status

Fix --all broadcast footgun when label precedes --all flag (TK-11936)

199e1563cd02f5596291de50c1af5b5ba2b011ab · 2026-09-20 04:20:25 -0700 · Steve Abrams

Before a1139e9 forwarded $@ to the engine, mode=${1:-} was the only --all
check. With $@ forwarding, a call like 'purpledot.sh "label" --all claude'
put the label in $mode (no --all match), fell to *), and forwarded --all raw
to the engine — which broadcast the caller label to every live session.

Fix: scan all remaining args for --all before the paint() dispatch so the
--all branch always fires regardless of argument order.

Files touched

Diff

commit 199e1563cd02f5596291de50c1af5b5ba2b011ab
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun Sep 20 04:20:25 2026 -0700

    Fix --all broadcast footgun when label precedes --all flag (TK-11936)
    
    Before a1139e9 forwarded $@ to the engine, mode=${1:-} was the only --all
    check. With $@ forwarding, a call like 'purpledot.sh "label" --all claude'
    put the label in $mode (no --all match), fell to *), and forwarded --all raw
    to the engine — which broadcast the caller label to every live session.
    
    Fix: scan all remaining args for --all before the paint() dispatch so the
    --all branch always fires regardless of argument order.
---
 integrations/dot.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/integrations/dot.sh b/integrations/dot.sh
index 563b228..76016cf 100644
--- a/integrations/dot.sh
+++ b/integrations/dot.sh
@@ -29,6 +29,10 @@ run() {  # run the engine, under a hard outer timeout when one is available
 }
 
 mode="${1:-}"
+# Mechanism-A footgun fix (TK-11936): --all intercept regardless of arg position.
+# Before a1139e9, only ${1:-} was checked; with $@ forwarding, --all in any position
+# reached the engine as a raw arg and silently broadcast the caller's label fleet-wide.
+for _a in "$@"; do case "$_a" in --all) mode=--all; break;; esac; done
 paint() {  # one dispatch of the requested subcommand; called again on auto-force retry
   case "$mode" in
     --off) run clear ;;

← c1b8135 stop_verdict: read last_assistant_message + background_tasks  ·  back to Terminal Status  ·  Narrow the CHILD_SESSION paint guard so a bridge session tha 5933ea1 →