e2e/run.sh builds the collector, installs the automation package and an
open-source web player from e2e/package-lock.json (npm ci, no install
scripts), runs the player integration's unit tests, then
e2e/audit.e2e.mjs: an HLS stream made with the host's media tool (H.264
and AAC in 2 s CMAF segments, a program time, a marked ad over two
segments) served from another origin with CMSD-Static exposed, played in
a real browser twice, once through the loader adapter and once through
the network tap, each session sent to a collector on loopback. It checks
the outcome, the acknowledged objects against the origin's own SHA-256
of what it served, the ad's claim, the CMSD notes, the unmetered energy,
the CMCD batches, the report, its recomputation by `wai-audit check`, a
replay stored once and a tampered record refused.
Three defects it found, fixed here:
- the player hands fragment buffers on (to a worker), emptying them
after the loader's callback: the session now copies the bytes at once,
and keeps each object in the order it was given;
- the tap read XMLHttpRequest responses after the player had moved them:
it now listens from the request's construction, so it reads first;
- a stitched ad is entered between two observations, so its claim began
past media time 0 and reached quartile 1: play that enters an ad
continuously now starts its first span at 0 (stream-audit §6.3), as
leaving it already ran the last span to the ad's end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>