Skip to content

Commit 68b3eb7

Browse files
committed
Include marginalia modules in HTML cache version digest
Editing src/marginalia.py (figure registry, attachments) or src/marginalia_grammar.py (Canvas grammar) changes runtime HTML output, but they were absent from html_version()'s content_paths. The Worker's in-memory HTML cache would serve stale figures after a deploy. Add both files to the digest so the cache version moves whenever either changes. Verified: a probe edit to src/marginalia.py now flips HTML_CACHE_VERSION; removing the probe restores it. https://claude.ai/code/session_01MazwoRWAihW6dwso3fMCHE
1 parent 7f29652 commit 68b3eb7

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/fingerprint_assets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def html_version(paths: dict[str, str]) -> str:
4141
ROOT / "src" / "examples.py",
4242
ROOT / "src" / "example_loader.py",
4343
ROOT / "src" / "example_sources_data.py",
44+
ROOT / "src" / "marginalia.py",
45+
ROOT / "src" / "marginalia_grammar.py",
4446
ROOT / "src" / "example_sources" / "manifest.toml",
4547
*sorted((ROOT / "src" / "example_sources").glob("*.md")),
4648
*sorted((ROOT / "src" / "templates").glob("*.html")),

src/asset_manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Generated by scripts/fingerprint_assets.py. Do not edit by hand.
22
ASSET_PATHS = {'SITE_CSS': '/site.5ef8f1332e43.css', 'SYNTAX_JS': '/syntax-highlight.3b6c7f730d46.js', 'EDITOR_JS': '/editor.dd81f5171b14.js'}
3-
HTML_CACHE_VERSION = '6de2b0323aeb'
3+
HTML_CACHE_VERSION = '2b27886b2818'

0 commit comments

Comments
 (0)