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 206 to 207

Compare

+25 −3 in 2 places
Lines 64–97 at 207 (were 64–74 at 206)
6464 // Net changes only, as show has them: a file made and removed again before the publish isn't one (#37).
6565 const touched = this.#deps.touchedFiles([...p.atoms, ...(p.dropped ?? [])], [before, after]);
6666 const files = [...touched].filter((path) => differs(before, after, path)).sort();
67+ this.keep(space, version, files, before, after);
68+ return files;
69+ }
71+ /**
72+ * Keep a version's changed files, with its files made and taken out and its moves: worked out here, or as the
73+ * version landed (version-files.ts, abso Capacity), which says which files existed before and after.
74+ */
75+ keep(
76+ space: Space,
77+ version: number,
78+ files: string[],
79+ before: ReadView,
80+ after: ReadView,
81+ exists?: ReadonlyMap<string, readonly [boolean, boolean]>,
82+ ): void {
83+ let cache = this.#filesCache.get(space);
84+ if (!cache) this.#filesCache.set(space, (cache = new Map()));
85+ let shapes = this.#shapeCache.get(space);
86+ if (!shapes) this.#shapeCache.set(space, (shapes = new Map()));
87+ const p = space.versions[version]!;
6788 cache.set(version, files);
6889 // Files made and taken out, and which of those are one file moved (#41): an atom that moves lines
6990 // names both files, and a binary or empty file moved keeps its blob.
70− const made = files.filter((f) => !before.hasFile(f) && after.hasFile(f));
71− const gone = files.filter((f) => before.hasFile(f) && !after.hasFile(f));
91+ const had = (f: string) => exists?.get(f)?.[0] ?? before.hasFile(f);
92+ const has = (f: string) => exists?.get(f)?.[1] ?? after.hasFile(f);
93+ const made = files.filter((f) => !had(f) && has(f));
94+ const gone = files.filter((f) => had(f) && !has(f));
7295 const moves: [string, string][] = [];
7396 if (made.length > 0 && gone.length > 0) {
7497 const movers = new Set(this.#deps.graph.movers());
Lines 110–115 at 207 (were 87–93 at 206)
87110 }
88111 shapes.set(version, { made, gone, moves });
89112 this.#deps.shapes?.put(space.name, version, JSON.stringify({ stamp: shapeStamp(p), files, made, gone, moves }));
90− return files;
91113 }
92114
93115 /** A version's files kept from an earlier load (#41), when the row describes this very version; into the caches. */
MCP
compare on this site's /mcp
CLI
abso diff 206 207 worker/project/pathindex.ts --json
JSON
/christopher/abso-core/compare/206..207?file=worker%2Fproject%2Fpathindex.ts&format=json