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

Compare

+15 −0 in 1 place
Lines 11–31 at 318 (were 11–16 at 154)
1111import { Repo } from "./helpers.ts";
1212import { SqlState } from "./storage-helper.ts";
1313
14+test("accepted atom indexing preserves the original digest without serializing the whole atom", (t) => {
15+ const db = new SqlState();
16+ t.after(() => db.db.close());
17+ const repo = Repo.init({ "a.txt": `${"x".repeat(16383)}\ud83d\ude80\n${"\u0000".repeat(20000)}\n` });
18+ const atom = repo.graph.atom("a0");
19+ const expected = createHash("sha256").update(JSON.stringify(atom)).digest("hex");
20+ const stringify = JSON.stringify;
21+ t.mock.method(JSON, "stringify", (...args: Parameters<typeof JSON.stringify>) => {
22+ assert.notEqual(args[0], atom, "indexing must not rematerialize the full atom JSON");
23+ return stringify(...args);
24+ });
25+ indexAcceptedProjectionAtom(atom, ["a.txt"], db);
26+ assert.equal(new ProjectionAtomIndex(db).openAccepted("a0").digest, expected);
27+});
1429test("projection atom descriptors exclude inserted text and read one indexed item", () => {
1530 const db = new SqlState();
1631 try {
MCP
compare on this site's /mcp
CLI
abso diff 154 318 src/engine/test/projection-atom-index.test.ts --json
JSON
/christopher/abso-core/compare/154..318?file=src%2Fengine%2Ftest%2Fprojection-atom-index.test.ts&format=json