Add the browser test harness and manual audio checklist #4

Closed
opened 2026-10-25 14:57:50 +00:00 by dsh · 1 comment
Owner

Goal

Make the parts that can be tested headlessly testable, and give the parts that cannot a written protocol so verification is not improvisation.

Scope

  • test/helpers/load-client.mjs — install a fake globalThis.window.__ModuleLoader__, import lib/client.js, return the registered factory + module exports. This is how pure helpers inside the bundle get unit-tested without a bundler (decision D2).
  • test/client-loader.test.mjs — the bundle registers id dsh-whale-noises, exports apply, and declares its injects.
  • scripts/env-probe.mjs — prints a copy-paste browser-console snippet that reports AudioContext, decodeAudioData, navigator.gpu, OPFS (createSyncAccessHandle), crossOriginIsolated, and storage estimate.
  • docs/manual-audio-checklist.md — the checklist from AGENTS.md, with a results table (browser, OS, engine, pass/fail, notes) and a place to paste measurements.
  • Wire both node tests into npm run check.

Acceptance

  • npm run check fails if the client bundle stops registering / stops exporting apply.
  • Probe runs in Chrome and Safari and reports the same fields.
  • Checklist is usable by a human without reading source.

Notes

  • Depends on #1. Part of M0 (blocks honest verification in M1+).
## Goal Make the parts that *can* be tested headlessly testable, and give the parts that cannot a written protocol so verification is not improvisation. ## Scope - [ ] `test/helpers/load-client.mjs` — install a fake `globalThis.window.__ModuleLoader__`, import `lib/client.js`, return the registered factory + module exports. This is how pure helpers inside the bundle get unit-tested without a bundler (decision D2). - [ ] `test/client-loader.test.mjs` — the bundle registers id `dsh-whale-noises`, exports `apply`, and declares its injects. - [ ] `scripts/env-probe.mjs` — prints a copy-paste browser-console snippet that reports `AudioContext`, `decodeAudioData`, `navigator.gpu`, OPFS (`createSyncAccessHandle`), `crossOriginIsolated`, and storage estimate. - [ ] `docs/manual-audio-checklist.md` — the checklist from AGENTS.md, with a results table (browser, OS, engine, pass/fail, notes) and a place to paste measurements. - [ ] Wire both node tests into `npm run check`. ## Acceptance - `npm run check` fails if the client bundle stops registering / stops exporting `apply`. - Probe runs in Chrome and Safari and reports the same fields. - Checklist is usable by a human without reading source. ## Notes - Depends on #1. Part of M0 (blocks honest verification in M1+).
dsh added this to the M0 — Foundations milestone 2026-10-25 14:57:50 +00:00
Author
Owner

Done in b9430b0. test/helpers/load-client.mjs runs the real built bundle through a Loader stub; scripts/env-probe.mjs prints a copy-paste capability table (AudioContext/decode/OPFS/WASM SIMD/WebGPU/isolation); docs/manual-audio-checklist.md has core, local-engine, host-budget and browser-limit tables. Whole suite green in CI run #4.

**Done** in `b9430b0`. `test/helpers/load-client.mjs` runs the real built bundle through a Loader stub; `scripts/env-probe.mjs` prints a copy-paste capability table (AudioContext/decode/OPFS/WASM SIMD/WebGPU/isolation); `docs/manual-audio-checklist.md` has core, local-engine, host-budget and browser-limit tables. Whole suite green in CI run #4.
dsh closed this issue 2026-10-25 17:43:47 +00:00
Sign in to join this conversation.
No description provided.