From ca3884039b68d6023d7d5213cd69abe1e98b4977 Mon Sep 17 00:00:00 2001 From: can1357 Date: Wed, 5 Aug 2026 21:56:24 +0200 Subject: [PATCH] test(session): canonicalize hashed migration cwd --- .../test/session-manager/file-operations.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/test/session-manager/file-operations.test.ts b/packages/coding-agent/test/session-manager/file-operations.test.ts index 92d3540dc..362cb02f5 100644 --- a/packages/coding-agent/test/session-manager/file-operations.test.ts +++ b/packages/coding-agent/test/session-manager/file-operations.test.ts @@ -6,7 +6,14 @@ import type { FileEntry, SessionHeader } from "@oh-my-pi/pi-coding-agent/session import { findMostRecentSession, resolveResumableSession } from "@oh-my-pi/pi-coding-agent/session/session-listing"; import { loadEntriesFromFile } from "@oh-my-pi/pi-coding-agent/session/session-loader"; import { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager"; -import { getConfigRootDir, getSessionsDir, removeSyncWithRetries, Snowflake, setAgentDir } from "@oh-my-pi/pi-utils"; +import { + getConfigRootDir, + getSessionsDir, + removeSyncWithRetries, + resolveEquivalentPath, + Snowflake, + setAgentDir, +} from "@oh-my-pi/pi-utils"; describe("loadEntriesFromFile", () => { let tempDir: string; @@ -223,7 +230,7 @@ describe("SessionManager temp cwd session dirs", () => { fs.mkdirSync(tempCwd, { recursive: true }); // Reconstruct the 17.2.5-17.2.8 hashed dir name (reverted PR #7397). - const canonicalCwd = path.resolve(tempCwd); + const canonicalCwd = resolveEquivalentPath(path.resolve(tempCwd)); const normalized = canonicalCwd.replaceAll("\\", "/"); const readable = path .basename(canonicalCwd)