Release v0.7.0 - Automatic pairing and validated MA audio playback
Validate and generate manual release / package (push) Waiting to run

This commit is contained in:
Jason committed 2026-12-04 08:58:47 -05:00
1 parent 83d168f5a1
commit 1ed30567fb
48 files changed
+2717 -742

No files matched your search

+98 -83
View File
@@ -1,96 +1,111 @@
# Adaptive Music verification — 0.6.0
# Adaptive Music verification — 0.7.0
## Offline regression and packaging
## Executed evidence
Use pinned Node 24.23.0 and Python standard library:
The source archive includes sanitized evidence separately from private .local inputs.
- Ubuntu Firefox 159.0 and Chromium 159.0.8154.6
authenticated from Foundry’s origin and MA’s origin and retrieved seven providers.
The unauthenticated Foundry page returned no enforced CSP header or meta policy.
- Both browsers paired a dedicated MA web receiver, completed Noise and clock sync,
and loaded eleven catalog playlists.
- Firefox 159 and Chromium 159 delivered real MA audio to two WebRTC listeners
after one activation click each. Both listeners measured audio during ambient,
combat and restored ambient. The runs exercised emulated pause, seek, resume,
volume, ordered track/offset restoration and final queue restoration.
- Both browsers reconnected the same receiver after an induced Sendspin disconnect
and browser reload. Reattachment preserved the idle nonempty queue without
writes, retained the identity without the token and rejected a stale snapshot.
- One Firefox startup received an available player but no queue. Startup now waits
briefly for that queue to register. The delayed reply is covered by a regression
fixture. The passing live playback follow-up received the queue on the first read.
- The browser source assets were supplied locally by Playwright under the deployed
Foundry origin. Controller inputs were explicit scene/combat states and signaling
used an encrypted-envelope relay through the test runner. This was not an installed,
logged-in Foundry world or real Foundry socket/user-permission test.
- Actual deployed Foundry v14.371 ApplicationV2 rendered the setup at 380/640px with
in-memory sample documents. Real IndexedDB receiver vault reopen, user isolation,
token exclusion and forgetting passed. No world documents were changed.
- Real browser signaling exposed Firefox’s session-default SDP inheritance; its fix
was retested in Firefox 144.0.2 and Chromium 143.0.7499.4.
Trusted local-CA HTTPS/WSS policy tests cover
allowed cross-origin, enforced/report-only CSP and server Origin rejection.
See `evidence/v0.7.0-live-follow-up.json`, `evidence/v0.7.0-live.json`,
`evidence/foundry-application-v070.json` and `evidence/v0.7.0-checks.txt` in the source
archive. Earlier Firefox and Chromium runs received MA `MediaNotFoundError` (code 2)
during playlist startup despite playable track metadata. Its cause remains
unconfirmed. Those failures are retained alongside the passing follow-up. The live
runs used dedicated MA development receivers exclusively.
## One consolidated Mac / logged-in-world acceptance
Run this in an isolated test world with the actual Foundry v14.371 host and existing
private HTTPS MA endpoint. It needs no developer console or diagnostic shell commands.
1. Install the staged module ZIP, reload, and log in as the sole active GM from your
Mac. Open setup at normal and narrow window sizes. Enter the HTTPS MA address and
dedicated token, Authenticate, then Connect audio. The receiver should be provisioned
and playlists should load without a backup file. If MA reports media error 2 after connection, verify the same content in MA’s own dedicated web player before treating it as a browser transport failure. If connection fails, select Check
browser connection and Copy connection diagnostics once, and report that single
report with browser/version and whether MA’s own page works in that same browser.
2. Choose two authorized static playlists for an active scene’s ambient/combat music,
save, and enable automation. Check the GM hears ambient and decoded frames increase.
Only the campaign receiver may be controlled. Native fallback remains optional.
3. Log in as two ordinary players using separate browser profiles/devices. They should
receive audio automatically, needing at most one Enable Audio click. Check late login,
Stop/Enable and one player reload. An unrelated user must not receive another user’s
invitation; verify Foundry still prevents players from editing other User keys/roles.
4. Note the ambient track/offset in MA. Start an actual Foundry combat in this scene,
then end/delete it. Both players should hear combat then ambient at the saved offset,
rather than restarting ambient. Repeat a rapid start/end and confirm no duplicate queue.
5. Close/reopen setup and retry one failed login with a replacement token. The private
draft/receiver should remain; after a browser reload only the token needs reentry.
Reconnect the same owned receiver and confirm its queue is not replaced. Apply the
automation setting explicitly if a nonempty queue was retained.
6. Continue listening for at least 30 minutes across invitation renewal. Exercise one
brief network interruption, reconnect, and one background/suspend cycle. Report
failures with Copy connection diagnostics. Repeat on the actual WAN player route;
loopback/LAN signal does not establish NAT/TURN reachability or synchronization.
Acceptance requires audible output on the actual Mac/player devices, a successful
original Mac connection path, actual Foundry hooks, socket delivery and User
permissions, and the renewal and WAN checks above. Public release readiness remains
false until these checks are recorded. If the Mac still cannot reach WSS before
opening, its exact device-side cause remains external to the tested Ubuntu path;
the exact private-route access request is consolidated in ignored .local/PRIVATE-ROUTE-REQUEST.md. It proposes only temporary VM-to-proxy TCP 443 access with rollback, not a public API or disabled browser protection.
## Reproduce development checks
Use the existing pinned Node 24.23.0, Python standard library and Playwright 1.57.0.
No upstream installation hook is required.
```sh
PATH="$HOME/.nvm/versions/node/v24.23.0/bin:$PATH" npm test
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
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/check_foundry_application.mjs
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/check_browser_signaling.mjs
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/live_browser_preflight.mjs
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/live_receiver_browser.mjs
PLAYWRIGHT_BROWSERS_PATH=.local/browsers node scripts/live_receiver_browser.mjs --chromium
python3 scripts/release.py
python3 scripts/release.py --validate dist/releases/v0.6.0/adaptive-music.zip
```
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.
Live scripts require authorized private configuration/token in ignored .local/ and
must only operate on their generated `Adaptive Music integration …` receivers.
`--fresh` exercises module provisioning directly and keeps the generated receiver
identity and reports in a separate private directory under .local/.
Browser transport evidence includes no TLS bypass. Headless Chromium’s local test
launcher uses --no-sandbox for this development environment; the shipped module sets
no browser flags. No new distributed dependency was introduced. Supplemental Playwright 1.65.2 and Chromium/Firefox 159 builds are isolated under .local/dev-browser-tools; AM_PLAYWRIGHT_MODULE selects that pinned development package. Its provenance is in evidence/v0.7.0-browser-tools.json. The repository dependency lock remains unchanged apart from the application version.
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.
## Limits
`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.
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.
## User report and historical evidence
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.
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.
## Remaining isolated live acceptance
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.
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.
No Mac/Safari execution, physical audibility, installed-world acceptance, real User
permission adversarial test, WAN relay test, long-run skew/drift, seamless GM handover,
crash restore or crossfade is claimed. The upstream single queue does not provide
simultaneous outgoing/incoming streams for a true crossfade. Pause is emulated and
its saved position remains in memory; a full reload cannot recover that position.