fix(indexer): streaming reads, per-file transactions, and error reporting

- Replace readFileSync+split with chunked line reader (readLines) to
    avoid loading entire JSONL files into memory at once
  - Wrap each file's indexing in its own transaction so one corrupt file
    doesn't roll back the entire index
  - Log warnings to stderr instead of silently swallowing errors in
    indexSubagentMeta, indexWorkflows, and indexHistory
  - Add try/catch around readdirSync calls in discoverJsonlFiles and
    indexWorkflows to survive unreadable directories
  - Push error-pattern filtering in failures() into SQL LIKE clauses
    instead of scanning all tool_results in JS
This commit is contained in:
tommy0103
2026-05-31 02:33:22 +08:00
parent 5593990440
commit fb353f5deb
2 changed files with 91 additions and 37 deletions
+1
View File
@@ -0,0 +1 @@
.DS_Store