{"draft":null,"from":151,"to":318,"files":[{"path":"src/engine/test/graph-metadata-indexed.test.ts","added":25,"removed":0,"diff":"--- a/src/engine/test/graph-metadata-indexed.test.ts\n+++ b/src/engine/test/graph-metadata-indexed.test.ts\n@@ -31,3 +31,28 @@\n \t\tdb.db.close();\n \t}\n });\n+\n+test(\"accepting an edit does not decode historical atoms to canonicalize identities\", () => {\n+\tconst db = new SqlState();\n+\ttry {\n+\t\tconst repo = Repo.init({ \"a.txt\": `first\\n${\"old\\n\".repeat(8191)}` });\n+\t\tconst graph = new Graph({ storage: db });\n+\t\tgraph.add(repo.graph.atom(\"a0\"));\n+\t\tconst edit = repo.edit({ edits: [{ file: \"a.txt\", old: \"first\\n\", new: \"changed\\n\" }] });\n+\t\tassert.ok(edit.deps.includes(\"a0\"));\n+\t\tconst read = db.read.bind(db);\n+\t\tdb.read = (collection, key) => {\n+\t\t\tif (collection === \"atoms\") throw Error(\"historical atom payload read forbidden\");\n+\t\t\treturn read(collection, key);\n+\t\t};\n+\t\tgraph.add(edit);\n+\t\tassert.equal(graph.size, 2);\n+\t\tassert.equal(graph.idOfSeq(1), edit.id);\n+\t\tassert.equal(graph.lamport(edit.id), repo.graph.lamport(edit.id));\n+\t\tassert.deepEqual(graph.filesOf(edit.id), repo.graph.filesOf(edit.id));\n+\t\tdb.read = read;\n+\t\tassert.deepEqual(graph.atom(edit.id), repo.graph.atom(edit.id));\n+\t} finally {\n+\t\tdb.db.close();\n+\t}\n+});"}],"unmatched":[]}