Skip to content

ui: pin the fork's UI bundle by version and recorded sha256; drop the moving latest fallback (card aecdb2f2) - #148

Merged
joelteply merged 2 commits into
codex/s4-per-mind-integrationfrom
fable/ui-bundle-pinned
Nov 17, 2026
Merged

joelteply merged 2 commits into
codex/s4-per-mind-integrationfrom
fable/ui-bundle-pinned

Conversation

@joelteply

Copy link
Copy Markdown

Unblocks every fork PR that builds llama-server (e.g. #147). Upstream's latest UI bundle dropped workbox[hash].js on 2026-11-17 and the fork's llama-ui-embed refuses it, while the fork's build number names no upstream bundle (b1, 404).

  • Pin: b10909, with sha256 e549e4cc01c0312d3fffdf6d4e431bb84c294a95ddf10fa40c8c643fc5f6a776 recorded in tools/ui/CMakeLists.txt. An explicit HF_UI_VERSION env still overrides.
  • No moving fallback: the latest candidate is gone. A recorded hash must match the bucket's file and the archive. A recorded bundle that can't be provisioned fails the step; it never silently builds without the UI.

Measured (M5, 2026-11-17 ~15:00Z)

  • tools/ui/embed.cpp (single file, clang++ -O1, nice 19) run against both bundles: b10909 embeds (rc 0); latest fails (rc 1, missing workbox[hash].js).
  • cmake -P scripts/ui-assets.cmake: the recorded hash provisions and writes ui.cpp (rc 0); a wrong recorded hash refuses and fails the step (rc 1, no ui.cpp).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… moving "latest" fallback

Card aecdb2f2. Every fork PR that builds llama-server failed at the UI step on 2026-11-17: a fork checkout's
LLAMA_BUILD_NUMBER (1) names no upstream bundle (b1 is 404), so ui-assets fell back to "latest", and upstream's
latest (sha256 2ecfaa5a..) dropped workbox[hash].js, which this fork's llama-ui-embed requires ("missing required
asset(s): workbox[hash].js", embed rc 1). The branch had passed hours earlier: "latest" moved underneath it.

- tools/ui: the bundle is b10909 with its sha256 recorded here (e549e4cc..), never derived from a build number. An
  explicit HF_UI_VERSION env still overrides (verified against the bucket's own .sha256, as before).
- ui-assets.cmake: one named version, no "latest" candidate; a recorded sha256 must match the bucket's file and the
  archive; a recorded bundle that cannot be provisioned fails the step instead of building without the UI.

Measured on the M5 (single-file compile of tools/ui/embed.cpp at nice 19, then `cmake -P scripts/ui-assets.cmake`):
b10909 embeds (rc 0); latest fails the embed (rc 1, missing workbox); the recorded hash provisions and writes
ui.cpp (rc 0); a wrong recorded hash refuses and fails the step (rc 1, no ui.cpp).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… only after verification

Codex's review of 0c33ab3: a warm cache was reused on stamp == version and index.html alone, so a cache from
before a digest was recorded, or a changed pin with the same version, skipped the new hash check. The stamp is now
"<version> sha256=<recorded digest>" (the version alone when no digest is recorded), compared before reuse and
written only after hf_download verified the archive.

Measured on the M5 (cmake -P scripts/ui-assets.cmake, one binary dir): cold provisions and writes the receipt
(rc 0); warm with the same pin reuses with no fetch (rc 0); an old version-only stamp fetches and verifies again
(rc 0); a changed digest over a valid cache fetches, refuses the mismatch and fails the step (rc 1, receipt not
overwritten). The expanded tree is not re-hashed per build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 3494952 into codex/s4-per-mind-integration Nov 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant