fix(index-builder): cast parent_ids default to jsonb

COALESCE(parent_ids, '[]'::json) fails because the column is JSONB
and PostgreSQL won't coerce json to jsonb. Change to '[]'::jsonb.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-04-20 23:32:28 -04:00
parent f206a87575
commit 5b23a83ad4

View file

@ -176,7 +176,7 @@ func fetchBots(ctx context.Context, db *sql.DB) ([]BotData, error) {
rating_mu, rating_phi, rating_sigma,
0, 0, status,
evolved, island, generation,
COALESCE(archetype, ''), COALESCE(parent_ids, '[]'::json),
COALESCE(archetype, ''), COALESCE(parent_ids, '[]'::jsonb),
created_at, COALESCE(last_active, created_at)
FROM bots
WHERE status != 'retired'