tracker
All repositories: gitoria
4.9 KB
# Report 067: tracker#18 delta sync, show record refresh, summary priority**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.## Files (merge notes)- 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`.- `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.- `details.hl`: `withDetailsFields` (shared with #26 `firstStep`, which no longer writes `summary`) and `applySynced`.- `project.hl`: `syncTick` rewritten for planning, delta and full walk. The clock's `busy` now includes planning. Adds the boot-time summary clear.- `tools/sync-tmdb.hl`: `--delta [--since D] [--plan]`, and uses `applySynced`.- `search.hl`: `haveTvmz`/`titleIdByTvmaze`, `searchTitleRenamed` (stale entries), and import `summary = null`.- `people.hl` (1 line, `summary = null`), `shows.hl` (`summaryOf`), `components/show.hl` (uses `summaryOf`).- Tests: `tests/browser.mjs`, `tests/faketmdb.mjs` (change lists, updates, embed, summaries), `tests/seed-show.hl` (the movie's summary is a copy).- `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.## Gate`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).What the 12 checks prove:- A changed title is refreshed: renamed, with its new text and tagline.- The creator's own summary is kept.- A copied summary is cleared at the first start.- Titles that did not change are untouched (same `tmdbSync`).- An unfollowed series gets only its newest season.- Search finds a title by its new name.- A failing change list falls back to the full walk and does not advance the stored day.- More than 14 days since the last run gives the full walk.- TVmaze's text is shown when there is no other summary.## Numbers (real data copy 2026-10-01, real TMDB and TVmaze, one day of changes)- **Changes**: TMDB tv 3,088 + movie 9,559 ids (31 + 96 pages), TVmaze 312 → **336 of our titles (28 followed)**.- **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.- **Old full walk** on the same copy: 128 shows, 259 + 128 TVmaze requests, **312 s**.- 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.- **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.- 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.- 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`.## Open points- 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.- **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.- **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.- The first live run after the deploy is a full walk, because there is no `sync-state.txt` yet.- **Hybriel issues**: no new tickets. Two things to know:- `mode` cannot be a top-level variable name; it is parsed as the file mode directive.- 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
- 5fd2ac75status: #36 GOmre
- 0d253b45mission: T36Amre
- 2aa22d23log: #36 GOmre
- 833aee2flog: #50 closed, HM56 startedmre
- ac58c1e5mission: HM56mre
- 58979c0clog: HM54 held for decision, DP65 startedmre
- bb2ebc67log: #64 live, #53 mergedmre
- 27cde42fMerge hm53-dom: tracker#53 inputs bound to membersmre
- 2156cc7flog: HM54 reviewmre
- 9fb82efclog: HM54 gap, fill continuesmre
- b632eb8dlog: HM53 done, HM54 startedmre
- ccb1a263tracker#53: bind editor drafts and use key event focus targetmre
- 3356fcfclog: #52 blocked, HM53 startedmre
- 833dcfc9Merge hm52-search: report only, tracker#52 blocked by framework gapmre
- 73010cc0HM52: report replace-navigation search draft regressionmre
- 1742e92bstatus: DP64 and HM52 runningmre
- 29ad5b58log: #64 merged, DP64 and HM52 startedmre
- fafddbf9Merge hm64-catalog: tracker#64 catalog from packed entriesmre
- b2e2206dlog: #63 livemre
- 5831e0e0log: HM64 donemre