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

Compare

+22 −14 in 12 places
Lines 23–29 at 318 (were 23–29 at 4)
2323 }
2424}
2525
26−test("a first sync hands back every file, empty ones included", () => {
26+test("a first pull hands back every file, empty ones included", () => {
2727 const store = new MemoryStore();
2828 const project = new Project(store);
2929 assert.deepEqual(project.init({ ...START, "empty.txt": "" }, 1), { version: 0, skipped: [] });
Lines 34–40 at 318 (were 34–40 at 4)
3434 assert.deepEqual(project.sync("backtracker").files, {});
3535});
3636
37−test("an edit joins the draft, publish adds it to shared, and sync brings it to others", () => {
37+test("an edit joins the draft, push adds it to shared, and pull brings it to others", () => {
3838 const { project } = setup();
3939 project.sync("a");
4040 project.sync("b");
Lines 121–127 at 318 (were 121–127 at 4)
121121 });
122122});
123123
124−test("changes that do not collide publish in any order and give the same files", () => {
124+test("changes that do not collide push in any order and give the same files", () => {
125125 const edits: [string, string, string, string][] = [
126126 ["a", "notes.md", "one\n", "uno\n"],
127127 ["b", "notes.md", "four\n", "cuatro\n"],
Lines 147–153 at 318 (were 147–153 at 4)
147147 }
148148 for (const i of order) {
149149 const [agent] = edits[i]!;
150− assert.equal(project.publish(agent, `from ${agent}`, 3).ok, true, `publish by ${agent}`);
150+ assert.equal(project.publish(agent, `from ${agent}`, 3).ok, true, `push by ${agent}`);
151151 }
152152 return project.files();
153153 });
Lines 159–165 at 318 (were 159–165 at 4)
159159 });
160160});
161161
162−test("a collision refuses the publish, sends news, and sync then an edit settles it", () => {
162+test("a collision refuses the push, sends news, and pull then an edit settles it", () => {
163163 const { project } = setup();
164164 const folderB: Record<string, string> = {};
165165 apply(folderB, project.sync("a").files);
Lines 173–179 at 318 (were 173–179 at 4)
173173 const heard = project.edit("b", { file: "engine.ts", old: "return null", new: "return undefined" }, 5);
174174 assert.equal(heard.ok, true);
175175 assert.deepEqual(heard.ok && heard.news, [
176− 'a published "Mark three for a" (version 1), which changes notes.md lines 3-3, where your draft also changes lines; run abso sync to see both versions.',
176+ 'a pushed "Mark three for a" (version 1), which changes notes.md lines 3-3, where your draft also changes lines; run abso pull to see both versions.',
177177 ]);
178178 assert.deepEqual(project.edit("b", { file: "engine.ts", old: "undefined", new: "void 0" }, 5), {
179179 ok: true,
Lines 204–216 at 318 (were 204–215 at 4)
204204 assert.equal(folderB["notes.md"], `one\ntwo\n${block}four\nfive\n`);
205205 assert.deepEqual(Object.keys(synced.files), ["notes.md"]); // b's own engine.ts edit was already in its folder
206206
207− // b settles it with an edit that takes the markers out, and publish goes through, saying what b kept.
207+ // b settles it with an edit that takes the markers out, and publish goes through, saying what b kept
208+ // and what its held push said.
208209 project.edit("b", { file: "notes.md", old: block, new: "three (a and b)\n" }, 7);
209210 const settled = project.publish("b", "Settle three", 8);
210211 assert.deepEqual(settled.ok && "version" in settled && [settled.version, settled.settled], [
211212 2,
212− [{ file: "notes.md", kept: "rewrote", theirs: { agent: "a", version: 1 } }],
213+ [{ file: "notes.md", kept: "rewrote", theirs: { agent: "a", version: 1 }, held: "Mark three for b" }],
213214 ]);
214215 assert.equal(project.files()["notes.md"], "one\ntwo\nthree (a and b)\nfour\nfive\n");
215216 assert.equal(project.files()["engine.ts"], "export function match(p, s) {\n return void 0;\n}\n");
Lines 219–225 at 318 (were 218–224 at 4)
218219 assert.deepEqual(unresolvedConflicts(project.graph, shared), []);
219220});
220221
221−test("publishing with the markers still in is refused; asIs publishes both and settles it (#37, #11)", () => {
222+test("pushing with the markers still in is refused; asIs pushes both and settles it (#37, #11)", () => {
222223 const { project } = setup();
223224 project.sync("a");
224225 project.sync("b");
Lines 236–242 at 318 (were 235–241 at 4)
235236 assert.deepEqual(unresolvedConflicts(project.graph, shared), []);
236237});
237238
238−test("after publishing without syncing, the agent keeps editing its own folder", () => {
239+test("after pushing without pulling, the agent keeps editing its own folder", () => {
239240 const { project } = setup();
240241 project.sync("a");
241242 project.sync("b");
Lines 346–352 at 318 (were 345–351 at 4)
345346 assert.deepEqual(loaded.files(), project.files());
346347});
347348
348−test("a refused publish is logged and counted, and the counts survive a reload", () => {
349+test("a refused push is logged and counted, and the counts survive a reload", () => {
349350 const store = new MemoryStore();
350351 const project = new Project(store);
351352 project.init({ "a.txt": "a\n" }, 0);
Lines 358–376 at 318 (were 357–368 at 4)
357358 assert.equal(project.publish("bob", "c", 3).ok, false);
358359 assert.deepEqual(project.status().refusals, { total: 1, lines: 1, definition: 0, attribute: 0, duplicate: 0 });
359360 assert.deepEqual(project.refusals().refusals, [
360− { agent: "bob", draft: null, via: "publish", time: 3, collisions: [{ kind: "lines", file: "a.txt" }] },
361+ {
362+ agent: "bob",
363+ draft: null,
364+ via: "publish",
365+ time: 3,
366+ collisions: [{ kind: "lines", file: "a.txt" }],
367+ message: "c",
368+ },
361369 ]);
362370 assert.deepEqual(Project.load(store.entries, new MemoryStore()).refusals(), project.refusals());
363371});
364372
365−test("a full sync answers every file in the view, even for an agent that synced before; file listings change nothing (#37)", () => {
373+test("a full pull answers every file in the view, even for an agent that pulled before; file listings change nothing (#37)", () => {
366374 const store = new MemoryStore();
367375 const project = new Project(store);
368376 project.init({ "a.txt": "a\n", "src/b.ts": "b\n" }, 0);
Lines 391–397 at 318 (were 383–389 at 4)
383391 assert.throws(() => project.agentPaths("nobody"), /join first/);
384392});
385393
386−test("a log entry of a kind this engine doesn't know stops the load instead of being skipped (AVCS - Git Lessons, report 8.3)", () => {
394+test("a log entry of a kind this engine doesn't know stops the load instead of being skipped", () => {
387395 const store = new MemoryStore();
388396 const project = new Project(store);
389397 project.init({ "a.txt": "a\n" }, 0);
MCP
compare on this site's /mcp
CLI
abso diff 4 318 worker/project/test/project.test.ts --json
JSON
/christopher/abso-core/compare/4..318?file=worker%2Fproject%2Ftest%2Fproject.test.ts&format=json