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
MCP
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/client/test/ci-runs.test.ts?format=json
60 linesrunsteps 100%Last change runsteps in version 301, 1 version changed it
1// abso ci for a project whose CI is its pipeline file (abso 719): test-byoc on 2026-10-16 had no abso.json, and abso ci
2// said "nothing to run" while its abso.yml's run 8 was going. The stored run is the project's CI there.
3
4import assert from "node:assert/strict";
5import { test } from "node:test";
6import { builtInHasNothing, runLine, storedRuns } from "../src/ci.ts";
7
8const base = { latest: null, checked: null, running: null, red: null, behind: null } as const;
9const nothing = {
10 version: 6,
11 from: 6,
12 reason: "nothing to run: no abso.json, and package.json has no test, typecheck or vite",
13 at: "2026-10-16T16:47:00.000Z",
14};
16test("the stored runs are read strictly, newest first as the server lists them", () => {
17 const runs = storedRuns({
18 blocked: null,
19 runs: [
20 { id: 8, version: 6, state: "running", file: "abso.yml", started: 1 },
21 { id: "7", version: 6, state: "failed", file: "abso.yml" },
22 { id: 6, version: 5, state: "failed", file: "abso.yml" },
23 ],
24 });
25 assert.deepEqual(
26 runs.map((r) => r.id),
27 [8, 6],
28 );
29 assert.deepEqual(storedRuns(null), []);
30 assert.deepEqual(storedRuns({ runs: "no" }), []);
31});
33test("a run in a line names its file, its state and where its jobs are", () => {
34 assert.equal(
35 runLine({ id: 8, version: 6, state: "running", file: "abso.yml" }),
36 "Pipeline run 8 (abso.yml) is running on version 6. abso pipeline runs 8 shows its jobs.",
37 );
38 assert.equal(
39 runLine({ id: 7, version: 6, state: "failed", file: "abso.yml" }),
40 "Pipeline run 7 (abso.yml) failed on version 6. abso pipeline runs 7 shows its jobs.",
41 );
42 assert.equal(
43 runLine({ id: 2, version: 1, state: "planned", file: "abso.yml" }),
44 "Pipeline run 2 (abso.yml) was planned, not run, on version 1. abso pipeline runs 2 shows its jobs.",
45 );
46});
48test("only the built-in check's own nothing to run is set aside, never a red or another skip", () => {
49 assert.equal(builtInHasNothing({ ...base, skipped: nothing }), true);
50 assert.equal(builtInHasNothing({ ...base, skipped: { ...nothing, reason: "CI is off" } }), false);
51 assert.equal(builtInHasNothing({ ...base }), false);
52 assert.equal(
53 builtInHasNothing({
54 ...base,
55 red: { version: 6, agent: null, message: null, lastGood: null },
56 skipped: nothing,
57 }),
58 false,
59 );
60});