← Commit history

pup-bridge-debug: add jump-list argv-quoting failure mode and the test-the-real-entry-point-not-a-proxy testing lesson

John Lauer ·ae2f32fa1c ·3mo ago ·parent 60088c8
1 file changed +39
dev-skills/pup-bridge-debug/SKILL.md+39
@@ -107,6 +107,45 @@ the first launch per profile registers a Promise and concurrent callers **JOIN** a second Chrome. **Corollary for callers/AIs:** never spam `browser_open_window` for the same session while it says `bridge_starting`. +## §Jump-list task does NOTHING when clicked (Windows argv quoting, fixed v1.9.9)++**Symptom:** the user clicks a taskbar jump-list task, a cmd window flashes for ~50ms, and nothing+happens. **Cause:** `desktop_set_window_jumplist` task `args` become a COMMAND LINE, and the CLI's+argv parser **STRIPS unescaped double quotes**. Raw JSON args+(`browser_wiki_set_view {"sessionId":"x","view":"authed"}`) therefore arrive as+`{sessionId:x,view:authed}` and the CLI dies instantly:++```+{"error": "Invalid JSON args: key must be a string at line 1 column 2"}    exit 1+```++**Fix:** wrap the JSON in quotes with the inner quotes BACKSLASH-escaped, so argv delivers it as+ONE intact argument. Any jump-list task passing JSON MUST do this:++```js+const taskArgs = (v) => `browser_wiki_set_view "${JSON.stringify({ sessionId, view: v }).replace(/"/g, '\\"')}"`;+// → browser_wiki_set_view "{\"sessionId\":\"wiki-demo\",\"view\":\"authed\"}"+```++**Diagnose it in one shot** — run the task's command line yourself via `shell_execute` and read the+exit code/stderr; a mangled-args failure is obvious and instant.++**Also:** a jump-list click is silent by nature and the pup action behind it can take seconds, so+the user cannot tell a working click from a broken one. Give IMMEDIATE on-screen feedback with+AD's `desktop_caption` (`{text, duration, id, position}` — reuse the same `id` so the "doing it…"+caption is REPLACED by the result caption rather than stacking).++## ⚠ THE TESTING LESSON (this is how the bug above survived to the user)++**Test the ACTUAL entry point the user hits, not a convenient proxy for it.** The wiki toggle was+"verified" by calling `browser_wiki_set_view` directly over the CLI — which bypasses the jump-list+command-line segment where the bug actually lived. The verb worked perfectly every time; the+feature was 100% broken for the user. Directly-invoking the handler proves the DESTINATION works,+never the PATH. For any user-triggered surface (jump-list task, pinned shortcut, protocol handler,+tray item), reproduce the real invocation — run the literal command line, click the real control —+before claiming it works. If you cannot press the control from here, at minimum execute the exact+command line it would run.+ ## The one-paragraph field guide (if you read nothing else)  pup misbehaving → **read `bridge_log_read` first.** Spawn-with-no-reap every ~N seconds = pup