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
MCP
show on this site's /mcp
CLI
abso show 233 --json
JSON
/christopher/abso-core/versions/233?format=json

A view's blobs come from file attributes alone (disk-first 2; abso Capacity).

of shared·capacity··Not checked

EngineProject.shared() lists shared's binary files on every call, and the Worker reads shared().version before and after most operations. View.blobs went through paths(), which lays out every file in the set to see whether it exists. On abso's export with a fresh writer, that was about 15 s on the first call.

A file with a blob attribute exists, so blobs now reads each candidate path's attributes (the packed attribute history) and lays nothing out. Same files, same order.

On abso adopted fresh: the harness's first read (status, shared, paths) went from about 20 s to 3 s.

New test blobs-stored: a file binary from the start, one that turns binary and back to text, and one deleted; a stored writer's blob list matches the in-memory project's at every version and in each agent's draft. Named tests: every engine test (288 of 288), blobs-stored, blobs, attributes, project-file, files-reads, draft-reads-stored, authors-stored, project, version-files (46 of 46); tsc and biome clean.

Version 232 · Files at version 233

2 files, 58 lines added, 2 removed.

--- a/src/engine/view.ts
+++ b/src/engine/view.ts
@@ -1042,9 +1042,12 @@
10421042
10431043 /** Binary files, path -> the SHA-256 of their bytes, in path order. */
10441044 blobs(): Record<string, string> {
1045+ // From attributes alone (abso Capacity): a file with a blob exists, so no file is laid out to find them. Going
1046+ // through paths() laid out every file in the set, and shared() asks for blobs on every call.
10451047 const out: Record<string, string> = {};
1046− for (const path of this.paths()) {
1047− const blob = this.#file(path).attrs.blob;
1048+ const candidates = this.#stable ? [...this.graph.knownFiles()].sort() : this.#known;
1049+ for (const path of candidates) {
1050+ const blob = this.attrs(path).blob;
10481051 if (blob !== null) out[path] = blob;
10491052 }
10501053 return out;
--- /dev/null
+++ b/worker/project/test/blobs-stored.test.ts
@@ -0,0 +1,53 @@
1+// Binary files on a writer-backed project (abso Capacity, View.blobs): the blob list is read from file attributes
2+// alone, with no file laid out. It must answer as the in-memory project does: a file binary from the start, one that
3+// turns binary and back to text, and one deleted, at every version and in each agent's draft.
4+
5+import assert from "node:assert/strict";
6+import { test } from "node:test";
7+import { storedArray } from "../../../src/engine/state-source.ts";
8+import { SqlState } from "../../../src/engine/test/storage-helper.ts";
9+import { MemoryStore, Project } from "../project.ts";
10+import type { Entry, ProjectStore } from "../project-types.ts";
12+const A = "a".repeat(64);
13+const B = "b".repeat(64);
14+const C = "c".repeat(64);
15+const held = (sha: string) => [A, B, C].includes(sha);
17+function writer() {
18+ const storage = new SqlState();
19+ const entries = storedArray<Entry>(storage, "canonical-log");
20+ const store: ProjectStore = {
21+ append(batch) {
22+ for (const entry of batch) entries.push(entry);
23+ },
24+ };
25+ return new Project(store, { writerStorage: storage, hasBlob: held });
26+}
28+function history(project: Project) {
29+ project.init({ "README.md": "hi\n", "notes.txt": "notes\n" }, 0, {}, { "logo.png": A, "old.bin": B });
30+ project.sync("ann");
31+ project.sync("bob");
32+ project.record("ann", { "old.bin": null }, 1, {}, { "logo.png": B, "README.md": C });
33+ assert.equal(project.publish("ann", "README turns binary, old.bin goes", 2).ok, true);
34+ project.sync("bob");
35+ project.record("bob", { "README.md": "text again\n" }, 3);
36+ assert.equal(project.publish("bob", "README is text again", 4).ok, true);
37+ project.sync("cy");
38+ project.record("cy", {}, 5, {}, { "icon.png": C });
39+}
41+test("a stored writer's blob list matches the in-memory project's at every version and draft", () => {
42+ const oracle = new Project(new MemoryStore(), { hasBlob: held });
43+ const project = writer();
44+ history(oracle);
45+ history(project);
46+ assert.deepEqual(oracle.blobs(), { "logo.png": B });
47+ assert.deepEqual(project.blobs(), oracle.blobs());
48+ for (let v = 0; v <= oracle.version; v++)
49+ assert.deepEqual(project.viewAt(v).blobs(), oracle.viewAt(v).blobs(), `version ${v}`);
50+ for (const agent of ["ann", "bob", "cy"])
51+ assert.deepEqual(project.draftOf(agent)?.view.blobs(), oracle.draftOf(agent)?.view.blobs(), agent);
52+ assert.deepEqual(oracle.draftOf("cy")?.view.blobs(), { "icon.png": C, "logo.png": B });
53+});