227 lines
14 KiB
Markdown
227 lines
14 KiB
Markdown
# Adaptive Music v0.8.0 handoff
|
||||
|
|
|
|||
|
|
## Repository state
|
|||
|
|
|
|||
|
|
The v0.8.0 release audit follows the handed-off candidate `987122f`. The original
|
|||
|
|
workspace Git metadata is mounted read-only. The completed local audit commit
|
|||
|
|
is on `main` in the independent, remote-free checkout
|
|||
|
|
`.local/v080-release-checkout`. Read the exact commit from
|
|||
|
|
`dist/releases/v0.8.0/release.json` or run
|
|||
|
|
`git -C .local/v080-release-checkout rev-parse HEAD`. The original workspace
|
|||
|
|
retains the same source changes over its existing baseline. The release
|
|||
|
|
builder runs from the clean checkout, and its source archive is compared
|
|||
|
|
against that commit. Gitea access, tags, publication and production changes
|
|||
|
|
are outside this work.
|
|||
|
|
|
|||
|
|
## Ready for operator testing
|
|||
|
|
|
|||
|
|
- 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 verified server install is v0.7.2. The private route grants access to the
|
|||
|
|
development world, and Foundry module installation is instance-wide. No
|
|||
|
|
development-only package directory or server install access was established.
|
|||
|
|
Follow the [isolated development install instructions](INSTALL.md#install-the-candidate-on-an-isolated-development-instance)
|
|||
|
|
and [Mac acceptance checklist](USER-ACCEPTANCE.md).
|
|||
|
|
- 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.
|
|||
|
|
- Prioritize the original Mac Firefox connection failure, physical audio
|
|||
|
|
artifacts and actual installed-world playback. MA-side revocation with a
|
|||
|
|
disposable token, Mac sleep/wake and the actual WAN route 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. Prefer a targeted reproduction over another full soak.
|
|||
|
|
|
|||
|
|
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](evidence/v0.8.0-live.json),
|
|||
|
|
[the verification guide](TESTING.md) and [the contributor rules](AGENTS.md).
|
|||
|
|
|
|||
|
|
| 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.log` and
|
|||
|
|
`.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_INDEXES` to 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.json` for 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 set `AM_LOOPBACK_TURN_CONFIG`
|
|||
|
|
to a private fixture grant and use `--webkit-only`.
|
|||
|
|
- A passing browser ZIP preview exercises real Foundry and MA with archive
|
|||
|
|
assets. Server installation of v0.8.0, the operator's original Mac Firefox
|
|||
|
|
path, native Safari, physical audibility, suspend/wake and WAN acceptance
|
|||
|
|
still require the corresponding environment. The active server reports
|
|||
|
|
v0.7.2. No production deployment is authorized.
|
|||
|
|
|
|||
|
|
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/get` returned
|
|||
|
|
`InsufficientPermissions` (22), preventing combat control. Run those tests
|
|||
|
|
serially, or use separately authorized tokens. The matching upstream code is
|
|||
|
|
`set_sendspin_player_for_token` in MA's tagged webserver controller. Adaptive
|
|||
|
|
Music keeps its original API session and reports queue-rights loss in
|
|||
|
|
`src/audio/gm-host.mjs`, `src/providers/ma/websocket.mjs` and
|
|||
|
|
`src/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.mjs` and
|
|||
|
|
`scripts/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.mjs` and `src/audio/gm-host.mjs`
|
|||
|
|
if it recurs.
|
|||
|
|
- Credential lifecycle and auto-reconnect are in `src/foundry/receiver-vault.mjs`,
|
|||
|
|
`src/foundry/account-connection.mjs`, `src/foundry/module.mjs` and
|
|||
|
|
`src/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.mjs` and `src/core/controller.mjs`. Playback UI is in
|
|||
|
|
`src/foundry/playback-panel.mjs` and `src/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.
|
|||
|
|
|
|||
|
|
```sh
|
|||
|
|
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
|
|||
|
|
|
|||
|
|
python3 scripts/release.py
|
|||
|
|
python3 scripts/release.py --validate dist/releases/v0.8.0/adaptive-music.zip
|
|||
|
|
(cd dist/releases/v0.8.0 && sha256sum -c SHA256SUMS && sha256sum -c adaptive-music-release-v0.8.0.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.json` contains the private HTTPS origins and proxy
|
|||
|
|
address. `.local/foundry-development.json` holds the test-world/account mapping.
|
|||
|
|
`.local/ma-token` holds the dedicated token. The private runners read them
|
|||
|
|
directly and load the token through `loadMAToken('.local')` from
|
|||
|
|
`gateway/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.
|