remove :storage-ksqlite (conversation/message) and related tests; decouple schema from journal
ci / JVM build + tests (push) Successful in 6m6s

This commit is contained in:
2026-09-22 16:01:05 +03:00
parent 639c7d1748
commit 84f5fd84f3
39 changed files with 1569 additions and 616 deletions
@@ -317,6 +317,11 @@ class ChatAgent(
conv?.close()
val ok = mutableConversationStore.delete(id)
if (ok) {
// Каскад — здесь, потому что владелец lifecycle диалога
// (ChatAgent) имеет доступ ко всем трём store'ам, а каждый
// отдельный store должен знать только про свою таблицу.
messageStore.clear(id)
workingMemoryStore.clear(id)
val event = AgentEvent.Deleted(date = now(), id = id)
eventStore.append(CommonEvent.Agent(date = now(), event = event))
}
@@ -116,6 +116,11 @@ class PersistenceTest {
val removed = stores.conversations.delete("c1")
assertTrue(removed)
assertNull(stores.conversations.get("c1"))
// conversations.delete больше не каскадит — это делает владелец
// lifecycle (ChatAgent). Здесь проверяем, что каждый store делает
// только свою таблицу чистой при ручном вызове.
stores.messages.clear("c1")
stores.workingMemory.clear("c1")
assertEquals(emptyList(), stores.messages.listFlow("c1", Instant.DISTANT_PAST).toList())
assertEquals(emptyList(), stores.workingMemory.list("c1"))
}