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 11 to 12

Compare

+41 −1 in 2 places
Lines 51–57 at 12 (were 51–57 at 11)
5151import { pulledText } from "../src/queue.ts";
5252import { noteText, titleLine } from "../src/review.ts";
5353import { screenAnswer, throughLink, unsafeLink, unsafePath } from "../src/safety.ts";
54−import { findBlocks, keepFrom, settleText } from "../src/settle.ts";
54+import { findBlocks, gitMarkerLine, keepFrom, settleText } from "../src/settle.ts";
5555import { tar } from "../src/tar.ts";
5656import { type Fake, startFake, untar } from "./fake-server.ts";
5757
Lines 4340–4382 at 12 (were 4340–4342 at 11)
43404340 for (const [path, data] of files) assert.deepEqual(back.get(path), data);
43414341 });
43424342});
4344+describe("git conflict markers typed or left by hand", () => {
4345+ it("finds what looks like a git conflict, and not abso's own blocks or a lone marker", () => {
4346+ const git = "a\n<<<<<<< HEAD\nmine\n=======\ntheirs\n>>>>>>> feature\nb\n";
4347+ assert.equal(gitMarkerLine(git), 2);
4348+ assert.equal(gitMarkerLine(git.replaceAll("\n", "\r\n")), 2, "CRLF files too");
4349+ assert.equal(gitMarkerLine("a\n=======\nb\n"), undefined, "a lone ======= is a heading underline");
4350+ assert.equal(gitMarkerLine("<<<<<<< HEAD\nmine\n"), undefined, "no middle and no close");
4351+ const mine =
4352+ '<<<<<<< yours (unpublished)\nx\n||||||| before (version 3)\ny\n=======\nz\n>>>>>>> theirs: bob, version 4 "m"\n';
4353+ assert.equal(gitMarkerLine(mine), undefined, "abso's own blocks are settled with abso settle");
4354+ });
4356+ it("record and publish say so, once, and still send the file", async () => {
4357+ const { folders } = await project({ "a.txt": "a\n" }, "alice");
4358+ const dir = folders.alice!;
4359+ writeFileSync(join(dir, "a.txt"), "a\n<<<<<<< HEAD\nmine\n=======\ntheirs\n>>>>>>> feature\n");
4360+ const said = await main(["record"], { cwd: dir, env: ENV, write: () => {} });
4361+ assert.equal(said.exit, 0, said.stdout);
4362+ assert.match(said.stdout, /Note: a\.txt has lines that look like a git conflict \(from line 2\)/);
4363+ const again = await main(["record"], { cwd: dir, env: ENV, write: () => {} });
4364+ assert.doesNotMatch(again.stdout, /git conflict/, "nothing new was sent, so nothing to say");
4365+ });
4366+});
4368+describe("paths too long for Windows", () => {
4369+ it("notes a long path once, as it is sent, and sends the file", async () => {
4370+ const { folders } = await project({ "a.txt": "a\n" }, "alice");
4371+ const dir = folders.alice!;
4372+ const long = `${"d".repeat(80)}/${"e".repeat(80)}/f.txt`;
4373+ mkdirSync(join(dir, dirname(long)), { recursive: true });
4374+ writeFileSync(join(dir, long), "deep\n");
4375+ const said = await main(["record"], { cwd: dir, env: ENV, write: () => {} });
4376+ assert.equal(said.exit, 0, said.stdout);
4377+ assert.match(said.stdout, /Note: d{80}\/e{80}\/f\.txt is 167 characters inside the folder/);
4378+ assert.match(said.stdout, /Windows stops at 260/);
4379+ const again = await main(["record"], { cwd: dir, env: ENV, write: () => {} });
4380+ assert.doesNotMatch(again.stdout, /Windows stops at 260/, "nothing new was sent");
4381+ });
4382+});
MCP
compare on this site's /mcp
CLI
abso diff 11 12 client/test/client.test.ts --json
JSON
/christopher/abso-core/compare/11..12?file=client%2Ftest%2Fclient.test.ts&format=json