19 KiB
Adaptive Music v0.8.3 handoff
Floating music controls
The music bar mounts at Foundry ready for the full GM and authorized
listeners. It shares saved listening preferences with Campaign audio and uses
a separate client setting for position and collapse. The GM monitor gain is
local. Campaign pause uses the fenced controller and blocks scene transitions
until Play. The new controls are packaged under dist/releases/v0.8.3/ from
the v0.8.3-music-bar branch in .local/v080-release-checkout.
The development world was inactive during this change. Repeat the new rows in
USER-ACCEPTANCE.md in an installed world with the GM and
at least one player connected. The private browser attempt is recorded under
.local/v083-bar-live.log.
Multiplayer release blocker
The operator passed the v0.8.1 combat corrections and reported a late-join
failure that stopped GM playback and emptied the catalog. In the development
world, GUI logins as Player and Trusted Player left v0.8.1 playback running.
An Assistant GM join reproduced the loss. Foundry's isGM counted both that user
and the full Gamemaster. The old single-GM guard closed the MA API and Sendspin
sockets when it saw both. The Foundry socket stayed connected.
v0.8.2 distinguishes the full Gamemaster role from listeners, reconciles
roster changes on userConnected and User updates, and keeps the player's
output controls in the existing Campaign audio window. The sound level is
local to the listener. Foundry User Settings retain only mute and volume.
See TESTING.md and USER-ACCEPTANCE.md.
The sanitized report is evidence/v0.8.2-live.json.
The private test runner and raw evidence are under .local/v082-multiplayer-*
and .local/v082-run-mixed.py. The world server reported v0.8.1 during the
v0.8.2 runtime preview. The final package fingerprint matches the tested preview.
Three Chrome/Firefox listeners and the GM passed 30 audio checks over six
minutes. The remembered GM credential restored the receiver and connected
listeners after reload. The test removed its fixtures and restored development
world settings. Verify the installed candidate with the operator's
party and capture the separate unresolved macOS Firefox private-route failure
using the acceptance checklist.
Repository state
The original workspace's Git metadata is read-only. Before v0.8.1 changes,
its 157 tracked and untracked source files matched the clean local release
commit 1ed6b4c byte for byte. The original HEAD 987122f is that commit's
parent. The remote-free .local/v080-release-checkout has the prior candidate
on v0.8.2-multiplayer and the floating controls on v0.8.3-music-bar.
Its main branch retains 1ed6b4c.
The operator reported Gitea published v0.8.0 from 95b0427. That object
is absent in both local Git databases. The published commit's ancestry
can be checked if its Git object is supplied offline.
A read-only check of the authorized private Foundry route confirmed the
installed manifest was v0.8.0 and all 28 runtime files matched 1ed6b4c.
A later check matched all 28 installed v0.8.1 runtime files to 251a019.
The v0.8.2 archive is built from a clean checkout and its source is compared
against its local commit. Read its exact commit in
dist/releases/v0.8.2/release.json. Gitea access and production deployment
are outside this work.
Installed v0.8.0 macOS acceptance
- Operator pass: Chrome connectivity, credentials after quitting and reopening Chrome, automatic scene playlist activation, background-tab audio, remote player audio over WAN, and smooth transitions. The operator heard no stuttering or crackling during their session.
- Operator fail: macOS Firefox connectivity.
- Combat follow-up: assigned battle music worked when used as ambient, while normal combat left ambient playing. The operator could not find the boss designation. The operator passed combat, restoration, boss and manual controls with the corrected v0.8.1 candidate.
v0.8.1 native combat correction
The native token HUD created an unlinked encounter on Foundry 14.371 and D&D 5e 6.1.2. Installed v0.8.0 ignored it even after the native tracker started round 1. Use the Combatant token scene when the encounter has no explicit scene. The tracker now has a GM-only Boss encounter option and shows the playback mode and Return to automation for a manual override. The same combat and boss assignment can change mode without restarting the queue. Use distinct playlists to verify the audible changes.
The authorized GUI run and its hook trace live under ignored
.local/v081-combat-gui-*. See TESTING.md and
USER-ACCEPTANCE.md for the reproduced lifecycle and steps.
The Chromium browser preview used three distinct cues and restored ambient at
30, 33 and 46 seconds across normal, boss and manual-override encounters.
It verified turn and round continuity, End Combat cancellation, scene changes,
and returning from the manual hold. The server still reported v0.8.0 during
the previews. Headed Firefox repeated the normal combat lifecycle against the
same runtime and restored ambient at 9 seconds.
v0.8.1 Firefox investigation
- The two WSS routes opened with HTTP 101 in Mozilla Firefox 161.0.1 on Ubuntu from the anonymous Foundry origin and the MA origin using the native WebSocket. Trusted TLS and the authorized private route were retained.
- The isolated stock-Firefox policy test reproduced enforced CSP, report-only CSP, a server-side Origin rejection and a mismatched TLS certificate. Browser script saw Origin rejection and TLS rejection as opaque upgrade failures.
- The candidate improves the token-free report with manual Connect failure stage and time, per-route duration and post-probe permission states. Audio, credential storage and the authenticated transport are outside the change. The original macOS failure needs the browser-side capture described in USER-ACCEPTANCE.md.
- The private stock browser, scripts and raw reports under
.local/v081-*are test-only. See sanitized v0.8.1 evidence.
Historical v0.8.0 audit checkpoint
- The development world keeps Christmas — Adaptive Music demo active with Christmas music assigned. Dûr-Khazrak — Adaptive Music demo has distinct ambient, combat and boss cues and a prepared, unstarted encounter with the Dûr-Khazrak Champion. Its ambient uses a development playlist as a stand-in. The authorized catalog contained no identifiable dwarven soundtrack.
- The preview host reported v0.7.2 during the automated audit. The operator subsequently installed v0.8.0 and carried out the checks above.
- Automated release regressions passed with 110 JavaScript and 17 Python tests. The dependency, repository and upstream provenance checks passed. The updated Chromium, Firefox and Linux WebKit credential fixture closed and reopened persistent browser profiles and tested rejection by a synthetic MA auth endpoint after simulated revocation. The real preview verified same-receiver auto-attachment after a page reload, Disconnect and Forget.
- MA-side revocation with a disposable token and Mac sleep/wake still need operator acceptance. The focused Ubuntu Firefox background check measured listener audio before switching tabs and could not establish that the GM page became hidden.
The package targets Foundry VTT 14.371 and MA 2.10.6. It uses the pinned Sendspin SDK and browser-hosted audio. The user authorized the existing test accounts and dedicated MA token for the private development-world acceptance runs on December 4. See the evidence, the verification guide and the contributor rules.
| Work | Candidate implementation |
|---|---|
| AM-005 browser compatibility | Staged, token-free transport diagnostics. Live Chromium and Firefox use the private development route. Linux WebKit provides an engine check. |
| AM-007 audio continuity | A bounded sample-contiguous PCM timeline and persistent established WebRTC media across signaling expiry. Live measurements count silent render blocks, verify rate and reject prolonged silence. |
| AM-008 trusted-device credentials | Explicit browser-local AES-GCM retention with reconnect, Disconnect and Forget Credentials. Account address and portable references retain their v0.7.2 formats. |
| AM-009 native Foundry integration | Native Scene Configuration fields, draggable MA catalog, world/boss defaults and real scene/combat hooks. Native soundtracks remain under Foundry's controller. |
| AM-010 gameplay controls | Token toolbar and sidebar launch points, transport, volume, repeat, manual override and return to scene music. The one dedicated MA queue uses sequential fades. |
Results and open acceptance
- The original Firefox report is preserved under
.local/v080-original-firefox-soak.json. It recorded 1,800 wall-clock measurement seconds and successful ambient restoration at 37 seconds. Both listeners then recorded about 763 seconds of continuous terminal silence and the Stop/Enable check failed. The first ZIP preview passed initial ambient playback but timed out selecting Repeat. The repeat field now has an explicit accessible name for Firefox and for the harness. - The first Chromium GUI review connected to MA, then timed out in the sidebar
and scene configuration workflow. The refreshed sidebar updates an existing
render and preserves its expanded state. The review now reports individual
stages, verifies the pointer drag and measures both listeners. Current raw
reports and logs are in
.local/foundry-v080-review-chromium.json,.local/v080-audit-chromium-review.logand.local/v080-audit-firefox-soak.log. Match the UTC start time and ZIP hash before attributing results to a given run. - Chromium's headless run exercised the real Foundry native UI, including
pointer drag, two scene assignments, both controls launch points, combat,
a boss override and ambient restoration. A first combat choice was rejected
during playlist preparation. For a reproducible review, set
AM_REVIEW_PLAYLIST_INDEXESto the three comma-separated zero-based catalog entries that passed preparation in.local/v080-catalog-readiness.json. - The corrected Firefox continuity run started at 00:29 UTC on December 5 and
passed 1,800 measured seconds, including ordered restoration at 37 seconds,
listener Stop/Enable and reload. The development-world cleanup passed. The
Chromium review uses the same tested ZIP and runtime asset hash. See the
sanitized JSON for phase measurements and the raw report under
.local/. - The Chromium review passed native scene assignment and pointer drag, both
playback launchers, combat and boss cues, ambient restoration at 10 seconds,
manual override and return, pause, resume, seek, skip and stop. It reconnected
the same receiver after reload without replacing its queue. Disconnect and
Forget Credentials both prevented automatic reconnection after another reload.
The final headed review disabled Playwright focus emulation in a private test
tool copy. A real cover tab hid the GM document for 12 seconds. Its audio clock
advanced, the GM output analyser measured audio, and both listeners continued
receiving audio. Earlier trials with focus emulation kept the page visible.
See
.local/v080-normal-visibility-playwright/focus-fixture.jsonfor the tool modification and hashes. - The isolated WebRTC fixture passed signaling expiry and revocation in
Chromium and Firefox. Linux WebKit's default ICE did not connect. Forced
relay via local coturn passed audio and expiry/revocation without microphone
access. The extracted binary and signed-package hashes are in
.local/v080-turn-fixture/. Future runs can setAM_LOOPBACK_TURN_CONFIGto a private fixture grant and use--webkit-only. - These v0.8.0 automated browser previews exercised real Foundry and MA with archive assets while the server reported v0.7.2. See the separate installed v0.8.0 manual results above.
The bundle is locally staged under
dist/releases/v0.8.0/. The install ZIP is adaptive-music.zip and the
outer archive also includes complete source, checksums, licenses and evidence.
The prior review restored the development world's active scene, automation
setting and account connection and removed temporary combats. The final audit
prepared the two demo scenes and activated Christmas for the operator.
The prior hostname override was restored from its saved backup. The focused
Firefox check used a process-local DNS mapping with normal TLS validation.
Findings and source map
- MA 2.10.6 assigns all authenticated API sessions using a restricted token to
the newest Sendspin browser receiver using the same token. This was directly
reproduced when the native MA reference player and the Foundry receiver shared
the test token. Foundry kept receiving audio but
players/getreturnedInsufficientPermissions(22), preventing combat control. Run those tests serially, or use separately authorized tokens. The matching upstream code isset_sendspin_player_for_tokenin MA's tagged webserver controller. Adaptive Music keeps its original API session and reports queue-rights loss insrc/audio/gm-host.mjs,src/providers/ma/websocket.mjsandsrc/foundry/connection-wizard.mjs. This explains the reproduced permission failure. The cause of the Mac Firefox failure remains open. - The v0.7.2 per-packet time mapping causes edge gaps and overlaps when Web Audio
time advances in render quanta. The rendered-tone fixture detected 86–97
short dropouts per seven-second measurement across the tested rate pairs and
engines. The new scheduler detected zero in the same fixture. A prior
two-minute live Firefox interval also detected zero short digital dropouts at
the GM and both players. See
src/audio/pcm-timeline.mjs,src/audio/gm-host.mjs,src/audio/peer-audio.mjsandscripts/browser-continuity-worklet.mjs. Natural track silence, an intentional transition, a network concealment event and a scheduler gap are different signals. - A headed installed-baseline Chromium attempt authenticated and paired but timed
out waiting for a newly registered MA queue. Retain that result alongside the
operator’s working Mac baseline. Setup already retries a successful null queue
lookup briefly. Check
src/providers/ma/client.mjsandsrc/audio/gm-host.mjsif it recurs. - Credential lifecycle and auto-reconnect are in
src/foundry/receiver-vault.mjs,src/foundry/account-connection.mjs,src/foundry/module.mjsandsrc/foundry/connection-wizard.mjs. The browser profile and enabled same-origin modules are trusted. The token cannot follow a GM account to a different browser without that GM entering it there. Token rotation can require reassigning older token-derived playlist references. - Native UI and automation are in
src/foundry/configuration.mjs,src/foundry/music-editor.mjs,src/foundry/runtime.mjs,src/core/scene-music.mjsandsrc/core/controller.mjs. Playback UI is insrc/foundry/playback-panel.mjsandsrc/foundry/setup.mjs. True simultaneous crossfade between arbitrary playlists would require both streams to be independently available at the same time. MA track-to-track crossfade within one queue is separate. GM logout or closing the last GM tab ends live playback.
Environment and commands
Use Ubuntu, Python 3, Node 24.23.0 or newer within the supported release line,
and the existing Playwright tools. System node on this machine is Node 18.
The development browser tools and browser binaries are ignored local paths.
The headless tests exercise isolated browser APIs. The headed tests use Xvfb with
software GL for the actual Foundry graphical workflows.
export PATH="/home/ubuntu/.nvm/versions/node/v24.23.0/bin:$PATH"
export PLAYWRIGHT_BROWSERS_PATH="$PWD/.local/browsers"
npm test
python3 -m unittest discover -s tests -v
python3 scripts/audit_repository.py
python3 scripts/verify_upstream.py
npm audit --json
node scripts/check_setup_browser.mjs
export AM_PLAYWRIGHT_MODULE="$PWD/.local/dev-browser-tools/node_modules/playwright/index.mjs"
export LIBGL_ALWAYS_SOFTWARE=1
xvfb-run -a node scripts/check_pcm_continuity.mjs --headed --webkit
node scripts/check_device_credentials_browser.mjs --webkit
# Run the desktop review after any background playback test has exited.
umask 077
AM_PLAYWRIGHT_MODULE="$PWD/.local/v080-normal-visibility-playwright/node_modules/playwright/index.mjs" \
xvfb-run -a -s '-screen 0 1600x1050x24 +extension GLX' \
node scripts/check_foundry_private_route.mjs --headed --playback --package-preview dist/releases/v0.8.0/adaptive-music.zip --review \
> .local/v080-candidate-chromium-review.log 2>&1
# Start another soak when changes require a retest.
xvfb-run -a -s '-screen 0 1600x1050x24 +extension GLX' \
node scripts/check_foundry_private_route.mjs --headed --firefox --playback --package-preview dist/releases/v0.8.0/adaptive-music.zip --continuity \
> .local/v080-candidate-firefox-soak.log 2>&1
# Build the current candidate from the clean local release checkout.
python3 .local/v080-release-checkout/scripts/release.py --output "$PWD/dist/releases/v0.8.3"
python3 scripts/release.py --validate dist/releases/v0.8.3/adaptive-music.zip
(cd dist/releases/v0.8.3 && sha256sum -c SHA256SUMS && sha256sum -c adaptive-music-release-v0.8.3.zip.sha256)
The headed browser tests use the authorized private Nginx HTTPS route and retain
normal TLS validation. Firefox and WebKit used a temporary Ubuntu hostname
override which has been restored. After an authorized future test, restore an
identical temporary override with
cmp -s /etc/hosts .local/v080-hosts.new && sudo -n install -m 0644 -o root -g root .local/v080-hosts.before /etc/hosts.
If the comparison fails, preserve subsequent edits and remove only the test
change marked adaptive-music-test-v080 using the backup as a reference.
Authorization and private configuration
- Use the dedicated Foundry development world and the three test accounts listed in the ignored development-world configuration. The runner checks whether the GM account is available before joining.
- Use only the authorized private HTTPS proxy and the dedicated MA test credential and receivers. GM authorization covers isolated development scenes, test combatants, playlists, diagnostics, receiver creation and playback. Leave production campaigns, core, other modules, network infrastructure and household MA/Sonos targets untouched.
.local/live-environment.jsoncontains the private HTTPS origins and proxy address..local/foundry-development.jsonholds the test-world/account mapping..local/ma-tokenholds the dedicated token. The private runners read them directly and load the token throughloadMAToken('.local')fromgateway/private-config.mjs. Pass the directory or file path to tools and retain the value in process memory. Avoid printing configuration values or raw auth frames. Do not paste them into an Ollama prompt, transcript or issue.- Keep
.local/mode 0700 and private input files mode 0600. Use sanitized aggregate evidence in Git. Local browser profiles, raw reports, screenshots and route backups belong under.local/. Run the repository audit before staging or committing anything newly generated. - Keep source commits and bundles local. Do not access, fetch from, push to, or publish a release on the Gitea repository.