tracker
All repositories: gitoria
4.1 KB
# Report 028 (w078) — tracker: code order (no behaviour change) — DONE on main**Commits** on main in loreana:/media/STORAGE/projects/tracker.worldapi.org (parent 4f47f18, fast-forward): `186079b` 1/5 move ·`94716fd` 2/5 util + topics · `06b078e` 3/5 project.hl = the map · `54796ff` 4/5 thin faces + last copies · `2e89b96` 5/5 let ·`d924f39` comments + audit tools · `27c916f` README/STATUS/LOG. Not pushed, not deployed. No `.env` read (the real-jobs run linked it for the runtime, as in mission 027; link removed). Every process killed byPID; 8720–8731 free; real-copy data deleted.## Before → after| | before (4f47f18) | after ||---|---|---|| `.hl` files in the root | 15 | 1 (`project.hl`) || `project.hl` lines | 914 | 261 || `let` (code, all .hl) | 1,211; 706 never reassigned (676 convertible + 30 name clashes) | 525 = 264 in loop bodies + 234 reassigned + 27 kept for a name clash; 667 converted |## File map (README "Files" has every file)- `project.hl` — config, every route, thin function routes, push audiences, boot wiring, `jobs = new Jobs()`, a feature → file index on top.- `lib/`: `util` (envOr, storageDir, postersDir, profilesDir, newId, hexDigits, todayStr, dateOr, textOr, hasId, listOr, firstOf,sortDesc — each once), `users` (+ /login/callback logic, `userOfCode` for both logins), `shows` (+ `isIncomplete`,`showsMovedPath`), `follows` (+ `toggleFollowed`), `watches` (+ `toggleWatched`, `toggleSeasonWatched`), `catalog`,`search` + `search-helpers`, `people`, `credits` + `credits-helpers` (out of details), `details`, `tmdb` (requests, out oftmdbsync), `sync` + `sync-helpers` (one title), `dailysync` (was deltasync), `backfill` (adult + kind), `shortids`,`franchises`, `collections` (the seed, out of franchises), `merge`, `jobs` (all background runners + clocks), `images`(posters/photos), `export` (the tools' mongo-export readers).- `components/styles.hl` (was `styles.hl`); `tools/let-audit.py`; `tests/realdata-m028.{sh,mjs}`.## Decisions- `lib/jobs.hl` is a CLASS with one instance (`jobs = new Jobs()` after the server): the runners' state is reassigned every step,a static cannot be (measured: "Cannot reassign immutable variable"); the code moved unchanged, log order unchanged.- `let` kept inside loop bodies (a plain declaration there fails on the 2nd pass — measured), and where the name is also amember/import/outer/free name (a plain `x = …` inside a function REBINDS a file member — measured) or used outside its block(the browser target emits a plain declaration as block-scoped JS `let`). Plain declarations copy like `let` (measured).- Faces/routes made thin where the logic was the topic's: show page check/follow toggles, both logins, posters/photos, /shows/<slug>.## Tests- Gates after every step and on the final tree: `TRACKER_GATE_PORT=8720 … TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727`→ browser **342 passed, 0 failed**, kinds **32/0**, franchises **52/0** (outputs `.scratch/w078/gate-*.txt`, shots `/tmp/m028/`, looked at).- Real copy (live storage, signed in as az5b2, all jobs off, no `.env`): 24 pages (/, lists, franchises, 2 series, a show, 2movies, 2 persons, genre, search, all /my/*, not-found pages) + 10 redirects/404s, 2 runs per tree: **normalized HTML and thehydrated page text identical to 4f47f18 (49/49 files)**. Browser full load 2×10 per page: sum 7,358 → 7,258 ms (0.99×), boot48–51 s and 2,216 MB both; client modules +0.9 %.- Real jobs on the copy (final tree, forced delta run): sync 345 titles errors=0, repair 24/24, collections 17/17, others nothingto do; RSS max 2.49 GB.- Tools old vs new: old-short-ids byte-identical, migrate + verify identical, 7 count tools identical.## Open- Deploy: rsync has no `--delete` → the 14 old root `.hl` stay on Byrodin (unused); delete them by hand after deploying.- The search import face still stores the credits itself (search.hl → credits.hl would be an import cycle).- Long topic files left as they are: merge.hl 599, sync.hl 446, franchises.hl 445, people.hl 404 lines.- tools/lambda-audit.py now also lists 2 harmless reassignments (`fid = franchiseId`, `inShow = showId`) besides the 13 before.
Branches
Latest commits
- 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
- 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