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

Compare

+23 −4 in 5 places
Lines 23–29 at 318 (were 23–29 at 91)
2323
2424const theirsLine = ">>>>>>> theirs: writer1, version 1 \"Goal wording 'playtest 4'\"";
2525
26−test("sync writes the block diff3 style, labeled, and lists it as a marked collision", () => {
26+test("pull writes the block diff3 style, labeled, and lists it as a marked collision", () => {
2727 const { project, synced } = collided();
2828 const text = project.draftOf("builder1")!.view.text("src/goals.ts");
2929 assert.equal(
Lines 90–96 at 318 (were 90–96 at 91)
9090 ["yours", "yours", "it kept its own lines, not yours"],
9191 ["both", "both", "it kept both its lines and yours"],
9292] as const) {
93− test(`settled by keeping ${keep}: the publish goes through, logs it, and writer1 hears "${phrase}"`, () => {
93+ test(`settled by keeping ${keep}: the push goes through, logs it, and writer1 hears "${phrase}"`, () => {
9494 const { project, store } = collided();
9595 const lines = project
9696 .draftOf("builder1")!
Lines 103–109 at 318 (were 103–109 at 91)
103103 project
104104 .news("writer1")
105105 .news.includes(
106− `builder1 settled its collision with your version 1 in src/goals.ts, publishing version 2: ${phrase}. abso show 2:src/goals.ts shows the file.`,
106+ `builder1 settled its collision with your version 1 in src/goals.ts, pushing version 2: ${phrase}. abso show 2:src/goals.ts shows the file.`,
107107 ),
108108 );
109109 assert.deepEqual(project.status().agents.find((a) => a.agent === "builder1")!.collisions, undefined);
Lines 116–122 at 318 (were 116–122 at 91)
116116 });
117117}
118118
119−test("publish refuses while the markers are in; asIs keeps both, lists the file, and tells writer1", () => {
119+test("push refuses while the markers are in; asIs keeps both, lists the file, and tells writer1", () => {
120120 const { project } = collided();
121121 const refused = project.publish("builder1", "Not yet", 4);
122122 assert.deepEqual(!refused.ok && refused.collisions.map((c) => [c.kind, c.marked, c.file, c.yours.lines]), [
Lines 244–268 at 318 (were 244–249 at 91)
244244 assert.deepEqual(lostLines([" rate. *B5: worth +N coin*"], region), ["- [x] **Gauge shows coin**"]);
245245});
246246
247+test("lostLines: a line rewritten longer, keeping its words and adding a reason, is not a loss", () => {
248+ const region = {
249+ file: "store-policy.md",
250+ yours: ["Free shipping on orders over $35."],
251+ base: ["Free shipping on orders over $50."],
252+ theirs: ["Free shipping on orders over $75."],
253+ agent: "alice",
254+ version: 1,
255+ message: "m",
256+ };
257+ const settled = (line: string) => ["# Store policy", "", line, "Returns accepted within 30 days."];
258+ assert.deepEqual(
259+ lostLines(settled("Free shipping on orders over $50 (alice wants $75, bob wants $35: decided by Friday)."), region),
260+ [],
261+ );
262+ assert.deepEqual(lostLines(settled("Free shipping on orders over $60."), region), []);
263+ assert.deepEqual(lostLines(settled("Shipping is free."), region), ["Free shipping on orders over $35."]);
264+});
247266test("markers.ts: blocks round-trip, settle, and say what was kept", () => {
248267 const who = { agent: "a", version: 3, message: 'Line one\nline two "quoted"' };
249268 const block = markerBlock(["y1", "y2"], ["b"], 2, ["t1"], who);
MCP
compare on this site's /mcp
CLI
abso diff 91 318 worker/project/test/markers.test.ts --json
JSON
/christopher/abso-core/compare/91..318?file=worker%2Fproject%2Ftest%2Fmarkers.test.ts&format=json