feat(pi-workflow): add human-readable run labels
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user