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
+6 -3
View File
@@ -130,9 +130,12 @@ test("delivery receipt closes the send/save crash window exactly once", async ()
harness.ctx,
);
assert.equal(harness.sent.length, 1);
const message = harness.sent[0]?.message as Record<string, unknown>;
assert.equal(message.customType, workflowNotificationType);
assert.match(String(message.content), /pi-workflow search is waiting/);
assert.equal(
(harness.sent[0]?.message as Record<string, unknown>).customType,
workflowNotificationType,
(message.details as Record<string, unknown>).runId,
"run-1",
);
const delivered = await store.loadRun("run-1");
assert.equal(delivered.deliveries[0]?.state, "sent");
@@ -262,7 +265,7 @@ test("terminal deliveries include the persisted report and settle once", async (
assert.equal(harness.sent.length, 1);
assert.match(
String((harness.sent[0]?.message as Record<string, unknown>).content),
/finished with status completed.*Report: \/state\/report.md/,
/pi-workflow search finished with status completed.*Report: \/state\/report.md/,
);
assert.equal((await store.loadRun("run-1")).deliveries[0]?.state, "sent");
});