test(checkpoints): stabilize diff path on macOS CI by using workspaceDir for absolute paths (avoid /private/tmp vs /tmp mismatch)

This commit is contained in:
Hannes Rudolph 2025-08-27 17:43:08 -06:00
parent 5f5cdf1b46
commit d6bf409439

View file

@ -330,7 +330,8 @@ export abstract class ShadowCheckpointService extends EventEmitter {
this.log(`[${this.constructor.name}#getDiff] diffing ${to ? `${from}..${to}` : `${from}..HEAD`}`)
const { files } = to ? await this.git.diffSummary([`${from}..${to}`]) : await this.git.diffSummary([from])
const cwdPath = (await this.getShadowGitConfigWorktree(this.git)) || this.workspaceDir || ""
// Always use the provided workspaceDir to avoid symlink-induced path mismatches (e.g., /tmp vs /private/tmp)
const cwdPath = this.workspaceDir
for (const file of files) {
const relPath = file.file