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

Compare

+40 −0 in 1 place
new file, 40 lines
1+import assert from "node:assert/strict";
2+import { test } from "node:test";
3+import { buildBase, Graph } from "../index.ts";
4+import { lineKey } from "../keys.ts";
5+import type { Atom } from "../types.ts";
6+import { SqlState } from "./storage-helper.ts";
7+
8+test("stored atom list metadata refuses missing or substituted references", () => {
9+ const storage = new SqlState();
10+ try {
11+ const graph = new Graph({ storage });
12+ graph.add(buildBase({ "a.txt": "base" }, { author: "fixture", message: "base", time: 0 }));
13+ const keys = Array.from({ length: 513 }, () => lineKey("a0.0"));
14+ const atom: Atom = {
15+ id: "a1",
16+ seq: 1,
17+ author: "fixture",
18+ message: "lists",
19+ time: 1,
20+ inserts: [],
21+ deletes: [],
22+ writes: keys,
23+ reads: keys,
24+ holds: keys,
25+ needs: [],
26+ resolves: [],
27+ reasons: [],
28+ deps: ["a0"],
29+ };
30+ graph.add(atom);
32+ const stored = storage.read("atoms", "1") as Record<string, unknown>;
33+ for (const lists of [undefined, {}, { writes: "atom-list:1:reads" }]) {
34+ storage.write("atoms", "1", { ...stored, lists });
35+ assert.throws(() => new Graph({ storage }).atom("a1"), /stored atom list/);
36+ }
37+ } finally {
38+ storage.db.close();
39+ }
40+});
MCP
compare on this site's /mcp
CLI
abso diff 2 318 src/engine/test/graph-atom-list-integrity.test.ts --json
JSON
/christopher/abso-core/compare/2..318?file=src%2Fengine%2Ftest%2Fgraph-atom-list-integrity.test.ts&format=json