Skip to content

Commit fc3e983

Browse files
Cobb04codex
andcommitted
test(dsh): handle Windows cwd path aliases
Compare explicit-blank DSH home resolution with the spawned process's own cwd so equivalent Windows 8.3 and long-name path spellings do not create a false failure. Addresses the Windows CI portability receipt for Story #101 using docs/specs/2026-08-23-101-deepseek-harness-configured-assets.md. Validated with the full DSH configured-assets suite on Node 22.20 and Node 24 plus the pinned native smoke. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
1 parent ff0fc86 commit fc3e983

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

test/agents/agent-customize-dsh.test.mjs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
chmod,
66
mkdir,
77
mkdtemp,
8-
realpath,
98
rm,
109
symlink,
1110
writeFile,
@@ -102,7 +101,7 @@ function probeDshHome({ workspace, cwd, syntheticHome, envDshHome, explicitDshHo
102101
const script = [
103102
`const module = await import(${JSON.stringify(pathToFileURL(PROVIDER_PATH).href)});`,
104103
`const result = await module.collectDshCustomizeInventory(${JSON.stringify(options)});`,
105-
"process.stdout.write(JSON.stringify({ dshHome: result.dshHome }));",
104+
"process.stdout.write(JSON.stringify({ dshHome: result.dshHome, cwd: process.cwd() }));",
106105
].join("\n");
107106
const env = {
108107
...process.env,
@@ -116,7 +115,7 @@ function probeDshHome({ workspace, cwd, syntheticHome, envDshHome, explicitDshHo
116115
env,
117116
});
118117
assert.equal(result.status, 0, result.stderr);
119-
return JSON.parse(result.stdout).dshHome;
118+
return JSON.parse(result.stdout);
120119
}
121120

122121
function itemByName(items, name) {
@@ -453,13 +452,13 @@ test("DSH home normalization matches native blank-environment and tilde semantic
453452

454453
for (const envDshHome of ["", " "]) {
455454
assert.equal(
456-
probeDshHome({ workspace, cwd: workspace, syntheticHome, envDshHome }),
455+
probeDshHome({ workspace, cwd: workspace, syntheticHome, envDshHome }).dshHome,
457456
path.join(syntheticHome, ".dsh"),
458457
);
459458
}
460459
for (const envDshHome of ["~/dsh-test", "~\\dsh-test"]) {
461460
assert.equal(
462-
probeDshHome({ workspace, cwd: workspace, syntheticHome, envDshHome }),
461+
probeDshHome({ workspace, cwd: workspace, syntheticHome, envDshHome }).dshHome,
463462
path.join(syntheticHome, "dsh-test"),
464463
);
465464
}
@@ -470,19 +469,17 @@ test("DSH home normalization matches native blank-environment and tilde semantic
470469
syntheticHome,
471470
envDshHome: path.join(root, "environment-home"),
472471
explicitDshHome: "~\\dsh-test",
473-
}),
472+
}).dshHome,
474473
path.join(syntheticHome, "dsh-test"),
475474
);
476-
assert.equal(
477-
probeDshHome({
478-
workspace,
479-
cwd: workspace,
480-
syntheticHome,
481-
envDshHome: path.join(root, "environment-home"),
482-
explicitDshHome: "",
483-
}),
484-
await realpath(workspace),
485-
);
475+
const explicitBlank = probeDshHome({
476+
workspace,
477+
cwd: workspace,
478+
syntheticHome,
479+
envDshHome: path.join(root, "environment-home"),
480+
explicitDshHome: "",
481+
});
482+
assert.equal(explicitBlank.dshHome, explicitBlank.cwd);
486483
});
487484
});
488485

0 commit comments

Comments
 (0)