Keep the demo's engine pin from going stale again, and name the version the arcade needs - #654
Merged
Merged
Conversation
…reen The GitHub Pages demos load the library from jsDelivr at an exact version, and they were still pinned to the release before 11.0.0. On that engine the arcade's DOOM cartridge does everything except the part you can see: the WebAssembly engine boots, plays and logs, replaceImage succeeds, and the 320x200 frame really is in the .docx (Save and reopen shows it) — but the incremental single-block render that repaints the frame paragraph cloned the block's XML into a throwaway shell with neither a copy of the referenced media part nor an image handler, so WmlToHtmlConverter correctly omitted the w:drawing and the paragraph refreshed blank. The library fix shipped in 11.0.0; what was left was the pin. Every pin moves together: the six demo pages, docs/demo/README.md, docs/npm-package.md, npm/README.md, npm/examples/embed.html, the copy-pasteable CDN examples in npm/src/embed.ts and npm/src/index.ts, and RELEASE_ENGINE in npm/tests/social-demo.spec.ts. Verified that jsDelivr serves docxodus@11.0.0/dist/embed.bundle.js before moving them. A stale pin is invisible to the browser specs — every arcade and social spec overrides ?engine= to the locally built bundle, which is why this reached production green. So the pin is now tested on its own, offline, in docs/demo/tools/engine-pin.test.mjs (wired into npm run test:demo-logic, and so into every Playwright run's pretest): it fails when the pins disagree with each other, when they fall below the arcade's newly exported IMAGE_ENGINE_MINIMUM — the oldest engine whose incremental render carries an inline image — or when RELEASE_ENGINE drifts from the pages it guards. Under DOCXODUS_CHECK_CDN=1 it also asks jsDelivr whether the pinned bundle is actually published, which is the failure mode of re-pinning ahead of a release. Both failure paths were exercised by temporarily reverting a pin and by raising the minimum. paintImage keeps its capability probe for anyone who points ?engine= at an older engine, and now names the required version from that constant instead of a hardcoded literal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG
main re-pinned the demo site to docxodus@11.0.0 in parallel (f8e347b), so this merge keeps that commit's wording for the arcade row in docs/demo/README.md and keeps this branch's addition to the Publish section, which documents the new pin guard. Everything else merged cleanly; what this branch still contributes on top of main is the offline pin test (docs/demo/tools/engine-pin.test.mjs), the IMAGE_ENGINE_MINIMUM constant that paintImage's halt message now reads, the CDN examples in npm/src, and the CHANGELOG entry. npm run test:demo-logic passes on the merge result (29 assertions across the five suites). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG
main picked up four nullable-annotation fixes (#656-#659), which collided with this branch only in CHANGELOG.md: both sides appended to the same `### Fixed` list under `[Unreleased]`. Kept every entry, main's bug fixes first and this branch's demo-pin entry after them. npm run test:demo-logic passes on the merge result (29 assertions across the five suites). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG
main picked up the FormattingAssembler nullable-annotation fixes (#675), which collided with this branch only in CHANGELOG.md: both sides appended to the same `### Fixed` list under `[Unreleased]`. Kept every entry, main's bug fixes first and this branch's demo-pin entry after them. npm run test:demo-logic passes on the merge result. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG
main picked up the NoWarn-list retirement and the CS8073 bug fixes (#676), which collided with this branch only in CHANGELOG.md: both sides appended to the same `### Fixed` list under `[Unreleased]`. Kept every entry, main's bug fixes first and this branch's demo-pin entry after them. npm run test:demo-logic passes on the merge result. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG
JSv4
pushed a commit
that referenced
this pull request
Sep 4, 2026
The release cut is the reason this merge needed hands. main emptied [Unreleased] into a 12.0.0 section, and git's auto-merge put this demo's entry back at the position that text now occupies -- inside the released section, where it would have claimed the demo shipped in a version it is not in. Moved it back under [Unreleased], and dropped the Office Math entry that came with it, because that one did ship in 12.0.0 and would otherwise appear twice. Re-pinned docs/demo/redline.html from 11.0.0 to 12.0.0. The release re-pins every sibling demo page but not this one, since this one is not on main yet; what is new is that #654's engine-pin guard globs docs/demo/*.html and requires them all to name one version, so a stale pin here is now a failing check rather than a quiet inconsistency. Confirmed jsDelivr actually serves 12.0.0 before moving it. The README conflict was the same event seen from the other side: seven pages (this branch adds one) at the new pin. #697 fixes the comparison timeout that made the last CI run red. That failure was #693's, bisected and filed as #695; the fix warms the WASM engine before the first real comparison rather than touching the aligner, so my guess at the cause in that issue was wrong even though the bisect was right. Verified here: the test that timed out at 60 seconds now passes. Build and pretest clean, 61 node checks, 14 browser assertions, and the engine-pin guard passing on all seven pages. Not re-measured: #698 changes token-stream arrangement for regions with no block correspondence, which the demo's 3 KB document does not exercise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The Doom cartridge on the live demo halted with:
That message is the arcade's own capability probe, and it was telling the truth. The GitHub Pages demos load the library from jsDelivr at an exact version, and every page was still pinned to the release before
11.0.0. On that engine the Doom cartridge does everything except the part you can see: the WebAssembly engine boots, plays and logs (which is why the console in the bug report is full of healthy Doom output),replaceImagesucceeds, and the 320×200 frame really is in the document — Save and reopen shows it. But the incremental single-block render that repaints the frame paragraph cloned the block's XML into a throwaway shell with neither a copy of the referenced media part nor an image handler, soWmlToHtmlConvertercorrectly omitted thew:drawingand the paragraph refreshed blank. The library fix shipped in11.0.0; what was left was the pin.The other console lines in the report are not ours and need no change: the
try/try_tableline is a Firefox deprecation warning about the .NET WebAssembly runtime's exception-handling opcodes, the Carlito line is Firefox's font-visibility setting refusing a locally installed font, and the source-map error is devtools failing to resolve a source map for awasm:URL.What this branch adds on top of main
mainmoved the pins in parallel (f8e347b), and this branch is merged with it — the arcade-row rewording from that commit is kept verbatim. What is left here is the part that stops the same thing happening at the next release:The pin is now under test, because nothing was watching it. A stale pin is invisible to the browser specs: every arcade and social spec overrides
?engine=to the locally built bundle, which has always carried the fix, so the whole suite stayed green while the public site rendered nothing.docs/demo/tools/engine-pin.test.mjsreads the checked-in files with no browser and no network, and fails when:IMAGE_ENGINE_MINIMUM, a new export fromascii-arcade.jsnaming the oldest engine whose incremental render carries an inline image — so the arcade cannot ship pointed at an engine that renders Doom invisibly;RELEASE_ENGINEinnpm/tests/social-demo.spec.tsdrifts from the pages it guards.A fourth check asks jsDelivr whether the pinned bundle is actually published — the failure mode of re-pinning ahead of a release — and is skipped unless
DOCXODUS_CHECK_CDN=1, so the default run stays offline and deterministic. The suite is wired intonpm run test:demo-logic, and therefore into every Playwright run'spretest.Prose that recounts a past version is not a pin: the scan grandfathers the README's account of the observatory being pinned ahead of 9.6.0, and the rest of the historical wording avoids the
docxodus@prefix.paintImagekeeps its probe, and stops hardcoding the version. Anyone who points?engine=at an older release still gets the halt rather than invisible frames; the message now reads the required version fromIMAGE_ENGINE_MINIMUMand says to check the override.Two more copies of the pin move with the rest: the copy-pasteable CDN examples in
npm/src/embed.tsandnpm/src/index.ts, which ship in the package's own doc comments — a reader who pastes one gets whatever engine it names. They are in the tested set now.The Publish section of
docs/demo/README.mdrecords the full pin set and what the guard checks, and there is a CHANGELOG entry under[Unreleased].Validation
npm run test:demo-logic— 29 assertions across the five demo-logic suites, all passing, on the merge result.IMAGE_ENGINE_MINIMUMabove the pin fails the capability check with the explanation.DOCXODUS_CHECK_CDN=1 node --test docs/demo/tools/engine-pin.test.mjspasses against the live CDN (4/4), which is the real confirmation that11.0.0is servable.npm run build, which needs thewasm-toolsworkload); the only thing it sees from this branch isRELEASE_ENGINE, unchanged from main and now pinned to the pages by the offline test.🤖 Generated with Claude Code
https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG