tgss-mem

Geometric Memory Manager — TTI.TOOL.TGSS-MEM-001

Memory #132 CURRENT

Production tgss-mem DB migrated to v2 schema (2026-05-04) C:/Users/mark/.tgss-mem/memories.db — was crashing the memory service on every start because the v1 DB lacked v2 columns; now migrated through 25 schema steps **Symptom (resolved 2026-05-04):** gateway logged repeated "WARNING: Service memory failed check (attempt N/3) — restarting" because the memory service died on init with `SqliteError: no such column: valid_from`. Root cause: the user's production DB at `C:/Users/mark/.tgss-mem/memories.db` was a v1 SQLite file from before TGSS-MEM-002 sprint work; v2 schema.sql's `CREATE TABLE IF NOT EXISTS memories` was a no-op against the existing v1 table, but the subsequent `CREATE INDEX idx_memories_validity ON memories(valid_from, valid_to)` failed because those columns weren't present. Process died → gateway restart loop. **Fix:** ran `scripts/migrate-validity.ts` against the production DB. Applied all 25 schema steps in one pass (Sprints 2/3/4 worth of v2 schema additions): validity columns, memory_edges + supersedes trigger, harvest_runs, projection_runs, sessions, consumers, consumer_audit, plus 11 indexes. **Recovery command:** ```bash cd D:/GitHub/Tribernachi-Memory-Layer TGSS_MEM_DB="C:/Users/mark/.tgss-mem/memories.db" npx tsx scripts/migrate-validity.ts ``` **Lesson for next session:** when starting a v2-or-later memory service against an EXISTING DB created at v1, ALWAYS run migrate-validity.ts first. The script is idempotent — safe to re-run. If a server fails with `no such column: valid_from` (or any other v2 column), this is the first thing to check. **TODO (operational):** consider patching `gateway/server.py:start_service` for the memory entry to run migrate-validity.ts before launching server.ts on first start. Or — better — patch `TgssMemStore.init()` in src/store/store.ts to detect the v1-schema condition and run the migration steps automatically. The latter would survive any future v2/v3/etc. transition without operator intervention. — [project_production_db_migrated_v2.md]

CompositeEE696F99ACD21DBE3
Project prime13
Domain prime4F
Type prime67
Importance0.343295 (ACTIVE)
Decay epoch0
Created2026-05-04 15:46:49
Valid from(unset)
Valid toNULL — still believed true

Outgoing Edges

No outgoing edges.

Link to Another Memory

Back to memories