{"draft":null,"from":217,"to":218,"files":[{"path":"src/engine/view.ts","added":8,"removed":11,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -242,23 +242,24 @@\n \t\t\treturn;\n \t\t}\n \t\tconst inSet = new Uint8Array(graph.size);\n-\t\tfor (const id of set) {\n-\t\t\tconst atom = graph.atom(id);\n-\t\t\tinSet[atom.seq] = 1;\n-\t\t}\n+\t\t// An atom's number is in its id (abso Capacity): reading the atom for it read the whole history on a stored graph.\n+\t\tconst seqIn = (id: AtomId): number => {\n+\t\t\tconst seq = seqOf(id);\n+\t\t\treturn seq >= 0 && seq < inSet.length && graph.idOfSeq(seq) === id ? seq : graph.atom(id).seq;\n+\t\t};\n+\t\tfor (const id of set) inSet[seqIn(id)] = 1;\n \t\t// Validate one atom at a time. Keeping all decoded atoms here defeats\n \t\t// storage-backed Graph reads even though the view only needs membership.\n \t\tfor (let seq = 0; seq < inSet.length; seq++) {\n \t\t\tif (inSet[seq] !== 1) continue;\n \t\t\tconst atom = graph.atom(graph.idOfSeq(seq));\n \t\t\tfor (const d of atom.deps) {\n-\t\t\t\tif (inSet[graph.atom(d).seq] !== 1)\n-\t\t\t\t\tthrow new EngineError(\"not-closed\", `set is not closed: ${atom.id} depends on ${d}`);\n+\t\t\t\tif (inSet[seqIn(d)] !== 1) throw new EngineError(\"not-closed\", `set is not closed: ${atom.id} depends on ${d}`);\n \t\t\t}\n \t\t}\n \t\tthis.graph = graph;\n \t\tthis.#in = inSet;\n-\t\tthis.#movers = graph.movers().filter((id) => inSet[graph.atom(id).seq] === 1);\n+\t\tthis.#movers = graph.movers().filter((id) => inSet[seqOf(id)] === 1);\n \t\tthis.#hasMoves = this.#movers.length > 0;\n \t\tthis.#relocs = this.#movers.length === 0 ? new Map() : undefined;\n \t\tthis.#relocsN = this.#movers.length === 0 ? new Map() : undefined;\n@@ -459,10 +460,6 @@\n \thasMoves(): boolean {\n \t\treturn this.#hasMoves;\n \t}\n-\t*#eachMover(): IterableIterator<AtomId> {\n-\t\tif (this.#movers) yield* this.#movers;\n-\t\telse for (const id of this.graph.movers()) if (this.#stable!.has(id)) yield id;\n-\t}\n \n \t/** The file a line is in, in this set: the one its chain of parents reaches. */\n \tfileOf(line: LineId): string {"}],"unmatched":[]}