Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): count workflows between phases #8749

Closedyashranaway(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/8749/headopened View on GitHub

Showing 2 changed files with 77 additions and 10 deletions.

x
0 of 2 viewed, 2 left
56 additions and 0 deletionspackages/client-runtime/src/state/subagentRuntime.test.tsModified
View file
@@ -426,6 +426,62 @@
expect(model.liveCount).toBe(0);
});
​
+ it("counts a running workflow coordinator between phases", () => {
+ const betweenPhases = fold([
+ activity("task.started", {
+ taskId: "wf-between-phases",
+ taskType: "local_workflow",
+ title: "review",
+ }),
+ activity("task.progress", {
+ taskId: "wf-between-phases:wf:0",
+ title: "review:a",
+ status: "completed",
+ parentAgentId: "wf-between-phases",
+ agentIndex: 0,
+ phaseIndex: 0,
+ }),
+ activity("task.completed", {
+ taskId: "wf-between-phases:wf:0",
+ status: "completed",
+ parentAgentId: "wf-between-phases",
+ }),
+ ]);
+​
+ const model = deriveAgentPanelModel({ agents: betweenPhases });
+​
+ expect(model.runningCount).toBe(1);
+ expect(model.settledCount).toBe(1);