{"version":301,"agent":"runsteps","message":"abso ci names the pipeline run for a project whose CI is its pipeline file (abso 719, 721).\ntest-byoc on 2026-10-16 had no abso.json and an abso.yml run going; abso ci said nothing to run. With stored pipeline runs, abso ci now says the newest run (abso ci <version>: that version's run) and the command that shows its jobs, and the built-in check's own nothing to run is no longer said as the project's CI. A red or any other skip stays as before. Reads pipelines next to ci; a server without it answers as before. client/test/ci-runs.test.ts; full check 1435 pass.","time":1792171494249,"timeIso":"2026-10-16T17:24:54.249Z","changes":2,"change":5069,"files":["client/src/ci.ts","client/test/ci-runs.test.ts"],"draft":null,"diff":[{"path":"client/src/ci.ts","added":50,"removed":4,"diff":"--- a/client/src/ci.ts\n+++ b/client/src/ci.ts\n@@ -80,6 +80,43 @@\n \treturn lines;\n }\n \n+/** A stored pipeline run as runRuns lists it: what the CI lines need of it. */\n+interface StoredRun {\n+\treadonly id: number;\n+\treadonly version: number;\n+\treadonly state: string;\n+\treadonly file: string;\n+}\n+\n+/** The stored pipeline runs, newest first, from the server's `pipelines` read; empty for anything else. */\n+export function storedRuns(raw: unknown): StoredRun[] {\n+\tconst runs = (raw as { runs?: unknown } | null)?.runs;\n+\tif (!Array.isArray(runs)) return [];\n+\treturn runs.filter(\n+\t\t(r): r is StoredRun =>\n+\t\t\ttypeof r === \"object\" &&\n+\t\t\tr !== null &&\n+\t\t\tNumber.isInteger((r as StoredRun).id) &&\n+\t\t\tNumber.isInteger((r as StoredRun).version) &&\n+\t\t\ttypeof (r as StoredRun).state === \"string\" &&\n+\t\t\ttypeof (r as StoredRun).file === \"string\",\n+\t);\n+}\n+\n+/** One stored run in a line, with where its jobs are. */\n+export function runLine(run: StoredRun): string {\n+\tconst how = run.state === \"planned\" ? \"was planned, not run,\" : run.state === \"running\" ? \"is running\" : run.state;\n+\treturn `Pipeline run ${run.id} (${run.file}) ${how} on version ${run.version}. abso pipeline runs ${run.id} shows its jobs.`;\n+}\n+\n+/**\n+ * Whether the built-in check (abso.json's setup, build and check) had nothing of its own to run. With stored runs, that is\n+ * about the built-in check, not the project's CI, so it isn't said as the project's (abso 719).\n+ */\n+export function builtInHasNothing(ci: CiStatus): boolean {\n+\treturn ci.red === null && ci.skipped?.reason.startsWith(\"nothing to run\") === true;\n+}\n+\n /** A shared version's mark in abso log; \"not checked\" says nothing, since most versions in a busy hour are covered by a newer one's job. */\n export function ciMarkText(mark: CiMark | undefined): string {\n \tswitch (mark) {\n@@ -143,11 +180,20 @@\n \t\t}\n \t\tif (typed !== undefined) {\n \t\t\tif (!/^\\d+$/.test(typed)) throw new UsageError(`a version is a number (got ${JSON.stringify(typed)})`);\n-\t\t\tconst job = await api.ci(Number(typed));\n-\t\t\treturn { text: jobText(job).join(\"\\n\"), json: { ...job } };\n+\t\t\tconst [job, raw] = await Promise.all([api.ci(Number(typed)), api.pipelineRuns().catch(() => null)]);\n+\t\t\tconst run = storedRuns(raw).find((r) => r.version === job.version);\n+\t\t\t// A version the built-in check never ran, with a pipeline run of its own: the run is its CI (abso 719).\n+\t\t\tconst text = run !== undefined && job.result === \"none\" ? [runLine(run)] : jobText(job);\n+\t\t\treturn { text: text.join(\"\\n\"), json: { ...job } };\n \t\t}\n-\t\tconst [ci, status] = await Promise.all([api.ci(), api.status()]);\n-\t\tconst lines = ciText(ci, status.version);\n+\t\tconst [ci, status, raw] = await Promise.all([api.ci(), api.status(), api.pipelineRuns().catch(() => null)]);\n+\t\tconst newest = storedRuns(raw)[0];\n+\t\tconst lines =\n+\t\t\tnewest === undefined\n+\t\t\t\t? ciText(ci, status.version)\n+\t\t\t\t: builtInHasNothing(ci)\n+\t\t\t\t\t? [runLine(newest)]\n+\t\t\t\t\t: [...ciText(ci, status.version), runLine(newest)];\n \t\treturn {\n \t\t\ttext: [\n \t\t\t\t`shared is at version ${status.version}.`,"},{"path":"client/test/ci-runs.test.ts","added":60,"removed":0,"diff":"--- /dev/null\n+++ b/client/test/ci-runs.test.ts\n@@ -0,0 +1,60 @@\n+// 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\n+// said \"nothing to run\" while its abso.yml's run 8 was going. The stored run is the project's CI there.\n+\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import { builtInHasNothing, runLine, storedRuns } from \"../src/ci.ts\";\n+\n+const base = { latest: null, checked: null, running: null, red: null, behind: null } as const;\n+const nothing = {\n+\tversion: 6,\n+\tfrom: 6,\n+\treason: \"nothing to run: no abso.json, and package.json has no test, typecheck or vite\",\n+\tat: \"2026-10-16T16:47:00.000Z\",\n+};\n+\n+test(\"the stored runs are read strictly, newest first as the server lists them\", () => {\n+\tconst runs = storedRuns({\n+\t\tblocked: null,\n+\t\truns: [\n+\t\t\t{ id: 8, version: 6, state: \"running\", file: \"abso.yml\", started: 1 },\n+\t\t\t{ id: \"7\", version: 6, state: \"failed\", file: \"abso.yml\" },\n+\t\t\t{ id: 6, version: 5, state: \"failed\", file: \"abso.yml\" },\n+\t\t],\n+\t});\n+\tassert.deepEqual(\n+\t\truns.map((r) => r.id),\n+\t\t[8, 6],\n+\t);\n+\tassert.deepEqual(storedRuns(null), []);\n+\tassert.deepEqual(storedRuns({ runs: \"no\" }), []);\n+});\n+\n+test(\"a run in a line names its file, its state and where its jobs are\", () => {\n+\tassert.equal(\n+\t\trunLine({ id: 8, version: 6, state: \"running\", file: \"abso.yml\" }),\n+\t\t\"Pipeline run 8 (abso.yml) is running on version 6. abso pipeline runs 8 shows its jobs.\",\n+\t);\n+\tassert.equal(\n+\t\trunLine({ id: 7, version: 6, state: \"failed\", file: \"abso.yml\" }),\n+\t\t\"Pipeline run 7 (abso.yml) failed on version 6. abso pipeline runs 7 shows its jobs.\",\n+\t);\n+\tassert.equal(\n+\t\trunLine({ id: 2, version: 1, state: \"planned\", file: \"abso.yml\" }),\n+\t\t\"Pipeline run 2 (abso.yml) was planned, not run, on version 1. abso pipeline runs 2 shows its jobs.\",\n+\t);\n+});\n+\n+test(\"only the built-in check's own nothing to run is set aside, never a red or another skip\", () => {\n+\tassert.equal(builtInHasNothing({ ...base, skipped: nothing }), true);\n+\tassert.equal(builtInHasNothing({ ...base, skipped: { ...nothing, reason: \"CI is off\" } }), false);\n+\tassert.equal(builtInHasNothing({ ...base }), false);\n+\tassert.equal(\n+\t\tbuiltInHasNothing({\n+\t\t\t...base,\n+\t\t\tred: { version: 6, agent: null, message: null, lastGood: null },\n+\t\t\tskipped: nothing,\n+\t\t}),\n+\t\tfalse,\n+\t);\n+});"}],"ci":null}