Skip to content

Commit 6fe3e4b

Browse files
committed
fix(vscode): make the success-path lane test non-vacuous
Assert the successful ToolResult actually lands on the tool item, and cover a still-spawned lane alongside the running one so the test can fail if the is_error gate regresses.
1 parent 653612e commit 6fe3e4b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

apps/vscode/test/event-handlers.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,22 @@ describe("Webview DynamicWorkflow per-agent lanes", () => {
231231
type: "SubagentStatus",
232232
payload: { parent_tool_call_id: "wf-1", agent_id: "agentA", status: "running" },
233233
});
234+
useChatStore.getState().processEvent({
235+
type: "SubagentStatus",
236+
payload: { parent_tool_call_id: "wf-1", agent_id: "agentB", status: "spawned" },
237+
});
234238

235239
useChatStore.getState().processEvent({
236240
type: "ToolResult",
237241
payload: { tool_call_id: "wf-1", return_value: { is_error: false, output: "ok", message: "", display: [] } },
238242
});
239243

244+
expect(workflowToolItem().result).toMatchObject({ is_error: false });
240245
const status = workflowToolItem().subagent_status!;
241246
expect(status["agentA"]!.status).toBe("running");
242247
expect(status["agentA"]!.endedAt).toBeUndefined();
248+
expect(status["agentB"]!.status).toBe("spawned");
249+
expect(status["agentB"]!.endedAt).toBeUndefined();
243250
});
244251
});
245252

0 commit comments

Comments
 (0)