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 318

Compare

+19 −1 in 2 places
Lines 8–30 at 318 (were 8–13 at 121)
88import { lines, Repo } from "./helpers.ts";
99
1010describe("View", () => {
11+ it("bounds file-location memo growth across long ancestry walks with moves", () => {
12+ const retained = (count: number) => {
13+ const repo = Repo.init({ "long.txt": "line\n".repeat(count), "a.txt": "move\n", "b.txt": "base\n" });
14+ repo.edit({ move: { file: "a.txt", start: 0, end: 1, to: "b.txt", at: 1 } });
15+ const view = new View(repo.graph, new StableOverlaySet<AtomId>(["a0", "a1"]));
16+ const oracle = repo.view();
17+ // Resolve the deepest ancestry first, then force repeated cache eviction.
18+ const sequence = oracle.sequence("long.txt");
19+ assert.equal(sequence.length, count);
20+ assert.equal(view.fileOf(sequence[count - 1]!.id), "long.txt");
21+ for (const line of sequence) assert.equal(view.fileOf(line.id), "long.txt");
22+ for (const line of oracle.lines("b.txt")) assert.equal(view.fileOf(line.id), "b.txt");
23+ assert.equal(view.fileOf(sequence[count - 1]!.id), "long.txt");
24+ return view.weight();
25+ };
26+ assert.equal(retained(2048), retained(512), "file-location retained state must not grow with ancestry depth");
27+ });
1128 it("current indexed paths do not retain deleted historical file layouts", () => {
1229 const retained = (count: number) => {
1330 const files: Record<string, string> = { "live.txt": "live\n" };
Lines 134–142 at 318 (were 117–124 at 121)
117134 assert.equal(repo.text("f.txt"), lines("top", "r", "q", "p", "bottom"));
118135 assert.deepEqual(
119136 r.deps,
120− ["a0", p.id, q.id].sort((a, b) => Number(a.slice(1)) - Number(b.slice(1))),
137+ [p.id, q.id].sort((a, b) => Number(a.slice(1)) - Number(b.slice(1))),
121138 );
139+ assert.deepEqual(repo.graph.closureOf(r.deps), repo.graph.closureOf(["a0", p.id, q.id]));
122140 });
123141
124142 it("puts a line's replacements ahead of the lines inserted after it, whatever their priority", () => {
MCP
compare on this site's /mcp
CLI
abso diff 121 318 src/engine/test/view.test.ts --json
JSON
/christopher/abso-core/compare/121..318?file=src%2Fengine%2Ftest%2Fview.test.ts&format=json