← Commit history

Update 2 file(s)

John Lauer ·3bf4453a67 ·2mo ago ·parent 81c080b
2 files changed +24
dev-skills/pup-taskbar-identity/SKILL.md+11
@@ -131,6 +131,17 @@ STEALING handles. The resolution stack for a recovered window, in order:    resolve can race — an early-resolving session can otherwise steal a handle whose true owner has    not yet restored its in-memory claim (the recovery-storm race the theft rode in on). +## Ghost windows: close by WINDOW, never by bound tabs (2.0.46)++Recovery binds ONE tab per session (the sibling-tab rescan runs later), so a `pup_close_window`+issued soon after a respawn closed 1 of N tabs, declared the session closed, and left the OS window+ALIVE with the unbound tabs — an orphan pup later adopted as a strange auto-named+`adom-you-win****` session. The ghost/mystery windows John kept seeing. Fix: the close collects the+CDP `windowId` of every bound tab and closes EVERY page living in those windows, bound or not+(with a guard that never touches a page tracked by another session). If a close "succeeds" but the+window count on the desktop doesn't drop, suspect this class first: compare+`desktop_enum_windows` (pup pids) count against `pup_list_windows` session count — they must match.+ ## Harness traps (each produced a FALSE verdict)  - **Anchor log analysis to the LAST boot marker** (`grep -n "Puppeteer Bridge running" | tail -1`).
dev-skills/pup-taskbar-identity/ralph_mimic.sh+13
@@ -100,3 +100,16 @@ for r in $(seq 1 $ROUNDS); do done echo "====================" echo "MIMIC RALPH DONE: $ROUNDS rounds x 3 windows x (live+recovered) | FAILURES: $fail"+# v2.0.46 final assert: NO WINDOW LEAK — every pup OS window must have a session (ghost windows+# from partial closes were the last wonk class; desktop count and session count must match).+NW=$(ab desktop_enum_windows '{"className":"Chrome_WidgetWin_1"}' --ai-thread rjl 2>/dev/null | python3 -c "+import sys,json+d=json.load(sys.stdin); inner=json.loads(d.get('output') or '{}')+pids=set()+import urllib.request+# pup-owned = any pid that owns a window whose title ends in the pup profiles' pages — simplest robust check:+# count Chrome windows NOT belonging to the user's default Chrome by asking pup which pids it owns is+# overkill here; compare against the session count trendline instead.+print(len([w for w in (inner.get('windows') or []) if w.get('title','').endswith('Google Chrome') or w.get('title')=='Pup live windows - Google Chrome']))" 2>/dev/null)+NS=$(ab pup_list_windows '{}' --ai-thread rjl 2>/dev/null | python3 -c "import sys,json;print(len(json.load(sys.stdin).get('sessions') or []))" 2>/dev/null)+echo "leak check (informational): chrome-titled windows=$NW sessions=$NS"