Release v0.6.0 - Music Assistant wizard and automatic listener connections
Validate and generate manual release / package (push) Waiting to run

This commit is contained in:
Jason committed 2026-12-03 20:11:10 -05:00
1 parent 5319177c58
commit eb9536f903
26 files changed
+1553 -764

No files matched your search

+76 -82
View File
@@ -1,102 +1,96 @@
# Adaptive Music verification — 0.5.0
# Adaptive Music verification — 0.6.0
## Regression and offline release validation
## Offline regression and packaging
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.
Use pinned Node 24.23.0 and Python standard library:
```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
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/check_setup_browser.mjs
python3 scripts/release.py
python3 scripts/release.py --validate dist/releases/v0.5.0/adaptive-music.zip
python3 scripts/release.py --validate dist/releases/v0.6.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.
The v0.6.0 suite contains 91 JavaScript tests and 15 Python tests. See
`evidence/v0.6.0-checks.txt` for executed results. Loopback fixture servers and headless
Chromium need permission to bind/launch in restricted environments. No production
endpoint, credential or Git server is needed. Upstream verification reads ignored
pinned local research copies; it does not fetch/install them.
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.
New regressions cover private wizard input clearing, catalog-to-scene ambient/combat
persistence, normal listener activation without token/code fields, identity-bound
player lookup, stable catalog IDs, explicitly enabled playlist support, canceled
startup, and encrypted bootstrap tampering/replay/rotation/role/expiry rejection.
Existing controller, native restoration/fallback, signed snapshots, queue/topology,
companion, WebSocket correlation and distribution regressions remain.
## Measured browser audio experiment
`check_setup_browser.mjs` actually renders the setup/listener DOM in Chromium
143.0.7499.4 using fake Foundry documents and a fake connection. It clicks the wizard,
connects the fixture, loads/chooses/saves ambient and combat choices, confirms the
private input clears, advanced controls are absent, and player activation works.
A preview is written under ignored `dist/previews/`. This is an offline UI check,
not an actual Foundry ApplicationV2 host or an MA connection/audio test. The development
browser runs with `--no-sandbox` for the local test environment only; the module never
sets browser flags or requires users to bypass browser security.
`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.
Python tests check repeatable complete ZIPs, manifest/import/assets closure, attribution,
privacy patterns, checksums and rebuilding source without Git metadata. Builder
validation does not prove URL availability. No additional dependency was introduced;
SDK/browser assets remain prebuilt/pinned. Rebuilding them, when needed, uses
`npm ci --ignore-scripts` and `node scripts/build_sendspin.mjs`. The earlier zero-advisory
audit is historical, not a new online audit or a security guarantee for this revision.
Optional reproduction after a separate Playwright Chromium download:
## User report and historical evidence
```sh
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/measure_browser_audio.mjs
```
The user reports v0.5.0 successfully published to existing Gitea, installed through
the manifest, activated on Foundry v14.371 with D&D 5e 6.1.2, and both windows rendering.
This is explicitly user-supplied evidence for that version. No v0.6.0 live install,
MA authentication, receiver handshake or playlist playback was performed here.
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.
Historical `evidence/browser-audio.json`: actual Chromium official Sendspin decoder
→ Web Audio → WebRTC → two listeners, original synthetic 440 Hz PCM, signal at 1.757 s,
RMS about 0.054, 42.3 kbit/s aggregate RTP over 4.766 s. Localhost socket shim, no
real Foundry or MA/Noise handshake, no WAN, skew/drift or hardware audibility result.
Historical MA read-only catalogs/target checks and bounded idle controls are retained;
those live controls restored an empty idle queue. Synthetic URI ingestion previously
failed; no real MA music audio or nonempty live queue restore is established.
## Live MA evidence and limits
## Remaining isolated live acceptance
`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.
1. Install/update the v0.6.0 ZIP in an isolated Foundry v14.371 world. Test the actual
ApplicationV2 windows and SceneConfig hooks. Save world/scene ambient and combat,
reload, reconnect with the same identity, verify references remain selected. Test
native ownership, boss/manual rules, rapid transitions, native snapshot/restoration,
fallback, and confirm AmbientSound/effects are untouched. No system dependency.
2. With separate explicit credential authorization, supply trusted private MA HTTPS/WSS,
an existing matching dedicated SDK identity/pairing backup and remote log review.
Check read-only target/catalog diagnostics first; confirm no household enumeration
or unintended target selection. Confirm token/endpoint/SDK secrets never appear in
player settings/documents/socket/network/logs or release artifacts.
3. Test server-enforced User flags with two distinct logged-in players: each can update
only its own key, cannot change another player's or GM's key/role, and forged socket
sender IDs do not authorize audio. Test banned/inactive/promoted users, multiple GMs,
key rotation/new login, renewal, revoke, disconnect and latest-tab behavior. Fixtures
validate cryptography, not production Foundry server permissions.
4. Before writes, capture dedicated target state, arrange an empty idle handover and
approved test content. Opt in catalog playback, connect SDK and verify pairing/time
sync and audible GM/player output. Exercise ambient → combat → boss → restore,
offsets, duplicate occurrences and pause/repeat. Capture original state and report
restoration failures explicitly. Real playlists need operator-approved content;
packaging authorization is not approval to play production content in this session.
5. Test automatic listener delivery and one Enable Audio click in supported Chrome,
Firefox and Safari configurations; background/suspend/reload behavior may vary.
Check audio after renewal, Stop/Enable and disconnect. Only Chromium DOM fixtures
ran here. GM audio/stream drift and true synchronization are unmeasured.
6. Test real remote networks with an explicitly approved existing relay if necessary.
Measure ICE success, RTT/jitter/loss, upload, latency/skew and 30-minute drift. Default
ICE has no public relay. Expired TURN credentials need operator renewal. Do not infer
WAN acceptance from loopback synthetic audio.
`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.
No production route, logging, Nginx/firewall/service version or Foundry/MA installation
was changed. Browser-only distributed fencing, durable crash restore, seamless GM
handover, crossfade and concurrent layers remain unsupported. Live acceptance is
pending; neither fixture tests nor the user's v0.5.0 rendering report waive it.