gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit84e1b3e184e1b3e1tracker: reports 025 + 026mre84e1b3e1/shows.hl

19.5 KB

  1. // shows.hl — READ-ONLY data access for a show's page (tracker.worldapi.org#4): shows, seasons,
  2. // episodes, persons, genres (storage/mpackdb/, migrated by tools/migrate.hl, tracker.worldapi.org#2).
  3. // Kept apart from watches.hl (the per-user watch state) and from components/show.hl (the page itself)
  4. // so /unwatched and /schedule (tickets #5/#6, "reuse, don't copy") can import the same functions.
  5. //
  6. // No declared index beyond the migration's own ['!oldId'] (opening a table with indexes it wasn't
  7. // created with is untested territory, hybriel#21 "opening a table rewrites its files") — a slug
  8. // lookup is a linear scan of ~9500 shows, cheap for one page load.
  9. import { MPackDB } from 'hl:mpackdb'
  10. import { env } from 'hl:proc'
  11. import { exists } from 'hl:fs'
  12. static envOr = (&name, &fallback) => {
  13. let v = env(name)
  14. return v != null && v.trim() != '' ? v.trim() : fallback
  15. }
  16. static storageDir = envOr('TRACKER_STORAGE', './storage/mpackdb')
  17. static genresTable = new MPackDB(file = storageDir + '/genres.db', primaryKey = '@id', indexes = ['!oldId'])
  18. static personsTable = new MPackDB(file = storageDir + '/persons.db', primaryKey = '@id', indexes = ['!oldId'])
  19. static showsTable = new MPackDB(file = storageDir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])
  20. static seasonsTable = new MPackDB(file = storageDir + '/seasons.db', primaryKey = '@id', indexes = ['!oldId'])
  21. static episodesTable = new MPackDB(file = storageDir + '/episodes.db', primaryKey = '@id', indexes = ['!oldId'])
  22. // the show with this urlSegment (slug), or null. tracker#28: by a slug → id map (one scan, at the first call) — the old scan of
  23. // every record per call (twice per show page) decoded every title's cast + crew: 82 ms per call on the live copy before the
  24. // credits, growing with them. A slug the map does not know (a title added since: import, filmography) costs one scan as before
  25. // and is remembered; slugs never change. (Flat static written key by key, like people.hl's maps.)
  26. // tracker#31 (mission 026): a MERGED title's slug (a tombstone's, below) and a keeper's former slug (`oldSlugs`) answer the
  27. // KEEPER — several records can share one slug (migrated duplicates did), so each slug has a rank: a live record's own slug (3)
  28. // beats a live record's former one (2) beats a tombstone's (1).
  29. static slugIds = {}
  30. static slugRank = {}
  31. static slugIdsBuilt = { yes = false }
  32. // ---- merged titles (tracker#31, mission 026, merge.hl) ----------------------------------------------------------------------
  33. // The old tracker left 68 titles as 2–6 records each (same type + TMDB id). The repair (merge.hl) keeps ONE record (the keeper)
  34. // and turns the others into TOMBSTONES — never deleted: `mergedInto` = the keeper's id, `mergedTmdbId` (their `tmdbId` is
  35. // null, so nothing looks them up by it), `mergedSeasons` (their `seasons` are empty). Every list skips them (isPublicTitle),
  36. // every job skips them, a tombstone's slug and short id lead to the keeper.
  37. static isMerged = (&show) => { return show != null && show.mergedInto != null }
  38. // the record a page shows for this one: the keeper of a tombstone (a chain is followed, at most 5 steps), else itself
  39. static liveShowOf = (&show) => {
  40. let s = show
  41. let n = 0
  42. while (s != null && s.mergedInto != null && n < 5) {
  43. s = showsTable.fetch(s.mergedInto)
  44. n = n + 1
  45. }
  46. return s
  47. }
  48. static holdsSlug = (&s, &slug) => { return s.urlSegment == slug || (s.oldSlugs != null && s.oldSlugs.includes(slug)) }
  49. // this record's slugs into the map (at the build, and by merge.hl after a merge changed a record)
  50. static noteSlugsOf = (&s) => {
  51. let live = s.mergedInto == null
  52. let mine = []
  53. if (s.urlSegment != null) { mine.push({ slug = s.urlSegment rank = live ? 3 : 1 }) }
  54. if (live && s.oldSlugs != null) { for (o of s.oldSlugs) { mine.push({ slug = o rank = 2 }) } }
  55. for (m of mine) {
  56. let cur = slugRank[m.slug]
  57. if (cur == null || m.rank >= cur || slugIds[m.slug] == s.id) {
  58. slugIds[m.slug] = s.id
  59. slugRank[m.slug] = m.rank
  60. }
  61. }
  62. return null
  63. }
  64. static ensureSlugIds = () => {
  65. if (!slugIdsBuilt.yes) {
  66. for (s of showsTable.find(null, null)) { noteSlugsOf(s) }
  67. slugIdsBuilt.yes = true
  68. }
  69. return true
  70. }
  71. static showBySlug = (&slug) => {
  72. if (slug == null || hlTypeName(slug) != 'String' || slug == '') { return null }
  73. ensureSlugIds()
  74. let id = slugIds[slug]
  75. if (id != null) {
  76. let hit = showsTable.fetch(id)
  77. if (hit != null && holdsSlug(hit, slug)) { return liveShowOf(hit) }
  78. }
  79. let found = null
  80. for (s of showsTable.find(null, null)) {
  81. if (holdsSlug(s, slug) && (found == null || (found.mergedInto != null && s.mergedInto == null))) { found = s }
  82. }
  83. if (found != null) {
  84. noteSlugsOf(found)
  85. return liveShowOf(found)
  86. }
  87. return null
  88. }
  89. // project.hl at boot: every slug that is not a live title's own any more (a tombstone's, a keeper's former one) → the keeper's
  90. // page, [{ slug, path }] — answered with a 301 (a component route cannot redirect; project.hl slugMoved asks `movedPathOf`)
  91. static movedPaths = {}
  92. static movedSlugs = () => {
  93. ensureSlugIds()
  94. let out = []
  95. for (slug of slugRank.keys()) {
  96. if (slugRank[slug] < 3) {
  97. let keeper = liveShowOf(showsTable.fetch(slugIds[slug]))
  98. if (keeper != null && keeper.mergedInto == null && keeper.urlSegment != null && keeper.urlSegment != slug) {
  99. let to = titlePath(keeper)
  100. out.push({ slug = slug path = to })
  101. movedPaths['/movies/' + slug] = to
  102. movedPaths['/series/' + slug] = to
  103. }
  104. }
  105. }
  106. return out
  107. }
  108. static movedPathOf = (&path) => { return path != null ? movedPaths[path] : null }
  109. static genreById = (&id) => { return id == null ? null : genresTable.fetch(id) }
  110. // /genres/<genre> (mission 058): the genre with this urlSegment ('Action', 'Sci-Fi-Fantasy'), exact first, else ignoring case
  111. // — a scan of the genres table (27 rows)
  112. static genreBySlug = (&slug) => {
  113. if (slug == null || hlTypeName(slug) != 'String' || slug == '') { return null }
  114. let lower = slug.toLowerCase()
  115. let loose = null
  116. for (g of genresTable.find(null, null)) {
  117. if (g.urlSegment == slug) { return g }
  118. if (loose == null && g.urlSegment != null && ('' + g.urlSegment).toLowerCase() == lower) { loose = g }
  119. }
  120. return loose
  121. }
  122. static personById = (&id) => { return id == null ? null : personsTable.fetch(id) }
  123. static seasonById = (&id) => { return id == null ? null : seasonsTable.fetch(id) }
  124. static showById = (&id) => { return id == null ? null : showsTable.fetch(id) }
  125. static episodeById = (&id) => { return id == null ? null : episodesTable.fetch(id) }
  126. // EVERY show / episode (tracker.worldapi.org#13, catalog.hl): read ONCE when the app starts, to build the public lists —
  127. // never per request
  128. static allShows = () => { return showsTable.find(null, null) }
  129. static allEpisodes = () => { return episodesTable.find(null, null) }
  130. // insertion sort, hand-written (no list sort(), hybriel#1) — a show has a handful of seasons at most
  131. static insertDesc = (&sorted, &s) => {
  132. let out = []
  133. let inserted = false
  134. for (x of sorted) {
  135. if (!inserted && s.seasonNumber >= x.seasonNumber) { out.push(s) inserted = true }
  136. out.push(x)
  137. }
  138. if (!inserted) { out.push(s) }
  139. return out
  140. }
  141. static insertAsc = (&sorted, &e) => {
  142. let out = []
  143. let inserted = false
  144. for (x of sorted) {
  145. if (!inserted && e.episodeNumber <= x.episodeNumber) { out.push(e) inserted = true }
  146. out.push(x)
  147. }
  148. if (!inserted) { out.push(e) }
  149. return out
  150. }
  151. // a show's seasons, latest (highest seasonNumber) first — creator: "all seasons in reverse order,
  152. // latest on top"
  153. static seasonsOfShow = (&show) => {
  154. let sorted = []
  155. for (id of show.seasons) {
  156. let s = seasonsTable.fetch(id)
  157. if (s != null) { sorted = insertDesc(sorted, s) }
  158. }
  159. return sorted
  160. }
  161. // a season's episodes, in episode-number order
  162. static episodesOfSeason = (&season) => {
  163. let sorted = []
  164. for (id of season.episodes) {
  165. let e = episodesTable.fetch(id)
  166. if (e != null) { sorted = insertAsc(sorted, e) }
  167. }
  168. return sorted
  169. }
  170. // ---- labels shared by every list (tracker.worldapi.org#8) -------------------------------------
  171. static pad2 = (&n) => {
  172. let s = '' + n
  173. while (s.length < 2) { s = '0' + s }
  174. return s
  175. }
  176. // an episode as `S01E01` (creator: "write it like that: S01E01") — /my/shows, /my/unwatched, /my/schedule
  177. static episodeCode = (&seasonNumber, &episodeNumber) => { return 'S' + pad2(seasonNumber) + 'E' + pad2(episodeNumber) }
  178. // the show's year: `year`, else the first 4 characters of `release` ('YYYY-MM-DD'; 197 migrated shows have
  179. // no year, a few of those an empty release) — null when neither gives one
  180. static showYear = (&show) => {
  181. if (show.year != null) { return '' + show.year }
  182. if (show.release != null && hlTypeName(show.release) == 'String' && show.release.length >= 4) { return show.release.slice(0, 4) }
  183. return null
  184. }
  185. // a show's title as every list shows it: `Doctor Who (2005)` (creator: so same-named shows can be told apart)
  186. static titleWithYear = (&show) => {
  187. let y = showYear(show)
  188. return y != null ? show.title + ' (' + y + ')' : show.title
  189. }
  190. // ---- the description (tracker#18) ---------------------------------------------------------------
  191. // creator: "i put the summary in an own field for tmdb because some summaries i wanted to rewrite ... in that case the summary
  192. // has priority over maze or tmdb" — `summary` (the creator's own text, never written by the sync), else TMDB's `tmdbSummary`,
  193. // else TVmaze's `tvmazeSummary` (HTML stripped); '' when none
  194. static hasText = (&v) => { return v != null && hlTypeName(v) == 'String' && v.trim() != '' }
  195. static summaryOf = (&show) => {
  196. if (show == null) { return '' }
  197. if (hasText(show.summary)) { return show.summary }
  198. if (hasText(show.tmdbSummary)) { return show.tmdbSummary }
  199. if (hasText(show.tvmazeSummary)) { return show.tvmazeSummary }
  200. return ''
  201. }
  202. // ---- adult titles (mission 054) -----------------------------------------------------------------
  203. // `adult` on every title: true / false from TMDB, null = not known yet (the migrated rows; the app's backfill, tmdbsync.hl
  204. // `backfillTitle`, asks TMDB). The PUBLIC lists (catalog.hl: homepage rows, /movies, /shows) and the search (search.hl) show
  205. // ONLY a title TMDB says is not adult — unknown counts as hidden. A title the user follows stays on /my/* and its page.
  206. // A merged tombstone (tracker#31) is never public.
  207. static isPublicTitle = (&show) => { return show != null && show.adult == false && show.mergedInto == null }
  208. // ---- the kind of a title (tracker.worldapi.org#21, mission 068) ----------------------------------------------
  209. // A TV title (`type = 'series'`) is either a SERIES (TMDB's TV type Scripted, Miniseries, Documentary) or a SHOW (Reality,
  210. // Talk Show, News, Video — or one of our genres Reality / Talk / News, whatever the type). Stored on the title as `kind`
  211. // ('series' | 'show') and TMDB's type as `tmdbType`: by the kind backfill (tmdbsync.hl `kindTitle`, one TMDB request per
  212. // title without a show genre), the daily sync and the search import. Until a title has `kind`, its genres decide (no
  213. // type known yet = series). Movies are `type = 'movie'` and have no kind.
  214. static showTmdbTypes = ['Reality', 'Talk Show', 'News', 'Video']
  215. static showGenreNames = ['Reality', 'Talk', 'News']
  216. static showGenreIdsOf = () => {
  217. let out = {}
  218. for (g of genresTable.find(null, null)) { if (g.name != null && showGenreNames.includes('' + g.name)) { out[g.id] = true } }
  219. return out
  220. }
  221. // the genre ids that make a title a show — read once (the genres table never changes while the app runs)
  222. static showGenreIds = showGenreIdsOf()
  223. static hasShowGenre = (&genres) => {
  224. if (genres == null) { return false }
  225. for (g of genres) { if (showGenreIds[g] == true) { return true } }
  226. return false
  227. }
  228. // 'show' | 'series' from TMDB's type (null = not known) and the title's genre ids
  229. static kindOfTitle = (&tmdbType, &genres) => {
  230. if (hasShowGenre(genres)) { return 'show' }
  231. if (tmdbType != null && showTmdbTypes.includes('' + tmdbType)) { return 'show' }
  232. return 'series'
  233. }
  234. // 'movie' | 'series' | 'show' of a stored title
  235. static titleKind = (&show) => {
  236. if (show.type == 'movie') { return 'movie' }
  237. if (show.kind == 'show' || show.kind == 'series') { return show.kind }
  238. return kindOfTitle(show.tmdbType, show.genres)
  239. }
  240. // a title's own page: /movies/<slug>, /series/<slug>, /shows/<slug> (the old /shows/<slug> of a movie or series answers 301,
  241. // project.hl showsRoute)
  242. static titlePath = (&show) => {
  243. let k = titleKind(show)
  244. return (k == 'movie' ? '/movies/' : (k == 'show' ? '/shows/' : '/series/')) + show.urlSegment
  245. }
  246. // tracker.worldapi.org#20: the type word of a page heading / list label and its colour class (styles.hl `type-*`)
  247. static kindWord = (&kind) => { return kind == 'movie' ? 'Movie' : (kind == 'show' ? 'Show' : 'Series') }
  248. static typeWordOf = (&show) => { return kindWord(titleKind(show)) }
  249. static typeClassOf = (&show) => { return 'type-word type-' + titleKind(show) }
  250. // the poster file name (oldId + the migrated extension) — null when either is missing; served at
  251. // /posters/<name> (project.hl), which falls back to a placeholder when the file itself isn't there
  252. // yet (the real poster files are not part of the mongo export, see the report's `open`)
  253. static posterName = (&show) => {
  254. if (show.oldId == null || show.image == null || show.image == '') { return null }
  255. return show.oldId + '.' + show.image
  256. }
  257. // the poster's URL for a LIST (/my/shows, tracker.worldapi.org#8): `/posters/<name>` only when the file really
  258. // is in storage/mpackdb/posters/ (project.hl posterRoute reads the same folder), else the ONE placeholder URL
  259. // `/posters/none` — the real data has no poster files yet, and 128 different URLs all answering the same
  260. // placeholder were 128 requests per page load (the browser can't cache them as one)
  261. static posterUrlOf = (&show) => { return posterUrlOfName(posterName(show)) }
  262. static posterUrlOfName = (&name) => { return name != null && exists(storageDir + '/posters/' + name) ? '/posters/' + name : '/posters/none' }
  263. // ---- slim per-title caches for the lists (tracker.worldapi.org#30, mission 025) ------------------------------------
  264. // /my/series took 4.4 s on a process that had run the first-start jobs (0.4 s fresh): every load fetched each followed title's
  265. // WHOLE record (cast + crew, up to 300 entries) and one episode per watch (11.7k fetches); /my/unwatched every season and
  266. // episode of every followed title. Each fetch decodes a new object, and with a big live heap (after the jobs) every byte
  267. // allocated feeds the byte-triggered GC. Now a list reads two small cached things per title:
  268. // - `cardOf(id)`: { id type kind title year titleYear href posterName } — what a row shows;
  269. // - `episodeRowsOf(id)`: every episode of the title as { id s e title release }, seasons latest first, episodes in order
  270. // (the same order as seasonsOfShow/episodesOfSeason);
  271. // - `episodeKeyOf(id)`: one episode as { show s e } — /my/series' last watched episode goes by the WATCHED episode's own
  272. // `show` (as before): migrated episodes the sync left outside the title's seasons (a duplicate season, e.g. Reacher S03 on
  273. // the real data) still count. project.hl warms every watched episode at boot.
  274. // Filled at the first ask (project.hl warms the followed titles at boot) and kept in sync by catalog.hl `refreshCatalogShow`,
  275. // which every writer of a title already calls after it changed one (daily sync, repair, kinds, adult backfill, imports):
  276. // it calls `refreshTitleCaches(show)`, which rebuilds the entries that exist. Cached values are only ever RETURNED from a
  277. // function (a `let x = map[k]` deep-copies the value; a return does not — measured: 3.7 ms per 20k-row copy).
  278. static cardCache = {}
  279. static episodeRowsCache = {}
  280. static episodeKeyCache = {}
  281. static cardFrom = (&show) => {
  282. let y = showYear(show)
  283. return {
  284. id = show.id type = show.type kind = titleKind(show) title = show.title year = y != null ? y : ''
  285. titleYear = titleWithYear(show) href = titlePath(show) posterName = posterName(show)
  286. }
  287. }
  288. static cardOf = (&id) => {
  289. if (id == null) { return null }
  290. if (cardCache[id] != null) { return cardCache[id] }
  291. let show = showsTable.fetch(id)
  292. if (show == null) { return null }
  293. cardCache[id] = cardFrom(show)
  294. return cardCache[id]
  295. }
  296. static episodeRowsFrom = (&show) => {
  297. let out = []
  298. if (show.seasons == null) { return out }
  299. // loop names apart from the row's own `s`/`e` keys: inside an object literal a key set earlier shadows the variable
  300. for (sn of seasonsOfShow(show)) {
  301. for (ep of episodesOfSeason(sn)) {
  302. out.push({ id = ep.id s = ep.seasonNumber e = ep.episodeNumber title = ep.title != null ? ep.title : '' release = ep.release })
  303. }
  304. }
  305. return out
  306. }
  307. static episodeRowsOf = (&id) => {
  308. if (id == null) { return [] }
  309. if (episodeRowsCache[id] != null) { return episodeRowsCache[id] }
  310. let show = showsTable.fetch(id)
  311. if (show == null) { return [] }
  312. episodeRowsCache[id] = episodeRowsFrom(show)
  313. return episodeRowsCache[id]
  314. }
  315. // an episode that is not stored is { show = null } (never fetched again)
  316. static episodeKeyOf = (&id) => {
  317. if (id == null) { return { show = null s = null e = null } }
  318. if (episodeKeyCache[id] != null) { return episodeKeyCache[id] }
  319. let ep = episodesTable.fetch(id)
  320. episodeKeyCache[id] = ep != null ? { show = ep.show s = ep.seasonNumber e = ep.episodeNumber } : { show = null s = null e = null }
  321. return episodeKeyCache[id]
  322. }
  323. // a title changed (catalog.hl refreshCatalogShow): its cached entries again from the stored record; the episode keys of its
  324. // episodes from the new rows (numbers the sync changed). Keys of a title nobody follows (no rows cached) are not refreshed —
  325. // /my/series only reads followed titles, and warmTitleCaches covers every followed one at boot.
  326. static refreshTitleCaches = (&show) => {
  327. if (cardCache[show.id] != null) { cardCache[show.id] = cardFrom(show) }
  328. if (episodeRowsCache[show.id] != null) {
  329. episodeRowsCache[show.id] = episodeRowsFrom(show)
  330. let sid = show.id
  331. for (r of episodeRowsOf(sid)) {
  332. if (episodeKeyCache[r.id] != null) { episodeKeyCache[r.id] = { show = sid s = r.s e = r.e } }
  333. }
  334. }
  335. return null
  336. }
  337. // project.hl at boot: the titles anyone follows and every watched episode, so the first /my/ load after a start is not the one
  338. // that fills them
  339. static warmTitleCaches = (&ids) => {
  340. let n = 0
  341. for (id of ids) {
  342. if (cardOf(id) != null) { episodeRowsOf(id) n = n + 1 }
  343. }
  344. return n
  345. }
  346. static warmEpisodeKeys = (&ids) => {
  347. for (id of ids) { episodeKeyOf(id) }
  348. return ids.length
  349. }
  350. // merge.hl (tracker#31): an episode that moved to another title — its key is read again at the next ask
  351. static forgetEpisodeKey = (&id) => {
  352. episodeKeyCache[id] = null
  353. return null
  354. }
  355. // ---- the show on other sites (tracker.worldapi.org#12) ------------------------------------------
  356. // the header's link icons: TMDB, IMDb, TheTVDB, TVmaze — ONLY for the ids the show has; a movie (`type = 'movie'`)
  357. // gets TMDB + IMDb. TheTVDB's id form is `/dereferrer/series/<id>` (checked 2026-10-01: it and the old
  358. // `?tab=series&id=` both 301 to the slug page); the others are the sites' own id URLs (they too 301 to a slug).
  359. static hasExternalId = (&v) => { return v != null && ('' + v).trim() != '' }
  360. static externalLinksOf = (&show) => {
  361. let out = []
  362. let movie = show.type == 'movie'
  363. if (hasExternalId(show.tmdbId)) { out.push({ site = 'tmdb' label = 'TMDB' title = 'On TMDB' href = 'https://www.themoviedb.org/' + (movie ? 'movie/' : 'tv/') + show.tmdbId }) }
  364. if (hasExternalId(show.imdbId)) { out.push({ site = 'imdb' label = 'IMDb' title = 'On IMDb' href = 'https://www.imdb.com/title/' + show.imdbId + '/' }) }
  365. if (!movie && hasExternalId(show.tvdbId)) { out.push({ site = 'tvdb' label = 'TVDB' title = 'On TheTVDB' href = 'https://thetvdb.com/dereferrer/series/' + show.tvdbId }) }
  366. if (!movie && hasExternalId(show.tvmzId)) { out.push({ site = 'tvmaze' label = 'TVmaze' title = 'On TVmaze' href = 'https://www.tvmaze.com/shows/' + show.tvmzId }) }
  367. return out
  368. }

Branches

Latest commits

  • 84e1b3e1tracker: reports 025 + 026mre
  • dc40d859tracker#31 (mission 026): duplicate titles merged — the 68 type+tmdbId pairs held by 157 records were the old tracker's (all migrated); merge.hl repair job (own clock, before the TMDB jobs) keeps one keeper per title (follows/watches > old short id > oldest), moves follows, watches, seasons, cast, credits, timelines, tombstones the rest (mergedInto, never deleted), slugs + short ids 301 to the keeper; stray seasons merged into their listed twin (Reacher S3 watches) or linked when watched; search import re-checks before its put; deploy.sh waits up to 90 s for 200; real copy 68 -> 0 dup ids, az5b2 follows/watches equal; gates 342/0, 32/0, 52/0mre
  • 2667da05tracker#30 (mission 025): /my/ pages from slim cached title cards, episode rows and watch sets (after the jobs /my/series 1.8 s -> 0.06 s, /my/unwatched 4.1 -> 0.18 s); timeline page shows its name once; franchise widget under the poster/title; movies with TV leftovers (First Contact) go through the details repair; tools/count-tmdb-ids.hl; gates 327/0, 52/0, 32/0mre
  • 3909810dantcolony#40: mission references in README/STATUS/docs point to the moved missionsmre
  • e63b1d28antcolony#40: history (LOG.md), worker briefs (missions/) and reports moved here from antcolony, numbered per project; old numbers in antcolony docs/mission-map.mdmre
  • 1cda451dtracker: Hybriel master 190aa11d (#127 both shapes, GC correctness fc838894) — conductor adopts despite /my/series 2.4x after jobs (memory 8.0 → 1.7 GB boot); see reports/071mre
  • c1fa2f2etracker (mission 071): Hybriel master 190aa11d measured on the real copy vs the live binary 8590df63 — NOT adopted (after the first-start jobs /my/series 2.4x slower, /series 1.6x, RSS swings 7.4-12.2 GB; fresh it is flat at 1.7-2.2 GB and /my/unwatched faster), vendor stays 8efba065, candidate kept in .scratch/w071/vendor-190aa11d; tests/kinds.mjs: collection seed off (its TMDB request broke check 1 in 1 of 4 runs); tests/realdata-071.sh + realdata-071-bench.mjs + tools/realdata-071-table.py; README + STATUS (numbers, how to repeat); gates 325/0, 32/0, 50/0mre
  • 8081350atracker docs (mission 070): README (summary, Config HL_GC_BYTES — kept at Hybriel's default, the 256 MiB setting is taken out of docker-compose.yml again: the jobs grew to 12+ GB with it too, see STATUS), Test (three gates), Deploy (first start ~50 min: kinds then seed, restart once after collections done, memory numbers), Vendored Hybriel 8efba065 + #48 audit, Files; STATUS mission 070 entry (merges, migrated counts, lambda audit, gates, RSS old vs new, how to repeat, open points); docs/kinds.md + docs/franchises.md job order; tests/realdata-070-*.sh, tools/count-migrated.hl, tools/ref-params.py, tools/lambda-audit.pymre
  • 1ad19c8ctracker: re-vendor Hybriel master 8efba065 (#126 GC by bytes, #48 lambda parameters copy) (mission 070): bin/hybriel sha256 50361e95…, plugins core crypto data fetch fs http http1 mpackdb proc smtp time web; lambda audit: 13 lambdas change a passed record/list (11 through a local alias), no caller relies on it — unchanged; 319 read-only lambda parameters get & (no copy per call: /my/schedule 2.35 → 0.46 s, /my/unwatched 13.7 → 5.7 s on the real copy); /my/unwatched one merge sort instead of n² inserts; docker-compose HL_GC_BYTES=268435456; deploy.sh runs kinds.mjs + franchises.mjs too (default ports 8700–8710); tests/realdata-070.mjs; gates browser 325/0, kinds 32/0, franchises 50/0mre
  • 46b21389tracker (mission 070, conductor): the sync never destroys migrated data — the one-time summary step MOVES a copied summary to migratedSummary (marker summaries-moved.txt) instead of clearing it; a migrated record's first title/genres/homepage/tagline TMDB replaces → migratedTitle/migratedGenres/migratedHomepage/migratedTagline, a migrated season's/episode's title/summary → migratedTitle/migratedSummary (set once); tests/peek-shows.hl prints them; gate 325/0mre
  • 749019b0Merge t19 (tracker#19 franchises + timelines) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/browser.mjs/faketmdb.mjs, both sides kept; franchise/timeline pages get #20's typed heading (Franchise | …, Timeline | …), their title links via titlePath (/movies|/series|/shows); the collection seed waits for repair, kinds and credits too; franchises.mjs URLs + 2 new checks; gates browser 323/0, kinds 32/0, franchises 50/0mre
  • daf49feaMerge t20 (tracker#20 typed headings + #21 series/shows split) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/search.hl/components/search.hl/browser.mjs/faketmdb.mjs, both sides kept; clock order backfill → repair → kinds → credits; withDetailsFields stores tmdbType + kind; gates: browser.mjs URLs → /series|/movies, typed h1 selectors; kinds.mjs repair/credits off, fixture name = seed name; browser 323/0, kinds 32/0mre
  • 20e09d89Merge t18 (tracker#18 delta sync) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/browser.mjs, both sides kept; pageShowOf summary = summaryOfmre
  • f83571c3tracker#18 (mission 067): daily sync by change lists — TMDB /tv|movie/changes (since the stored day, paged) + TVmaze /updates/shows → only our changed titles (followed: full step, unfollowed: light step — changed seasons, no TVmaze), full walk on first run / gap > 14 days / failed list; show record refreshed (title, tmdbSummary, tagline, status, genres …; renamed titles re-indexed); summary = the creator's own text (page: summary > tmdbSummary > tvmazeSummary), one-time clear of copied summaries (9,647 on the live copy); gate 261, tests/realdata-018*.mjs, README + STATUSmre
  • 1ed5457etracker#20 + #21 (mission 068): typed headings "<Type> | <name>" in type colours; TV titles split into Series (/series) and Shows (/shows) by TMDB type + Reality/Talk/News genres — kind stored by sync/import/adult backfill + new kind backfill (resumes), /movies/<slug>, /shows/<slug> of a series/movie → 301, /my/series + /my/shows, home 5 tiles + 3 rows, search/filmography labels; gates kinds 32 + browser 266, tests/realdata-068.mjs, tools/count-kinds.hl, docs/kinds.md, README + STATUSmre
  • f2b00674Merge t26 (tracker#26 + #28) into main (mission 062): short ids for every new person (castPersonId, guest route), guest stars stored on the title and created as people only when opened (/person/tmdb/<id>?show=<id> → 302), lean watch/follow clicks (showRow a small object, cast/crew from the slug, watches cached per user, face rows only after a season toggle); gate 311, tests/realdata-062.mjs, README + STATUSmre
  • 0553b51ftracker#19 (mission 066): franchises and timelines — tables, /franchises, /franchises/<slug>, /timelines/<slug> (Timeline | Release sort, series by last episode), the Prequel | Timeline | Sequel widget with the franchise above, the creator's editor, TMDB collection seed in the app (resumes, paced); gate tests/franchises.mjs 48/0 + browser.mjs 266/0, tests/realdata-066.mjs, docs/franchises.md, README + STATUSmre
  • fa1f9dfatracker#29 (mission 063): unwatched check muted grey outline + check (accent only on hover), watched stays solid — no code regression, the accent outline read as ticked; gate checks real checks visibly (computed style + screenshot pixel) on /my/unwatched, show, movie, /my/movies; gate 266, tests/realdata-063.mjs, README + STATUSmre
  • 10bb3f93tracker#28 (mission 061): full cast (all seasons, main cast by episodes, guest stars) + crew (created by, directed by, written by, screenplay, story, music) — stored by the details completion, the daily sync, the search import (one details request) and a background credits job (resumes, RSS limit); show page collapsed after 20 with client-side Show all; showBySlug via a slug map; gate 249, tests/realdata-028.mjs, README + STATUSmre
  • d8b12d67tracker#27 (mission 060): short ids for movies, series and persons — old 702 kept (data/old-short-ids.json), new random [a-z0-9]{5} unique across both, claimed at creation, background backfill (resumes), shown under poster/photo, /<shortId> → 301; gate 259, tests/realdata-060*, README + STATUSmre