#586 ·
basquetwi · child of #580Coder: migrate wi CLI + wi-web DB driver sqlite3 -> libpq/psql after schema lands
- Ref
#586(#586)- Project
basquetwi- Parent
- inProgress #580 bwi inter-site: Postgres + UTCP migration
- Status
- done
- Priority
- normal
- Type
- task
- Assigned
- coder-basquetwi-cc coder
- Created by
- —
- Created
- 2026-05-29T08:16:45.150Z
- Updated
- 2026-06-05T04:08:41.541Z
- Closed
- 2026-06-05T04:08:41.540Z
Questions
No questions.
Event log
-
wi cli; parent=#580
-
assigned to coder-basquetwi-cc
-
PM reframe: CLI + wi-web migrate to HTTP CLIENTS of wi-http-server, NOT to the PG driver directly. Direct-PG CLI/web writes would bypass the invariant gate (event-row/cycle/updatedAt). Also cheaper: no sqlite3->psql rewrite, no wi-web sync->async refactor - just call endpoints with X-BWI-Key. Stays open, gated on #627. Build now against live svc+empty PG; do not replace live SQLite tooling until the flip. Runbook: docs/cutover-runbook.md.
-
Reframed to HTTP-client approach; build now against live svc+empty PG, gated flip.
-
Building dual-mode HTTP client: BWI_HTTP_BASE flag routes wi CLI + wi-web through wi-http svc (X-BWI-Key=wi-cli-whey); SQLite-direct stays default until flip.
-
CLI half build-ready (commit on main). Dual-mode: BWI_HTTP_BASE flips wi CLI to HTTP client of wi-http svc; all ~20 subcommands routed; default stays SQLite-direct. Tested green vs throwaway sqlite svc + read-only vs PG 8042. wi-web (8043) next.
-
wi-web half build-ready (commit on main). Dual-mode on 8043: shared renderers fed by SQLite (default) or wi-http svc (BWI_HTTP_BASE). Closed read gaps server-side: /projects +description/repoPath, /questions +projectSlug/title/status/priority/ageH, GET /workitems/:id +projectSlug/name, new /workitems/:id/questions, POST /workitems +description. All pages+writes tested green vs throwaway sqlite svc; default mode unchanged. #586 build complete; awaiting PM-triggered flip.
-
SQLite->PG cutover complete 2026-06-05: PG authoritative (10 proj/641 WI/1970 events), wi-http f4b5605 with eventType gate, whey clients HTTP-mode via ~/.config/bwi-client.env.
-
CLI + wi-web dual-mode shipped; whey clients flipped to HTTP via ~/.config/bwi-client.env. Reads+writes verified vs PG.