Why:
The dev runtime switched to the PostgreSQL tier today 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:
- 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
(same tests green). Boolean columns that are INTEGER in both dialects
(hitl_cards.resolved, profiles.builtin, activity_cards.pinned) keep
boolInt().
Refs: task card .task/fix-pg-boolean-columns.md
Why: advance the backend gitlink to the boolean-column fix so the dev
runtime's PostgreSQL tier stops failing every conversations endpoint.
Evidence: backend branch pushed (685bd0d); make test run recorded in
the task card.
Impact: gitlink-only change in Dev; combined verification via make test.
Refs: .task/fix-pg-boolean-columns.md
Why: Backend PR #62 merged as 3f438b9 (superseded by #64/#65); task card
requires re-pinning the gitlink to the backend merge commit before the
Dev PR can merge.
Evidence: backend go vet + go test ./... -count=1 all ok (29 packages);
merged tree content-identical to backend main.
Impact: modules/backend 685bd0d -> 3f438b9.
Refs: .task/fix-pg-boolean-columns.md
Why: Backend PR #62 dependency is now merged and the Dev branch is
synced with main; the card needs the closing evidence trail.
Evidence: backend 29 packages ok; make test all green at 8a91cded.
Impact: task card only.
Refs: PR #185
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
runtime/dev 2026-10-04 14:02 切换 PostgreSQL 档后,前端
GET/POST /api/conversations*、GET /api/events全部 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 下报operator does not exist: boolean = integer(42883)、bool 编码错误、column ... boolean but expression integer(42804)。改动
Evidence
4fd03ee+ AGENT_PG_TEST_DSN 指向临时库):TestConversationFlagsAndTaskList / TestAdminAccountsAndSessions FAIL,错误与线上同类;线上 GET /api/conversations 返回 42883。./internal/store/全量 PG 档 ok、./internal/pgbus/ok、make test-backendSQLite 档全绿;Dev 仓make test组合验证通过(2026-10-04)。Impact
conversations 列表/详情/标记与用户认证态读写两档一致;SQLite 行为不变。
合入顺序
先合 Backend PR #62;若产生 merge commit,需把本分支 gitlink 重钉到 Backend main 新头并 task-sync 后再合入本 PR。
Refs: 任务卡 .task/fix-pg-boolean-columns.md(同文档)