Bind archived filter as bool in ListTasks #65

Merged
weichen merged 1 commits from feature/store-pg-archived-literal into main 2026-10-05 03:21:13 +00:00
1 Commits
Author SHA1 Message Date
weichenandCursor 8d82408bb7 Bind archived filter as bool in ListTasks
ci / vet-and-test (pull_request) Successful in 41s
Why: GET /api/conversations on the default unarchived view appended
AND archived=0. PostgreSQL stores conversations.archived as BOOLEAN
and rejects boolean = integer (42883), so listTasks returned 500.
The previous dialect fix bound parameters and scans but left this literal.

Evidence: before the change, TestConversationFlagsAndTaskList against
pg1 failed with SQLSTATE 42883. After: AGENT_PG_TEST_DSN set to pg1,
go test ./internal/store -count=1 passed; go vet ./... && go test ./...
passed on SQLite.

Impact: the default task list works on the postgres tier. SQLite still
binds the bool as 0/1. openTestStore accepts URL and keyword DSNs and
keeps public on search_path so an existing pg_trgm extension stays visible.

Refs: Agent-System-Dev feature/store-pg-archived-literal
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 03:18:10 +00:00