gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit593dab6f593dab6fmission 043: report, LOGmre593dab6f/missions/003-tracker-tmdb-sync.md

2.5 KB

  1. # Mission 003 (old 044) — tracker.worldapi.org#9: TMDB sync (new episodes + posters)
  2. Ticket: `curl -s -H 'Accept: text/markdown' https://tickets.worldapi.org/api/projects/tracker.worldapi.org/tickets/9`
  3. Setup and rules exactly as mission 002 (old 041) (`missions/002-tracker-my-pages.md`, incl. the real-data check on a Loreana
  4. copy) — read it. App: loreana:/media/STORAGE/projects/tracker.worldapi.org.
  5. ## Build
  6. 1. A sync in Hybriel (hl:fetch) that, for every show SOMEONE FOLLOWS (not all 9,453), fetches from TMDB
  7. (api.themoviedb.org/3, `Authorization: Bearer $TMDB_READ_TOKEN` from the app's env — the dev `.env` already has
  8. TMDB_READ_TOKEN and TMDB_API_KEY; never print or copy them): show details, seasons, episodes. New seasons/episodes are
  9. added, existing ones updated (title, summary, release) — matched by tmdbId, never duplicated; nothing is deleted.
  10. Reference for the API calls: /media/STORAGE/projects/old-tracker/crates/sync/commands/sync.js (read-only).
  11. 2. Posters: download each followed show's poster (TMDB `poster_path`, size w342) into `storage/posters/` (in storage →
  12. in the nightly backup), served by the existing `/posters/…` route; the placeholder stays for shows without one.
  13. 3. Runs: a tool `tools/sync-tmdb.hl` (idempotent, prints counts; `--limit N` for tests) AND automatically inside the
  14. app once a day (e.g. 04:00 via the framework's timers) without blocking requests — the server serves one request at a
  15. time (see mission 002 (old 041)), so the sync must yield between shows, and never run during a page render. Respect TMDB rate
  16. limits (≤ 40 requests / 10 s).
  17. 4. After a sync /my/schedule shows upcoming episodes and /my/unwatched the newly released ones.
  18. 5. Gate: extend tests/browser.mjs with a FAKE TMDB (a tiny local HTTP server in the test serving fixed JSON + a png;
  19. point the app at it via an env var like TMDB_BASE_URL) — no real TMDB calls in the gate. All green.
  20. ## Real-data proof (on the Loreana copy, mission 002 (old 041) procedure)
  21. Run `tools/sync-tmdb.hl` against the COPY with the real TMDB (limit to the creator's 128 followed shows): report counts
  22. (shows, new seasons, new episodes, posters), duration, TMDB errors; then load /my/schedule, /my/shows, one show page as
  23. `az5b2` in the copy: times + screenshots (LOOK at them; posters must appear). Delete the copy afterwards.
  24. ## Report (short)
  25. Files, decisions, gate command + last line, the real-data numbers + page times, screenshot paths
  26. (/tmp/w044-real/ on Loreana), how the daily run is scheduled, open points, Hybriel issues.
  27. Ports 8720–8731.

Branches

Latest commits

  • 593dab6fmission 043: report, LOGmre
  • 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
  • 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
  • 0d6293ebmission 043: mission filemre
  • 55bbd619boot: one streamed pass per table (lib/bootscan.hl) instead of find(null,null) per module; follows/watches/franchises scans streammre
  • 1d465d3ere-vendor plugins to Hybriel master f9614007 (mpackdb #202 copy fix, libmpackdb sha 6fb3b9d6)mre
  • 6648ba44mission 042: real-browser E2E on ce6f2e0a re-vendor 69/0 at 390 + 1280mre
  • 3ed3a0efmission 042: gates old/new equal (browser #41 route-table regex accepts unescaped hl:web output), real-data TTFB, E2E blocked by lisbeth lockmre
  • d5b61e90LOG 042mre
  • 4acdbaccmission 042: memory comparison old vs ce6f2e0a (stopped: warm VmHWM higher), reportmre
  • d0f620d6mission 042: re-vendor Hybriel ce6f2e0a (plugins incl. mpackdb; bin runtime built from the same archive, git-ignored), compact=false keptmre
  • 5bd14e12mission 040: theme 76f99f6 gates + E2E green; 44 px fixes (skeleton row, type-word, genre-link/pill); README, reportmre
  • 77cfa45cmission 040: partial report (theme/modal/pagination re-copied, tilelist onPage, 44 px taps; gates new + E2E pending)mre
  • 4b14822fe2e-theme: menu marker by colourmre
  • 09780f4emission 040 WIP: theme, modal, pagination, tokens re-copied from layouts 76f99f6; tilelist uses onPage; tap sizes 44 px for tracker's own small buttons; tests/e2e-theme.mjsmre
  • fb80bb8chotfix: open the 5 show stores without compaction (compact = false) — compact-on-open left another handle on stale offsets, every read gave a bare Number (hybriel mpackdb refresh after a shrink); live down 2026-10-20 05:11mre
  • e00d3bf7paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • a8c7f234tracker#36 (mission 039): tools/tmdb-check.hl survives a dropped connection (on Error, asked again, failed lines) and resumes with --from N; tests/tmdbcheck.mjs 6/6 against a fake TMDBmre
  • 9c230516mission brief w39mre
  • 3609121dmission 038 docs + report (quota stop): README/kinds.md for #43 #42 #36, STATUS, LOG; HEAD browser gate 374/8 in the in-app daily run block (hour-boundary suspected, rerun pending), other gates green; #36 real run needs TMDB_READ_TOKENmre