Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/codex/scripts/lib/broker-endpoint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function createBrokerEndpoint(sessionDir, platform = process.platform) {
return `pipe:\\\\.\\pipe\\${pipeName}`;
}

return `unix:${path.join(sessionDir, "broker.sock")}`;
return `unix:${path.posix.join(sessionDir, "broker.sock")}`;
}

export function parseBrokerEndpoint(endpoint) {
Expand Down
12 changes: 10 additions & 2 deletions tests/git.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,21 @@ test("collectReviewContext skips untracked directories in working tree review",
assert.match(context.content, /### \.claude\/worktrees\/agent-test\/\n\(skipped: directory\)/);
});

test("collectReviewContext skips broken untracked symlinks instead of crashing", () => {
test("collectReviewContext skips broken untracked symlinks instead of crashing", (t) => {
const cwd = makeTempDir();
initGitRepo(cwd);
fs.writeFileSync(path.join(cwd, "app.js"), "console.log('v1');\n");
run("git", ["add", "app.js"], { cwd });
run("git", ["commit", "-m", "init"], { cwd });
fs.symlinkSync("missing-target", path.join(cwd, "broken-link"));
try {
fs.symlinkSync("missing-target", path.join(cwd, "broken-link"));
} catch (err) {
if (process.platform === "win32" && err.code === "EPERM") {
t.skip("Skipping symlink test: Windows requires Developer Mode or Administrator privileges to create symlinks.");
return;
}
throw err;
}

const target = resolveReviewTarget(cwd, {});
const context = collectReviewContext(cwd, target);
Expand Down
6 changes: 5 additions & 1 deletion tests/runtime.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ test("setup reports ready when fake codex is installed and authenticated", () =>
test("setup is ready without npm when Codex is already installed and authenticated", () => {
const binDir = makeTempDir();
installFakeCodex(binDir);
fs.symlinkSync(process.execPath, path.join(binDir, "node"));
if (process.platform === "win32") {
fs.writeFileSync(path.join(binDir, "node.cmd"), `@echo off\n"${process.execPath}" %*\n`);
} else {
fs.symlinkSync(process.execPath, path.join(binDir, "node"));
}

const result = run("node", [SCRIPT, "setup", "--json"], {
cwd: ROOT,
Expand Down