Versions 199 to 200
new file, 56 lines
1+// The in-memory membership cache is bounded across every space (abso Capacity): 106 drafts on prod project abso
2+// each kept whole copies of shared's set, 37 MB in all. One least-recently-used cache now holds MEMBERSHIP_SETS_KEPT.
3+
7+
9+
10+/** Shared with `versions` versions, version v adding atom s<v>; then `drafts` drafts, each on shared's version 3. */
18+ addVersion(space, { version: 0, agent: "a", message: "start", time: 0, atoms: [], sharedBase: 3 });
19+ addVersion(space, { version: 1, agent: "a", message: "work", time: 0, atoms: [`d${d}-x`], sharedBase: 3 });
23+
24+test("the cache never holds more than MEMBERSHIP_SETS_KEPT sets, however many drafts are read", () => {
29+
30+test("a set that fell out of the cache is built again the same, and a kept one is the same object", () => {
41+ assert.equal(m.at(m.shared, 9), m.shared.own, "shared's newest version is its live set, never cached");
43+
50+ addVersion(replaced, { version: 0, agent: "a", message: "start", time: 0, atoms: [], sharedBase: 5 });
51+ addVersion(replaced, { version: 1, agent: "a", message: "work", time: 0, atoms: ["new"], sharedBase: 5 });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 199 200 worker/project/test/membership-cache.test.ts --json
- JSON
- /christopher/abso-core/compare/199..200?file=worker%2Fproject%2Ftest%2Fmembership-cache.test.ts&format=json