test: prove wasmbox backend on the REAL wasmdesk/wasmbox Ruby desktop - #9
Merged
Merged
Conversation
Lift the "protocol-faithful harness" caveat on the internal/wasmbox client
backend by proving it end-to-end against the ACTUAL wasmdesk/wasmbox Ruby
compositor (compositor/*.rb on the pure-Go rbgo interpreter, baked into
wasmbox.wasm), not the test/harness.html stand-in.
test/probe-wasmbox-real.mjs (headless Chromium via Playwright):
- boots the real compositor (wasmboxReady + "rbgo compositor: started with N
windows"), served by wasmbox's own unmodified COOP/COEP cmd/serve;
- spawns cmd/gowidgetsclient (CGO=0 js/wasm) as a genuine EXTERNAL client via
the documented globalThis.wasmboxSpawnExternal("clients/gowidgets/worker.js")
— a separate Web Worker + wasm instance over the step-C.1 MessagePort + SAB;
- locates the window by its live focused rect (__wasmboxFocusedRect, no
hardcoded slot) and asserts exact cascade bounds (172,172 260x160);
- asserts the VBox+Label+Button rendered into the composited desktop
(compositor OffscreenCanvas pixels via __wasmboxReadRegion);
- injects a REAL page.mouse.click the compositor routes to the focused window
and asserts the counter goes 0->1 (input -> toolkit.Event through the real
input routing);
- saves test/wasmbox-live-proof-real-desktop-2026-08-09.png.
The wasmbox repository is NOT modified: it is cloned read-only, built and run
as-is; the client is served same-origin via a symlink overlay (documented in
test/README-real-desktop.md). The harness proof (test/probe-wasmbox.mjs +
test/harness.html) is kept as the deterministic CI floor. README + client
README updated to describe both tiers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Lifts the "protocol-faithful harness" caveat on the
internal/wasmboxclient backend by proving it end-to-end against the actual wasmdesk/wasmbox Ruby desktop (the pure-Go CGO=0 rbgo interpreter runningcompositor/*.rb, baked intowasmbox.wasm), not thetest/harness.htmlstand-in.What's new
test/probe-wasmbox-real.mjs— headless Chromium (Playwright) against the real compositor, served by wasmbox's own unmodified COOP/COEPcmd/serve:wasmboxReady+rbgo compositor: started with N windows, cross-origin isolated).__wasmboxReadRegion).cmd/gowidgetsclient(CGO=0js/wasm) as a genuine external client via the documentedglobalThis.wasmboxSpawnExternal("clients/gowidgets/worker.js")— its own Web Worker + wasm instance over the step-C.1MessagePort+SharedArrayBuffersurface.__wasmboxFocusedRect, no hardcoded slot) and asserts exact bounds(172,172) 260x160.page.mouse.clickthe compositor routes to the focused window; asserts the counter0→1(input →toolkit.Eventthrough the real input routing).test/wasmbox-live-proof-real-desktop-2026-08-09.png.Guarantees
test/README-real-desktop.md).test/probe-wasmbox.mjs+test/harness.html) is kept as the deterministic CI floor (identical wire/SAB/input assertions, no ~80 MB Ruby build).test/*.mjs, one screenshot, one reproduce doc. CI (build/vet/test/100% codec coverage/cross-build/qemu/Xvfb/Wayland) is unaffected.🤖 Generated with Claude Code