← Commit history

CRITICAL: wiki-streamed pup cache copy crashes (no node_modules); document AD-side fix + warn not to outrun the bundled seed

John Lauer ·924fa2995c · ·parent 90d5610
2 files changed +44
HANDOFF-TO-ADOM-DESKTOP.md+28
@@ -115,3 +115,31 @@ These are AD-core-owned (we won't touch them, same as you don't touch pup), so p **Easiest path:** lift the content from the pup bridge's now-canonical publish playbook — `wiki.adom.inc/adom/adom-desktop-puppeteer-bridge` → `dev-skills/pup-bridge-publish.md` (it carries all six points above, battle-tested) — and generalize the pup-specifics into the SDK guide.++---++## ⚠ CRITICAL (found LIVE 2026-06-29): a wiki-streamed pup CACHE copy CRASHES — no node_modules++When AD installs pup from the wiki — `bridge_install {manifestUrl}`, or `refresh_bridges` / the 4h poll+via `updateManifestUrl` — it streams the **source-only** zip into `bridges-cache\puppeteer\` and spawns+`node server.js`, which **immediately crashes**: `MODULE_NOT_FOUND` on `require('puppeteer')` (server.js:10).+The cache copy has **no `node_modules`**, and AD's cache-spawn path does NOT `npm install` it or reuse the+bundled `node_modules`. Because **cache-over-bundled wins, this replaced a working bundled v1.0.16 with a+broken v1.1.0** (verified live on AdomLapper; reverted with `bridge_uninstall`). This is the Node-bridge+analogue of why kicad/fusion (Python, no node_modules) stream fine but pup can't.++**Fix — please do ONE:**++- **(A) PREFERRED — give a cache-installed `spawn.kind:"node"` bridge its node_modules.** On spawn from+  the cache, AD should either (i) `npm install`/`npm ci` in the cache dir first (the bespoke+  `start_browser_bridge` ALREADY does this for the bundled pup — extend it to / route the cache copy+  through it), or (ii) reuse/symlink the bundled `node_modules` into the cache dir. Then wiki-streaming ++  `updateManifestUrl` auto-update works for pup exactly like kicad/fusion.+- **(B) OR keep pup runtime "bundled-only"** (the original model): the bundled-seed bump (handoff #2,+  which KEEPS node_modules) is the runtime delivery; wiki-streaming the runtime stays off and+  `updateManifestUrl` must NOT pull a newer runtime into the cache.++**Until (A) ships: do NOT publish a wiki pup RUNTIME version newer than the AD bundled seed** — any box+with our `updateManifestUrl` persisted would pull the newer source-only zip into the cache and crash. The+**skills pkg is unaffected** (separate path, works). Net for now: ship the pup RUNTIME via the bundled+seed (#2); treat wiki-streaming as blocked on fix (A).
dev-skills/pup-bridge-publish.md+16
@@ -189,3 +189,19 @@ etc. The wiki **auto-generates** the discover snippet from `discovery_triggers` (there is no separate "upload a snippet" — those two fields ARE the snippet). Set them via `adom-wiki discover triggers <ref> --add ...` OR `page.json` `discovery_triggers`/`discovery_pitch` + push. **Verify:** `adom-wiki discover preview "open my app in pup"` should rank this page #1.++## ⚠ Node-bridge gotcha: the cache copy needs node_modules (don't outrun the bundled seed)++pup is a **Node** bridge with heavy native deps (puppeteer, sharp, keytar). The release zip is+SOURCE-ONLY (no node_modules). kicad/fusion (Python) stream fine, but a wiki-streamed pup **cache** copy+**crashes** `MODULE_NOT_FOUND` because AD spawns `node server.js` without installing node_modules (the+bespoke `start_browser_bridge` npm-installs only the BUNDLED copy; the cache copy gets nothing). So:++- **The working runtime delivery for pup is the BUNDLED NSIS seed** (it keeps node_modules). Wiki-stream+  the SKILLS (pkg) freely; the RUNTIME effectively ships with the AD installer until AD is fixed.+- **Do NOT publish a wiki RUNTIME (`src/`) version NEWER than the AD bundled seed** — a box with our+  `updateManifestUrl` persisted would pull the newer source-only zip into the cache and crash (it+  supersedes the good bundled copy). Keep the wiki runtime version == the bundled seed version.+- The real fix is AD-side (give cache-installed node bridges their node_modules — `npm install` the cache+  or reuse the bundled node_modules). Tracked in `HANDOFF-TO-ADOM-DESKTOP.md`. Once it ships, normal+  wiki-streaming + `updateManifestUrl` auto-update works for pup like the other bridges.