agent-orchestrator/backend/internal/storage/sqlite
neversettle c53c4af8bd
test(storage): guard against duplicate goose migration version prefixes (#336)
* test(storage): guard against duplicate goose migration version prefixes

Statically scans embedded migration filenames for repeated numeric
version prefixes and fails with a clear message, catching the class
of bug from #333 (two PRs adding 0014_*.sql independently) before
goose.Up() would panic at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(storage): dedupe migration versions by goose's parsed int64, not raw string

versionPrefix compared raw filename prefixes, so 014_x.sql and 0014_y.sql
were treated as distinct even though goose.NumericComponent parses both
to version 14 and panics on the collision. Use goose.NumericComponent
directly so the test enforces goose's actual collision rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(storage): trim PR-specific framing from migration version test comment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 12:49:59 +05:30
..
gen Feat/backend telemetry v0 (#307) 2026-06-18 22:00:25 +05:30
migrations fix(storage): renumber telemetry migration to 0015 to resolve 0014 version collision (#334) 2026-06-20 11:23:13 +05:30
queries Feat/backend telemetry v0 (#307) 2026-06-18 22:00:25 +05:30
store fix: surface missing reviewer harness (#318) 2026-06-20 10:19:50 +05:30
db.go refactor: simplify session lifecycle and zellij runtime (#62) 2026-06-01 08:42:49 +05:30
migrate_review_dedup_test.go fix(review): serialize concurrent triggers per worker to stop reviewer double-spawn (#246) 2026-06-17 00:43:10 +05:30
migrate_test.go feat(agents): agent platform — registry, activity hooks, harness allowlist (#119) 2026-06-07 00:52:40 +05:30
migrate_unique_version_test.go test(storage): guard against duplicate goose migration version prefixes (#336) 2026-06-20 12:49:59 +05:30