Skip to content

Keep the demo's engine pin from going stale again, and name the version the arcade needs - #654

Merged
JSv4 merged 5 commits into
mainfrom
claude/doom-wasm-loading-0zo97w
Sep 3, 2026
Merged

Keep the demo's engine pin from going stale again, and name the version the arcade needs#654
JSv4 merged 5 commits into
mainfrom
claude/doom-wasm-loading-0zo97w

Conversation

@JSv4

@JSv4 JSv4 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

What was wrong

The Doom cartridge on the live demo halted with:

this engine renders a single block without its inline image, so the frame is in the .docx but never on screen

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), replaceImage succeeds, 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, 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.

The other console lines in the report are not ours and need no change: the try/try_table line 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 a wasm: URL.

What this branch adds on top of main

main moved 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.mjs reads the checked-in files with no browser and no network, and fails when:

  • the pins disagree with each other (a half-moved pin is how you get a landing page on one engine and the arcade it frames on another);
  • the pinned version falls below IMAGE_ENGINE_MINIMUM, a new export from ascii-arcade.js naming the oldest engine whose incremental render carries an inline image — so the arcade cannot ship pointed at an engine that renders Doom invisibly;
  • RELEASE_ENGINE in npm/tests/social-demo.spec.ts drifts 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 into npm run test:demo-logic, and therefore into every Playwright run's pretest.

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.

paintImage keeps 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 from IMAGE_ENGINE_MINIMUM and says to check the override.

Two more copies of the pin move with the rest: the copy-pasteable CDN examples in npm/src/embed.ts and npm/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.md records 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.
  • Both new failure paths were exercised rather than assumed: reverting one page's pin to the old version fails the agreement check naming that file, and raising IMAGE_ENGINE_MINIMUM above the pin fails the capability check with the explanation.
  • DOCXODUS_CHECK_CDN=1 node --test docs/demo/tools/engine-pin.test.mjs passes against the live CDN (4/4), which is the real confirmation that 11.0.0 is servable.
  • The Playwright suite could not run in this environment (it needs npm run build, which needs the wasm-tools workload); the only thing it sees from this branch is RELEASE_ENGINE, unchanged from main and now pinned to the pages by the offline test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PzrZihTdHGDcP3jLeBShBG

…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
@JSv4 JSv4 changed the title Re-pin the demo site to docxodus@11.0.0 so DOOM's frames reach the screen Keep the demo's engine pin from going stale again, and name the version the arcade needs Sep 2, 2026
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
JSv4 merged commit 1caeb25 into main Sep 3, 2026
14 checks passed
@JSv4
JSv4 deleted the claude/doom-wasm-loading-0zo97w branch September 3, 2026 00:14
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.
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