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 257 to 258

Compare

+21 −0 in 1 place
Lines 163–186 at 258 (were 163–165 at 257)
163163 source.db.close();
164164 }
165165});
167+test("a collection read straight through is never kept, and pushes nothing out (abso Capacity)", () => {
168+ const source = new SqlState();
169+ try {
170+ const cache = new CachedStateStorage(source, 8192, 2, 8192, (collection) => collection === "pages");
171+ source.write("rows", "a", "A");
172+ source.write("rows", "b", "B");
173+ for (let i = 0; i < 10; i++) source.write("pages", String(i), [i]);
174+ cache.read("rows", "a");
175+ cache.read("rows", "b");
176+ const reads = source.reads;
177+ for (let i = 0; i < 10; i++) assert.deepEqual(cache.read("pages", String(i)), [i]);
178+ assert.equal(source.reads, reads + 10);
179+ assert.equal(cache.read("rows", "a"), "A");
180+ assert.equal(cache.read("rows", "b"), "B");
181+ assert.equal(source.reads, reads + 10, "the two kept rows were not pushed out by the pages");
182+ assert.equal(cache.retainedEntries, 2);
183+ } finally {
184+ source.db.close();
185+ }
186+});
MCP
compare on this site's /mcp
CLI
abso diff 257 258 src/engine/test/state-cache.test.ts --json
JSON
/christopher/abso-core/compare/257..258?file=src%2Fengine%2Ftest%2Fstate-cache.test.ts&format=json