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 52 to 53

Compare

+73 −1 in 3 places
Lines 14–21 at 53 (were 14–20 at 52)
1414import { after, before, describe, it } from "node:test";
1515import { readConfig, readMachineServers } from "../src/config.ts";
1616import { issuesServerFor, tokenGoesTo } from "../src/core.ts";
17−import { searchLines } from "../src/issues.ts";
17+import { issuePage, searchLines } from "../src/issues.ts";
18+import type { IssuePage } from "../src/issues-wire.ts";
1819import { main } from "../src/main.ts";
1920import { argvFor, mcpTools } from "../src/mcp.ts";
2021import { type Fake, startFake } from "./fake-server.ts";
Lines 65–76 at 53 (were 64–69 at 52)
6465 });
6566 return;
6667 }
68+ // An ack answers with the ask, acknowledged and still open.
69+ const ack = /\/a\/([^/]+)\/ack\/(\d+)$/.exec(req.url ?? "");
70+ if (req.method === "POST" && ack)
71+ return send(200, {
72+ ask: { id: Number(ack[2]), by: "desk", of: ack[1], answer: null, ack: { at: Date.now(), note: "" } },
73+ });
6774 send(500, { error: "a stand-in" });
6875 });
6976 await new Promise<void>((ok) => issues.listen(0, "127.0.0.1", ok));
Lines 204–274 at 53 (were 197–202 at 52)
197204 assert.equal(posts.length, 1, posts.join("\n"));
198205 assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/erin\/withdraw\/3$/);
199206 });
208+ it("ack is one POST to the one asked's ack/<ask> route, and says the ask stays open", async () => {
209+ const fay = await folder("fay");
210+ const before = seen.length;
211+ const r = await main(["ack", "7", "on it after the deploy"], { cwd: fay, env: ENV(), write: () => {} });
212+ assert.equal(r.exit, 0, r.stdout + r.stderr);
213+ assert.equal(r.stdout, 'Acknowledged ask 7. desk hears it; the ask stays open until abso answer 7 "...".\n');
214+ const posts = seen.slice(before).filter((s) => s.startsWith("POST"));
215+ assert.deepEqual(posts.length, 1, posts.join("\n"));
216+ assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/fay\/ack\/7$/);
217+ assert.equal((await main(["ack"], { cwd: fay, env: ENV(), write: () => {} })).exit, 1);
218+ });
220+ it("an acknowledged ask reads as acknowledged, not answered, with the note under it", () => {
221+ const ask = {
222+ id: 7,
223+ issue: 3,
224+ by: "desk",
225+ of: "fay",
226+ kind: "question",
227+ question: "Which way?",
228+ review: false,
229+ due: null,
230+ recommendation: null,
231+ options: [],
232+ blocks: [],
233+ at: 0,
234+ answer: null,
235+ seen: 0,
236+ ack: { at: 0, note: "on it after the deploy" },
237+ };
238+ const page = {
239+ issue: {
240+ id: 3,
241+ title: "t",
242+ status: "blocked",
243+ parent: null,
244+ opened: { by: "desk", at: 0 },
245+ agent: null,
246+ agents: [],
247+ blockedBy: [],
248+ labels: [],
249+ versions: [],
250+ waitingOn: ["fay"],
251+ closed: null,
252+ description: "",
253+ lines: null,
254+ watchers: [],
255+ },
256+ comments: [],
257+ edits: [],
258+ asks: [ask],
259+ claims: [],
260+ children: [],
261+ } as unknown as IssuePage;
262+ const text = issuePage(page).join("\n");
263+ assert.match(
264+ text,
265+ /\n {2}ask 7: desk, [^\n]*asks fay a question on issue 3 \(acknowledged [^;)]+, not answered yet\): "Which way\?"\n {4}fay acknowledged: "on it after the deploy"/,
266+ );
267+ assert.doesNotMatch(text, /answer:/);
268+ const answered = { ...ask, answer: { by: "fay", words: "This way", at: 0 } };
269+ const later = issuePage({ ...page, asks: [answered] } as unknown as IssuePage).join("\n");
270+ assert.doesNotMatch(later, /acknowledged/, "an answer replaces the ack");
271+ });
200272});
201273
202274describe("abso issue <N> --copy-to <project>", () => {
MCP
compare on this site's /mcp
CLI
abso diff 52 53 client/test/issues.test.ts --json
JSON
/christopher/abso-core/compare/52..53?file=client%2Ftest%2Fissues.test.ts&format=json