Both cold reviews (different model families) independently rated the deferral
MEDIUM, and the deciding fact I had not checked when I deferred: each of the six
repository methods involved has exactly ONE caller — the dead handler. Zero
blast radius, so "cheap and safe" beat "dead code, leave it", and leaving a
known instance of the mechanism this PR's own record establishes is what rots.
- GetSeasonCount expanded to the same Title+Year show set GetPagedSeasons pages
(it counted only the requested ShowId, so the same show present in two
libraries under-reported: count 2 against a 5-row page).
- GetEpisodeCount and GetMusicVideoCount now count the METADATA table their
pages are taken from, not the item table. An item whose metadata row was lost
to a scanner failure — a state FindOrphanPaths and RemoveMetadata both model —
inflated the total and produced the permanently-empty-page symptom.
The 1-based pageNumber on these three is a separate defect against
api.paging-zero-based and stays open in #832, which is now narrowed to that plus
the delete-or-keep question.
Mutation proof: restoring all three pre-fix counts turns all four new
MediaCardsCountMatchesPageTests red.
Two findings that only appeared by writing those tests, both now pinned or
recorded rather than left as folklore:
- GetSeasonCount has a third answer — with no ShowMetadata row there is nothing
to expand from, so GetPagedSeasons returns nothing and the count must be 0,
not the show's season total. Pinned as its own case.
- The episode page can be narrower than even the metadata count: its include
chain walks Episode -> Season -> Show -> ShowMetadata and a missing Show drops
every row. So "count the table the page reads" is necessary and NOT sufficient
wherever an include chain can filter. Recorded in the record and #832 rather
than claimed closed.
Also from review: docs/README.md's row now resolves the rule by KEY through the
catalog rather than hard-linking record paths, per the catalog-first convention
it was violating.
refs #832