gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitbb2ebc67bb2ebc67log: #64 live, #53 mergedmrebb2ebc67/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

  • 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
  • 4042b923Flatten catalog membership rows into paired slotsmre
  • ea8a759elog: #61 #62 live, DP63 and HM64 startedmre
  • 40439456Merge hm63-searchtext: tracker#63 packed search textmre
  • b7e6b48ePack normalized search text behind numeric offsetsmre
  • b35f53e1log: DP62 stale runtime decisionmre
  • f9593602log: Apollo deploy rule correctionmre