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
MCP
show on this site's /mcp
CLI
abso show 208 --json
JSON
/christopher/abso-core/versions/208?format=json

Compare on a stored writer takes its candidates from the kept version files of the versions between (abso Capacity): every file that differs between two shared versions changed in one between them. Before, it walked every atom either version's set holds. version-files.test.ts compares both ways, across a drop, against the in-memory project. On game's export, compare from 762 to 1525: 20 s to 5.4 s, same answer.

of shared·capacity··Not checked

Version 207 · Files at version 208

2 files, 21 lines added, 4 removed.

--- a/worker/project/test/version-files.test.ts
+++ b/worker/project/test/version-files.test.ts
@@ -1,6 +1,6 @@
11// Each version's changed files kept as it lands (abso Capacity, version-files.ts): a writer-backed project's log,
2−// path histories and shows match the in-memory project's through edits, new and removed files, a line taken out and
3−// put back with the same text, moves and a drop.
2+// path histories, shows and compares match the in-memory project's through edits, new and removed files, a line
3+// taken out and put back with the same text, moves and a drop.
44
55import assert from "node:assert/strict";
66import { test } from "node:test";
@@ -52,4 +52,13 @@
5252 for (const path of ["a.txt", "b.txt", "c.txt", "d.txt", "e.txt", "gone.txt"])
5353 assert.deepEqual(project.log({ limit: 100, path }), oracle.log({ limit: 100, path }), path);
5454 for (let v = 0; v <= oracle.version; v++) assert.deepEqual(project.show(v), oracle.show(v), `version ${v}`);
55+ // A compare reads the kept lists for the versions between (version-log.ts): both ways, and across the drop.
56+ for (const [from, to] of [
57+ [0, oracle.version],
58+ [oracle.version, 0],
59+ [2, 7],
60+ [5, 9],
61+ [3, 3],
62+ ] as const)
63+ assert.deepEqual(project.compare(from, to), oracle.compare(from, to), `compare ${from} to ${to}`);
5564});
--- a/worker/project/version-log.ts
+++ b/worker/project/version-log.ts
@@ -249,11 +249,19 @@
249249 const space = host.spaceFor(options);
250250 host.checkVersion(space, from);
251251 host.checkVersion(space, to);
252− const a = host.at(space, from);
253− const b = host.at(space, to);
254252 const before = host.viewAt(space, from);
255253 const after = host.viewAt(space, to);
256254 const files = new Set<string>();
255+ // A stored writer keeps each shared version's changed files (version-files.ts, abso Capacity): every file that
256+ // differs between two versions changed in one between them, so those lists are the candidates, not every atom
257+ // either set holds.
258+ if (space.name === SHARED && host.graph.packedFiles) {
259+ for (let v = Math.min(from, to) + 1; v <= Math.max(from, to); v++)
260+ for (const file of host.paths.versionFiles(space, v)) files.add(file);
261+ return { from, to, files: changesBetween(before, after, files) };
262+ }
263+ const a = host.at(space, from);
264+ const b = host.at(space, to);
257265 for (const [x, y] of [
258266 [a, b],
259267 [b, a],