Two guards on the movie relayout, both found by the live run.
1 · A series is the name before the episode marker
Frank found Monk in the movie library. Worse than one show in the wrong share: the live relayout filed its 124 episodes as 124 separate movies, each in its own folder — Movies/monk s07e13 mr monk makes the playoffs (2002)/monk s07e13 mr monk makes the playoffs (2002).mkv.
The planner groups episode-shaped files and quarantines a series into _TV needs a TV library - <name>; under five files it stays put, because a lone film named Part 2 is a film. The grouping key was key_of(title) — the episode's own title, so the naming convention decided the outcome:
Big Little Lies S01E01.mp4 → key big little → 7 together → quarantined ✅
Monk - S05E03 - Mr. Monk and the Big Game.mkv → key monk s05e03 → one group per episode, never ≥5 → filed as a movie ❌
The convention that puts the episode title after the marker is the common box-set convention, and it was the one the guard could not see.
media-titles.ep_of now returns the series — the name before the SxxEyy / 1x04 / Part N marker, whole title as fallback when a file is named only by its marker — and media-plan.py groups and names the pile by it. One show, one pile, readable name: the live pile used to be _TV needs a TV library - big little lies s01e03, named after whichever episode won a Counter tie.
2 · A sweep carries the emptied folder's own empty subfolders
Sweeping the husks the apply left: 2271 folders removed, 146 left standing, files 8193 before and 8193 after — no file was touched. Every survivor is a release folder blocked by a junk subfolder that no file ever moved out of:
Eligibility was per-folder, so the blocker was never itself a target and its parent could never be removed. Proof now carries downward: inside a folder the journal shows emptied, every empty directory qualifies — nothing under it can hold data. Every removal is still journalled as rmdir, still undone by the same rollback, still refused for a folder nobody moved or a subtree holding a symlink.
Evidence
tests/media_relayout.bats had no TV test at all — which is how #1 survived — and no test for the junk-subfolder case. Three added, each red first (the sweep one verified red against the previous revision by running the same test through git show HEAD:scripts/media-apply.py):
a box set in the movie library is quarantined, not filed as movies — both naming conventions land in the right pile; 10 episodes across 2 series make exactly 2 piles of 5.
a film named Part 2 is not called a series — the ≥5 threshold still protects a film.
a swept folder carries the empty junk folders inside it.
Re-planned the live census with the fixed planner: moves unchanged at 8189, episode files 168 across 3 series (Monk 124, Leah Remini 37, Big Little Lies 7) instead of 44 across 2.
./tests/run.sh: 624 tests, all pass.
Runbook gains both laws; the Plex law was tightened to say why (the database keeps the release-folder path, so playback 404s while the section rescans — never read that 404 as a lost file).
Follow-up this unblocks
The 168 episode files are on disk in movie folders. Frank's chosen end state is the TV library at /mnt/entropy/TVShows in Jellyfin/Plex shape — that is a separate change: the movie tool must keep refusing to file TV.
Two guards on the movie relayout, both found by the live run.
## 1 · A series is the name before the episode marker
Frank found *Monk* in the movie library. Worse than one show in the wrong share: the live relayout **filed its 124 episodes as 124 separate movies**, each in its own folder — `Movies/monk s07e13 mr monk makes the playoffs (2002)/monk s07e13 mr monk makes the playoffs (2002).mkv`.
The planner groups episode-shaped files and quarantines a *series* into `_TV needs a TV library - <name>`; under five files it stays put, because a lone film named `Part 2` is a film. The grouping key was `key_of(title)` — the episode's **own** title, so the naming convention decided the outcome:
- `Big Little Lies S01E01.mp4` → key `big little` → 7 together → quarantined ✅
- `Monk - S05E03 - Mr. Monk and the Big Game.mkv` → key `monk s05e03` → **one group per episode**, never ≥5 → filed as a movie ❌
The convention that puts the episode title *after* the marker is the common box-set convention, and it was the one the guard could not see.
`media-titles.ep_of` now returns the **series** — the name before the `SxxEyy / 1x04 / Part N` marker, whole title as fallback when a file is named only by its marker — and `media-plan.py` groups and names the pile by it. One show, one pile, readable name: the live pile used to be `_TV needs a TV library - big little lies s01e03`, named after whichever episode won a `Counter` tie.
## 2 · A sweep carries the emptied folder's own empty subfolders
Sweeping the husks the apply left: **2271 folders removed, 146 left standing**, files 8193 before and 8193 after — no file was touched. Every survivor is a release folder blocked by a junk subfolder that no file ever moved out of:
```
Willy Wonka & the Chocolate Factory (1971) [1080p]/Other
Y2k.2024...-AOC/Screens Your.Highness...-ETRG/Screenshots
[ www.Torrenting.com ] - Dudley.Do-Right.../Sample
```
Eligibility was per-folder, so the blocker was never itself a target and its parent could never be removed. Proof now carries **downward**: inside a folder the journal shows emptied, every empty directory qualifies — nothing under it can hold data. Every removal is still journalled as `rmdir`, still undone by the same `rollback`, still refused for a folder nobody moved or a subtree holding a symlink.
## Evidence
- `tests/media_relayout.bats` had **no TV test at all** — which is how #1 survived — and no test for the junk-subfolder case. Three added, each red first (the sweep one verified red against the previous revision by running the same test through `git show HEAD:scripts/media-apply.py`):
- `a box set in the movie library is quarantined, not filed as movies` — both naming conventions land in the right pile; 10 episodes across 2 series make exactly 2 piles of 5.
- `a film named Part 2 is not called a series` — the ≥5 threshold still protects a film.
- `a swept folder carries the empty junk folders inside it`.
- Re-planned the **live** census with the fixed planner: moves unchanged at 8189, episode files 168 across 3 series (Monk 124, Leah Remini 37, Big Little Lies 7) instead of 44 across 2.
- `./tests/run.sh`: 624 tests, all pass.
- Runbook gains both laws; the Plex law was tightened to say *why* (the database keeps the release-folder path, so playback 404s while the section rescans — never read that 404 as a lost file).
## Follow-up this unblocks
The 168 episode files are on disk in movie folders. Frank's chosen end state is the TV library at `/mnt/entropy/TVShows` in Jellyfin/Plex shape — that is a separate change: the movie tool must keep refusing to file TV.
---
cwd: /home/blank/.omp/wt/wt-20261030-163847-6d1fc1f · session: 01a18f2e-18b1-7573-bcd5-ac99636f8bcb
Keyed on the whole episode title, every episode of a box set became a group of
one and never reached the five-episode size that calls something a series, so
the live run filed 124 Monk episodes as 124 movie folders, each named after its
own episode. ep_of now returns the series — the name before SxxEyy / 1x04 /
Part N — and the planner groups and names the quarantine pile by that series,
so one show is one pile: 'Monk - S05E03 - Mr. Monk and the Big Game' is series
monk. The threshold keeps its job: a lone film named Part 2 stays a film.
Re-planning the live census with this moves nothing differently except the 124
Monk files, which now join the TV pile: 168 episode files across 3 series.
The live sweep removed 2271 husks and left 146 standing, every one a release
folder blocked by a junk subfolder (Screens/, Sample/, a BDMV leaf) that no
file ever moved out of. Eligibility was per-folder, so the blocker was never a
target and its parent could never be removed.
Proof now carries downward: inside a folder the journal shows emptied, every
empty directory qualifies. Nothing under such a folder can hold data, and every
removal is still journalled as rmdir and undone by rollback.
The new test is red against the previous revision, green now. The live sweep
touched no file: 8193 before, 8193 after.
dank
merged commit 5cd9a0c4c2 into main2026-10-30 20:20:25 -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.
Two guards on the movie relayout, both found by the live run.
1 · A series is the name before the episode marker
Frank found Monk in the movie library. Worse than one show in the wrong share: the live relayout filed its 124 episodes as 124 separate movies, each in its own folder —
Movies/monk s07e13 mr monk makes the playoffs (2002)/monk s07e13 mr monk makes the playoffs (2002).mkv.The planner groups episode-shaped files and quarantines a series into
_TV needs a TV library - <name>; under five files it stays put, because a lone film namedPart 2is a film. The grouping key waskey_of(title)— the episode's own title, so the naming convention decided the outcome:Big Little Lies S01E01.mp4→ keybig little→ 7 together → quarantined ✅Monk - S05E03 - Mr. Monk and the Big Game.mkv→ keymonk s05e03→ one group per episode, never ≥5 → filed as a movie ❌The convention that puts the episode title after the marker is the common box-set convention, and it was the one the guard could not see.
media-titles.ep_ofnow returns the series — the name before theSxxEyy / 1x04 / Part Nmarker, whole title as fallback when a file is named only by its marker — andmedia-plan.pygroups and names the pile by it. One show, one pile, readable name: the live pile used to be_TV needs a TV library - big little lies s01e03, named after whichever episode won aCountertie.2 · A sweep carries the emptied folder's own empty subfolders
Sweeping the husks the apply left: 2271 folders removed, 146 left standing, files 8193 before and 8193 after — no file was touched. Every survivor is a release folder blocked by a junk subfolder that no file ever moved out of:
Eligibility was per-folder, so the blocker was never itself a target and its parent could never be removed. Proof now carries downward: inside a folder the journal shows emptied, every empty directory qualifies — nothing under it can hold data. Every removal is still journalled as
rmdir, still undone by the samerollback, still refused for a folder nobody moved or a subtree holding a symlink.Evidence
tests/media_relayout.batshad no TV test at all — which is how #1 survived — and no test for the junk-subfolder case. Three added, each red first (the sweep one verified red against the previous revision by running the same test throughgit show HEAD:scripts/media-apply.py):a box set in the movie library is quarantined, not filed as movies— both naming conventions land in the right pile; 10 episodes across 2 series make exactly 2 piles of 5.a film named Part 2 is not called a series— the ≥5 threshold still protects a film.a swept folder carries the empty junk folders inside it../tests/run.sh: 624 tests, all pass.Follow-up this unblocks
The 168 episode files are on disk in movie folders. Frank's chosen end state is the TV library at
/mnt/entropy/TVShowsin Jellyfin/Plex shape — that is a separate change: the movie tool must keep refusing to file TV.cwd: /home/blank/.omp/wt/wt-20261030-163847-6d1fc1f · session: 01a18f2e-18b1-7573-bcd5-ac99636f8bcb