← Commit history

v2.0.254: Stop re-fetching a favicon that does not exist. 2.0.229 bounded the SUMMARY log line but not the work or the two rail-failure lines beneath it, so every overlay re-assert on a faviconless page re-ran BOTH network rails (a 5s-timeout node fetch plus a CDP fetch) and logged two more lines, forever. Measured live on ConfRoomROG: those three lines filled the entire log tail and degraded a real investigation, the exact trap the icon-audit skill warns about. Adds a per-origin negative cache (30 min, capped at 500 origins), cleared the moment an origin serves a real icon.

John Lauer ·942321aaf2 ·2mo ago ·parent f88a1c8
4 files changed +28−9
adom-bridge-puppeteer-manifest.json+5−5
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "2.0.253",-  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.253/adom-bridge-puppeteer-v2.0.253.zip",-  "sha256": "caa0eee49279d29b20d114f024e7137292e974a3166f3d5bb0f4a4f64bc73df4",-  "size": 951552,+  "version": "2.0.254",+  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.254/adom-bridge-puppeteer-v2.0.254.zip",+  "sha256": "c8a45e166b20d017ef4de185961f5a9e2d84f76279d710d7d2f6bbcdb91630db",+  "size": 952082,   "verbPrefixes": [     "browser_",     "desktop_recorder_",@@ -12,5 +12,5 @@   ],   "healthEndpoint": "/status",   "statusVerb": "browser_readiness",-  "released_at": "2026-08-20T10:26:50.108980Z"+  "released_at": "2026-08-20T10:51:28.907780Z" }
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-2.0.253\ No newline at end of file+2.0.254\ No newline at end of file
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "2.0.253",+  "version": "2.0.254",   "description": "Drives a browser ALREADY on the machine \u2014 installed Chrome, else Microsoft Edge (every Windows PC ships with Edge) \u2014 launched with a FRESH isolated profile, so the common case has NO ~150 MB Chrome-for-Testing download and it never touches the user's real tabs/logins. Binds its local server to LOOPBACK (127.0.0.1) only, so no Windows Firewall 'allow Node through the firewall' prompt ever pops. Chrome for Testing is fetched only as a LAST RESORT if the machine has no Chromium browser at all. SPAWN-VERIFIED fallback: pup tries each detected browser (Chrome \u2192 Edge \u2192 CfT) and actually launches it, falling through to the next if one won't start (and handling browsers like Edge that relaunch onto another PID), so a corrupt/partial install never hard-fails an open. The browser that launches is cached as the default (persisted across restarts) so it isn't re-probed each time. On spawn the bridge SELF-WARMS: detects browsers + disk, and only if the box has no Chrome/Edge and no cached CfT does it background-fetch CfT so the first open is instant. pup_use pins a specific browser (chrome | edge | cft | auto); {browser:'chrome',install:true} downloads & installs REAL Google Chrome (user-scoped, no admin) on an Edge-only box. pup_readiness (READ-ONLY) reports which browser will be used + the full candidate list + the default + free disk. Every failure returns a specific errorCode + _hint (chrome_install_no_disk, chrome_download_network, chrome_install_permission, chrome_stable_not_detected, \u2026). Launches with FULL browser permissions by default for full debug (strictPermissions:true opts out). Headful automation: open/close windows+tabs, navigate, screenshot, eval JS, record. pup is a GENERIC, non-profile browser only \u2014 every session is a fresh isolated Chrome/Edge process, never the user's real signed-in browser; profile defaults to sessionId. To drive the user's REAL Chrome/Edge (their profile, cookies, SSO), use the Adom browser EXTENSION's nbrowser_* verbs \u2014 a separate bridge, not pup's job. macOS (v1.9.74+): full parity with mac-native mechanics \u2014 background-by-default is the app-level hide (windows stay drivable/screenshottable while hidden), raise/lower map to unhide+activate/hide, pup_alert_window posts a native toast whose click focuses the window, pup_use {browser:'chrome',install:true} installs Chrome from the official dmg, and taskbar identity/badging remains Windows-only.",   "homepage": "https://wiki.adom.inc/adom/adom-bridge",   "author": "Adom Inc.",
src/server.js+21−2
@@ -3222,6 +3222,13 @@ async function forceActivateHwnd(hwnd) {  // v1.9.181: cached session hwnds so periodic sweeps don't call AD's find_window per session per tick. // TTL 10 min; a stale hwnd just fails a foreground match harmlessly and refreshes on the next miss.+// v2.0.254: origins whose /favicon.ico failed on BOTH rails -> ts of that failure. Suppresses the+// re-fetch (and its log lines) for 30 min. Capped so a long-lived pup can't accumulate origins.+const _faviconNegCache = new Map();+function _faviconNegRemember(origin) {+  _faviconNegCache.set(origin, Date.now());+  if (_faviconNegCache.size > 500) { for (const k of [..._faviconNegCache.keys()].slice(0, 200)) _faviconNegCache.delete(k); }+} const _hwndCache = new Map();     // sessionId -> { hwnd, ts } async function cachedSessionHwnd(sessionId) {   const c = _hwndCache.get(sessionId);@@ -6309,7 +6316,15 @@ async function applyAppOverlay(session, sessionId) {         try {           let _u9 = ''; try { _u9 = (activePage && activePage.url()) || ''; } catch (e) {}           const _o9 = (() => { try { const u = new URL(_u9); return /^https?:$/.test(u.protocol) && !/^(localhost|127\.)/.test(u.hostname) ? u.origin : null; } catch (e) { return null; } })();-          if (_o9) {+          // v2.0.254: NEGATIVE CACHE per origin. 2.0.229 bounded the SUMMARY line (_bothRailsLogKey)+          // but not the work or the two rail-failure lines beneath it, so every overlay re-assert on a+          // faviconless page re-ran BOTH network fetches (a 5s-timeout node fetch + a CDP fetch) and+          // logged two more lines, forever. Measured live on ConfRoomROG 2026-08-20: three lines per+          // pass filled the entire log tail — the exact "the diagnosis died with it" trap the icon-audit+          // skill warns about, and it degraded a real investigation. One attempt per origin per 30 min.+          if (_o9 && _faviconNegCache.get(_o9) > Date.now() - 30 * 60000) {+            // known faviconless — fall straight through to the generic glyph, silently+          } else if (_o9) {             const _icoUrl = _o9 + '/favicon.ico';             const _tryIcon = async (buf, mime, rail) => {               if (!buf || buf.length <= 100) return false;@@ -6339,7 +6354,11 @@ async function applyAppOverlay(session, sessionId) {               if (_cb) _got = await _tryIcon(_cb, null, 'via-Chrome-CDP');               else console.log(`[overlay] "${sessionId}" via-Chrome-CDP favicon fetch returned nothing for ${_icoUrl}`);             }-            if (!_got && session._bothRailsLogKey !== _u9) { session._bothRailsLogKey = _u9; console.log(`[overlay] "${sessionId}" favicon fetch failed on BOTH rails for ${_o9} — generic it is`); }+            if (_got) _faviconNegCache.delete(_o9);+            else {+              _faviconNegRemember(_o9);+              if (session._bothRailsLogKey !== _u9) { session._bothRailsLogKey = _u9; console.log(`[overlay] "${sessionId}" favicon fetch failed on BOTH rails for ${_o9} — generic it is; not retrying this origin for 30 min`); }+            }           }         } catch (e) { console.log(`[overlay] "${sessionId}" favicon fallback threw: ${e && e.message}`); }       }