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

Compare

+12 −6 in 4 places
Lines 15–28 at 318 (were 15–27 at 180)
1515 return Buffer.concat([Buffer.from((body.length + 4).toString(16).padStart(4, "0")), body]);
1616};
1717
18−for (const mode of ["success", "limit", "fatal", "server-intake", "text-intake"])
18+for (const mode of ["success", "limit", "fatal", "server-intake", "text-intake", "binary-limit"])
1919 test(`actual disk clone handles ${mode}`, async (t) => {
2020 const rejectPack = mode === "limit";
2121 const source = new MemoryFS(),
2222 dir = "/repo";
2323 await git.init({ fs: source, dir, defaultBranch: "main" });
2424 const blob = mode === "text-intake" ? Buffer.from("x".repeat(16383) + "🚀é中".repeat(20000)) : randomBytes(400000);
25+ if (mode === "binary-limit") blob[0] = 255;
2526 const blobOid = await git.writeBlob({ fs: source, dir, blob });
2627 const tree = await git.writeTree({
2728 fs: source,
Lines 128–139 at 318 (were 127–138 at 180)
127128 return write(path, ...args);
128129 };
129130 try {
130− if (mode === "server-intake" || mode === "text-intake") {
131+ if (mode === "server-intake" || mode === "text-intake" || mode === "binary-limit") {
131132 const trees = new GitIntakeTrees(storage);
132− if (mode === "text-intake") {
133+ if (mode === "text-intake" || mode === "binary-limit") {
133134 const original = GitDiskIntake.prototype.read;
134135 t.mock.method(GitDiskIntake.prototype, "read", function (this: GitDiskIntake, oid: string) {
135− if (oid === blobOid) throw Error("whole text blob read forbidden");
136+ if (oid === blobOid) throw Error("whole blob read forbidden");
136137 return original.call(this, oid);
137138 });
138139 }
Lines 149–165 at 318 (were 148–162 at 180)
148149 "fixture",
149150 undefined,
150151 async (bytes) => {
152+ assert.notEqual(mode, "binary-limit", "oversized binary must not reach the store");
151153 assert.deepEqual(Buffer.from(bytes), blob);
152154 return "fixture-blob";
153155 },
156+ mode === "binary-limit" ? () => "previous-blob" : undefined,
154157 undefined,
155− undefined,
156158 {
157159 storage,
158160 maxPackBytes: 2000000,
159161 maxObjectBytes: 1000000,
162+ maxBinaryBytes: mode === "binary-limit" ? 100000 : undefined,
160163 http,
161164 retainFileChunks: (files, path, chunks, oid) => trees.retainChunks(files, path, chunks, oid),
162165 },
Lines 167–176 at 318 (were 164–170 at 180)
164167 assert.equal(found!.base, 0);
165168 assert.equal(found!.commits.length, 1);
166169 if (mode === "text-intake") assert.equal(found!.commits[0]!.files["large.bin"], blob.toString("utf8"));
167− else assert.equal(found!.commits[0]!.blobs["large.bin"], "fixture-blob");
170+ else if (mode === "binary-limit") {
171+ assert.equal(found!.commits[0]!.blobs["large.bin"], "previous-blob");
172+ assert.deepEqual(found!.tooBig, ["large.bin"]);
173+ } else assert.equal(found!.commits[0]!.blobs["large.bin"], "fixture-blob");
168174 trees.dispose();
169175 for (const table of ["git_pack_spool", "git_pack_resolve", "git_object_meta", "git_object_bytes"])
170176 assert.equal(storage.db.prepare(`SELECT COUNT(*) AS n FROM ${table}`).get()!.n, 0);
MCP
compare on this site's /mcp
CLI
abso diff 180 318 server/test/git-disk-clone.test.ts --json
JSON
/christopher/abso-core/compare/180..318?file=server%2Ftest%2Fgit-disk-clone.test.ts&format=json