feat(pi-workflow): add human-readable run labels

This commit is contained in:
jb
2026-08-25 21:22:08 -04:00
parent a1d0b1415c
commit 54a7921227
17 changed files with 385 additions and 52 deletions
+3 -4
View File
@@ -11,10 +11,7 @@ import { tmpdir } from "node:os";
import * as path from "node:path";
import test from "node:test";
import { DEFAULT_WORKFLOW_CONFIG, type WorkflowRun } from "./domain.ts";
import {
readVerifiedReportArtifact,
WorkflowStore,
} from "./store.ts";
import { readVerifiedReportArtifact, WorkflowStore } from "./store.ts";
async function withTempDir(run: (directory: string) => Promise<void>) {
const directory = await mkdtemp(path.join(tmpdir(), "pi-workflow-store-"));
@@ -141,6 +138,8 @@ test("terminal reports bound large persisted Decisions instead of blocking compl
await store.createRun(run);
const report = await store.saveReport(run);
const contents = await readFile(report.path, "utf8");
assert.match(contents, /^# pi-workflow build-feature/m);
assert.match(contents, /- Run ID: run-1/);
assert.match(contents, /\[truncated\]/);
assert.match(contents, /report truncated to 1 MiB/);
assert.ok(Buffer.byteLength(contents, "utf8") <= 1024 * 1024);