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 121 to 122

Compare

+12 −4 in 1 place
Lines 126–144 at 122 (were 126–136 at 121)
126126/** `a` has the lower seq. */
127127function makeConflict(graph: Graph, set: AtomSet | undefined, a: Atom, b: Atom, keys: ConflictKey[]): Conflict {
128128 const kind = keys.every((k) => k.relation === "hold") ? "semantic" : "edit-edit";
129− let resolvedBy: AtomId[] = [];
129+ const resolvedBy: AtomId[] = [];
130130 if (set) {
131− const fromA = graph.resolversOf(a.id).filter((r) => set.has(r));
132− const fromB = new Set(graph.resolversOf(b.id));
133− resolvedBy = fromA.filter((r) => fromB.has(r)).sort((p, q) => graph.atom(p).seq - graph.atom(q).seq);
131+ // Resolver indexes append in sequence order: intersect without copying either history.
132+ const left = graph.eachResolverOf(a.id);
133+ const right = graph.eachResolverOf(b.id);
134+ let p = left.next();
135+ let q = right.next();
136+ while (!p.done && !q.done) {
137+ const order = graph.atom(p.value).seq - graph.atom(q.value).seq;
138+ if (order === 0 && set.has(p.value)) resolvedBy.push(p.value);
139+ if (order <= 0) p = left.next();
140+ if (order >= 0) q = right.next();
141+ }
134142 }
135143 return { atoms: [a.id, b.id], kind, keys, sides: [side(a), side(b)], resolvedBy };
136144}
MCP
compare on this site's /mcp
CLI
abso diff 121 122 src/engine/conflicts.ts --json
JSON
/christopher/abso-core/compare/121..122?file=src%2Fengine%2Fconflicts.ts&format=json