Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

fix: ix reset must truncate idempotency_keys and all state collections

kagebinary85344e1d6f67
diff --git a/memory-layer/src/main/scala/ix/memory/db/ArangoClient.scala b/memory-layer/src/main/scala/ix/memory/db/ArangoClient.scala
index eacfee62..ddee578a 100644
--- a/memory-layer/src/main/scala/ix/memory/db/ArangoClient.scala
+++ b/memory-layer/src/main/scala/ix/memory/db/ArangoClient.scala
@@ -107,11 +107,16 @@ class ArangoClient private (db: ArangoDatabase) {
def ensureSchema(): IO[Unit] = ArangoSchema.ensure(db)
- /** Truncate all graph collections (nodes + edges). Destructive — dev use only. */
+ /** Truncate all graph state. Destructive — dev use only. */
def truncateGraph(): IO[Unit] =
IO.blocking {
db.collection("nodes").truncate()
db.collection("edges").truncate()
+ db.collection("patches").truncate()
+ db.collection("claims").truncate()
+ db.collection("idempotency_keys").truncate()
+ db.collection("revisions").truncate()
+ db.collection("conflict_sets").truncate()
()
}
}