ensure_media_view ran media-view.sh install on a host where the documented base directory did not exist, and install refuses by design (refused: upper base /var/lib/media-meta does not exist (put it on the SSD first)) — so tonight's overlay cutover would have died at the restart step with nobody beside the box.
Change
scripts/media-view.sh: new ensure-base subcommand (idempotent; creates the documented /var/lib/media-meta; refuses by name when it cannot write it).
tests/media_overlay.bats: two seams — ensure-base behaviour (creates a missing base, second call is a no-op, non-root refusal names root), and the deployer-ordering invariant.
Docs flip with the deploy: the view is live on Dankserver, both media servers verified resolving real media through it. The stale "never been deployed" claims in the view / Plex / Jellyfin / AGENTS pages are corrected, and three laws join them:
a container restart discards the in-flight library scan and nothing resumes it ("Status": "Aborted");
Jellyfin 12.4 authenticates only Authorization: MediaBrowser Token="…", so a 401 says nothing about a key until the ApiKeys table is read;
Plex answers 32400 over TLS only, so a plaintext probe reads as a dead server.
Measured
./tests/run.sh on this branch (after merging main, which carries #112): 791 ok, exit 0 — 789 from the seam-fix worktree plus the two seams this branch adds; measured on this checkout, not borrowed
the cutover itself: deploy.sh dankserver --service plex and --service jellyfin, each with the Playwright gate — 37 passed both times
binds after deploy: plex/var/lib/media-meta/view:/mnt/entropy:ro, jellyfin/var/lib/media-meta/view:/data:rw; podman exec resolves a 1.9 GB and an 8.2 GB file through the view; upper layer 0 files (nothing has written yet)
No deploy is wanted when this lands — the hosts already run this exact state (installed by hand tonight), and a service-scoped deploy would restart a media server and abort the library walk that is running now.
## Why
`ensure_media_view` ran `media-view.sh install` on a host where the documented base directory did not exist, and `install` refuses **by design** (`refused: upper base /var/lib/media-meta does not exist (put it on the SSD first)`) — so tonight's overlay cutover would have died at the restart step with nobody beside the box.
## Change
- `scripts/media-view.sh`: new `ensure-base` subcommand (idempotent; creates the documented `/var/lib/media-meta`; refuses by name when it cannot write it).
- `scripts/deploy-remote.sh`: `ensure_media_view` calls `ensure-base` **before** `install`.
- `tests/media_overlay.bats`: two seams — `ensure-base` behaviour (creates a missing base, second call is a no-op, non-root refusal names root), and the deployer-ordering invariant.
- Docs flip with the deploy: the view is **live on Dankserver**, both media servers verified resolving real media through it. The stale "never been deployed" claims in the view / Plex / Jellyfin / AGENTS pages are corrected, and three laws join them:
- a container restart discards the in-flight library scan and nothing resumes it (`"Status": "Aborted"`);
- Jellyfin 12.4 authenticates only `Authorization: MediaBrowser Token="…"`, so a 401 says nothing about a key until the `ApiKeys` table is read;
- Plex answers 32400 over TLS only, so a plaintext probe reads as a dead server.
## Measured
- `./tests/run.sh` on this branch (after merging main, which carries #112): **791 ok, exit 0** — 789 from the seam-fix worktree plus the two seams this branch adds; measured on this checkout, not borrowed
- the cutover itself: `deploy.sh dankserver --service plex` and `--service jellyfin`, each with the Playwright gate — **37 passed** both times
- binds after deploy: `plex` `/var/lib/media-meta/view:/mnt/entropy:ro`, `jellyfin` `/var/lib/media-meta/view:/data:rw`; `podman exec` resolves a 1.9 GB and an 8.2 GB file through the view; upper layer 0 files (nothing has written yet)
**No deploy is wanted when this lands** — the hosts already run this exact state (installed by hand tonight), and a service-scoped deploy would restart a media server and abort the library walk that is running now.
---
cwd: `/home/blank/.omp/wt/wt-20261030-163847-6d1fc1f` · session: 01a18f2e-18b1-7573-bcd5-ac99636f8bcb
`ensure_media_view` ran `install` on a host where the documented base directory
did not exist, and `install` refuses by design ("put it on the SSD first") — so
tonight's cutover would have died at the restart step with nobody beside the
box. `media-view.sh ensure-base` now makes the documented directory, and the
deployer calls it first; two seams cover it (the subcommand's behaviour, and the
ordering invariant inside `ensure_media_view`).
Docs flip with the deploy: the view is live on Dankserver (both media servers
verified resolving real media through it), so every "never been deployed" claim
in the view, Plex, Jellyfin and AGENTS pages is corrected, and three laws join
them — a container restart discards the in-flight library scan and nothing
resumes it; Jellyfin 12.4 authenticates only the `MediaBrowser Token` form, so a
401 says nothing about the key until the `ApiKeys` table is read; and Plex
answers 32400 over TLS only, which makes a plaintext health probe read as dead.
dank
merged commit 6c115c1394 into main2026-10-31 19:36:53 -07:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
ensure_media_viewranmedia-view.sh installon a host where the documented base directory did not exist, andinstallrefuses by design (refused: upper base /var/lib/media-meta does not exist (put it on the SSD first)) — so tonight's overlay cutover would have died at the restart step with nobody beside the box.Change
scripts/media-view.sh: newensure-basesubcommand (idempotent; creates the documented/var/lib/media-meta; refuses by name when it cannot write it).scripts/deploy-remote.sh:ensure_media_viewcallsensure-basebeforeinstall.tests/media_overlay.bats: two seams —ensure-basebehaviour (creates a missing base, second call is a no-op, non-root refusal names root), and the deployer-ordering invariant."Status": "Aborted");Authorization: MediaBrowser Token="…", so a 401 says nothing about a key until theApiKeystable is read;Measured
./tests/run.shon this branch (after merging main, which carries #112): 791 ok, exit 0 — 789 from the seam-fix worktree plus the two seams this branch adds; measured on this checkout, not borroweddeploy.sh dankserver --service plexand--service jellyfin, each with the Playwright gate — 37 passed both timesplex/var/lib/media-meta/view:/mnt/entropy:ro,jellyfin/var/lib/media-meta/view:/data:rw;podman execresolves a 1.9 GB and an 8.2 GB file through the view; upper layer 0 files (nothing has written yet)No deploy is wanted when this lands — the hosts already run this exact state (installed by hand tonight), and a service-scoped deploy would restart a media server and abort the library walk that is running now.
cwd:
/home/blank/.omp/wt/wt-20261030-163847-6d1fc1f· session: 01a18f2e-18b1-7573-bcd5-ac99636f8bcb`ensure_media_view` ran `install` on a host where the documented base directory did not exist, and `install` refuses by design ("put it on the SSD first") — so tonight's cutover would have died at the restart step with nobody beside the box. `media-view.sh ensure-base` now makes the documented directory, and the deployer calls it first; two seams cover it (the subcommand's behaviour, and the ordering invariant inside `ensure_media_view`). Docs flip with the deploy: the view is live on Dankserver (both media servers verified resolving real media through it), so every "never been deployed" claim in the view, Plex, Jellyfin and AGENTS pages is corrected, and three laws join them — a container restart discards the in-flight library scan and nothing resumes it; Jellyfin 12.4 authenticates only the `MediaBrowser Token` form, so a 401 says nothing about the key until the `ApiKeys` table is read; and Plex answers 32400 over TLS only, which makes a plaintext health probe read as dead.