gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit8f1d45428f1d4542tracker#40: superseded collections — a TMDB collection timeline whose titles are all in one curated timeline is hidden (supersededBy; kept: own page + editor finder), set by the collection seed when it makes one and by the curated build (lifted when the cover is gone); partly covered ones join that franchise; no second widget (First Contact: only Star Trek — Prime); gate franchiseseed 26/0, browser 365/0, kinds 32/0, franchises 53/0, check-theme 0; real copy 24 supersededmre8f1d4542/reports/021-tracker-delta-sync.md

4.9 KB

  1. # Report 067: tracker#18 delta sync, show record refresh, summary priority
  2. **Commit**: `f83571c` on branch `t18` (worktree loreana:/media/STORAGE/projects/tracker-wt18, from t26 head 10bb3f9). Not pushed, not merged, not deployed. main, tracker-wt26 and tracker-wt19 were not touched.
  3. ## Files (merge notes)
  4. - New: `deltasync.hl` (the plan from the change lists, `sync-state.txt`, one-time `clearCopiedSummaries`), `tests/peek-shows.hl`, `tests/realdata-018.mjs`, `tests/realdata-018-poll.mjs`.
  5. - `tmdbsync.hl`: `syncShowDelta` (the light step), `changedSeasonNumbers`, `emptyResult`. The TVmaze request is now `/shows/<id>?embed=episodes`, which also brings `tvmazeSummary` (through `stripHtml`). `syncShowPart` only reads the episodes of its own part, and takes an `only.tvmaze` flag.
  6. - `details.hl`: `withDetailsFields` (shared with #26 `firstStep`, which no longer writes `summary`) and `applySynced`.
  7. - `project.hl`: `syncTick` rewritten for planning, delta and full walk. The clock's `busy` now includes planning. Adds the boot-time summary clear.
  8. - `tools/sync-tmdb.hl`: `--delta [--since D] [--plan]`, and uses `applySynced`.
  9. - `search.hl`: `haveTvmz`/`titleIdByTvmaze`, `searchTitleRenamed` (stale entries), and import `summary = null`.
  10. - `people.hl` (1 line, `summary = null`), `shows.hl` (`summaryOf`), `components/show.hl` (uses `summaryOf`).
  11. - Tests: `tests/browser.mjs`, `tests/faketmdb.mjs` (change lists, updates, embed, summaries), `tests/seed-show.hl` (the movie's summary is a copy).
  12. - `README.md` and `STATUS.md`: expect conflicts with the t19 and 062 merges in these two docs only. The code overlaps with people.hl and search.hl are small.
  13. ## Gate
  14. `TRACKER_GATE_SHOTS=/tmp/w067-shots TRACKER_GATE_PORT=8751 TRACKER_GATE_IDENT_PORT=8752 TRACKER_GATE_TMDB_PORT=8753 TRACKER_GATE_CHROME=8754-8756 node tests/browser.mjs` → **`261 passed, 0 failed`** (249 before, plus 12 #18 checks).
  15. What the 12 checks prove:
  16. - A changed title is refreshed: renamed, with its new text and tagline.
  17. - The creator's own summary is kept.
  18. - A copied summary is cleared at the first start.
  19. - Titles that did not change are untouched (same `tmdbSync`).
  20. - An unfollowed series gets only its newest season.
  21. - Search finds a title by its new name.
  22. - A failing change list falls back to the full walk and does not advance the stored day.
  23. - More than 14 days since the last run gives the full walk.
  24. - TVmaze's text is shown when there is no other summary.
  25. ## Numbers (real data copy 2026-10-01, real TMDB and TVmaze, one day of changes)
  26. - **Changes**: TMDB tv 3,088 + movie 9,559 ids (31 + 96 pages), TVmaze 312 → **336 of our titles (28 followed)**.
  27. - **Delta run**: 128 change requests + 477 title requests + 29 TVmaze. It took **536 s** (511 s on a second run), 0 errors, slowest step 2.5 s. Pages during the run: median 45 ms, p99 693 ms, max 2.2 s.
  28. - **Old full walk** on the same copy: 128 shows, 259 + 128 TVmaze requests, **312 s**.
  29. - My first variant gave every title the full step. Today (15,716 episodes) and EastEnders (7,349) then blocked the server for 20.8 s each, and RSS reached 14 GB. That is why titles nobody follows now get the light step.
  30. - **Cleared summaries: 9,647**, 24 kept. All 24 are followed shows whose tmdbSummary the #9 sync changed after the migration, so they are probably older TMDB texts, not rewrites (list in STATUS). One of them, Star-Trek-First-Contact, has another title's tmdbSummary: wrong tmdbId on that record.
  31. - First day only: 24 titles renamed, 79 TMDB texts changed, 173 taglines, +79 seasons / +4,475 episodes. The new seasons and episodes belong to unfollowed series that were never synced since the migration.
  32. - Screenshots (I looked at them) are on Loreana in `/tmp/w067/real/` (Andor renamed; Breaking Bad shows TMDB's current text) and `/tmp/w067-shots/delta-{show,movie}-1280.png`.
  33. ## Open points
  34. - It is **not "a handful of requests"**: about 634 a day against 387 for the old run, mainly because the movie change list is 96 pages. In return every title stays current. Dropping unfollowed movies would save roughly 300 requests a day; that is the creator's call.
  35. - **Memory**: about 10 MB per synced title is never freed (the Hybriel leak described in #28). A delta run adds about 3.5 GB RSS, the old run about 2.8 GB. A daily restart or a runtime fix is needed either way. The one-time summary clear adds about 2 GB at that boot.
  36. - **Titles**: TMDB's en-US name replaces the migrated title, including the old "Name(original)" form, e.g. Kaun Banega Crorepati(कौन बनेगा करोड़पति) → Kaun Banega Crorepati. To keep a title, a creator-title field like `summary` would be needed.
  37. - The first live run after the deploy is a full walk, because there is no `sync-state.txt` yet.
  38. - **Hybriel issues**: no new tickets. Two things to know:
  39. - `mode` cannot be a top-level variable name; it is parsed as the file mode directive.
  40. - The known fetch/decode memory leak. A small HTTPS fetch alone grows RSS by about 0.57 MB per request (60 TVmaze fetches: 6 → 51 MB).

Branches

Latest commits

  • 8f1d4542tracker#40: superseded collections — a TMDB collection timeline whose titles are all in one curated timeline is hidden (supersededBy; kept: own page + editor finder), set by the collection seed when it makes one and by the curated build (lifted when the cover is gone); partly covered ones join that franchise; no second widget (First Contact: only Star Trek — Prime); gate franchiseseed 26/0, browser 365/0, kinds 32/0, franchises 53/0, check-theme 0; real copy 24 supersededmre
  • 7d4b293dtracker#40: "Franchises" in the main menu (desktop header after People, phone sidebar) → /franchises, marked on franchise and timeline pages; gates 365/0, 32/0, 53/0, 24/0, check-theme 0mre
  • 93dfb0batracker#40 (mission 034): the curated franchises — data/franchises.json (17 franchises, 31 timelines, 285 TMDB titles, movies + series, in-universe/release order, 12 TMDB collections attached); lib/franchiseseed.hl + jobs.hl franchiseSeedTick (last start job, imports missing titles via details.hl importWithCredits = the search's Add, one per step paced, then one build; franchiseseed.db: editor changes win, the creator's same-name franchise adopted / timeline left alone, 404 remembered, resumable, idempotent); timeline heads 'N titles · in-universe order' (orderKind) and wrap on a phone; series pages show the widget; new gate tests/franchiseseed.mjs (5th in deploy.sh), the others run with TRACKER_FRANCHISE_SEED=0; gates 365/0, 32/0, 52/0, 24/0, check-theme 0; real copy 196 imported, 0 failed, 7 min, restart unchanged=31mre
  • 96ba683adeploy.sh: a gate without a 'passed,' line (check-theme) no longer ends the scriptmre
  • eb3b9205tracker: report 031mre
  • 9b5d2e89tracker mission 031: README (What it does, Test: four gates + the #32 checks, Files: theme/, new pages), STATUS (real copy, A/B load, how to repeat, open points), LOGmre
  • 39950e4ctracker#32 (mission 031): the WorldAPI theme (theme/ vendored verbatim from layouts.worldapi.org 85b5654; styles.hl inherits it: accent green-dark, type colours 1-6; own base/header rules, row lines, genre-pill and inverted-button frames removed, the season foldable keeps its line; check-theme 21 -> 0, 4th deploy gate; main actions class primary) and the #32 header (theme AppHeader/MainMenu/UserMenu/Sidebar/ContentFirst: desktop brand, search, Series|Shows|Movies|Genres|People, user icon with Unwatched..Settings, Logout; signed out the ident selector, phone the iD icon dropdown; phone menu in the sidebar overlay; marked entry by :has); /find -> /search/<q>, /genres, /people(/<letter>), /settings; main { ContentFirst { slot } } works around the hl:web one-line slot bug; gates 365/0, 32/0, 52/0, check-theme 0mre
  • a386dc92tracker: reports 029 + 030mre
  • 71e0fd7dtracker missions 029 + 030: README (What it does, Files, gate count), STATUS (real-copy numbers, how to repeat, open points), LOGmre
  • d36ea6eatracker#34 + #35 (mission 030): Follow directly under the poster, as wide as the poster (show.hl, styles.hl); the status pill next to a series' title — TVmaze's status (new tvmazeStatus, stored by the sync's TVmaze merge) else TMDB's, TVmaze Ended + TMDB Canceled = Canceled, inverted (filled, dark text, no border), green running / yellow pending / red canceled / muted ended (shows.hl statusOf); the daily delta asks TVmaze's status of an unfollowed series TVmaze's change list names (dailysync.hl syncRunStep, sync.hl syncTvmazeStatus); the status backfill after the details repair (backfill.hl, jobs.hl statusTick; resumable, 550 ms per TVmaze request); gates 354/0, 32/0, 52/0mre
  • 7d7d4487tracker#33 (mission 029): reduced titles — every title TMDB's details never went through this app (no detailsAt, no tmdbSync) is incomplete (shows.hl isIncomplete; the old tracker's migrated rows passed #26's test: 5,697 non-adult on the live copy, 691 series without seasons); the repair job does the visibly reduced first (shows.hl missingParts), the page completes one on open; a title TMDB has no poster for (The Remaining) shows the placeholder; tools/count-incomplete.hl; gate fixtures stand for synced titles (tmdbSync), tests/seed-reduced.hl + #33 checks; gates 347/0, 32/0, 52/0mre
  • 661c2592tracker: report 028mre
  • 27c916fatracker mission 028: README ("Code order", the new file map), STATUS (counts before/after, tests, how to repeat, open), LOGmre
  • d924f398tracker mission 028: comments name the new files (sync.hl, dailysync.hl, backfill.hl, credits.hl, jobs.hl, images.hl …); tools/ref-params.py + tools/lambda-audit.py also scan lib/ (they globbed the root only), lambda-audit counts a plain `x = p` alias like `let x = p`mre
  • 2e89b968tracker mission 028 (code order) 5/5 let: `let` only where a variable is reassigned — 667 never-reassigned lets became plain declarations (project.hl, lib/, components/, tools/, tests/); kept: 264 in loop bodies (a plain declaration there is 'Cannot reassign' on the 2nd pass), 234 reassigned, 27 whose name is also a member/outer/free name (a plain write would rebind it); tools/let-audit.py decides and fixes (README 'Code order'); tests/realdata-m028.{sh,mjs} = the page-output diff on a real copy; gates 342/0, 32/0, 52/0, real-copy pages identicalmre
  • 54796ff2tracker mission 028 (code order) 4/5 thin faces + last copies: the show page's check/follow faces call lib/watches.hl toggleWatched / toggleSeasonWatched (seasonAllWatched moved there) and lib/follows.hl toggleFollowed; both logins (header selector face, /login/callback) share lib/users.hl userOfCode; todayStr/listOf copies in components and the export readers copied into tools/migrate.hl + tools/old-short-ids.hl now once (lib/util.hl, lib/export.hl); gates 342/0, 32/0, 52/0; old-short-ids output byte-identical, migrate output identicalmre
  • 06b078e3tracker mission 028 (code order) 3/5 project.hl is the map: config, routes, wiring and a feature → file index (914 → 258 lines); the background jobs (daily sync run, backfills, details repair, credits job, merge, short ids, collection seed) moved unchanged into lib/jobs.hl (a class: their state is reassigned every step, a static cannot be; one instance made after the server), the login callback into lib/users.hl, poster/photo serving into lib/images.hl, the /shows/<slug> rule into lib/shows.hl showsMovedPath; route handlers are thin wrappers; gates 342/0, 32/0, 52/0, real-copy pages identicalmre
  • 94716fd2tracker mission 028 (code order) 2/5 util + topics: lib/util.hl holds envOr, storageDir, postersDir, profilesDir, newId, hexDigits, todayStr, dateOr, textOr, hasId, listOr, firstOf, sortDesc once (were copied into up to 5 files); tmdbsync.hl split into tmdb.hl (TMDB/TVmaze requests), sync.hl (one title's sync), sync-helpers.hl, backfill.hl; details.hl split into details.hl, credits.hl, credits-helpers.hl (isIncomplete to shows.hl); search-helpers.hl (words, query, ranking, slugs); collections.hl (the TMDB collection seed, out of franchises.hl); deltasync.hl renamed dailysync.hl; no behaviour change: gates 342/0, 32/0, 52/0, real-copy pages identicalmre
  • 186079b0tracker mission 028 (code order) 1/5 move: every root .hl except project.hl into lib/ (styles.hl into components/), import paths only; gates 342/0, 32/0, 52/0; real-copy pages identicalmre
  • 4f47f181tracker: report 027mre