Pin the raw=1 spelling with a testable URL builder (review fix)
Review found the raw=1 spelling had no coverage in the gate: it lived
only as inline string-building at both fetch call sites in
editor-entry.js, which has no test file (DOM-bound, by this repo's own
convention), so a typo like raw=true or a bare raw would pass all 15
existing tests while silently reintroducing the exact bug Task 7
exists to prevent — the browser refetching the same corrupt snapshot
forever.
Extracted updatesURL(base, { since, raw }) as a pure string builder in
live-updates.mjs, used by both call sites in editor-entry.js, and
pinned its exact output in live-updates.test.mjs for all four
combinations of since/raw. Confirmed a deliberate raw=true mutation
fails the new test (14 pass, 1 fail) before reverting it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4 files changed,
+52
−17
fixtures/editor-entry.js+3 −3fixtures/live-updates.mjs+17 −0fixtures/live-updates.test.mjs+19 −1internal/docs/static/{editor.9afcd625b7781c14.js => editor.6029d6f8d990c8a4.js}+13 −13
fixtures/editor-entry.jsLoading diff…
fixtures/live-updates.mjsLoading diff…
fixtures/live-updates.test.mjsLoading diff…
internal/docs/static/{editor.9afcd625b7781c14.js => editor.6029d6f8d990c8a4.js}Loading diff…