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

Compare

+7 −7 in 5 places
Lines 52–58 at 318 (were 52–58 at 7)
5252 });
5353}
5454
55−test("an edit published after the move, made against the old place, lands at the new one", () => {
55+test("an edit pushed after the move, made against the old place, lands at the new one", () => {
5656 const { project } = setup();
5757 annMovesArea(project);
5858 project.edit("bob", { file: "src/shapes.ts", old: "const pi = 3.14;", new: "const pi = 3.1416;" }, 1);
Lines 60–66 at 318 (were 60–66 at 7)
6060 // bob hears that the lines it changed moved, with its change.
6161 const news = project.edit("bob", { file: "src/shapes.ts", old: "return 1;", new: "return 1; // other" }, 2);
6262 assert.deepEqual(news.ok && news.news, [
63− 'ann published "Move area" (version 1), which moved lines your draft changes from src/shapes.ts to src/geometry.ts; your changes moved with them. Run abso sync to see them there.',
63+ 'ann pushed "Move area" (version 1), which moved lines your draft changes from src/shapes.ts to src/geometry.ts; your changes moved with them. Run abso pull to see them there.',
6464 ]);
6565 project.restore("bob", null, 2);
6666 project.edit("bob", { file: "src/shapes.ts", old: "return pi * r * r;", new: "return pi * r ** 2;" }, 3);
Lines 80–86 at 318 (were 80–86 at 7)
8080 assert.equal(files["src/figures.ts"], START["src/shapes.ts"].replace("return 1;", "return 2;"));
8181});
8282
83−test("publishing a move leaves the mover's own files exactly as they were", () => {
83+test("pushing a move leaves the mover's own files exactly as they were", () => {
8484 const { project } = setup();
8585 annMovesArea(project);
8686 project.edit("ann", { file: "src/geometry.ts", old: "3.14", new: "3.14159" }, 2);
Lines 179–185 at 318 (were 179–185 at 7)
179179 assert.equal(bob.ok, false, "the lines bob edited are gone, not moved");
180180});
181181
182−test("a move split across two publishes is a delete and a fresh write: the moved lines are new", () => {
182+test("a move split across two pushes is a delete and a fresh write: the moved lines are new", () => {
183183 const { project } = setup();
184184 project.edit("ann", { file: "src/shapes.ts", old: AREA, new: "" }, 1);
185185 assert.equal(project.publish("ann", "Take area out", 2).ok, true);
Lines 189–201 at 318 (were 189–201 at 7)
189189 assert.equal(project.publishOf(lines[1]!.atom)?.version, 2, "written fresh in version 2, not carried from version 0");
190190});
191191
192−test("past the move limit only the longest blocks move: a rewrite of many single lines still publishes, and a block moved whole keeps someone's edit (abso issue 137)", () => {
192+test("past the move limit only the longest blocks move: a rewrite of many single lines still pushes, and a block moved whole keeps someone's edit (abso issue 137)", () => {
193193 const keys = Array.from({ length: 200 }, (_, i) => ` "k${i}": ${i},`);
194194 const block = [" // block", ' "b1": "one",', ' "b2": "two",', ' "b3": "three",', " // end block"];
195− const before = ["{", ...block, ...keys, "}"].join("\n") + "\n";
195+ const before = `${["{", ...block, ...keys, "}"].join("\n")}\n`;
196196 // The draft reverses the keys with a new line between each, so every one is its own one-line match.
197197 const rewritten = keys.toReversed().flatMap((k, i) => [k, ` "n${i}": 0,`]);
198− const after = ["{", ...rewritten, ...block, "}"].join("\n") + "\n";
198+ const after = `${["{", ...rewritten, ...block, "}"].join("\n")}\n`;
199199 const store = new MemoryStore();
200200 const project = new Project(store);
201201 project.init({ "f.json": before }, 0);
MCP
compare on this site's /mcp
CLI
abso diff 7 318 worker/project/test/moves.test.ts --json
JSON
/christopher/abso-core/compare/7..318?file=worker%2Fproject%2Ftest%2Fmoves.test.ts&format=json