← Commit history

selftest: T5/T6 assert against the LIVE mode from pup_status at check time (user may flip states mid-run); T5 now catches plain-mode key minting (found the jumplist registration hole fixed in 2.0.220)

John Lauer ·da641fd1ee ·2mo ago ·parent 2969cec
1 file changed +14−4
tools/selftest.sh+14−4
@@ -56,15 +56,17 @@ PY else bad "could not capture the scroll pair"; fi  echo "== T5 IDENTITY KEY: own window gets a pup AUMID registry key (mode-aware) =="+MODE=$(timeout 40 $CLI pup_status '{}' 2>&1 | J "(d.get('settings') or {}).get('taskbarMode') or 'unknown'")+echo "  (live taskbarMode at check time: $MODE — the user may flip it mid-run, that is legitimate)" # In tiles mode the key is the thread AUMID (…thread.pup-selftest…); in aumid mode it is the # per-window category id (Adom.Pup.st-web.…). Either proves the stamp/registry path. In plain # mode there is deliberately no key, so pass with a note. Never flip the user's mode to test. sleep 20 KEY=$(timeout 60 $CLI shell_execute '{"command":"reg query HKCU\\Software\\Classes\\AppUserModelId /s /f Adom.Pup 2>nul | findstr /i \"pup-selftest st-web st-tall\"","reason":"selftest: pup AUMID key present (thread or category)"}' 2>&1 | J "bool((d.get('stdout') or '').strip())")-if [ "$KEY" = "True" ]; then ok "pup AUMID registry key exists for the selftest window (thread or category form)"+if [ "$MODE" = "plain" ]; then+  [ "$KEY" = "True" ] && bad "plain mode but pup AUMID keys EXIST for the selftest window (strip hole)" || ok "plain mode: correctly NO pup AUMID key for the selftest window" else-  MODE_OFF=$(timeout 40 $CLI pup_status '{}' 2>&1 | J "'plain-hint'")-  bad "no pup AUMID key for the selftest window (stamp/registry path broken, unless the box is in plain mode)"+  [ "$KEY" = "True" ] && ok "pup AUMID registry key exists for the selftest window ($MODE mode)" || bad "no pup AUMID key for the selftest window in $MODE mode (stamp/registry path broken)" fi  echo "== T6 JUMP LIST: commit log line for the thread AUMID exists =="@@ -74,7 +76,15 @@ JL=$(timeout 60 $CLI bridge_log_read '{"name":"puppeteer","tail":600}' 2>&1 | py import sys,json d=json.load(sys.stdin); log=str(d.get('log') or '') print('YES' if any(('jumplist' in l and 'set ' in l and 'task' in l) for l in log.splitlines()[-600:]) else 'NO')")-[ "$JL" = "YES" ] && ok "jump-list commits present in log" || bad "no jump-list commit lines (menus will be bare Pin/Close — John's screenshot bug)"+MODE6=$(timeout 40 $CLI pup_status '{}' 2>&1 | J "(d.get('settings') or {}).get('taskbarMode') or 'unknown'")+if [ "$MODE6" = "plain" ]; then ok "plain mode at check time: no pup AUMIDs, jump lists correctly quiet"+elif [ "$JL" = "YES" ]; then ok "jump-list commits present in log"+else+  # plain mode has NO pup AUMIDs, so zero commits is the CORRECT outcome — detect it by the registry+  PK=$(timeout 60 $CLI shell_execute '{"command":"reg query HKCU\\Software\\Classes\\AppUserModelId /f Adom.Pup /k 2>nul","reason":"selftest: any pup AUMID keys registered?"}' 2>&1 | J "('Adom.Pup' in (d.get('stdout') or ''))")+  if [ "$PK" = "False" ]; then ok "plain mode (zero pup AUMID keys): no jump lists to commit — correctly quiet"+  else bad "no jump-list commit lines despite registered pup AUMIDs (menus will be bare Pin/Close — John's screenshot bug)"; fi+fi  echo "== T7 ENUM RATE: lastMin sane; steady-state near zero ==" E1=$(timeout 40 $CLI pup_status '{}' 2>&1 | J "(d.get('enumWindows') or {}).get('total',-1)")