gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmaind2e6d26bMerge branch 'records-park55' into mainTrackermain/reports/T36-tracker-tmdb-fix.md

8.9 KB

  1. # T36 report — tracker#36: fix the years and wrong TMDB ids (phase 1: tool + dry run on a copy; NOTHING live was written)
  2. Branch `t36` (worktree /media/STORAGE/claude-scratch/atlas/T36/wt), tool commit 1ceda3a plus the commit with this report. No deploy, no push, no live write. All numbers come from a fresh read-only copy of the live data made on 2026-10-30 (about 09:30), checked against real TMDB.
  3. ## What was built
  4. - `tools/tmdb-fix.hl` (`--dry-run [--plan-out FILE]` prints every planned change and changes nothing; `--apply FILE` re-asks TMDB once per planned title, then writes) and `lib/tmdbfix.hl` (the grouping and the writes). `lib/tmdbcheck.hl` got one new function `tcAssess`; `tcCheckTitle` now uses it and gives the same lines as before (old and new tmdb-check gave identical lines on 1,000 real titles up to the time cut).
  5. - Group 1 stores TMDB's year in `year`; an old different `year` is kept in `migratedYear`. Group 3 searches TMDB by name and our year and switches `tmdbId` only if exactly one result has the same name (title or original title, normalized) and the same year AND no other record of ours already has that id; the old id is kept in `tmdbIdWas`, a stored "TMDB 404" marker is cleared. Nothing else on the record changes. Watches, follows, seasons and episodes hang on the record's own id, so a switched id orphans and duplicates nothing.
  6. - Gate `tests/tmdbfix.mjs` (fake TMDB, 27 checks, with its seed `tests/seed-tmdbfix.hl` and `tests/peek-tmdbfix.hl`): year fix, other-year fix, unique switch for a movie and a series with watches/follows/season/episodes unchanged, ambiguous / other-year / id-already-ours / no-year titles only listed, translation untouched, dry run changes nothing, second apply and second dry run change nothing. Red first: with the tool missing the gate fails; with the tool 27 pass / 0 fail. Also `tests/tmdbfix-chrome.mjs` (the Chrome proof script).
  7. ## Numbers now (copy of 2026-10-30, 9,285 migrated titles with a TMDB id; the old check had 9,364)
  8. - Fine: 8,954. Group 1: 140 — of these 49 can be fixed (TMDB has a year), 91 have no year on either side, nothing to take (so the "109 missing" of 19 Oct were mostly titles TMDB has no year for either). Group 2 (same year, other name, left): 46. Group 3 (TMDB 404): 137 — 9 get a unique switch, 128 listed. Group 4: 8 (4 of them: same name, TMDB has no year). Failed requests: 0.
  9. - Dry run file: /media/STORAGE/claude-scratch/atlas/T36/dryrun-2026-10-30.txt; plan (58 lines: 49 year, 9 id): /media/STORAGE/claude-scratch/atlas/T36/plan.txt.
  10. - The 9 id switches: The LEGO Ghostbusters Movie 401887→1456302, Freddy vs. Ghostbusters 71977→1646693, The Boys (movie 2021) 935667→915561, Sandman (2018) 566744→1273338, Thanksgiving (2007) 363909→642629, My Brother & I 1208812→580849, World Poker Tour (series) 12853→327634, The Wheel of Time: Origins (series) 223660→307623, re:View (series) 80547→336364.
  11. - Of the 128 group-3 titles that stay: 91 TMDB has no title with that name and year, 24 we have no year to search with, 12 have exactly one match but that id already belongs to ANOTHER record of ours (these are real duplicates, e.g. Making Logan / Making-Logan-2, The Protector / The-Protector-5 — a merge decision, not a switch), 1 has two matches (Blockbuster 2017: 431435 and 437319).
  12. - List for him (plain lines page / title / year / old id / what was found): /media/STORAGE/claude-scratch/atlas/T36/list-for-him.txt (group 3 128, group 4 8, group 1 left 91, group 2 left 46).
  13. ## The Daily Show, by hand
  14. `/shows/The-Daily-Show` is our record with TMDB id 38609, and TMDB's 38609 really is the Dutch "The Daily Show" (2011-01-31, origin NL, alt names "The Daily Show NL"), same name and year, so the check calls it fine and the tool leaves it. `/shows/The-Daily-Show-with-Trevor-Noah` is the US show (his follow). A third record `/series/The-Daily-Show-2` (id 33832) has no year on either side: group 1 "nothing to take", untouched. TMDB's US show is 2224 (1996).
  15. ## Apply on the copy and the second check
  16. Apply of the plan on the copy: 58 applied, 0 skipped, 0 failed (log /media/STORAGE/claude-scratch/atlas/T36/apply-copy.txt); second apply: 0 applied, 58 skipped (idempotent). Full re-check of all 9,285 titles after the apply (dryrun-after-apply.txt): fine 9,012 (+58), group 1 = 91 (all nothing-to-take), group 2 = 46, group 3 = 128, group 4 = 8, zero planned fixes, and the list/leave lines are identical to the ones before (diff empty): the 58 are gone, nothing else is new.
  17. ## Proof in his Chrome (lisbeth :9223, one own plain tab, closed after, own cookie deleted; app on the copy, port 8761, reverse tunnel, all jobs off, no TMDB token)
  18. Before the apply I marked The Boys (movie, switched) and one re:View episode (series, switched, Season 8 episode 2) as watched with real mouse clicks; after the apply, reload: both still watched (movie "Watched" with solid check, episode 2 solid, the other 14 checks regular). Pages looked at in 390×844, 800×1280, 1280×800 and 1280×900, before and after (shots /media/STORAGE/claude-scratch/atlas/T36/shots-before, shots-after, side-by-side /media/STORAGE/claude-scratch/atlas/T36/montage/): The-Daily-Show, The-Daily-Show-with-Trevor-Noah (166 checks, Following, same as before), The Gathering (2001→2003), Ripley Under Ground (2005→2007), 7 Deaths of Maria Callas (2020→2022), The Boys, re:View. No horizontal overflow at any size (scrollWidth ≤ innerWidth; the 15 px difference at 1280 is the scrollbar), poster images are missing only because I did not copy the poster folder.
  19. **What I saw that Atlas must know:** a title's own page shows the RELEASE DATE ("23 June 2001"), not `year`. The year fix changes `year` (cards and lists) but leaves `release`, so The Gathering's page still says 2001 after the fix. His words say "years", the tool does exactly that; whether the page's release date should follow TMDB's date too (keeping the old one in `migratedRelease`) is a question for him. Not done.
  20. No planned title had a watch or follow by anyone in the live data (checked on the copy: none of the 58), so no real watch is at risk; the watched proof above used watches I created in the copy.
  21. ## How the live apply must run (for Atlas and Apollo)
  22. - The app must be stopped: hl:mpackdb does not coordinate two processes on one storage and a tool run rewrites table files when it opens them. The live data is the bind mount /CONTAINERS/projects/tracker.worldapi.org/storage/mpackdb on byrodin, written by the running container tracker.worldapi.org (it runs as root; the standby container tracker.worldapi.org-standby shares the same mount and must also be stopped, nginx then has no upstream: a short outage). The container now restarts about every 7 minutes (restart: unless-stopped), so it must be stopped with `docker compose stop` (not killed) and kept stopped until the tool has finished.
  23. - Tool run on byrodin as root in the same image, e.g. `docker run --rm --network host -v /CONTAINERS/projects/tracker.worldapi.org:/home/tracker -w /home/tracker --env-file .env -e TRACKER_STORAGE=/home/tracker/storage/mpackdb worldapi-hybriel-runtime:debian12 ./bin/hybriel tools/tmdb-fix.hl --apply /home/tracker/plan.txt` (the deploy of the t36 code to byrodin is needed first so tools/ and lib/ are there; I did not do it). The apply needs only about 60 TMDB requests, about 1 minute plus table opening; the dry run that makes the plan takes about 55 minutes and does not need to stop the app if it runs on a COPY, so: make the plan on a fresh copy right before (the data and TMDB move), then stop, back up, apply, start.
  24. - Backup right before, with the app stopped, `ssh byrodin 'cd /CONTAINERS/projects/tracker.worldapi.org && tar czf /root/tracker-storage-before-t36.tgz storage/mpackdb --exclude=storage/mpackdb/posters --exclude=storage/mpackdb/profiles'` (about 4 GB without images; deploy.sh makes the same kind of tar to /media/SLOW1TB2/deploy-backups/tracker.worldapi.org/ on Loreana), and verify it with `gzip -t`. Undo: stop, restore the tar, start. Old values are also kept on the records: `migratedYear`, `tmdbIdWas`.
  25. - After the start: curl the 9 switched pages and a few year-fixed ones (200), and run `tmdb-fix --dry-run` on a copy again: it must plan nothing.
  26. - Nothing in this was run against live. The copy (3.7 GB) is deleted, plan, logs, lists and shots stay.
  27. ## Steps and requests (about 75 tool calls; over the 60 mark in step "wait for the 65 min dry run" because every wait was one call, and in the Chrome step because of the listed problems with the first script)
  28. Reading (6), copy from byrodin (6), library + tool + gate (14), red/green gate (5), dry run and waits (14), plan/Daily Show/list files (8), Chrome before + watch clicks + apply + after + look (14), second check + tmdb-check comparison (6), report (3).
  29. ## Stopped processes
  30. Dry run 3452605 and 1301550 finished by themselves; app server 1010983 (first start) and the second start (PID in logs/app-8761.pid) killed by PID; ssh reverse tunnel 1010988 killed. The tmdbfix gate's fake TMDB servers ended with their node processes. Nothing of mine runs or listens; his Chrome has only its about:blank tab.

Branches

Latest commits

  • d2e6d26bMerge branch 'records-park55' into mainTracker
  • f567f025|||PR records: park #55, no Claude workers ruleTracker
  • c21aff6bMerge branch 'records-hm55c' into mainTracker
  • 9ba258d3|||PR records: HM55b resultTracker
  • 64f2d300Merge branch 'records-hm55b2' into mainTracker
  • ae3b80dc|||PR records: HM55b briefTracker
  • 7ef3cb3bMerge branch 'records-st55' into mainTracker
  • fec2e080|||PR records: STATUS HM55Tracker
  • 8e174918Merge branch 'records-hm55b' into mainTracker
  • b1ecee57|||PR records: HM55 stateTracker
  • 28eab08cMerge branch 'records-hm55' into mainTracker
  • d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
  • 3059f86cMerge branch 'records-design-rule' into mainTracker
  • 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
  • d1390692Merge branch 'records-dp75b' into mainTracker
  • a4d1a7d2|||PR records: later steps checked, branch auditTracker
  • e070e16fMerge branch 'records-dp75' into mainTracker
  • 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
  • bfc4ea4dMerge branch 'ap62' into mainTracker
  • 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker