fix(build): include the Music playlist in the static media sync

The Music-option tracks are referenced by app.js (MUSIC_PLAYLIST), not the
manifest/ring, so build_static skipped them — Music would 404 on the static
site. Add audio/music/<name>.mp3 explicitly. +1 pytest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
BenStullsBets
2026-07-02 18:02:22 -07:00
parent da3581afea
commit 89cd6aa1dd
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -53,3 +53,13 @@ def test_build_emits_frontend_baked_json_and_only_referenced_media(tmp_path):
for f in versions["versions"]:
assert (media / f).exists(), f"missing synced media: {f}"
assert result["media_files"] == sum(1 for _ in media.rglob("*") if _.is_file())
def test_build_includes_the_music_playlist(tmp_path):
# The Music-option tracks are referenced by app.js (MUSIC_PLAYLIST), not the
# manifest — the build must copy them explicitly or Music 404s on the static site.
out = tmp_path / "dist"
media = tmp_path / "media"
build_static(out, media, media_base="https://static.benstull.art/", app_path="/human-machine-strata")
for name in ("manatees", "dewdrop", "eastminster", "overheat", "concentration"):
assert (media / "audio" / "music" / f"{name}.mp3").exists(), f"music track not synced: {name}"