Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(remote-agent): await startup handshake before proof assertions

xuzini-xzn80e8cf81efe8
diff --git a/apps/desktop/src/main/remote-agent/__tests__/guestHost.test.ts b/apps/desktop/src/main/remote-agent/__tests__/guestHost.test.ts
index cac812fe5e..684a38894c 100644
--- a/apps/desktop/src/main/remote-agent/__tests__/guestHost.test.ts
+++ b/apps/desktop/src/main/remote-agent/__tests__/guestHost.test.ts
@@ -515,11 +515,10 @@ describe('guest send options', () => {
const started: Started[] = [];
const host = makeHost(started);
await host.handle(controller, { op: 'open', runId: RUN_1, agentKind: 'claude-code', payload: { json: openPayload('task-1') } });
- await vi.waitFor(() => expect(started).toHaveLength(1));
- await vi.waitFor(async () => {
- const poll = await host.handle(controller, { op: 'poll', runs: [{ runId: RUN_1, cursor: 0 }], waitMs: 0 }) as { runs: Array<{ data?: string }> };
- expect(Buffer.from(poll.runs[0]?.data ?? '', 'base64').toString('utf8')).toContain('"started"');
- });
+ // Open acknowledges receipt before filesystem preparation; wait for startup,
+ // not the default 1s poll budget (Windows CI run 39835502754).
+ await waitForStarted(host, controller, RUN_1);
+ expect(started).toHaveLength(1);
await host.handle(controller, {
op: 'call',
runId: RUN_1,