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
show on this site's /mcp
CLI
abso show 101 --json
JSON
/christopher/abso-core/versions/101?format=json

Pipeline trigger: on: [push] replaces on: [publish] (abso 427)

of shared·rename··Not checked

A pipeline file writes on: [push] (abso.yml, abso.yaml, avcs.json). The word publish is no longer accepted, with no alias. The check messages, "doesn't run on push", abso pipeline check --on push and its --json say push. The stored event kind stays "publish" underneath.

Version 100 · Files at version 101

8 files, 43 lines added, 32 removed.

--- a/client/README.md
+++ b/client/README.md
@@ -115,7 +115,7 @@
115115| `abso label <name> [--version n] [--remove]` / `abso labels` | Puts a label on a version of shared (the newest by default) or takes it off, like a git tag; `labels` lists them all. |
116116| `abso follow <label>` / `abso follow --none` | Makes this folder follow a label: every pull takes it to the newest version of shared with that label. `--none` goes back to shared's newest. Saved in `.abso/config.json`. |
117117| `abso check-ignore <path...>` | Whether abso leaves each path out, and which line of which ignore file decided (see "What is left out"). |
118−| `abso pipeline check [file] [--on <event>]` | Reads the folder's pipeline file (abso.yml, abso.yaml or avcs.json, or the file named) and lists each problem as `<path>: <message>`: a cycle in needs, a job or pipeline that doesn't exist, secrets in a pipeline a draft can start, keys it doesn't know. Exits 1 on problems; otherwise lists each pipeline's jobs in the order they run. With `--on publish|draft|green|land|hand|schedule` (and `--space`, `--pipeline` or `--every`), says which pipelines that event starts, with their jobs in waves that can run side by side, and why the others don't. Reads only the file. The shape is still a draft. |
118+| `abso pipeline check [file] [--on <event>]` | Reads the folder's pipeline file (abso.yml, abso.yaml or avcs.json, or the file named) and lists each problem as `<path>: <message>`: a cycle in needs, a job or pipeline that doesn't exist, secrets in a pipeline a draft can start, keys it doesn't know. Exits 1 on problems; otherwise lists each pipeline's jobs in the order they run. With `--on push|draft|green|land|hand|schedule` (and `--space`, `--pipeline` or `--every`), says which pipelines that event starts, with their jobs in waves that can run side by side, and why the others don't. Reads only the file. The shape is still a draft. |
119119| `abso issues [--open] [--status <s>] [--agent <a>] [--parent <N>] [--label <l,l>]` | The project's issues, most recently updated first. Statuses come from the work: `abso start --issue N` puts an issue In progress, an open ask makes it Blocked (In review for a review), and `push --done` closes it. `--label friction` keeps the issues with every label named: a ready list of work to pick up. `abso issues --labels` lists the labels in use, with how many issues are open under each. |
120120| `abso issue new "<title>" --label <l,l>` / `abso issue <N> --label <l,l> --unlabel <l,l>` | Labels an issue, or changes its labels. A label is 1-40 lower-case letters, digits and `- _ . :` (`friction`, `area:client`); what you type is lower-cased. An edit that only changes labels tells nobody unless `--notify` names people. Tool friction goes in its own issue, labeled `friction`. |
121121| `abso issue draft "<title>"` / `abso issues --drafts` | A draft of an issue: yours alone, with no number and no news. Takes the same fields as `issue new`. `abso issue draft <D> [fields]` changes one, `--open` opens it as an issue (with any fields given over the draft's), `--delete` deletes it. |
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -771,7 +771,7 @@
771771 pipeline: {
772772 flags: { on: "string", space: "string", pipeline: "string", every: "string", log: "string" },
773773 usage:
774− "abso pipeline check [file] [--on publish|draft|green|land|hand|schedule [--space <name>] [--pipeline <name>] [--every <when>]] | abso pipeline runs [<run>] [--log <pipeline.job>]",
774+ "abso pipeline check [file] [--on push|draft|green|land|hand|schedule [--space <name>] [--pipeline <name>] [--every <when>]] | abso pipeline runs [<run>] [--log <pipeline.job>]",
775775 about:
776776 "Read the folder's pipeline file (abso.yml, abso.yaml or avcs.json, or the file named) and say what's wrong with it, place by place: a cycle in needs, a job that doesn't exist, secrets a draft could reach, a key it doesn't know. Exits 1 when it has problems. With --on, it says which pipelines that event starts (in shared, or --space), with their jobs in waves that can run side by side, and why each other pipeline doesn't start. It reads only the file. abso pipeline runs asks the server what the project's pipelines did: the runs, newest first; with a run's number, its jobs (state, why, exit, time, an npm or deploy job's phase); with --log <pipeline.job>, that job's output.",
777777 // Loaded only here, so the yaml package it needs can't stop every other command
--- a/client/src/pipeline-commands.ts
+++ b/client/src/pipeline-commands.ts
@@ -5,7 +5,7 @@
55
66import { existsSync, readFileSync } from "node:fs";
77import { basename, join, resolve } from "node:path";
8−import { readPipelineFile } from "../../src/pipeline/pipeline.ts";
8+import { readPipelineFile, triggerWord } from "../../src/pipeline/pipeline.ts";
99import { type PipelineEvent, plan } from "../../src/pipeline/plan.ts";
1010import { type Parsed, str, UsageError } from "./args.ts";
1111import { type Env, EXIT, type Output, open } from "./command-env.ts";
@@ -47,7 +47,7 @@
4747 const said =
4848 event.kind === "schedule"
4949 ? `On the schedule "${event.every}"`
50− : `On ${event.kind}${event.kind === "hand" ? ` of ${event.pipeline}` : ""} in ${event.space}`;
50+ : `On ${triggerWord(event.kind)}${event.kind === "hand" ? ` of ${event.pipeline}` : ""} in ${event.space}`;
5151 const lines = [
5252 ...planned.start.flatMap((p) => [
5353 ` ${p.name} starts:`,
@@ -59,11 +59,11 @@
5959 ];
6060 return {
6161 text: `${said}, ${planned.start.length === 0 ? "nothing in" : `${planned.start.length === 1 ? "1 pipeline" : `${planned.start.length} pipelines`} from`} ${name} starts; jobs on one line can run side by side.\n${lines.join("\n")}\n`,
62− json: { file: name, event, ...planned },
62+ json: { file: name, event: { ...event, kind: triggerWord(event.kind) }, ...planned },
6363 };
6464 }
6565 const lines = pipelines.flatMap((p) => [
66− ` ${p.name}, on ${p.on.map((t) => (typeof t === "string" ? t : `every ${t.every}`)).join(", ")}${p.only ? `, only ${p.only.join(", ")}` : ""}:`,
66+ ` ${p.name}, on ${p.on.map((t) => (typeof t === "string" ? triggerWord(t) : `every ${t.every}`)).join(", ")}${p.only ? `, only ${p.only.join(", ")}` : ""}:`,
6767 ...p.jobs.map(
6868 (j) =>
6969 ` ${j.name}${p.required.includes(j.name) ? " (required)" : ""}: ${j.uses ? `uses ${j.uses}` : j.run}${j.needs.length ? `, after ${j.needs.join(", ")}` : ""}`,
@@ -71,11 +71,14 @@
7171 ]);
7272 return {
7373 text: `${name} is fine: ${pipelines.length === 1 ? "1 pipeline" : `${pipelines.length} pipelines`}, jobs in the order they run.\n${lines.join("\n")}\n`,
74− json: { file: name, pipelines },
74+ json: {
75+ file: name,
76+ pipelines: pipelines.map((p) => ({ ...p, on: p.on.map((t) => (typeof t === "string" ? triggerWord(t) : t)) })),
77+ },
7578 };
7679}
7780
78−const KINDS = ["publish", "draft", "green", "land", "hand", "schedule"] as const;
81+const KINDS = ["push", "draft", "green", "land", "hand", "schedule"] as const;
7982
8083/** --on, with --space, --pipeline (by hand) and --every (a schedule), as an event. */
8184function eventFrom(on: string, args: Parsed): PipelineEvent {
@@ -91,7 +94,7 @@
9194 if (!pipeline) throw new UsageError("--on hand takes --pipeline <name>");
9295 return { kind: "hand", pipeline, space };
9396 }
94− return { kind: on as "publish" | "draft" | "green" | "land", space };
97+ return { kind: on === "push" ? "publish" : (on as "draft" | "green" | "land"), space };
9598}
9699
97100/** A run as the server's list gives it. */
--- a/client/test/pipeline-commands.test.ts
+++ b/client/test/pipeline-commands.test.ts
@@ -24,7 +24,7 @@
2424
2525const GOOD = `pipelines:
2626 ci:
27− on: [publish, draft]
27+ on: [push, draft]
2828 jobs:
2929 test: { needs: [setup], run: npm test }
3030 setup: { run: npm ci }
@@ -37,7 +37,7 @@
3737 assert.equal(r.exit, 0, r.stderr);
3838 assert.equal(
3939 r.stdout,
40− "abso.yml is fine: 1 pipeline, jobs in the order they run.\n ci, on publish, draft:\n setup: npm ci\n test (required): npm test, after setup\n",
40+ "abso.yml is fine: 1 pipeline, jobs in the order they run.\n ci, on push, draft:\n setup: npm ci\n test (required): npm test, after setup\n",
4141 );
4242 });
4343
@@ -78,7 +78,7 @@
7878 assert.equal(only.exit, 0, only.stderr);
7979 assert.match(
8080 only.stdout,
81− /^avcs\.json is fine: 1 pipeline.*\n {2}ci, on publish:\n {4}setup \(required\): npm ci\n {4}check \(required\): npm test, after setup\n$/s,
81+ /^avcs\.json is fine: 1 pipeline.*\n {2}ci, on push:\n {4}setup \(required\): npm ci\n {4}check \(required\): npm test, after setup\n$/s,
8282 );
8383 });
8484
@@ -116,7 +116,7 @@
116116describe("abso pipeline check --on (abso issue 176)", () => {
117117 const FILE = `pipelines:
118118 ci:
119− on: [publish, draft]
119+ on: [push, draft]
120120 jobs:
121121 setup: { run: npm ci }
122122 lint: { needs: [setup], run: lint }
@@ -153,7 +153,7 @@
153153 const dir = folder({ "abso.yml": FILE });
154154 assert.match(
155155 (await run(dir, "check", "--on", "merge")).stderr,
156− /--on is one of publish, draft, green, land, hand, schedule/,
156+ /--on is one of push, draft, green, land, hand, schedule/,
157157 );
158158 assert.match((await run(dir, "check", "--on", "hand")).stderr, /--on hand takes --pipeline <name>/);
159159 assert.match((await run(dir, "check", "--on", "schedule")).stderr, /--on schedule takes --every/);
--- a/src/pipeline/pipeline.ts
+++ b/src/pipeline/pipeline.ts
@@ -89,7 +89,13 @@
8989/** An npm package name: lower case, URL-safe, optionally under a @scope/. */
9090const NPM_NAME = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;
9191
92−const TRIGGERS = ["publish", "draft", "green", "land", "hand"] as const;
92+/** The words a pipeline file writes. The word `push` is the stored event "publish" (a log entry kind that stays). */
93+const TRIGGERS = ["push", "draft", "green", "land", "hand"] as const;
95+/** A trigger as a file and a person say it: the stored "publish" event is written `push`. */
96+export function triggerWord(t: string): string {
97+ return t === "publish" ? "push" : t;
98+}
9399const SIZES: readonly Size[] = ["small", "standard", "large"];
94100const MACHINE_KEYS = ["image", "dockerfile", "size"] as const;
95101const JOB_KEYS = ["needs", "run", "uses", "from", "keep", "cache", "secrets", "abso", ...MACHINE_KEYS] as const;
@@ -196,7 +202,7 @@
196202 jobs[name] = { run, ...(last ? { needs: [last] } : {}), ...(name === "build" ? { keep: [`${out}/**`] } : {}) };
197203 last = name;
198204 }
199− return { on: ["publish"], jobs, required: Object.keys(jobs) };
205+ return { on: ["push"], jobs, required: Object.keys(jobs) };
200206}
201207
202208function pipeline(name: string, p: unknown, at: string, say: Say): Pipeline | undefined {
@@ -364,7 +370,8 @@
364370 const out: Trigger[] = [];
365371 all.forEach((t, i) => {
366372 const here = Array.isArray(on) ? `${at}[${i}]` : at;
367− if (typeof t === "string" && (TRIGGERS as readonly string[]).includes(t)) out.push(t as Trigger);
373+ if (typeof t === "string" && (TRIGGERS as readonly string[]).includes(t))
374+ out.push((t === "push" ? "publish" : t) as Trigger);
368375 else if (isRecord(t) && Object.keys(t).length === 1 && typeof t.every === "string" && t.every.trim())
369376 out.push({ every: t.every });
370377 else say(here, `must be one of ${TRIGGERS.join(", ")}, or { every: "<when>" }, not ${q(t)}`);
--- a/src/pipeline/plan.ts
+++ b/src/pipeline/plan.ts
@@ -4,7 +4,7 @@
44// waves, so the jobs of one wave can run side by side. `abso pipeline check
55// --on <event>` shows it, and a runner reads the same plan.
66
7−import type { Job, Pipeline, PipelineFile } from "./pipeline.ts";
7+import { type Job, type Pipeline, type PipelineFile, triggerWord } from "./pipeline.ts";
88
99/** What happened, and in which space (shared, or a named draft). */
1010export type PipelineEvent =
@@ -46,7 +46,8 @@
4646 event.kind === "schedule"
4747 ? p.on.some((t) => typeof t !== "string" && t.every === event.every)
4848 : p.on.includes(event.kind);
49− if (!on) return event.kind === "schedule" ? `has no schedule "${event.every}"` : `doesn't run on ${event.kind}`;
49+ if (!on)
50+ return event.kind === "schedule" ? `has no schedule "${event.every}"` : `doesn't run on ${triggerWord(event.kind)}`;
5051 if (p.only && !p.only.includes(space)) return `runs only for ${p.only.join(", ")}, not ${space}`;
5152 // The file check refuses this already; the plan holds the line too.
5253 if (event.kind === "draft" && p.jobs.some((j) => j.secrets.length > 0))
--- a/src/pipeline/test/pipeline.test.ts
+++ b/src/pipeline/test/pipeline.test.ts
@@ -11,7 +11,7 @@
1111const DRAFT = `defaults: { image: node, size: standard } # image: a menu or \`dockerfile: path\`
1212pipelines:
1313 ci:
14− on: [publish, draft] # every version of shared, and an agent's draft before it pushes
14+ on: [push, draft] # every version of shared, and an agent's draft before it pushes
1515 jobs:
1616 setup: { run: npm ci, cache: [package-lock.json] }
1717 lint: { needs: [setup], run: npx biome ci . }
@@ -54,7 +54,7 @@
5454
5555/** A file with one pipeline `p` of the given jobs. */
5656const one = (jobs: Record<string, unknown>, rest: Record<string, unknown> = {}) => ({
57− pipelines: { p: { on: ["publish"], jobs, ...rest } },
57+ pipelines: { p: { on: ["push"], jobs, ...rest } },
5858});
5959
6060describe("reading the file", () => {
@@ -106,7 +106,7 @@
106106 });
107107
108108 it("reads on as a key in YAML, not as true", () => {
109− ok(readPipelineFile("pipelines:\n p:\n on: publish\n jobs:\n a: { run: x }\n", "abso.yaml"));
109+ ok(readPipelineFile("pipelines:\n p:\n on: push\n jobs:\n a: { run: x }\n", "abso.yaml"));
110110 });
111111
112112 it("says where YAML or JSON breaks, and refuses a name it can't tell the format of", () => {
@@ -122,7 +122,7 @@
122122 it("refuses a key given twice in YAML", () => {
123123 has(
124124 problems(
125− readPipelineFile("pipelines:\n p:\n on: publish\n on: draft\n jobs: { a: { run: x } }\n", "abso.yml"),
125+ readPipelineFile("pipelines:\n p:\n on: push\n on: draft\n jobs: { a: { run: x } }\n", "abso.yml"),
126126 ),
127127 "file",
128128 /isn't valid YAML/,
@@ -166,7 +166,7 @@
166166 checkPipelines({
167167 pipelines: {
168168 p: {
169− on: ["publish"],
169+ on: ["push"],
170170 jobs: { a: { needs: ["nope"], run: "a" }, b: { needs: ["q.c"], run: "b" } },
171171 required: ["a", "missing"],
172172 },
@@ -198,7 +198,7 @@
198198
199199 it("secrets in a pipeline a draft can start", () => {
200200 const deploy = { uses: "deploy", worker: "w", secrets: ["CLOUDFLARE_API_TOKEN"] };
201− const ps = problems(checkPipelines(one({ ship: deploy }, { on: ["publish", "draft"], only: "shared" })));
201+ const ps = problems(checkPipelines(one({ ship: deploy }, { on: ["push", "draft"], only: "shared" })));
202202 has(ps, "pipelines.p.on", /includes draft, but ship holds secrets/);
203203 assert.equal(ps.length, 1, JSON.stringify(ps));
204204 });
@@ -300,7 +300,7 @@
300300 const ps = problems(
301301 checkPipelines({
302302 defaults: { image: "node", colour: "blue" },
303− pipelines: { p: { on: ["publish"], when: "always", jobs: { a: { run: "x", timeout: 5, worker: "w" } } } },
303+ pipelines: { p: { on: ["push"], when: "always", jobs: { a: { run: "x", timeout: 5, worker: "w" } } } },
304304 extra: 1,
305305 }),
306306 );
@@ -336,7 +336,7 @@
336336 checkPipelines({
337337 defaults: { image: "node", dockerfile: "Dockerfile" },
338338 pipelines: {
339− p: { on: ["publish", "sometimes", { every: "" }], jobs: { a: { run: "x", size: "huge" } } },
339+ p: { on: ["push", "sometimes", { every: "" }], jobs: { a: { run: "x", size: "huge" } } },
340340 Bad: { on: [], jobs: {} },
341341 s: { on: "green", only: "shared", jobs: { "x y": { uses: "deploy", worker: "w", secrets: ["token"] } } },
342342 t: { jobs: { a: { run: "x" } } },
@@ -344,7 +344,7 @@
344344 }),
345345 );
346346 has(ps, "defaults", /both image and dockerfile/);
347− has(ps, "pipelines.p.on[1]", /must be one of publish, draft, green, land, hand/);
347+ has(ps, "pipelines.p.on[1]", /must be one of push, draft, green, land, hand/);
348348 has(ps, "pipelines.p.on[2]", /every/);
349349 has(ps, "pipelines.p.jobs.a.size", /must be one of small, standard, large, not "huge"/);
350350 has(ps, "pipelines.Bad", /isn't a usable name/);
@@ -364,7 +364,7 @@
364364});
365365
366366describe("abso.json's shorthand for a ci pipeline", () => {
367− it("reads the project's own abso.json as ci: setup, then check, both required, on publish", async () => {
367+ it("reads the project's own abso.json as ci: setup, then check, both required, on push", async () => {
368368 const { readFileSync } = await import("node:fs");
369369 const text = readFileSync(new URL("../../../abso.json", import.meta.url), "utf8");
370370 const own = JSON.parse(text);
--- a/src/pipeline/test/plan.test.ts
+++ b/src/pipeline/test/plan.test.ts
@@ -7,7 +7,7 @@
77
88const FILE = `pipelines:
99 ci:
10− on: [publish, draft]
10+ on: [push, draft]
1111 jobs:
1212 setup: { run: npm ci }
1313 lint: { needs: [setup], run: npx biome ci . }
@@ -40,8 +40,8 @@
4040 assert.deepEqual(p.start[0]!.waves, [["setup"], ["lint", "test"], ["bundle"]]);
4141 assert.deepEqual(p.start[0]!.required, ["lint", "test"]);
4242 assert.deepEqual(p.skip, [
43− { name: "release", why: "doesn't run on publish" },
44− { name: "nightly", why: "doesn't run on publish" },
43+ { name: "release", why: "doesn't run on push" },
44+ { name: "nightly", why: "doesn't run on push" },
4545 ]);
4646 });
4747