Skip to content

fix: docs visitors retain outdated diagrams after updates - #296

Merged
roboclaw-bot merged 1 commit into
mainfrom
fix/docs-pele-runtime-cache-20261101
Nov 1, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
fix/docs-pele-runtime-cache-20261101

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes returning docs visitors continuing to run Pele 1.6 after the installed renderer was updated to 1.10, because both builds reused a one-year immutable asset URL.

User Impact

Returning visitors receive the renderer shipped with the current docs build. No dependency, cache-policy, security-setting, or content changes.

Why This Change Was Made

Give the compiler bundle a content-hashed name, owned by one build-time module and consumed by asset writing, browser import, and smoke validation. This follows the existing Glimm/web-vitals pattern and removes the stale fixed filename and silent missing-package copy path. The small production addition is required to share that identity; browser regressions independently protect legacy-cache avoidance in Chromium and WebKit.

Evidence

  • Real generated architecture page reproduced the defect: after changing the server from 1.6 to 1.10, Chromium made only one immutable-asset request and retained 1.6 bytes.
  • Two committed cache regressions failed before the repair and pass afterward; parent independently reran all four diagram-rendering browser tests: 4/4 passed.
  • 24 focused tests passed; bounded 30-page English preview and Chromium visual/PJAX smoke passed. Chromium and WebKit production home/architecture pages checked at desktop, portrait, and landscape sizes.
  • Fresh isolated Codex P0–P3 autoreview: scoped-clean; syntax and whitespace checks passed.
  • Gap: stock WebKit visual smoke on /__elements received HTTP 400 from the secret-egress proxy. Separate WebKit production-page and focused browser proof passed; no safeguard was bypassed.
  • Upstream dark-theme/light-fill contrast correction remains separate, awaiting the dependency cooldown decision. This PR does not consume it or overlap Dependabot Bump the development group across 1 directory with 2 updates #295.

Inspected before/after

Returning visitor with cached 1.6 runtime → current installed 1.10 runtime. No dependency upgrade.

Mobile before:
Mobile before — cached renderer

Mobile after:
Mobile after — current renderer

Desktop before:
Desktop before — cached renderer

Desktop after:
Desktop after — current renderer

Credit

Requested by @vincentkoc; Vincent Koc is credited in the commit.

Work sessions

Content-address the immutable Pele bundle and share its name between the generated shell, asset writer, and smoke check. Keep the installed dependency unchanged.

Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 1, 2026 02:53
@roboclaw-bot
roboclaw-bot requested a review from a team as a code owner November 1, 2026 02:53
function resetMermaidBlock(block,source){block.dataset.mermaidReady="";block.classList.remove("is-rendered","is-error");block.innerHTML="<pre><code>"+escapeHtml(source)+"</code></pre>"}
async function renderMermaidSvg(source,renderId){
const pele=await (mermaidReady??=import(withBase("/assets/pele-1.6.0.js")));
const pele=await (mermaidReady??=import(withBase(${JSON.stringify("/assets/" + peleAssetName)})));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on exact head 85d7661: this is a false positive, not an untrusted-code construction path. pele-runtime.mjs derives the interpolated filename solely as pele- + SHA-256 bytes encoded with digest("hex").slice(0, 12) + .js; package/source text never enters the JavaScript string. site-js.mjs then JSON-encodes the fixed /assets/ prefix and that digest-only filename. Independently checked the producer output against ^pele-[0-9a-f]{12}\.js$ and the real generated import: /assets/pele-bb01f8b243c8.js. There is no attacker-controlled delimiter or executable source to sanitize here. No suppression or security-setting change is needed.

@roboclaw-bot
roboclaw-bot merged commit e57b613 into main Nov 1, 2026
4 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/docs-pele-runtime-cache-20261101 branch November 1, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants