feat(postgres): implement PG serve session curation and insight persistence#898
feat(postgres): implement PG serve session curation and insight persistence#898rodboev wants to merge 11 commits into
Conversation
796db71 to
9117d03
Compare
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
PG serve already supports shared stars and pins, but the rest of the dashboard curation surface still behaves as read-only. Session rename, trash, restore, empty trash, insight delete, and generated-insight persistence all route through the existing
db.Storeseam, yet the PostgreSQL adapter still returnsdb.ErrReadOnlyfor those methods, and the insight-generation route stops on a coarse read-only check before it can save anything.This change fills in the remaining PG dashboard-write slice without widening scope to local-only features or other read-only backends. PostgreSQL gets the missing insight storage plus Store implementations for insight CRUD and session-management methods, and the server now treats generated-insight writes as an explicit capability: pg serve advertises it, the frontend enables the Generate controls in that mode, and plain read-only stores such as duckdb still fail fast before any generator work starts. Settings remain blocked in pg serve through the existing read-only contract, while local
serve --no-syncstays writable because it still uses a local Store.The tests cover the PG round trips for insight CRUD and session management, the read-only capability split on the insight route, the pg serve and local no-sync settings behavior, the pg serve version metadata that enables the frontend, and the two frontend insight entry points. Stars and pins are left untouched, and ingestion-oriented methods such as
WriteSessionBatchAtomicremain read-only.Closes #183