app: vendor the prebuilt editor bundle
Vendors ProseMirror + yjs + y-prosemirror as a committed, prebuilt bundle (fixtures/build-editor.mjs, run by a person; the app performs no build step per spec §6.5) and serves it, unauthenticated, at /static/editor.<hash>.js with an immutable Cache-Control — safe only because the hash in the filename changes whenever the bytes do. internal/docs/assets.go embeds internal/docs/static/ (not a top-level static/: go:embed cannot reach outside its own file's directory) and resolves the single bundle's name at init, panicking if the count is ever wrong. yjs stays pinned at 13.6.27, unchanged by this commit — the version the wire fixtures are generated with.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011F5CivVm4CmL9ByfSSAaXA
fixtures/build-editor.mjs+54 −0fixtures/editor-entry.js+32 −0fixtures/package-lock.json+652 −0fixtures/package.json+15 −2internal/docs/app.go+6 −1internal/docs/assets.go+117 −0internal/docs/assets_test.go+58 −0internal/docs/static/editor.f13f5e0ce6fa7467.js+14 −0
Intent
<task-notification> <task-id>ad73c1c7c1f244926</task-id> <tool-use-id>toolu_01WWnoe9pr9xPxW4UDdzepZK</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-docs/70f302d1-9d5d-4eb2-8b38-e09a15fdd1c3/tasks/ad73c1c7c1f244926.output</output-file> <status>completed</status> <summary>Agent "Editing Task 3 fragments and read view" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Now let's give the coordinator the concise reply requested. **Status:** Fixed. Commit `a7795e1` on branch `editing`. **Letter's first block now:** `<paragraph>Dear Members of the Harbourview Allotment Committee,</paragraph>` — verified directly against the regenerated `.bin` (not assumed); `letter.update.bin` is byte-identical to before (absent from `git status`), so this is the pre-existing correct behavior, untouched. **Store.Text test:** Added `TestSeedTextReturnsRealProse`, watched it fail first: `Text = "", want it to contain the packing list's real opening line`. Then repointed `text_string` (abi.rs) to `fragment_text`, no ABI bump, with the "why" documented at the function. **Test results:** `go test ./...` and `.amadan/ci.d/10-gate` both green (exit 0), including Rust (`fragment.rs`, `wire_compat.rs`, `wasm_trap_containment.rs`) and Go suites. Repointing broke other tests reading `fixtures/data` (Y.Text) through `Text`/`(*Handle).Text`; added `fixtures/vectors/fragment/{hello,unicode,formatted,concurrent}` and repointed those tests, leaving `TestSlowUpdateIsCutOffByGuestCallTimeout`'s pinned RNG-mutation reproducer untouched on the old fixtures. Also corrected the earlier report's overbroad "tightened" claim — narrowed to the one test (`TestSeedContentMatchesItsSource`) that actually was.</result> <usage><subagent_tokens>263199</subagent_tokens><tool_uses>78</tool_uses><duration_ms>798303</duration_ms></usage> </task-notification>
<task-notification> <task-id>a06c2baf6b965f13a</task-id> <tool-use-id>toolu_017s8FNpgUsgbqHHuaFbkKQm</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-docs/70f302d1-9d5d-4eb2-8b38-e09a15fdd1c3/tasks/a06c2baf6b965f13a.output</output-file> <status>completed</status> <summary>Agent "Re-review task 3 fix round" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Tree is clean. Full review written to `.superpowers/sdd/2026-08-31-editing/task-3-rereview.md`. **Both findings genuinely fixed.** Finding 1: `blocksFor` in `fixtures/generate-seed.mjs` now drops the first block only on exact trimmed match against a `titles` map — verified by decoding the regenerated `.update.bin` bytes directly: 5/6 docs drop their title-echo, `letter.txt` still opens with its real salutation. Finding 2: `core/src/abi.rs::text_string` now calls `fragment_text` (root "prosemirror"); `text_content` is untouched and still backs the wire-compat Y.Text tests. **Repointed tests — all kept strength, none weakened:** - `wasm_trap_containment.rs` (both tests) — kept; the hardcoded trap-repro hex is independent of the fixture-dir swap, ran live and still reproduces `MemoryOutOfBounds`. - `wire_compat.rs::abi_round_trips_a_fixture` — kept (uses pre-existing `simple.bin`). - `TestTrappedInstanceIsDiscardedAndRebuilds` — kept. - `TestSlowUpdateIsCutOffByGuestCallTimeout` — correctly left on `fixtures/data` for its RNG-mutation loop; ran live, still reproduces the pathological ~4.3s decode, cut off at 1s cap. - `TestAppliesFixturesUnderWazero` + `TestGarbageUpdateReturnsErrorNotTrap` — kept; concurrent still tests a genuine two-client conflict merge (block-level analogue of the old char-run merge), formatted arguably tightened (now also checks the format attribute name decoded correctly). - `store_test.go`'s two repointed tests — kept. **Fixture reproducibility:** confirmed — regenerated both `generate-fragment.mjs` and `generate-seed.mjs` twice, `git status` stayed clean each time, byte counts identical. **Verification:** `cargo test` (16/16), `go test ./...` (all pass), `.amadan/ci.d/10-gate` (full green, one benign sandbox artifact from `go build`'s module cache that didn't stop the gate). Tree left clean. **Nothing else broken.** `Store.Text`/`HTML` doc comments in `store.go` were already root-agnostic and needed no update; `TestApplyLogCapFailsCleanly` correctly stayed on the old fixture since it asserts rejection, not content.</result> <usage><subagent_tokens>114727</subagent_tokens><tool_uses>42</tool_uses><duration_ms>367573</duration_ms></usage> </task-notification>
fixtures/build-editor.mjsLoading diff…
fixtures/editor-entry.jsLoading diff…
fixtures/package-lock.jsonLoading diff…
fixtures/package.jsonLoading diff…
internal/docs/app.goLoading diff…
internal/docs/assets.goLoading diff…
internal/docs/assets_test.goLoading diff…
internal/docs/static/editor.f13f5e0ce6fa7467.jsLoading diff…