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

Compare

+18 −0 in 1 place
new file, 18 lines
1+import assert from "node:assert/strict";
2+import { test } from "node:test";
3+import { buildBase, Graph } from "../index.ts";
4+import { SqlState } from "./storage-helper.ts";
5+
6+test("stored insertion reads reject missing lines and substituted run references", (t) => {
7+ const storage = new SqlState();
8+ t.after(() => storage.db.close());
9+ const lines = Array.from({ length: 257 }, (_, i) => (i === 128 ? "x".repeat(40000) : `line ${i}`));
10+ const atom = buildBase({ "a.txt": lines.join("\n") }, { author: "fixture", message: "base", time: 0 });
11+ new Graph({ storage }).add(atom);
12+ assert.equal(new Graph({ storage }).atom("a0").inserts[0]!.lines[128], lines[128]);
13+ storage.remove("atom-inserts:0:lines:0", "12");
14+ assert.throws(() => new Graph({ storage }).atom("a0").inserts[0]!.lines[12], /missing stored list element/);
15+ const run = storage.read("atom-inserts:0", "0") as Record<string, unknown>;
16+ storage.write("atom-inserts:0", "0", { ...run, lines: "unrelated" });
17+ assert.throws(() => new Graph({ storage }).atom("a0").inserts[0], /invalid stored insertion run/);
18+});
MCP
compare on this site's /mcp
CLI
abso diff 53 318 src/engine/test/graph-insertion-integrity.test.ts --json
JSON
/christopher/abso-core/compare/53..318?file=src%2Fengine%2Ftest%2Fgraph-insertion-integrity.test.ts&format=json