From 5b23a83ad45656cacff15b465763902b04cfe26a Mon Sep 17 00:00:00 2001 From: jedarden Date: Mon, 20 Apr 2026 23:32:28 -0400 Subject: [PATCH] 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 --- cmd/acb-index-builder/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/acb-index-builder/db.go b/cmd/acb-index-builder/db.go index 7352b60..cd51992 100644 --- a/cmd/acb-index-builder/db.go +++ b/cmd/acb-index-builder/db.go @@ -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'