Why:
The dev runtime switched to the PostgreSQL tier and every conversation
endpoint started returning 500. Migrations define
conversations.pinned/archived/allow_cross_read/cross_private and
users.must_change_password/is_admin as BOOLEAN on PostgreSQL but
INTEGER on SQLite, while the store layer compared them with 0/1
literals, scanned them into int, and wrote them via boolInt().
Under pgx these fail with 42883 (operator does not exist: boolean =
integer), bool encode errors, or 42804 (column is of type boolean but
expression is of type integer).
Evidence:
- parent-repo main 4fd03ee with AGENT_PG_TEST_DSN:
TestConversationFlagsAndTaskList and TestAdminAccountsAndSessions
fail with the errors above; live GET /api/conversations returned
"operator does not exist: boolean = integer (SQLSTATE 42883)".
- this branch: full ./internal/store suite green on the PostgreSQL
tier (AGENT_PG_TEST_DSN against a scratch database), pgbus green,
make test-backend green on the SQLite tier.
- scan into *bool and Go bool parameters are cross-dialect: pgx encodes
bool natively; database/sql converts bool<->0/1 for SQLite.
- pre-existing and out of scope: ./internal/runmgr PG integration tests
fail on main too (gin_trgm_ops invisible inside the search_path
isolation schema, 42704).
Impact:
Conversations list/detail/flags and user auth-state reads/writes now
work identically on both storage tiers; SQLite behavior is unchanged.
Refs: Dev task .task/fix-pg-boolean-columns.md
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Dev 运行时切换 PostgreSQL 档后全部 conversations 接口 500。迁移把
conversations.{pinned,archived,allow_cross_read,cross_private}、users.{must_change_password,is_admin}在 PG 档建为 BOOLEAN(SQLite 档 INTEGER),store 层用 0/1 字面量、int 扫描与 boolInt() 写入,pgx 下报 42883/42804/bool 编码错误。改动
archived=?参数化;SetConversationFlags 传 Go bool。Evidence
./internal/store/全量 PG 档 ok;./internal/pgbus/PG 档 ok;make test-backendSQLite 档全绿;Dev 仓make test组合验证通过。./internal/runmgr/PG 集成测试在 main 同样失败(gin_trgm_ops 不在 search_path 隔离 schema,42704)。Impact
两档行为一致;SQLite 档行为不变。Refs: Dev 任务卡 .task/fix-pg-boolean-columns.md