Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 217 to 218

Compare

+8 −11 in 2 places
Lines 242–265 at 218 (were 242–264 at 217)
242242 return;
243243 }
244244 const inSet = new Uint8Array(graph.size);
245− for (const id of set) {
246− const atom = graph.atom(id);
247− inSet[atom.seq] = 1;
248− }
245+ // An atom's number is in its id (abso Capacity): reading the atom for it read the whole history on a stored graph.
246+ const seqIn = (id: AtomId): number => {
247+ const seq = seqOf(id);
248+ return seq >= 0 && seq < inSet.length && graph.idOfSeq(seq) === id ? seq : graph.atom(id).seq;
249+ };
250+ for (const id of set) inSet[seqIn(id)] = 1;
249251 // Validate one atom at a time. Keeping all decoded atoms here defeats
250252 // storage-backed Graph reads even though the view only needs membership.
251253 for (let seq = 0; seq < inSet.length; seq++) {
252254 if (inSet[seq] !== 1) continue;
253255 const atom = graph.atom(graph.idOfSeq(seq));
254256 for (const d of atom.deps) {
255− if (inSet[graph.atom(d).seq] !== 1)
256− throw new EngineError("not-closed", `set is not closed: ${atom.id} depends on ${d}`);
257+ if (inSet[seqIn(d)] !== 1) throw new EngineError("not-closed", `set is not closed: ${atom.id} depends on ${d}`);
257258 }
258259 }
259260 this.graph = graph;
260261 this.#in = inSet;
261− this.#movers = graph.movers().filter((id) => inSet[graph.atom(id).seq] === 1);
262+ this.#movers = graph.movers().filter((id) => inSet[seqOf(id)] === 1);
262263 this.#hasMoves = this.#movers.length > 0;
263264 this.#relocs = this.#movers.length === 0 ? new Map() : undefined;
264265 this.#relocsN = this.#movers.length === 0 ? new Map() : undefined;
Lines 460–465 at 218 (were 459–468 at 217)
459460 hasMoves(): boolean {
460461 return this.#hasMoves;
461462 }
462− *#eachMover(): IterableIterator<AtomId> {
463− if (this.#movers) yield* this.#movers;
464− else for (const id of this.graph.movers()) if (this.#stable!.has(id)) yield id;
465− }
466463
467464 /** The file a line is in, in this set: the one its chain of parents reaches. */
468465 fileOf(line: LineId): string {
MCP
compare on this site's /mcp
CLI
abso diff 217 218 src/engine/view.ts --json
JSON
/christopher/abso-core/compare/217..218?file=src%2Fengine%2Fview.ts&format=json