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 128 to 129

Compare

+47 −0 in 1 place
Lines 315–364 at 129 (were 315–317 at 128)
315315 assert.equal(new Graph({ storage }).label("child")?.base, "a0");
316316 storage.db.close();
317317});
319+test("together links stream bounded pages in both directions after storage reopen", () => {
320+ class ObservedStorage extends SqlState {
321+ pageReads = 0;
322+ largestPage = 0;
323+ override read(collection: string, key: string): unknown {
324+ if (collection === "together:pages") this.pageReads++;
325+ return super.read(collection, key);
326+ }
327+ override write(collection: string, key: string, value: unknown): void {
328+ if (collection === "together:pages") {
329+ assert.ok(Array.isArray(value));
330+ this.largestPage = Math.max(this.largestPage, value.length);
331+ }
332+ super.write(collection, key, value);
333+ }
334+ }
335+ const storage = new ObservedStorage();
336+ try {
337+ const oracle = Repo.init({ "a.txt": "one\n" });
338+ const draft = oracle.draft({ edits: [{ file: "a.txt", old: "one", new: "ONE" }] });
339+ const graph = new Graph({ storage });
340+ graph.add(oracle.graph.atom("a0"));
341+ for (let seq = 1; seq <= 513; seq++) {
342+ const atom = {
343+ ...draft,
344+ id: `a${seq}`,
345+ seq,
346+ reasons: [{ to: "a0", kind: "together" as const, text: `reason ${seq}` }],
347+ };
348+ graph.add(atom);
349+ oracle.graph.add(atom);
350+ }
351+ const reopened = new Graph({ storage });
352+ storage.pageReads = 0;
353+ const iterator = reopened.eachTogetherLink("a0");
354+ assert.deepEqual(iterator.next().value, oracle.graph.togetherLinks("a0")[0]);
355+ assert.equal(storage.pageReads, 1);
356+ storage.pageReads = 0;
357+ assert.deepEqual(reopened.togetherLinks("a0"), oracle.graph.togetherLinks("a0"));
358+ assert.equal(storage.pageReads, 3);
359+ assert.deepEqual(reopened.togetherLinks("a513"), oracle.graph.togetherLinks("a513"));
360+ assert.equal(storage.largestPage, 256);
361+ } finally {
362+ storage.db.close();
363+ }
364+});
MCP
compare on this site's /mcp
CLI
abso diff 128 129 src/engine/test/state-source.test.ts --json
JSON
/christopher/abso-core/compare/128..129?file=src%2Fengine%2Ftest%2Fstate-source.test.ts&format=json