gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita1a88bd4a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmrea1a88bd4/missions/SL1-slices.md

3.7 KB

  1. # SL1-slices: slice the details-repair and person-fill steps so no step blocks the request loop for seconds
  2. Task (Apollo 2026-11-03, GO): "slice the repair and person-fill steps (Sonnet, gates, deploy after ~19:30 ...)". Tracker deploys; you do code + gates + measurement only.
  3. Origin: caramboleyo: "setting episodes to watched feels offly slow". Diagnosis: reports/ST1-stalls.md (read sections 1 and 5): one `details repair` step (lib/jobs.hl repairTick → completeStep) blocks the single request loop 1.5-10.9 s; person fills (lib/people.hl startFill/fillStep/personFillStep) take median 2.2 s wall while TMDB is only ~0.26 s.
  4. Tracker's reading (unconfirmed): same results, same data written, same order of work; only the work per loop turn gets small (target: no single synchronous unit > ~100 ms on real data), the loop answering requests between units. No new features, no change to what the jobs do or how often they ask TMDB/TVmaze (pauses stay), no new env switches unless needed for the gates.
  5. ## Read first
  6. - Worker rules: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md (read fully).
  7. - Hybriel: /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md, docs/CODE-ORDER.md. Existing slicing patterns in this app to copy: lib/jobs.hl `every(0.1)` clocks, `collectStep`/`collected` (scan in slices), the boot scan "in steps of 60 ms" (project.hl / lib/shows.hl). At a Hybriel gap: STOP with a repro, no workaround.
  8. - README.md sections about the jobs (repair, person fill); project.hl map.
  9. - Fixed rules: no hand-written JS; mpackdb-touching helpers used in `on server` faces must be `static`; logins never expire, never delete session files.
  10. ## Steps
  11. 1. First MEASURE where a slow step spends its time (not guess): on a local copy of real data. Real data: extract storage/ (NOT .env, NOT .sessions) from /media/STORAGE/deploy-backups/tracker.worldapi.org/tracker.worldapi.org-20261103-1135.tgz into your scratch dir (read only source). TMDB/TVmaze: use the gates' fake TMDB (tests/) — never the real API, no token. Instrument timings locally (time per sub-part: TMDB wait vs. parse vs. upserts/persist vs. index updates vs. poster/photo work). Name the parts with numbers.
  12. 2. Split the work so each loop turn does at most one bounded unit (e.g. one request's handling, a batch of N upserts, persist in chunks), state kept between turns like the existing jobs do. Same for the person fill (a person page request must not do the whole fill inline if that blocks; keep what the page shows the same).
  13. 3. Prove on the real-data copy: per-unit max and p99 time before vs after (log them), and that results are identical (same records written for a sample of ≥20 titles and ≥20 people: compare stores or dumps before/after).
  14. 4. Gates: all of deploy.sh GATES (11) + `node tests/tmdbfix.mjs`, LC_ALL=C, ports 8701-8719 only (never 8700), each start waits ≥120 s. Expected only the known #277 failures (browser 'results for g', franchises 'added Pager Older Series (2019)'). Any other failure: fix your change, never a gate.
  15. 5. Work on a branch `sl1-slices` from main in worktree /media/STORAGE/claude-scratch/tracker/SL1/wt (copy main's bin/ into it: day38b 5ff2a46d). Scratch only /media/STORAGE/claude-scratch/tracker/SL1/. No live access, no byrodin, no deploy, no push, no lisbeth Chrome.
  16. 6. Stop everything you started by saved PID; delete the extracted data copy at the end; list name+PID.
  17. ## Report
  18. /media/STORAGE/claude-scratch/tracker/SL1/REPORT.md, copy to reports/SL1-slices.md in the worktree, commit on the branch. Final message ≤10 lines: commits, where the time went (numbers), max/p99 unit time before → after, identical-results check, gate counts, stopped processes.
  19. Cap ~60 API requests / 150k context: if near, commit, stop what you started, report exact next steps.

Branches

Latest commits

  • a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
  • cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre
  • 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre
  • ddb4127egc1: TRACKER_QSTATS=1 logs queue and cache sizes every 10 s (measurement only)mre
  • da60547fstatus: GC1 done, backup bugmre
  • e4171021log: GC1 result, backup hard-link bugmre
  • f1597214deploy.sh backup: tar --hard-dereference (hot tar stored mpackdb sidecars as hard links to .sessions files)mre
  • 6b58571elog: GC windowmre
  • 5c8baa1fdeploy lock: hold only around deploy.shmre
  • b8dac822log: hybriel#309mre
  • bf676d9elog: GC1 startedmre
  • c7828541mission GC1mre
  • ef949994conductor: neutral ticket rulemre
  • 89e91ef3log: RV39 livemre
  • ee2b677alog: RV39 deployingmre
  • c1c4178cMerge branch 'rv39'mre
  • a016e9abReapply "Merge branch 'rv39'"mre
  • f29e2502log: RV39 gate fixmre
  • d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre
  • ad529ac1log: m572 verdictmre