{"draft":null,"from":166,"to":318,"files":[{"path":"src/engine/test/graph-long-text.test.ts","added":0,"removed":45,"diff":"--- a/src/engine/test/graph-long-text.test.ts\n+++ b/src/engine/test/graph-long-text.test.ts\n@@ -47,51 +47,6 @@\n \t}\n });\n \n-import { SqliteWriterState } from \"../../../server/src/writer-host.ts\";\n-import { memoryStorage } from \"../../../server/test/helpers.ts\";\n-\n-test(\"persistent atom metadata accepts text beyond the generic state limit\", (t) => {\n-\tconst database = memoryStorage();\n-\tt.after(() => database.db.close());\n-\tSqliteWriterState.initialize(database);\n-\tconst storage = new SqliteWriterState(database, \"long-atom\");\n-\tconst memory = new MemoryStore();\n-\tconst value = \"x\".repeat(8100000);\n-\tnew Project(memory).init({ \"large.txt\": value }, 0);\n-\tconst entry = memory.entries[0]!;\n-\tif (entry.type !== \"init\") throw Error(\"expected init\");\n-\tnew Graph({ storage }).add(entry.atom);\n-\tassert.ok(JSON.stringify(storage.read(\"atoms\", \"0\")).length < 4096);\n-\tconst read = storage.read.bind(storage);\n-\tlet textReads = 0;\n-\tt.mock.method(storage, \"read\", (collection: string, key: string) => {\n-\t\tif (collection === \"atom-text:long:chunks\") textReads++;\n-\t\treturn read(collection, key);\n-\t});\n-\tconst graph = new Graph({ storage });\n-\tconst atom = graph.atom(\"a0\");\n-\tassert.equal(textReads, 0, \"reading atom metadata must not load long text\");\n-\tassert.equal(atom.inserts[0]!.lines[0], value);\n-\tassert.ok(textReads > 0);\n-\tassert.equal(graph.lineText(\"a0.0\"), value);\n-\tassert.equal(\n-\t\tdatabase.db\n-\t\t\t.prepare(\n-\t\t\t\t\"SELECT COUNT(*) AS n FROM writer_state WHERE namespace = 'long-atom' AND collection = 'atom-text:long:chunks' AND part = -1\",\n-\t\t\t)\n-\t\t\t.get()!.n,\n-\t\tMath.ceil(value.length / 16384),\n-\t);\n-\tassert.equal(\n-\t\tdatabase.db\n-\t\t\t.prepare(\n-\t\t\t\t\"SELECT COUNT(*) AS n FROM writer_state WHERE namespace = 'long-atom' AND collection = 'line-text:long:chunks'\",\n-\t\t\t)\n-\t\t\t.get()!.n,\n-\t\t0,\n-\t);\n-});\n-\n test(\"long atom acceptance rolls back partial chunks and detects missing text\", (t) => {\n \tconst storage = new SqlState();\n \tt.after(() => storage.db.close());"}],"unmatched":[]}