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 116 to 318

Compare

+19 −1 in 2 places
Lines 5–14 at 318 (were 5–12 at 116)
55
66import assert from "node:assert/strict";
77import { describe, it } from "node:test";
8−import { type Atom, type AtomId, conflicts } from "../index.ts";
8+import { type Atom, type AtomId, conflicts, Graph, View } from "../index.ts";
9+import { StableOverlaySet } from "../state-source.ts";
910import { lines, Repo, Rng } from "./helpers.ts";
11+import { SqlState } from "./storage-helper.ts";
1012
1113const BASE_SEED = Number(process.env.PROP_SEED ?? 20261004);
1214const CASES = Number(process.env.PROP_CASES ?? 200);
Lines 245–266 at 318 (were 243–248 at 116)
243245 accept(repo, mk("a0.2", "a0.0"));
244246 const text = repo.text("f.txt");
245247 assert.deepEqual(text.split("\n").filter(Boolean).sort(), ["m", "n", "x", "y"]);
248+ class BoundedReads extends SqlState {
249+ override read(collection: string, key: string): unknown {
250+ if (this.reads > 10_000) throw new Error("relocation cycle did not terminate");
251+ return super.read(collection, key);
252+ }
253+ }
254+ const storage = new BoundedReads();
255+ try {
256+ const stored = new Graph({ storage });
257+ for (let seq = 0; seq < repo.graph.size; seq++) stored.add(repo.graph.atom(repo.graph.idOfSeq(seq)));
258+ const reopened = new Graph({ storage });
259+ assert.equal(new View(reopened, repo.shared).text("f.txt"), text);
260+ assert.equal(new View(reopened, new StableOverlaySet(repo.shared)).text("f.txt"), text);
261+ } finally {
262+ storage.db.close();
263+ }
246264 });
247265
248266 it("rejects a move onto itself or out of range", () => {
MCP
compare on this site's /mcp
CLI
abso diff 116 318 src/engine/test/moves.test.ts --json
JSON
/christopher/abso-core/compare/116..318?file=src%2Fengine%2Ftest%2Fmoves.test.ts&format=json