You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rule of thumb (the product requirement, from the fleet's daily use)
The fleet topology is the only proper test rig for Amicode: changes get put through their paces on the real hub (tunnel, frontdoor, shelf, panel) before they merge. Which means the last mile of every agent deploy is the same ceremony: the agent ships the dist, the developer reloads the window they're developing in, the new feature is there. That ceremony must be:
Reliable — reload-the-window picks up the freshly shipped build, no cache surgery, no stale ghosts.
Prompting — the panel tells the developer a new build is live and offers the reload. The agent shouldn't have to nag; the system should know.
Today it is neither — verified live twice this week.
No prompt exists anywhere. The agent's last message has to tell the developer to reload (the deploying campaign's actual last words on 9-24 were "reload your window, open the panel…" — the agent doing the UI's job). Nothing watches the served dist version, so a ship lands silently and the developer discovers it whenever.
Why this is tractable today, with zero hub-side changes
Two facts make the whole lane land in the extension alone:
The extension host's fetches bypass the webview service worker. The SW sits in the webview layer; the host process fetching the panel origin's / gets the true current index.html every time. So the host can reliably detect the served dist's version (its index-<hash>.js asset reference) even while the framed app is stuck on the old one.
The version is already mechanically present: index.html references index-<buildhash>.js. Same derivation the shelf would expose; no service route needed for v1 (a clean GET /amicode/app-version route can be the follow-up nicety).
The design (subsumes #1459's stamping requirement)
packages/extension/src only — a new small module + chat_panel.ts:
Derive (pure): distBuildIdFromIndexHtml(html) → the index-<hash>.js build id, or undefined on no-match (graceful: an unparseable origin doc never breaks anything).
Prompt (the new ceremony): the host polls the same derivation on a slow interval (e.g. every 3 minutes; cheap — one small GET, and pause when the VS Code window is unfocused is a nice-to-have, not required). When the served build id ≠ the id the loaded panel was stamped with, show the information message: "Amicode: a new app build is live (<id>). Reload Window to pick it up." with a Reload Window button → workbench.action.reloadWindow. One prompt per version change (re-prompt only when another new build lands), never a nag loop on the same version.
The re-frame path (origin switches) re-derives and re-stamps so fleet switches get the same guarantee.
Acceptance shape
A freshly shipped dist + Reload Window → the panel runs the new build, no cache surgery — the amicode_build param changed and the frame fetched fresh.
While the panel is open and a new dist ships, the developer receives exactly one prompt with the new build id; clicking reloads the window; declining means no more prompts for that version.
The credential (auth_token) and every existing param survive the stamping.
Unparseable origin docs / fetch failures: no stamp, no prompt, no error surfaced (today's behavior, honestly degraded).
Unit tests on: the derivation (real index.html shapes, the no-match leg), the stamp (param addition, preservation of existing params, both HTML paths), and the change-detection logic (prompt-once-per-version semantics).
#1459 is the stamping half (the cache-bust) — this issue keeps its diagnosis and lands it as part of the full lane, adding the detection + prompt that make it a ceremony rather than a mechanism. Closing this closes #1459's requirement.
The interrupted-session re-dispatch makes the campaign side of deploys survivable; this makes the developer side of deploys effortless. Together they turn the sanctioned bounce + ship into a complete, safe live-test loop: ship → prompt → reload → test.
The rule of thumb (the product requirement, from the fleet's daily use)
The fleet topology is the only proper test rig for Amicode: changes get put through their paces on the real hub (tunnel, frontdoor, shelf, panel) before they merge. Which means the last mile of every agent deploy is the same ceremony: the agent ships the dist, the developer reloads the window they're developing in, the new feature is there. That ceremony must be:
Today it is neither — verified live twice this week.
The evidence
Why this is tractable today, with zero hub-side changes
Two facts make the whole lane land in the extension alone:
/gets the true currentindex.htmlevery time. So the host can reliably detect the served dist's version (itsindex-<hash>.jsasset reference) even while the framed app is stuck on the old one.index.htmlreferencesindex-<buildhash>.js. Same derivation the shelf would expose; no service route needed for v1 (a cleanGET /amicode/app-versionroute can be the follow-up nicety).The design (subsumes #1459's stamping requirement)
packages/extension/srconly — a new small module +chat_panel.ts:distBuildIdFromIndexHtml(html)→ theindex-<hash>.jsbuild id, or undefined on no-match (graceful: an unparseable origin doc never breaks anything).renderHtml+ the transition-HTML path): at panel construction, the host fetches the origin doc, derives the build id, and setsamicode_build=<id>on the iframe src alongside the existing param convention (colorScheme,auth_token,amicode_hide_project, …). A new dist = a new URL = the SW's navigation cache can never serve the old app across ships. The param must not disturb the credential carriage (auth_token) or any existing param. Failure to fetch/parse = no stamp = exactly today's behavior (honest degradation).<id>). Reload Window to pick it up." with a Reload Window button →workbench.action.reloadWindow. One prompt per version change (re-prompt only when another new build lands), never a nag loop on the same version.Acceptance shape
Reload Window→ the panel runs the new build, no cache surgery — theamicode_buildparam changed and the frame fetched fresh.auth_token) and every existing param survive the stamping.Relationship to #1459
#1459 is the stamping half (the cache-bust) — this issue keeps its diagnosis and lands it as part of the full lane, adding the detection + prompt that make it a ceremony rather than a mechanism. Closing this closes #1459's requirement.
Relationship to #1552/#1553
The interrupted-session re-dispatch makes the campaign side of deploys survivable; this makes the developer side of deploys effortless. Together they turn the sanctioned bounce + ship into a complete, safe live-test loop: ship → prompt → reload → test.