tracker
All repositories: gitoria
10.1 KB
# Report 070 — tracker: t18 + t20 + t19 merged into main, migrated data kept, Hybriel 8efba065Repo: loreana:/media/STORAGE/projects/tracker.worldapi.org. Everything is committed on main (HEAD `8081350`). Not pushed, not deployed. The worktrees tracker-wt18, -wt20 and -wt19 and the branches t18, t20 and t19 are removed; they held nothing uncommitted (only `bin/` and `.scratch/`).## Commits (main)| Commit | What ||---|---|| `20e09d8` | merge t18 (#18) || `daf49fe` | merge t20 (#20/#21) || `749019b` | merge t19 (#19) || `46b2138` | migrated data is never destroyed || `1ad19c8` | Hybriel re-vendor, `&` on read-only lambda parameters, merge sort on /my/unwatched, deploy.sh runs all 3 gates || `8081350` | docs (README, STATUS, docs/kinds.md, docs/franchises.md), real-data scripts, tools |## Conflicts and how they were resolved (both sides kept everywhere)- **t18** conflicted in README, STATUS, show.hl, project.hl and browser.mjs.- `pageShowOf` (the small object from mission 018 (old 062)) now uses `summaryOf`.- Imports and boot steps are joined.- **t20** conflicted in README, STATUS, show.hl, project.hl, search.hl, components/search.hl, browser.mjs and faketmdb.mjs.- `slugInfoOf` sits beside 062's slug helpers.- The shared clock runs: adult backfill → repair → **kinds** → credits.- `withDetailsFields` also stores `tmdbType` and `kind`, so the delta light step and the #26 completion set them too.- The search import keeps both `path` and `details`.- browser.mjs: URLs changed to `/series/` and `/movies/`, h1 selectors to the typed `type-name`.- kinds.mjs: repair and credits switched off, and its fake TMDB name set to the seed's long name. Otherwise the #18 rename hit it.- **t19** conflicted in README, STATUS, show.hl, project.hl, browser.mjs and faketmdb.mjs.- The franchise/timeline pages get the typed headings "Franchises", "Franchise | …", "Timeline | …" (also the timeline editor).- Their title links go through `titlePath`.- The collection seed now waits for every other job, so it runs last.- franchises.mjs: URLs updated and 2 new checks (headings with their colours, mixed-timeline links).- deploy.sh now runs browser.mjs, kinds.mjs and franchises.mjs. The default ports of kinds and franchises moved to 8700–8710, because kinds' old defaults 8765/8766 are taken by other services on Loreana.## Step 2: migrated data is kept (conductor's change)- The one-time summary step now **moves** a copied summary to `migratedSummary` and empties `summary`. The marker is `summaries-moved.txt`.- On a migrated record (oldId not `tmdb-…`), the first time TMDB replaces a value the old one is kept, and only that first time:- shows: `migratedTitle`, `migratedGenres`, `migratedHomepage`, `migratedTagline`;- seasons and episodes (oldId not `tmdb-`/`tvmaze-`): `migratedTitle`, `migratedSummary`.- Not kept: status, counts, ids and the poster. They are TMDB's state and the sync has written them since #9.- **Gate**: 3 checks.- The first start moves the copied summary.- The renamed show, the renamed movie and episode 1x1 keep their old values.- A second rename keeps the first value.- **Real copy** (`tools/count-migrated.hl`):| Kept | Count ||---|---|| summaries | 9,647 || titles | 16 (e.g. "The Daily Show with Trevor Noah → The Daily Show") || genres | 71 || taglines | 16 || homepages | 4 || episode titles / summaries | 635 / 409 || season titles / summaries | 3 / 3 |## Hybriel- **Commit**: master `8efba065` (#126 f685f240, #48 4371b7aa).- `bin/hybriel` sha256 `50361e954e317a819aa58adfc2e3553f0b4b7adc82abd1fad79385d33b3d5b72`.- Plugins updated: core crypto data fetch fs http http1 mpackdb proc smtp time web.- The previous build is in `.scratch/pre-070/`.- **w068's `/shows/<slug>` route** still works: `page(m, s, host, hdrs)`, `hostOf`, `requestHeaders` and the sessions API are unchanged. The kinds gate (function-rendered show page: season toggle, Follow) passes.- **Lambda audit (#48)**, with `tools/lambda-audit.py`: 13 lambdas change a parameter without `&`.- details.hl: `withCredits` :236, `withDetailsFields` :265, `addSum` :359, `firstStep` :412.- franchises.hl: `storeOrder` :373.- people.hl: `startFill` :222, `fillStep` :269.- tmdbsync.hl: `mergeTvmaze` :279, `syncMovie` :442, `addTotals` :826.- Every caller uses the returned value or the stored record, so no fix was needed.- **Speed**: the copy per call was the real cost. A micro test passing a 20k-row list 2,000×: 15.5 s with the copy, 0.015 s with `&`.- All 319 read-only parameters got `&` (`tools/ref-params.py`).- /my/schedule went from 2.35 to 0.46 s, /my/unwatched from 13.7 to 5.7 s.- /my/unwatched also got one merge sort instead of n² inserts: 5.7 → 4.8 s.## Gate commands (final tree, new binary)```TRACKER_GATE_SHOTS=/tmp/w070/new-shots TRACKER_GATE_PORT=8751 TRACKER_GATE_IDENT_PORT=8752 TRACKER_GATE_CHROME=8753-8756 TRACKER_GATE_TMDB_PORT=8757 node tests/browser.mjs325 passed, 0 failedTRACKER_GATE_SHOTS=/tmp/w070/new-kinds TRACKER_GATE_PORT=8750 TRACKER_GATE_IDENT_PORT=8751 TRACKER_GATE_CHROME=8752-8756 TRACKER_GATE_TMDB_PORT=8757 node tests/kinds.mjs32 passed, 0 failedTRACKER_GATE_SHOTS=/tmp/w070/new-fr TRACKER_GATE_PORT=8750 TRACKER_GATE_IDENT_PORT=8751 TRACKER_GATE_CHROME=8752-8756 TRACKER_GATE_TMDB_PORT=8757 node tests/franchises.mjs50 passed, 0 failed```## Real data (copy of live storage/ 2026-10-02, real TMDB/TVmaze, all jobs, the daily run forced as a delta)**Jobs on the first start, about 50 min in all:**- The summary move: 16 s at boot.- Kind backfill: 1,789 titles in 16–21 min.- Collection seed: 4,774 movies in 32–37 min, giving 110 timelines.- Adult backfill, repair and credits: nothing to do.- One delta run: 261 titles in 6–10 min.- Without `sync-state.txt`, the first 04:00 run after the deploy is a full walk.**RSS old vs new** (controlled, one process at a time; "after jobs" = 200 page loads on a fresh process):| | after boot | jobs peak | 200 loads after the jobs | /my/unwatched ||---|---|---|---|---|| old 8590df63 | 8.0 GB | 15.2 GB | 8.0 → 12.2 GB | 1.15 s || new, final tree | 2.1 GB | 11.8 GB (median 2.7) | 2.1 → 2.8 GB | 4.8 s || new, `HL_GC_BYTES=256 MiB` | 2.7 GB | 12.4 GB at 24 min (run stopped) | 2.7 → 3.5 GB | 2.2 s || new, `HL_GC_BYTES=0` | 6.2 GB | — | 6.2 → 8.7 GB | 1.15 s |**Load times** (final tree, fresh process):- curl: `/` 0.02 s, lists 0.01–0.05 s, `/franchises` 0.04 s, a series 0.25–0.45 s, /my/series 0.4 s, /my/schedule 0.42 s, /my/unwatched 4.8 s.- Browser at 390/1280 (signed in as az5b2):| Page | Full load ||---|---|| lists | 39–146 ms || timeline | ~40 ms || First Contact with its widget | 136–346 ms || Picard (202 cast) | 192–368 ms || /my/series | 0.8–1.1 s || /my/unwatched | 5.6–6.1 s || the first `/` after boot | 15 s |Nothing scrolls sideways and there were 0 console problems.- I looked at the screenshots on Loreana: `/tmp/w070/real/*-{390,1280}.png` and the gate shots `/tmp/w070/new-*`.## Open points1. **Memory after the jobs (Hybriel, for the architect).** The process that ran the jobs keeps about 25 MB per page load: 3.0 → 8.1 → 13.6 → 18.9 GB over 600 loads, with /my/unwatched at 8.3 s. A fresh process keeps 3.5 MB per load; after one delta run, about 8 MB. The old binary kept about 21 MB per load from the start.- Recommendation: restart the container once after `collections done`. A daily restart after the 04:00 run is probably needed (not built). This is in README "Deploy".2. **GC by bytes is slow with a big heap (Hybriel).** With a 2+ GB live heap, every 64 MiB of plugin data triggers a full collection: /my/unwatched went from 1.2 to 4.8 s.- `HL_GC_BYTES` is not set. I tried 256 MiB (2.2 s), but that run reached 12.4 GB by 24 min and I stopped it. Its full peak was not measured. This is the creator's/architect's call.- Repro: `tests/realdata-070-bench.sh`.3. **systemd-oomd killed my first parallel run** (old + new at once) at 05:38. Loreana was above 90 % memory + swap, with other workers' tests running too. All numbers above come from later runs, one process at a time.4. **Port clash.** At the start, a tickets gate held 8720–8725. The lead moved me to 8750–8759.5. **No real "series page with a widget".** The seed only makes movie timelines. The gate covers a series with a widget; on real data I checked a movie with the widget and a series with its cast.6. Still open from earlier missions: TMDB type Video → Series? (#21), #18's 24 kept "own" summaries, #19's rename/delete not built.## Where I stopped (wrap-up, usage limit)The lead's messages about hybriel#127, the move to master d98926c6 and the port switch reached me only after this work was finished and committed. The tracker therefore runs on **8efba065**, not d98926c6.**Still to do after the reset:**1. Re-vendor to d98926c6 or a later HEAD: same procedure, `.scratch/pre-070` stays as the rollback copy.2. Re-run the 3 gates on 8750–8757.3. Run the big-page measurement, old vs new, 20 loads each, time and RSS:- /my/unwatched (~1,300 rows)- Picard with "Show all"- /series- a franchise index or timeline4. Re-run the RSS and job measurements: `tests/realdata-070-run.sh` and `tests/realdata-070-bench.sh` (STATUS "How to repeat"), real-data server on 8758.5. Check whether #127 explains the per-load growth and the slow /my/unwatched (open points 1 and 2).**Big-page numbers I already have.** Fresh process, curl, 10 loads per page, average:| Page | old 8590df63 | new 8efba065 (final tree, with `&`) ||---|---|---|| /my/unwatched (1,287 rows) | 1.15 s | 4.8 s || /series/Star-Trek-Picard (collapsed cast) | 0.055 s | ~0.25 s || /series | 0.014 s | 0.018 s || /my/series (126 rows) | 0.20 s | 0.40 s |- The process that had run the jobs got slower on every load, the #127 symptom: /my/unwatched 8.3 s, and RSS grew about 25 MB per load.- Not yet measured: Picard with "Show all" and a franchise index.## Leftovers- Nothing of mine is running. Ports 8720–8731 and 8750–8759 are free.- The data copies, the old-binary tree and its `.env` link are deleted. I never read `.env`.- Logs are in `.scratch/w070/`.
Branches
Latest commits
- 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
- a5d06e79tracker#36 (mission 038): tools/tmdb-check.hl + lib/tmdbcheck.hl — every live migrated title's migrated title + year against its TMDB entry (one GET /movie|tv/<id>?append_to_response=alternative_titles, 260 ms apart, passing failures asked once more): ok / ambiguous (one of title, year disagrees) / clear (both, or 404); read-only; token only from TMDB_READ_TOKEN; --stored = a title-only preview from the TMDB names already stored (no request). Tested against a fake TMDB (.scratch/w38/t36): 7 titles, 3 ok, 2 ambiguous, 2 clear, data unchangedmre
- 982554f3tracker#42 (mission 038): series pages — an unknown slug no longer scans every title (lib/shows.hl showBySlug: the slug map only; new titles are noted by refreshTitleCaches, which both title puts already reach): 10.7–15.7 s → 0.013 s on the real copy (the one-request-at-a-time server was blocked meanwhile); cast/crew rows take name + slug from a person-link cache (personLinkOf) instead of whole person records (SNL: 303 cast with 4,761 credits, ~49k allocations per render) — allocations per series page −5…−40 %; HTML of 20 pages identical to beforemre
- 4586b6e3docker-compose: init: true (hybriel#156)mre
- 085c2e5ftracker#43 (mission 038): TVmaze's type makes Variety / Talk Show / Game Show / Reality / News / Panel Show / Award Show / Sports titles Shows (TMDB calls Saturday Night Live UK Scripted) — the #43 part of parked w37-wip a79c8c1 only (no re-vendor, no cache volume): tvmazeType stored by the sync and the TVmaze status backfill (asks every series with a TVmaze id once), kindOfTitle/kindWithTvmaze, tools/tvmaze-types.hl, gate fixture Variety Gate Series; start waits 150 smre
- 4fa303b5mission brief w38mre
- 975f6843tracker#41 (mission 037b): no request tap — an old /movies|/series slug renders the keeper's page (slug map) with og:url naming the keeper's address, /shows/ 301; no moved slug in any page's HTML. Real copy 168/168 old addresses, 0 moved slugs in 54 pages, 300x + 1000x stress without a crash; gates on 06617221 380/0, 32/0, 53/0, 229/0, 26/0, theme 0mre
- 6decff4ftracker#41 (mission 037): moved slugs no longer listed in every page's HTML — a request tap answers their 301 by a slug-map lookup (shows.hl movedTitlePath); catalog.hl buildIndex pushes genre lists in place (the quadratic copy hung the boot > 20 min on today's data); gate: no moved slug in 19 page kinds signed out/in, immediate 301 after a merge. Gates on hybriel 06617221 green (380/0, 32/0, 53/0, 229/0, 26/0, theme 0); real copy 84/84 301, 0 moved slugs in 54 pages. NOT deployable: the tap faults after ~38 answers on 06617221 (report 037).mre
- 35f7a872mission brief 037mre
- 5cbcddd7tracker mission 036: recheck of the 16 review tickets — 15 WORKS, #39 PARTLY; review packages + bugs in reports/036-review-recheck.md (no code change)mre
- 9e18c2d0mission brief (w36)mre
- 216fac57missions 028-035 + reports 033/034 (were untracked)mre
- 5cb85d75deploy.sh: a backup taken while a background job writes (tar exit 1) is a warning; archive checked with gzip -tmre
- 9abda75dtracker: report 035mre
- 12595e47mission 035: theme re-vendored from layouts.worldapi.org 0222f67 (two corner radii: radiusSmall 5px, radiusLarge 10px); the tracker's 18 own radii -> radiusSmall/radiusLarge (--layout-radius is gone); check-theme 0; gates 379/0, 32/0, 53/0, 229/0, 26/0; real copy: every computed radius in {0, 5px, 10px, 50%}mre
- e7305014tracker: report 032 (art + photos)mre