From de24c6511903592b0fda5a59f55d5993d9086794 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Mon, 21 Sep 2026 22:49:13 -0700 Subject: [PATCH] fix: the build stamp's check must not depend on a title attribute Self-review of the previous commit. The assemble-stamp pattern spelled the whole opening tag, including the title text, so a purely cosmetic edit on ui/shell-polish -- which is rewriting this header right now -- would have failed the assembly with a message about a missing cache-bust stamp. `id` moves last in the tag and the pattern is `id="build-version">TOKEN<`, which still verifies the token is inside that element and nothing else. Re-proved discriminating by injecting the missed substitution: exit 1 with `assemble: refusing to ship; unstamped: .../app/index.html`. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH --- web/assemble.sh | 5 +++-- web/index.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/assemble.sh b/web/assemble.sh index 4f310215..6935bd80 100755 --- a/web/assemble.sh +++ b/web/assemble.sh @@ -12,7 +12,8 @@ # # Usage: web/assemble.sh [OUT_DIR] [CACHE_BUST_TOKEN] # -# The token cache-busts the two generated bundles. Pages serves everything +# The token cache-busts the two generated bundles and names the build in the +# page's own #build-version (improvise-oujb). Pages serves everything # `max-age=600` and the wasm-pack filenames carry no content hash, so for ten # minutes after a deploy a returning visitor runs the PREVIOUS build — which # during improvise-9x6 debugging made a shipped fix look like it had not @@ -84,7 +85,7 @@ sedi "s|'improvise_worker_server_bg\.wasm'|'improvise_worker_server_bg.wasm?v=${ # (improvise-w8ih). Its argument is FILE PATTERN, five times -- the page's own # #build-version among them (improvise-oujb). sh "$root/scripts/assemble-stamp.sh" \ - "$app/index.html" "id=\"build-version\" title=\"Build this page was assembled from\">${token}<" \ + "$app/index.html" "id=\"build-version\">${token}<" \ "$app/app.js" "pkg/improvise_wasm_client.js?v=${token}" \ "$app/worker.js" "worker-pkg/improvise_worker_server.js?v=${token}" \ "$app/pkg/improvise_wasm_client.js" "improvise_wasm_client_bg.wasm?v=${token}" \ diff --git a/web/index.html b/web/index.html index 3d19d84d..619555f6 100644 --- a/web/index.html +++ b/web/index.html @@ -44,7 +44,7 @@ or commit it assembled from (improvise-oujb). A page served straight out of web/ was never assembled and honestly says so. --> - unstamped + unstamped