@@ -2056,7 +2056,7 @@ describe("ClaudeAdapterV2 attachments", () => {
20562056 yield* deliver;
20572057 const retried = offeredMessages.at(-1)!.message.content;
20582058 assert.notInclude(JSON.stringify(retried), '"type":"document"');
2059- assert.include(JSON.stringify(retried), documentPath);
2059+ assert.include(JSON.stringify(retried), JSON.stringify( documentPath).slice(1, -1) );
20602060 assert.isBelow(Buffer.byteLength(JSON.stringify(offeredMessages)), 32_000_000);
20612061 return;
20622062 }
@@ -2105,7 +2105,7 @@ describe("ClaudeAdapterV2 attachments", () => {
21052105 typeof sent === "string" ? [] : sent.filter((block) => block.type === "image"),
21062106 budget === "partial-images" ? 1 : 0,
21072107 );
2108- assert.include(JSON.stringify(sent), imagePath);
2108+ assert.include(JSON.stringify(sent), JSON.stringify( imagePath).slice(1, -1) );
21092109 yield* runtime.steerTurn({
21102110 threadId,
21112111 runId: RunId.make("run-claude-attachments"),
@@ -2124,7 +2124,7 @@ describe("ClaudeAdapterV2 attachments", () => {
21242124 : steered.filter((block) => block.type === "image"),
21252125 0,
21262126 );
2127- assert.include(JSON.stringify(steered), imagePath);
2127+ assert.include(JSON.stringify(steered), JSON.stringify( imagePath).slice(1, -1) );
21282128 assert.isBelow(
21292129 Buffer.byteLength(
21302130 JSON.stringify(offeredMessages.map((message) => message.message)),
@@ -2186,7 +2186,7 @@ describe("ClaudeAdapterV2 attachments", () => {
21862186 0,
21872187 budget,
21882188 );
2189- assert.include(JSON.stringify(sent), documentPath);
2189+ assert.include(JSON.stringify(sent), JSON.stringify( documentPath).slice(1, -1) );
21902190 return;
21912191 }
21922192 if (!resumed) {
@@ -2399,7 +2399,7 @@ describe("ClaudeAdapterV2 attachments", () => {
23992399 );
24002400 if (scenario === "text-only")
24012401 assert.equal(sent, ultrathink ? "Ultrathink:\nContinue." : "Continue.");
2402- else assert.include(JSON.stringify(sent), documentPath);
2402+ else assert.include(JSON.stringify(sent), JSON.stringify( documentPath).slice(1, -1) );
24032403 }
24042404 }).pipe(
24052405 Effect.provide(
@@ -4459,8 +4459,8 @@ describe("ClaudeAdapterV2 background wake turns", () => {
44594459 "false",
44604460 );
44614461
4462- // Claude Code keeps the local file at the repository root, the main checkout's root in a
4463- // worktree, and that file beats the user's settings .
4462+ // POSIX resolves local settings at the repository root; Windows uses cwd.
4463+ // Local settings beat user settings wherever they are found .
44644464 const repo = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-claude-repo-" });
44654465 const worktree = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-claude-wt-" });
44664466 const worktreeGitDir = path.join(repo, ".git", "worktrees", "wt");
@@ -4478,11 +4478,23 @@ describe("ClaudeAdapterV2 background wake turns", () => {
44784478 `{"env":{"ENABLE_TOOL_SEARCH":"${value}"}}`,
44794479 );
44804480 const userAuto = '{"env":{"ENABLE_TOOL_SEARCH":"auto"}}';
4481+ const platform = yield* HostProcess.Platform;
44814482 yield* rootLocal("auto");
4482- assert.equal(yield* openedToolSearch("{}", worktree), "true");
4483+ assert.equal(yield* openedToolSearch("{}", repo), "true");
4484+ assert.equal(
4485+ yield* openedToolSearch("{}", worktree),
4486+ platform === "win32" ? undefined : "true",
4487+ );
44834488 yield* rootLocal("false");
4484- assert.isUndefined(yield* openedToolSearch(userAuto, worktree));
4485- assert.isUndefined(yield* openedToolSearch(userAuto, path.join(repo, "packages", "app")));
4489+ assert.isUndefined(yield* openedToolSearch(userAuto, repo));
4490+ assert.equal(
4491+ yield* openedToolSearch(userAuto, worktree),
4492+ platform === "win32" ? "true" : undefined,
4493+ );
4494+ assert.equal(
4495+ yield* openedToolSearch(userAuto, path.join(repo, "packages", "app")),
4496+ platform === "win32" ? "true" : undefined,
4497+ );
44864498
44874499 // Project settings beat user settings, and the process env applies only when no file sets it.
44884500 const project = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-claude-project-" });
0 commit comments