tickets
All repositories: gitoria
2.0 KB
// tools/fix-import-summaries.hl — ONE-OFF (ticket #10, 2026-09-24): the tickets imported// before the importer joined hard-wrapped lines (#1–#5) kept the files' line breaks in// their stored summary. This rewrites ONLY `summary` of every ticket that has a `source`// (= was imported) with lib/import.hl's paragraphsOf(); id, state, dates, event count and// the event history are untouched (no event is written). Idempotent: a second run// changes nothing. (Since ticket #38 it works on the storage/mpackdb/ tables.) STOP THE SERVER FIRST (it holds the tables), back up storage/://// kill $(cat server.pid); cp -a storage .scratch/storage-backup-$(date +%Y%m%d-%H%M%S)// TICKETS_STORAGE=$PWD/storage/mpackdb bin/hybriel tools/fix-import-summaries.hl//// TICKETS_STORAGE must be ABSOLUTE: Hybriel resolves a relative path against the ENTRY// SCRIPT's directory (tools/), so the default './storage/mpackdb' would open empty// tables in tools/storage/mpackdb/. Without it the tool refuses (the import has already created// empty tools/storage/mpackdb/* files by then — delete them).import { env } from 'hl:proc'import { merged, countOf, storageDir } from '../lib/util.hl'import { ticketsTable } from '../lib/tickets.hl'import { paragraphsOf } from '../lib/import.hl'if (env('TICKETS_STORAGE') == null || !env('TICKETS_STORAGE').startsWith('/')) {hlError('set TICKETS_STORAGE to the ABSOLUTE table directory, e.g. TICKETS_STORAGE=$PWD/storage/mpackdb')}fixed = 0same = 0all = ticketsTable.find(null, null)if (countOf(all) > 0) {for (t of all) {if (t.source != null && t.source != '') {s = paragraphsOf(t.summary != null ? t.summary : '')if (s != t.summary) {ticketsTable.update(t.id, merged(t, { summary = s }))fixed = fixed + 1console.log('FIXED ' + t.project + ' #' + t.number + ' (' + t.source + ')')} else {same = same + 1console.log('SAME ' + t.project + ' #' + t.number + ' (' + t.source + ')')}}}}console.log('fix-import-summaries: ' + fixed + ' fixed, ' + same + ' already fine (' + storageDir + ')')
Branches
Latest commits
- bc3bdecerecords: day38b live, #94 purgedmre
- f6c5aa0dMerge main (records)mre
- e23d42acconnect gate: wait for hydration before clicking Disconnectmre
- a5d45d00records: D38 cause, GOmre
- 19eeb938records: D38 gates, two day38b failuresmre
- f8e42a85Re-vendor tickets to Hybriel set day38b (1e554d7)mre
- 51645016Merge purge-94 (#94, identity rule)mre
- 94d6ca2arecords: D38 startedmre
- 9df09aacmission 029: day38b re-vendor + deploymre
- d2834f65records: #94 backup planmre
- 4467d8cbrecords: #94 purge readymre
- aa2d124eREADME: the #94 purge gatemre
- e843ff7cOne-time purge of miserit-anthar#94 (#94, identity rule): idempotent step in lib/migrate.hl, fixture gate tests/purge94.mjsmre
- 506a4efdmission 028: #94, identity rulemre
- 78c7f48eRefine mpackdb holdmre
- 3d7d89c8Record mpackdb hold until day38mre
- f1bf7195#51 done; my subscription idmre
- 9870b945status: #51 proof greenmre
- e92173c6log: #51 live push proofmre
- 72d87041log: Hermes push livemre