tracker
All repositories: gitoria
2.8 KB
// 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// prepare's stats and, with TRACKER_DUMP_MERGE=1, the stores AFTER every merge step ran, (3) the collections queue, (4) every table's// 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// output through the former `…Queue()` / `mergePrepare()` functions), `sort` both outputs, diff: equal = same jobs, same writes.// Order differs on purpose (slices = key order, the old scans = file order), hence the sort. Run while the app is STOPPED.// TRACKER_STORAGE=<store copy> TRACKER_DUMP_MERGE=1 ./bin/hybriel tests/jobs-dump.hl | sort > out-new.txtimport { env } from 'hl:proc'import { showsTable, seasonsTable, episodesTable, personsTable } from '../lib/shows.hl'import { followsTable } from '../lib/follows.hl'import { watchesTable } from '../lib/watches.hl'import { collectStep, collected } from '../lib/slices.hl'import { adultBackfillScan, adultPred, kindBackfillScan, kindPred, tvmazeStatusScan, statusPred, artScan, artPred } from '../lib/backfill.hl'import { creditsScanStart, creditsPred } from '../lib/credits.hl'import { detailsRepairScan, repairClass } from '../lib/details.hl'import { mergePrepare, mergeStep, mergeStats, mergeLine, persistMerge } from '../lib/merge.hl'import { seedPrepare, seedQueue } from '../lib/collections.hl'printIds = (tag, ids) => {for (id of ids) { console.log(tag + ' ' + id) }console.log('count ' + tag + ' ' + ids.length)return true}drainScan = (c, pred) => {while (!collectStep(&c, pred)) {}return collected(&c)}printIds('adult', drainScan(adultBackfillScan(), adultPred))printIds('kind', drainScan(kindBackfillScan(), kindPred))printIds('status', drainScan(tvmazeStatusScan(), statusPred))printIds('art', drainScan(artScan(), artPred))printIds('credits', drainScan(creditsScanStart(), creditsPred))rq = drainScan(detailsRepairScan(), repairClass)printIds('repair', rq)// the repair queue is "the reduced ones first, then the rest": print the position class toowhile (!mergePrepare()) {}st = mergeStats()console.log('mergeprep groups=' + st.groups + ' records=' + st.records + ' strayTitles=' + st.strayTitles + ' doubleSeasons=' + st.doubleSeasons)while (!seedPrepare()) {}printIds('seed', seedQueue)if (env('TRACKER_DUMP_MERGE') == '1') {let guard = 0while (guard < 100000) { r = mergeStep() if (r.done) { break } guard = guard + 1 }persistMerge()console.log('merge ' + mergeLine())}dumpTable = (tag, table) => {for (r of table.find(null, null)) { console.log('row ' + tag + ' ' + JSON.stringify(r)) }return true}dumpTable('shows', showsTable)dumpTable('seasons', seasonsTable)dumpTable('episodes', episodesTable)dumpTable('persons', personsTable)dumpTable('follows', followsTable)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