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

Compare

+18 −0 in 1 place
Lines 6–29 at 318 (were 6–11 at 175)
66import { StoredText } from "../stored-text.ts";
77import { SqlState } from "./storage-helper.ts";
88
9+test("many stored insertion runs serialize with linear reads and support backwards access", (t) => {
10+ const storage = new SqlState();
11+ t.after(() => storage.db.close());
12+ const files = Object.fromEntries(Array.from({ length: 128 }, (_, i) => [`f${i}`, `${i}:${"x".repeat(17000)}\n`]));
13+ const graph = new Graph({ storage });
14+ graph.add(buildBase(files, { author: "writer", message: "many runs" }));
15+ const stored = graph.atom("a0");
16+ const expected = JSON.stringify(stored);
17+ const before = storage.reads;
18+ assert.equal([...jsonValueChunks(stored)].join(""), expected);
19+ assert.ok(storage.reads - before < 128 * 25, `serialization used ${storage.reads - before} reads`);
20+ for (const index of [127, 0, 64, 2, 126, 1]) {
21+ const run = stored.inserts[index]!;
22+ assert.equal(run.lines[0], files[run.file]!.trimEnd());
23+ }
24+ assert.equal([...jsonValueChunks(stored)].join(""), expected);
25+});
927test("chunk-backed JSON strings preserve escaping and split UTF-16 exactly", () => {
1028 const values = [
1129 "",
MCP
compare on this site's /mcp
CLI
abso diff 175 318 src/engine/test/json-string-chunks.test.ts --json
JSON
/christopher/abso-core/compare/175..318?file=src%2Fengine%2Ftest%2Fjson-string-chunks.test.ts&format=json