{"draft":null,"from":162,"to":163,"files":[{"path":"src/engine/experimental/projection-sequence.ts","added":15,"removed":1,"diff":"--- a/src/engine/experimental/projection-sequence.ts\n+++ b/src/engine/experimental/projection-sequence.ts\n@@ -143,7 +143,21 @@\n \t\t\t// One operation changes an AVL path plus rotation neighbors, not history.\n \t\t\t// Keep only those decoded records and persist each final record once.\n \t\t\tconst changed = new Map<number, SequenceNode>();\n-\t\t\tconst get = (id: number): SequenceNode => changed.get(id) ?? this.get(map, id);\n+\t\t\t// The immutable input map is fixed for this batch. Cache only its bounded reads;\n+\t\t\t// changed nodes always take precedence and the cache never survives a transaction.\n+\t\t\tconst original = new Map<number, SequenceNode>();\n+\t\t\tlet originalBytes = 0;\n+\t\t\tconst get = (id: number): SequenceNode => {\n+\t\t\t\tconst found = changed.get(id) ?? original.get(id);\n+\t\t\t\tif (found) return found;\n+\t\t\t\tconst node = this.get(map, id);\n+\t\t\t\tconst bytes = 192 + node.text.length * 2;\n+\t\t\t\tif (original.size < 256 && originalBytes + bytes <= 65536) {\n+\t\t\t\t\toriginal.set(id, node);\n+\t\t\t\t\toriginalBytes += bytes;\n+\t\t\t\t}\n+\t\t\t\treturn node;\n+\t\t\t};\n \t\t\tconst put = (node: SequenceNode): number => {\n \t\t\t\tchanged.set(node.id, node);\n \t\t\t\treturn node.id;"}],"unmatched":[]}