gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmaind2e6d26bMerge branch 'records-park55' into mainTrackermain/tests/jobs-dump.hl

2.8 KB

  1. // tests/jobs-dump.hl — CHECK of mission 044 (background jobs in slices): prints, one line each, (1) every job's queue (ids), (2) the merge
  2. // prepare's stats and, with TRACKER_DUMP_MERGE=1, the stores AFTER every merge step ran, (3) the collections queue, (4) every table's
  3. // rows as JSON. Run on the SAME store copy with this tree and with the old tree (tests/jobs-dump-old.hl in the old checkout: the same
  4. // output through the former `…Queue()` / `mergePrepare()` functions), `sort` both outputs, diff: equal = same jobs, same writes.
  5. // Order differs on purpose (slices = key order, the old scans = file order), hence the sort. Run while the app is STOPPED.
  6. // TRACKER_STORAGE=<store copy> TRACKER_DUMP_MERGE=1 ./bin/hybriel tests/jobs-dump.hl | sort > out-new.txt
  7. import { env } from 'hl:proc'
  8. import { showsTable, seasonsTable, episodesTable, personsTable } from '../lib/shows.hl'
  9. import { followsTable } from '../lib/follows.hl'
  10. import { watchesTable } from '../lib/watches.hl'
  11. import { collectStep, collected } from '../lib/slices.hl'
  12. import { adultBackfillScan, adultPred, kindBackfillScan, kindPred, tvmazeStatusScan, statusPred, artScan, artPred } from '../lib/backfill.hl'
  13. import { creditsScanStart, creditsPred } from '../lib/credits.hl'
  14. import { detailsRepairScan, repairClass } from '../lib/details.hl'
  15. import { mergePrepare, mergeStep, mergeStats, mergeLine, persistMerge } from '../lib/merge.hl'
  16. import { seedPrepare, seedQueue } from '../lib/collections.hl'
  17. printIds = (tag, ids) => {
  18. for (id of ids) { console.log(tag + ' ' + id) }
  19. console.log('count ' + tag + ' ' + ids.length)
  20. return true
  21. }
  22. drainScan = (c, pred) => {
  23. while (!collectStep(&c, pred)) {}
  24. return collected(&c)
  25. }
  26. printIds('adult', drainScan(adultBackfillScan(), adultPred))
  27. printIds('kind', drainScan(kindBackfillScan(), kindPred))
  28. printIds('status', drainScan(tvmazeStatusScan(), statusPred))
  29. printIds('art', drainScan(artScan(), artPred))
  30. printIds('credits', drainScan(creditsScanStart(), creditsPred))
  31. rq = drainScan(detailsRepairScan(), repairClass)
  32. printIds('repair', rq)
  33. // the repair queue is "the reduced ones first, then the rest": print the position class too
  34. while (!mergePrepare()) {}
  35. st = mergeStats()
  36. console.log('mergeprep groups=' + st.groups + ' records=' + st.records + ' strayTitles=' + st.strayTitles + ' doubleSeasons=' + st.doubleSeasons)
  37. while (!seedPrepare()) {}
  38. printIds('seed', seedQueue)
  39. if (env('TRACKER_DUMP_MERGE') == '1') {
  40. let guard = 0
  41. while (guard < 100000) { r = mergeStep() if (r.done) { break } guard = guard + 1 }
  42. persistMerge()
  43. console.log('merge ' + mergeLine())
  44. }
  45. dumpTable = (tag, table) => {
  46. for (r of table.find(null, null)) { console.log('row ' + tag + ' ' + JSON.stringify(r)) }
  47. return true
  48. }
  49. dumpTable('shows', showsTable)
  50. dumpTable('seasons', seasonsTable)
  51. dumpTable('episodes', episodesTable)
  52. dumpTable('persons', personsTable)
  53. dumpTable('follows', followsTable)
  54. dumpTable('watches', watchesTable)

Branches

Latest commits

  • d2e6d26bMerge branch 'records-park55' into mainTracker
  • f567f025|||PR records: park #55, no Claude workers ruleTracker
  • c21aff6bMerge branch 'records-hm55c' into mainTracker
  • 9ba258d3|||PR records: HM55b resultTracker
  • 64f2d300Merge branch 'records-hm55b2' into mainTracker
  • ae3b80dc|||PR records: HM55b briefTracker
  • 7ef3cb3bMerge branch 'records-st55' into mainTracker
  • fec2e080|||PR records: STATUS HM55Tracker
  • 8e174918Merge branch 'records-hm55b' into mainTracker
  • b1ecee57|||PR records: HM55 stateTracker
  • 28eab08cMerge branch 'records-hm55' into mainTracker
  • d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
  • 3059f86cMerge branch 'records-design-rule' into mainTracker
  • 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
  • d1390692Merge branch 'records-dp75b' into mainTracker
  • a4d1a7d2|||PR records: later steps checked, branch auditTracker
  • e070e16fMerge branch 'records-dp75' into mainTracker
  • 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
  • bfc4ea4dMerge branch 'ap62' into mainTracker
  • 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker