fix(panel): guard SQLite schema init and recover .pb sessions (#41)

- Add lock-free 100-byte SQLite header readiness check before opening local
  DBs so high-frequency scans skip 0-byte, pre-DDL, 32-byte WAL-header-only,
  and active rollback-journal DBs without triggering schema-init lock races
- Separate unready DB skips from confirmed empty-shell DBs and fall back to
  transcript.jsonl / size-capped transcript_full.jsonl with .pb + transcript
  signature tracking and subagent ref recovery
- Extract shared transcript JSONL fallback parsing reused by local-scanner
  and cli-statusline, including .pb-aware candidate ranking and root redirect
This commit is contained in:
yuhuan2498281558
2026-11-25 14:06:55 +09:00
committed by fish
parent 8a01705e6f
commit 57c298775b
8 changed files with 1149 additions and 160 deletions
+1
View File
@@ -62,6 +62,7 @@ const BACKEND_MODULE_FILES = [
'../backend/model-pricing.mjs',
'../backend/quota-pools.mjs',
'../backend/quota-reservation.mjs',
'../backend/transcript-fallback.mjs',
'../backend/local-scanner.mjs',
'../backend/usage-aggregator.mjs',
'../backend/telemetry-builder.mjs',