From 6f040f93b5eba9266006fe89c66ed99219bc1e4b Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 10:23:44 +0000 Subject: [PATCH] test(server): make fetch and ACP expectations match supported Git and timeline behavior Newer Git also creates origin/HEAD on the first fetch, so assert the authenticated branch result without excluding that valid additional ref. Main now qualifies ACP timeline identities by chunk kind while preserving the native messageId; update the plugin round-trip test to check that contract. --- packages/server/src/server/plugins/runtime.posix.test.ts | 3 ++- packages/server/src/server/workspace-git-fetch.test.ts | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/server/src/server/plugins/runtime.posix.test.ts b/packages/server/src/server/plugins/runtime.posix.test.ts index 30ada955a6..a777ff188e 100644 --- a/packages/server/src/server/plugins/runtime.posix.test.ts +++ b/packages/server/src/server/plugins/runtime.posix.test.ts @@ -651,7 +651,8 @@ lines.on("line", (line) => { type: "timeline.item", item: expect.objectContaining({ type: "assistant_message", - id: "assistant-1", + id: JSON.stringify(["agent_message_chunk", "assistant-1"]), + messageId: "assistant-1", text: "ACP says hi", }), }), diff --git a/packages/server/src/server/workspace-git-fetch.test.ts b/packages/server/src/server/workspace-git-fetch.test.ts index 641a172552..de9e69959e 100644 --- a/packages/server/src/server/workspace-git-fetch.test.ts +++ b/packages/server/src/server/workspace-git-fetch.test.ts @@ -233,9 +233,11 @@ test.skipIf(process.platform === "win32")( const result = await fetchWorkspaceGitRemote(cwd, { onRefSnapshot() {} }, run); expect(result.error).toBeNull(); - expect(result.changes).toEqual([ - { kind: "added", ref: "origin/main", afterOid: expectedOid }, - ]); + expect(result.changes).toContainEqual({ + kind: "added", + ref: "origin/main", + afterOid: expectedOid, + }); expect((await run(["rev-parse", "refs/remotes/origin/main"], { cwd })).stdout.trim()).toBe( expectedOid, );