102 lines
5.9 KiB
Markdown
102 lines
5.9 KiB
Markdown
# Adaptive Music verification — 0.5.0
|
|||
|
|
|
||
|
|
## Regression and offline release validation
|
||
|
|
|
||
|
|
The current suite has **85 JavaScript tests** and **15 Python tests**. Tests cover
|
||
|
|
controller transitions, signed snapshots, target/topology guards, durable catalog
|
||
|
|
IDs, native restore behavior, scene/default/combat interfaces, optional companion
|
||
|
|
scope/replay protection, GM access policy, official PCM decoder, encrypted WebRTC
|
||
|
|
signaling/replay checks, public MA WebSocket correlation and offline release contracts.
|
||
|
|
These are fixtures and source checks, not live Foundry/MA playback tests.
|
||
|
|
|
||
|
|
```sh
|
||
|
|
PATH="$HOME/.nvm/versions/node/v24.23.0/bin:$PATH" npm test
|
||
|
|
python3 -m unittest discover -s tests -v
|
||
|
|
python3 scripts/audit_repository.py
|
||
|
|
python3 scripts/verify_upstream.py
|
||
|
|
python3 scripts/release.py
|
||
|
|
python3 scripts/release.py --validate dist/releases/v0.5.0/adaptive-music.zip
|
||
|
|
```
|
||
|
|
|
||
|
|
Python uses the standard library. Upstream verification requires ignored pinned
|
||
|
|
research copies; it does not fetch/install them. Browser assets are prebuilt and
|
||
|
|
SHA256 verified. Optional rebuilding uses Node 24.23.0, `npm ci --ignore-scripts`
|
||
|
|
and `node scripts/build_sendspin.mjs`. No install hooks were run. The online npm
|
||
|
|
advisory audit of the pinned dependency tree reported **zero vulnerabilities**;
|
||
|
|
this is an advisory observation, not a safety guarantee or an offline audit.
|
||
|
|
|
||
|
|
Release tests exercise repeatable ZIP generation, embedded/standalone manifest
|
||
|
|
identity, missing import/asset rejection, URL versioning, GitHub configuration,
|
||
|
|
checksums, attribution, private-content exclusion and rebuilding from a source
|
||
|
|
archive without Git metadata. Neither the builder nor these tests contact Gitea.
|
||
|
|
CI workflows generate artifacts only on an already provisioned shell runner.
|
||
|
|
They have not run on GitHub or Gitea; Gitea Actions/artifact compatibility is untested.
|
||
|
|
|
||
|
|
## Measured browser audio experiment
|
||
|
|
|
||
|
|
`evidence/browser-audio.json` records an actual Chromium 143.0.7499.4 experiment:
|
||
|
|
official Sendspin 5.0.0 decoder → Web Audio → WebRTC → two listener browser contexts.
|
||
|
|
The original 440 Hz synthetic tone produced RMS 0.05391/0.05396 and FFT peaks
|
||
|
|
445.3125 Hz (nearest frequency bin). All listeners had signal at 1.757 s; during
|
||
|
|
4.766 s observation, the GM sent 25,198 RTP payload bytes, approximately 42.3 kbit/s
|
||
|
|
aggregate. Four encrypted signaling messages (maximum 2,078 bytes), no raw audio
|
||
|
|
on signaling. AudioContexts/HTMLAudioElements were unlocked by actual page clicks.
|
||
|
|
|
||
|
|
Optional reproduction after a separate Playwright Chromium download:
|
||
|
|
|
||
|
|
```sh
|
||
|
|
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/measure_browser_audio.mjs
|
||
|
|
```
|
||
|
|
|
||
|
|
The harness starts a temporary loopback static server and a socket shim, uses
|
||
|
|
headless Chromium with `--no-sandbox` only for the development experiment and
|
||
|
|
closes them afterwards. This is not a real Foundry socket integration, live MA
|
||
|
|
Sendspin handshake, WAN/NAT/TURN test, perceptual quality test or synchronization
|
||
|
|
measurement. Browser dependencies/binaries do not ship with the module.
|
||
|
|
|
||
|
|
## Live MA evidence and limits
|
||
|
|
|
||
|
|
`ma-readonly.json` records prior authenticated restricted account checks, dedicated
|
||
|
|
target/provider restrictions and catalog reads. `ma-adapter.json` records eleven
|
||
|
|
playlists/one radio and stable opaque identifiers across adapter reconstruction.
|
||
|
|
`ma-live-history.json` and `ma-playback.json` record prior bounded idle-queue runs:
|
||
|
|
shuffle/repeat/stop and exact restoration to empty/idle/unshuffled/repeat-off/zero.
|
||
|
|
They verify neither audible music nor restoration of a nonempty queue.
|
||
|
|
|
||
|
|
`module-only-prerequisites.json` adds fresh authenticated **read-only HTTP**
|
||
|
|
verification of the fixed DEV identity/topology and empty idle queue. The configured
|
||
|
|
MA endpoint is HTTP; an HTTPS Foundry page fails the module mixed-content gate.
|
||
|
|
The existing receiver private identity is absent from the GM profile. No receiver
|
||
|
|
was created, no Sendspin connection attempted and no playback command issued in
|
||
|
|
this revision. MA 2.10.6 source logs received WebSocket frames at VERBOSE: operator
|
||
|
|
log review is required before token-bearing `/ws` authentication. No live WS auth
|
||
|
|
was attempted. Route behavior and authentication protocol are source-derived.
|
||
|
|
|
||
|
|
Prior synthetic URI ingestion timed out/returned HTTP 400; approved six-track
|
||
|
|
ambient/combat WAV sequences are not established as ingestible. Actual MA playlist
|
||
|
|
playback remains a separate content-approval acceptance test. Synthetic browser
|
||
|
|
PCM does not satisfy it. Household devices, grouping, queue transfers, production
|
||
|
|
Foundry and network/service configuration remain untouched.
|
||
|
|
|
||
|
|
## Remaining acceptance tests
|
||
|
|
|
||
|
|
In an isolated Foundry v14.371 world: install/enable ZIP, test native ownership,
|
||
|
|
scene ambient/combat/boss and world defaults, explicit combatant flags, manual
|
||
|
|
silence/clear, rapid transitions and native fallback. Validate supported socket
|
||
|
|
signaling using two logged-in users; private invite delivery and revocation, user
|
||
|
|
role changes, disconnects and automation shutdown need real-world confirmation.
|
||
|
|
|
||
|
|
Before live MA audio: operator supplies the existing DEV identity/pairing without
|
||
|
|
registering a new target; makes private secure MA browser access available without
|
||
|
|
public exposure; confirms token-bearing WS frames cannot enter logs; supplies
|
||
|
|
approved synthetic ingestion. Recheck exact target/group/queue before every write.
|
||
|
|
Capture and restore original state with a bounded harness. Then test seeking,
|
||
|
|
interrupt/restore, rapid/nested contexts and stereo/format handling with listeners.
|
||
|
|
Do not treat mocked nonempty restoration as live evidence. Real playlists require
|
||
|
|
separate approved content. Record an explicit restoration failure if it occurs.
|
||
|
|
|
||
|
|
Remote WAN trials must measure ICE/TURN reachability, expiry/reconnect, throughput,
|
||
|
|
latency and listener skew; none is inferred from the loopback result. GM restart,
|
||
|
|
durable nonempty live restore, distributed fencing, crossfade, background tab
|
||
|
|
behavior and service fallback termination remain unsupported or unverified as
|
||
|
|
specified in ARCHITECTURE.md. No production readiness claim.
|