Explorar el Código

fix(e2e): gate tmux ownership on creation success

Make the copyable recipe independent of ambient set -e behavior. A failed tmux new-session now reports the failure and exits while session_owned is still false; only a successful creation reaches the ownership assignment.

A real collision reproduced the prior snippet killing its sentinel after marking a failed creation as owned. The guarded version preserved the exact sentinel identity, and three refined fresh-agent runs again preserved IDs 17, 18, and 19 while cleaning only their fallback sessions.
Drew Ritter hace 1 mes
padre
commit
602ba17888
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      skills/agentic-end-to-end-testing/driving-cli-tui.md

+ 4 - 1
skills/agentic-end-to-end-testing/driving-cli-tui.md

@@ -19,7 +19,10 @@ cleanup() {
 }
 trap cleanup EXIT
 
-tmux new-session -d -s "$session" -x 200 -y 50 "<cmd> 2>\"$stderr_log\""
+if ! tmux new-session -d -s "$session" -x 200 -y 50 "<cmd> 2>\"$stderr_log\""; then
+  echo "failed to create tmux session: $session" >&2
+  exit 1
+fi
 session_owned=1
 tmux send-keys -t "$session" -l "literal text"   # -l = no key-name parsing (paths, slashes)
 tmux send-keys -t "$session" Enter