Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): stop counting a workflow coordinator as a working agent #6672

MergedRishet11(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/6672/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 45 additions and 8 deletions.

x
0 of 2 viewed, 2 left
39 additions and 3 deletionspackages/client-runtime/src/state/subagentRuntime.test.tsModified
View file
@@ -383,13 +383,49 @@
it("counts idle deliberately and waiting as active", () => {
const model = deriveAgentPanelModel({ agents: roster });
expect(model.idleCount).toBe(1);
- // wf-1 coordinator + member 1 running.
- expect(model.runningCount).toBeGreaterThanOrEqual(1);
+ // Member 1 is running; the wf-1 coordinator is a container, not a worker.
+ expect(model.runningCount).toBe(1);
+ // Every agent lands in exactly one bucket, except coordinators that stand
+ // in for their members.
expect(model.idleCount + model.runningCount + model.waitingCount + model.settledCount).toBe(
- roster.length,
+ roster.length - 1,
});
​
+ it("omits a workflow coordinator from the working-agent count", () => {
+ const model = deriveAgentPanelModel({ agents: roster });
+ // One member still running plus one idle direct spawn. The coordinator
+ // reports running for the whole workflow and must not inflate the banner.
+ expect(model.liveCount).toBe(1);
+ });
+​
+ it("omits a finished workflow coordinator from the settled count", () => {
+ const finished = fold([
+ activity("task.started", { taskId: "wf-2", taskType: "local_workflow", title: "sweep" }),
+ activity("task.progress", {
+ taskId: "wf-2:wf:0",
+ title: "sweep:a",
+ status: "completed",