refactor(store)!: remove the SQLite task store, the PocketBase event store and the SQLite session store

The State Store, event capture and Gateway conversations already serve from
PostgreSQL. This deletes internal/store and internal/infrastructure/edastore,
the SQLite gateway session store and openProductionTaskStore, and the -db
recovery path on a legacy task file; backup, restore, validate and rollback
work on the database database_url names.

- The binding-secret cipher moves to internal/infrastructure/bindingcipher and
  ToolCall to internal/infrastructure/postgres.
- NewSessionStoreMemory is now a pure in-memory store that passes the shared
  SessionStore conformance suite.
- Tests run against PostgreSQL through internal/infrastructure/postgres/pgstore;
  legacyimport/legacyfixture writes the legacy files the import and the boot
  gate read.
- The cron dialect is owned in internal/domain/scheduling, so
  github.com/pocketbase/pocketbase and pocketbase/dbx leave go.mod.
  modernc.org/sqlite stays for the one-time import (legacyread).
- The UI and Messaging architecture gates ban the Postgres and legacy readers
  in place of internal/store.
This commit is contained in:
sam committed 2026-09-24 14:43:50 +10:00
1 parent dda12dcdba
commit ae552db7e0
90 files changed
+1022 -1453

No files matched your search

+7 -11
View File
@@ -5,32 +5,28 @@ import (
"log/slog"
"net/http"
"net/http/httptest"
"path/filepath"
"strings"
"testing"
"time"
"github.com/samcharles93/archie-core/internal/infrastructure/edastore"
"github.com/samcharles93/archie-core/internal/store"
"github.com/samcharles93/archie-core/internal/domain/storecontract"
"github.com/samcharles93/archie-core/internal/infrastructure/postgres/pgstore"
)
// captureTestServer builds a Server whose Captures field points at the same
// concrete *store.Store as Store, so tests can assert on persisted rows
// concrete *pgstore.TaskDB as Store, so tests can assert on persisted rows
// through the narrower CaptureStore interface -- Server.Store's static type
// (store.TaskStore) does not expose ListCaptures.
// (storecontract.TaskStore) does not expose ListCaptures.
func captureTestServer(t *testing.T) *Server {
t.Helper()
s, err := store.Open(t.Context(), filepath.Join(t.TempDir(), "test.db"))
if err != nil {
t.Fatal(err)
}
s := pgstore.Open(t)
t.Cleanup(func() { _ = s.Close() })
return &Server{
Store: s,
Log: slog.New(slog.DiscardHandler),
// Captures come from the event-capture store; the task store no
// longer holds them.
Captures: edastore.OpenTest(t),
Captures: pgstore.EDA(t, nil),
}
}
@@ -39,7 +35,7 @@ func captureTestServer(t *testing.T) *Server {
// internal/infrastructure/captureintake and is tested there.
func seedCapture(t *testing.T, srv *Server, source string) string {
t.Helper()
id, err := srv.Captures.InsertCapture(t.Context(), store.CapturedEvent{
id, err := srv.Captures.InsertCapture(t.Context(), storecontract.CapturedEvent{
ReceivedAt: time.Now().UTC(),
Source: source,
Body: `{"n":1}`,