- MCP
- blame on this site's /mcp
- CLI
- abso blame worker/project/test/queued-moves.test.ts --json
- JSON
- /christopher/abso-core/blame/worker/project/test/queued-moves.test.ts?format=json
89 linesFirst import 96% · pinch 2% · rename 2%Last change rename in version 100,
89 lines from 3 changes in 3 versions.
init0Start the project1// A publish while the agent's earlier publish still waits in the queue (#39)
2// must leave the queued one's changes alone (abso issue 135, item 4). Moves
3// (#28) are expressed by dropping the draft's changes to the files involved
4// and making them again; when that took a queued item's atoms too, the queue
5// later landed the item with a tie depending on discarded atoms, and the
6// project's log no longer loaded (typescript-rs, entries 6017 and 6504).
8import assert from "node:assert/strict";
9import { test } from "node:test";
10import { type EditBody, MemoryStore, Project } from "../project.ts";
12function edit(project: Project, agent: string, body: EditBody, time: number): void {
13 const a = project.edit(agent, body, time);
14 if (!a.ok) throw new Error(`edit by ${agent} was out of step`);
15}
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare17test("a move in a later push leaves the agent's queued push whole, and both land", () => {
19 const project = new Project(store);
20 project.checkerReady = true;
21 project.init(
22 {
pinch78Biome is silent: about 90 hints cleared. String joins as templates, dotted keys, unused imports, variables and a private method removed, optional chains (one kept boolean with === true), the preset field instead of the deprecated recommended. Two rules off where they don't fit: noExplicitAny in the hook modules, whose engine types come from the host, and noTemplateCurlyInString in tests, which hold source text as data.Compare23 "avcs.json": `${JSON.stringify({ queue: true })}\n`,
init0Start the project24 "a.ts": "export const a = 1;\nexport function kept() {\n\treturn 'x';\n}\n",
25 "c.ts": "export const c = 1;\n",
26 },
27 0,
28 );
29 project.sync("one");
30 // The first publish changes a.ts and waits in the queue.
31 edit(project, "one", { file: "a.ts", old: "const a = 1", new: "const a = 2" }, 1);
32 const first = project.publish("one", "a is 2", 2);
33 assert.ok(first.ok && "queued" in first, JSON.stringify(first));
34 // The second moves kept() from a.ts to c.ts, so a.ts is a file the move involves.
35 edit(project, "one", { file: "a.ts", old: "export function kept() {\n\treturn 'x';\n}\n", new: "" }, 3);
36 edit(
37 project,
38 "one",
39 {
40 file: "c.ts",
41 old: "export const c = 1;\n",
42 new: "export const c = 1;\nexport function kept() {\n\treturn 'x';\n}\n",
43 },
44 4,
45 );
46 const second = project.publish("one", "move kept to c", 5);
47 assert.ok(second.ok && "queued" in second, JSON.stringify(second));
49 const ids = project.queue().items.map((q) => q.id);
50 assert.equal(ids.length, 2);
51 project.queueChecking(2);
52 assert.deepEqual(
53 project.queueLand(2, 6).versions.map((v) => v.version),
54 [1, 2],
55 );
56 assert.equal(project.files()["a.ts"], "export const a = 2;\n");
57 assert.equal(project.files()["c.ts"], "export const c = 1;\nexport function kept() {\n\treturn 'x';\n}\n");
58 // The log replays: no publish depends on a discarded atom.
59 const again = Project.load(store.entries, new MemoryStore());
60 assert.equal(again.files()["a.ts"], "export const a = 2;\n");
61 assert.equal(again.version, 2);
62});
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare64test("restore while a push waits in the queue undoes only the later edits, and the queued one lands", () => {
66 const project = new Project(store);
67 project.checkerReady = true;
68 project.init(
pinch78Biome is silent: about 90 hints cleared. String joins as templates, dotted keys, unused imports, variables and a private method removed, optional chains (one kept boolean with === true), the preset field instead of the deprecated recommended. Two rules off where they don't fit: noExplicitAny in the hook modules, whose engine types come from the host, and noTemplateCurlyInString in tests, which hold source text as data.Compare69 { "avcs.json": `${JSON.stringify({ queue: true })}\n`, "a.ts": "export const a = 1;\nexport const b = 1;\n" },
71 );
72 project.sync("one");
73 edit(project, "one", { file: "a.ts", old: "const a = 1", new: "const a = 2" }, 1);
74 const first = project.publish("one", "a is 2", 2);
75 assert.ok(first.ok && "queued" in first, JSON.stringify(first));
76 edit(project, "one", { file: "a.ts", old: "const b = 1", new: "const b = 2" }, 3);
77 const r = project.restore("one", ["a.ts"], 4);
78 assert.equal(r.files["a.ts"], "export const a = 2;\nexport const b = 1;\n", "the queued change stays");
79 project.queueChecking(1);
80 assert.deepEqual(
81 project.queueLand(1, 5).versions.map((v) => v.version),
82 [1],
83 );
84 assert.equal(project.files()["a.ts"], "export const a = 2;\nexport const b = 1;\n");
85 assert.equal(
86 Project.load(store.entries, new MemoryStore()).files()["a.ts"],
87 "export const a = 2;\nexport const b = 1;\n",
88 );
89});