diff options
| author | Adam Malczewski <[email protected]> | 2026-06-10 11:42:21 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-10 11:42:21 +0900 |
| commit | 9e7554cde98f45df30dad1f9d356b6954138685b (patch) | |
| tree | 0a8047a4951141fe0ed33b24787d2507266bd3c7 /packages/tool-shell/src/shell.test.ts | |
| parent | c1b08acd121432fcf4fea2fc0b70521cdf9f0cf6 (diff) | |
| download | dispatch-9e7554cde98f45df30dad1f9d356b6954138685b.tar.gz dispatch-9e7554cde98f45df30dad1f9d356b6954138685b.zip | |
trace-store: fix old-schema migration crash (found by live boot)
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.
Diffstat (limited to 'packages/tool-shell/src/shell.test.ts')
0 files changed, 0 insertions, 0 deletions
