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 233 to 234

Compare

+7 −7 in 3 places
Lines 4–10 at 234 (were 4–10 at 233)
44import { buildBase, Graph, View } from "../../../src/engine/index.ts";
55import { StableOverlaySet } from "../../../src/engine/state-source.ts";
66import type { AtomId } from "../../../src/engine/types.ts";
7−import { ViewCache } from "../views.ts";
7+import { VIEW_COUNT, ViewCache } from "../views.ts";
88
99const VIEW_BUDGET = 24_000_000;
1010
Lines 25–31 at 234 (were 25–31 at 233)
2525 assert.equal(cache.view(set), view);
2626 assert.equal(set.iterations, 1, "cache hit must not construct a full-history key");
2727 assert.equal(view.text("a.txt"), "one\n");
28− for (let i = 0; i < 33; i++) cache.view(new Counted(["a0"]));
28+ for (let i = 0; i < VIEW_COUNT + 1; i++) cache.view(new Counted(["a0"]));
2929 assert.notEqual(cache.view(set), view, "indexed identities obey the same cache eviction limit");
3030 assert.equal(set.iterations, 2);
3131});
Lines 76–91 at 234 (were 76–91 at 233)
7676 });
7777});
7878
79−test("the cache retains exactly 32 views and evicts the least recently used one", () => {
79+test("the cache retains exactly VIEW_COUNT views and evicts the least recently used one", () => {
8080 withControlledWeights((control) => {
8181 const cache = new ViewCache(new Graph());
82− control.setIncomingWeights(Array(33).fill(0));
82+ control.setIncomingWeights(Array(VIEW_COUNT + 1).fill(0));
8383 const first = get(cache, "key-0");
84− const retained = Array.from({ length: 31 }, (_, i) => get(cache, `key-${i + 1}`));
84+ const retained = Array.from({ length: VIEW_COUNT - 1 }, (_, i) => get(cache, `key-${i + 1}`));
8585 assert.equal(get(cache, "key-0"), first);
86− const last = get(cache, "key-32");
86+ const last = get(cache, `key-${VIEW_COUNT}`);
8787 assert.equal(get(cache, "key-0"), first);
88− assert.equal(get(cache, "key-32"), last);
88+ assert.equal(get(cache, `key-${VIEW_COUNT}`), last);
8989 for (let i = 1; i < retained.length; i++) assert.equal(get(cache, `key-${i + 1}`), retained[i]);
9090 assert.notEqual(get(cache, "key-1"), retained[0]);
9191 });
MCP
compare on this site's /mcp
CLI
abso diff 233 234 worker/project/test/view-cache.test.ts --json
JSON
/christopher/abso-core/compare/233..234?file=worker%2Fproject%2Ftest%2Fview-cache.test.ts&format=json