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 236 to 237

Compare

+43 −0 in 1 place
Lines 68–113 at 237 (were 68–70 at 236)
6868 assert.doesNotMatch(String(read(oracle, "cy")["src/geometry.ts"]), /const pi/);
6969 assert.deepEqual(project.tree("", { agent: "cy", authors: true }), oracle.tree("", { agent: "cy", authors: true }));
7070});
72+// A push landed through the merge queue whose delete and write of the same text became a move, by an agent whose base
73+// stays older than the landing, then more drafting in the moved-to file: the diff and every file read as in memory.
74+// (Here the move is among the agent's own atoms, so nothing is shared; touched-beyond.test.ts covers work held only
75+// by dependency.)
76+function landedWithMoves(project: Project) {
77+ let t = 0;
78+ project.checkerReady = true;
79+ project.init(
80+ {
81+ "avcs.json": `${JSON.stringify({ queue: true })}\n`,
82+ "src/shapes.ts": `// shapes\n${AREA}`,
83+ "src/geometry.ts": "// geometry\n",
84+ "notes.md": "notes\n",
85+ },
86+ t,
87+ );
88+ project.sync("ann");
89+ project.sync("bob");
90+ const land = (agent: string, message: string) => {
91+ const queued = project.publish(agent, message, ++t);
92+ assert.ok(queued.ok && "queued" in queued, JSON.stringify(queued));
93+ project.queueChecking(queued.queued);
94+ project.queueLand(queued.queued, ++t);
95+ };
96+ project.record("bob", { "notes.md": "notes\nbob\n" }, ++t);
97+ land("bob", "Notes");
98+ project.edit("ann", { file: "src/shapes.ts", old: AREA, new: "" }, ++t);
99+ project.edit("ann", { file: "src/geometry.ts", content: `// geometry\n${AREA}` }, ++t);
100+ project.record("ann", { "README.md": "readme\n" }, ++t);
101+ land("ann", "Move area, add a readme");
102+ project.edit("ann", { file: "src/geometry.ts", old: "3.14", new: "Math.PI" }, ++t);
103+ project.edit("ann", { file: "README.md", content: "readme\nmore\n" }, ++t);
104+}
106+test("a draft's diff takes nothing from its base that its landed work holds by dependency", () => {
107+ const oracle = new Project(new MemoryStore());
108+ const project = writer();
109+ landedWithMoves(oracle);
110+ landedWithMoves(project);
111+ assert.deepEqual(project.diffOf("ann"), oracle.diffOf("ann"));
112+ assert.deepEqual(read(project, "ann"), read(oracle, "ann"));
113+});
MCP
compare on this site's /mcp
CLI
abso diff 236 237 worker/project/test/agent-views-shared.test.ts --json
JSON
/christopher/abso-core/compare/236..237?file=worker%2Fproject%2Ftest%2Fagent-views-shared.test.ts&format=json