{"draft":null,"from":124,"to":125,"files":[{"path":"src/engine/test/view.test.ts","added":17,"removed":0,"diff":"--- a/src/engine/test/view.test.ts\n+++ b/src/engine/test/view.test.ts\n@@ -8,6 +8,23 @@\n import { lines, Repo } from \"./helpers.ts\";\n \n describe(\"View\", () => {\n+\tit(\"bounds file-location memo growth across long ancestry walks with moves\", () => {\n+\t\tconst retained = (count: number) => {\n+\t\t\tconst repo = Repo.init({ \"long.txt\": \"line\\n\".repeat(count), \"a.txt\": \"move\\n\", \"b.txt\": \"base\\n\" });\n+\t\t\trepo.edit({ move: { file: \"a.txt\", start: 0, end: 1, to: \"b.txt\", at: 1 } });\n+\t\t\tconst view = new View(repo.graph, new StableOverlaySet<AtomId>([\"a0\", \"a1\"]));\n+\t\t\tconst oracle = repo.view();\n+\t\t\t// Resolve the deepest ancestry first, then force repeated cache eviction.\n+\t\t\tconst sequence = oracle.sequence(\"long.txt\");\n+\t\t\tassert.equal(sequence.length, count);\n+\t\t\tassert.equal(view.fileOf(sequence[count - 1]!.id), \"long.txt\");\n+\t\t\tfor (const line of sequence) assert.equal(view.fileOf(line.id), \"long.txt\");\n+\t\t\tfor (const line of oracle.lines(\"b.txt\")) assert.equal(view.fileOf(line.id), \"b.txt\");\n+\t\t\tassert.equal(view.fileOf(sequence[count - 1]!.id), \"long.txt\");\n+\t\t\treturn view.weight();\n+\t\t};\n+\t\tassert.equal(retained(2048), retained(512), \"file-location retained state must not grow with ancestry depth\");\n+\t});\n \tit(\"current indexed paths do not retain deleted historical file layouts\", () => {\n \t\tconst retained = (count: number) => {\n \t\t\tconst files: Record<string, string> = { \"live.txt\": \"live\\n\" };"}],"unmatched":[]}