fix: search_mental_models uuid type mismatch after text id migration (#225)

The mental_models.id column was changed from UUID to TEXT in migration
u6p7q8r9s0t1, but the exclude_ids filter in search_mental_models still
cast the parameter as ::uuid[]. This caused every search_mental_models
call during reflect to fail with "operator does not exist: text <> uuid",
forcing the reflect agent to waste all 5 iterations on retries and
producing degraded mental model content.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
DK09876 2026-01-28 12:04:19 -07:00 committed by GitHub
parent 67c47881cb
commit 94cc0a1270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,7 @@ async def tool_search_mental_models(
next_param += 1
if exclude_ids:
filters += f" AND id != ALL(${next_param}::uuid[])"
filters += f" AND id != ALL(${next_param}::text[])"
params.append(exclude_ids)
next_param += 1