aboutsummaryrefslogtreecommitdiffstats
path: root/CLAUDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 9aac263..5463437 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -493,6 +493,42 @@ do. Read them before writing anything that touches the same mechanism.
viewport from the layout one), which was plausible, cost a round trip, and
was wrong; the screenshot showing no keyboard was already in hand.
+- **Derived data that nothing persists is re-derived where somebody is
+ watching.** `video_meta`, `photo_meta` and `thumbs` were durable; the audio
+ tags were not, so every node start re-read every audio file it serves and,
+ until that pass landed, served an index with no artist on any track — an
+ index the Music app cannot group. Nobody noticed for months because the
+ re-read is cheap and the node is usually up. `media_cache.audio_meta` holds
+ it now: the pass over a real 6176-file library costs 27.8s cold and 6.4s
+ cached. **What goes in such a cache is what the file's bytes decided, never
+ the field as the app finally sees it** — `display_title`, `track_no`, artist
+ and album can also come from the filename and the folder, and a rename has to
+ re-derive those; storing the resolved field would hand a renamed file the old
+ name's answer, which is the fault `_reenrich_renamed_audio_entries` exists to
+ prevent. The sibling-cover scan stays live for the mirror-image reason: it
+ reads the *folder*, so caching "no cover" would make a cover dropped in
+ afterwards unfindable. And a read that *failed* is not an answer — caching
+ "this file says nothing" for a drive that did not respond makes one bad read
+ permanent
+
+- **A view that draws one shape of unit, beside an emptiness test that counts
+ every shape.** The Music grid's unit is an album; a track whose artist tag is
+ empty belongs to none, so it was drawn nowhere — while `empty` counted it and
+ therefore stayed false. Neither "no music" nor anything else appeared: a
+ toolbar over a blank page, with every track one mode-switch away and nothing
+ saying so. Both halves read as correct alone, which is why no amount of
+ re-reading the file found it; what found it was rendering the component
+ against entries with no artist and looking (`music_untagged_probe.py`).
+ **Whenever a mode filters the units it draws, the emptiness test has to be
+ asked of that mode, not of the library** — or the two disagree and the
+ disagreement is silent. Fixed by giving the untagged pile a card of its own,
+ the same shape the singleton folding already minted, so the two agree by
+ construction rather than by a second condition someone has to maintain. That
+ card also stopped a cover lookup going out for a release name the browser
+ itself wrote: a third-party request, on the operator's connection, that
+ cannot match anything, seen in a live log naming a placeholder as both artist
+ and release
+
- **Three headers decide whether a page may frame itself, and they must agree.**
The same streamed download navigates a hidden iframe to `/_mbdl/<id>`.
`frame-src` was reCAPTCHA's two origins with no `'self'`, `frame-ancestors`