| Age | Commit message (Collapse) | Author |
|
Wave 1 created idx_records_bodyHash BEFORE migrateOldBodies ran, so opening a
pre-existing old-schema traces.db crashed the collector with 'no such column:
bodyHash' (crash-looped 168x in ~20s). Fresh DBs hid it (CREATE TABLE already
has bodyHash); only a real old-schema DB exposed it.
- reorder schema(): migrateOldBodies (ALTER ADD bodyHash + content-address
backfill + drop old bodies) runs BEFORE the bodyHash index.
- add 3 regression tests that seed a real old-schema DB and open it.
Live-verified: old-schema traces.db migrates on boot with 0 crashes; 318 body
refs collapse to 270 content-addressed bodies; prune cadence fires cleanly.
typecheck EXIT 0; biome clean; bun 106->109, 0 fail.
|
|
Wave 1 of the dedup/storage-growth milestone (notes §12).
- bodies table is now content-addressed (SHA-256 hash key); identical verbatim
bodies (cache-warming resends, any repeat) collapse to one stored row,
referenced by hash from records. Transparent to insert/read callers.
- at-rest gzip compression for bodies >1 KiB (node:zlib), decompressed on read.
- prune(policy): age-based delete + drop-oldest byte-cap eviction + orphan-body
GC. Exports RetentionPolicy/PruneSummary/DEFAULT_RETENTION (7d / 256 MiB).
typecheck EXIT 0; biome clean; vitest 576; bun 89->100, 0 fail.
|
|
collector + trace CLI (345 tests)
trace-store (bun:sqlite): records+bodies schema (thin/fat split), idempotent insertRecords (FNV-1a id + INSERT OR IGNORE), getTurn/getBody, pure renderEasyView (D8 timeline skeleton), trace CLI. Its own DB, isolated from storage-sqlite.
observability-collector: out-of-process bin — tail journal -> splitLines/drainOnce -> trace-store.insertRecords; offset sidecar; at-least-once + idempotent; fail-safe; clean SIGINT/SIGTERM drain.
Build-config (orchestrator): root tsconfig refs; both excluded from vitest + added to test:bun (bun:sqlite); bun install.
Verified: tsc -b clean, 345 tests (273 vitest + 72 bun), biome 0 warnings/0 infos. Pipeline proven end-to-end: app -> journal -> collector -> SQLite -> 'trace <turnId>' easy-view. Known follow-up (next commit): kernel spans are flat (parent=ROOT) — run-turn nesting fix.
|