From 758ed119f6c73af5191cce529445743aecd6fd1c Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Thu, 17 Sep 2026 02:16:12 +0000 Subject: [PATCH 1/2] fix: run the Windows release checks with native paths --- .github/workflows/release.yml | 8 ++++---- scripts/run-unit-tests.mjs | 2 +- test/desktop-shim.test.js | 9 +++++++-- test/test-runner.test.js | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54d19a8..a8ec772 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,10 +52,10 @@ jobs: package_files=("$package_root"/*.tgz) test -f "${package_files[0]}" test "${#package_files[@]}" -eq 1 - npm install --global --prefix "$install_root" "${package_files[0]}" - "$install_root/bin/gbot" --help - "$install_root/bin/grok-bot" --help - "$install_root/bin/gbot-install" --help + npm install --prefix "$install_root" "${package_files[0]}" + npm exec --prefix "$install_root" --no -- gbot --help + npm exec --prefix "$install_root" --no -- grok-bot --help + npm exec --prefix "$install_root" --no -- gbot-install --help - name: Create release pull request or publish id: changesets diff --git a/scripts/run-unit-tests.mjs b/scripts/run-unit-tests.mjs index 2da92fd..b543b5f 100644 --- a/scripts/run-unit-tests.mjs +++ b/scripts/run-unit-tests.mjs @@ -26,7 +26,7 @@ const files = readdirSync(dir) .sort() .map((name) => join("test", name)) .filter((name) => { - if (process.platform === "win32" && skipOnWindows.has(name)) { + if (process.platform === "win32" && skipOnWindows.has(name.replaceAll("\\", "/"))) { console.error(`skip ${name}: Unix sockets and Codex routes are unsupported on win32`); return false; } diff --git a/test/desktop-shim.test.js b/test/desktop-shim.test.js index f19e91c..4d2fb02 100644 --- a/test/desktop-shim.test.js +++ b/test/desktop-shim.test.js @@ -187,7 +187,9 @@ test("install then uninstall round-trips in a scratch Codex home (no live Deskto assert.equal(gone.installed, false); }); -test("darwin install writes the LaunchAgent and drives it through the runner", () => { +test("darwin install writes the LaunchAgent and drives it through the runner", { + skip: process.platform === "win32" && "Unix executable bits are unsupported on Windows", +}, () => { const home = mkdtempSync(join(tmpdir(), "gbot-shim-mac-home-")); const codexHome = mkdtempSync(join(tmpdir(), "gbot-shim-mac-codex-")); const env = { CODEX_HOME: codexHome, HOME: home }; @@ -1060,7 +1062,9 @@ test("uninstall reports only paths that existed before delete", () => { assert.deepEqual(empty.removed, [], "nothing installed, nothing reported removed"); }); -test("linux status quotes the export path for spaces", () => { +test("linux status quotes the export path for spaces", { + skip: process.platform === "win32" && "Unix executable bits are unsupported on Windows", +}, () => { const home = mkdtempSync(join(tmpdir(), "gbot-shim-quote-home-")); const codexHome = mkdtempSync(join(tmpdir(), "gbot-shim-quote-codex-")); const installed = installDesktopShim({ @@ -1157,6 +1161,7 @@ ${script} test("wrapper exits without fallback while Desktop leaves stdout unread", { skip: !canRunShellBridge && "needs bash + python3", + skip: !canRunShellBridge && "needs bash + python3", }, async () => { const dir = mkdtempSync(join(tmpdir(), "gbot-shim-backpressure-")); const payload = Buffer.from(JSON.stringify({ method: "notice", params: { text: "x".repeat(2_000_000) } })); diff --git a/test/test-runner.test.js b/test/test-runner.test.js index 12fc81c..0576332 100644 --- a/test/test-runner.test.js +++ b/test/test-runner.test.js @@ -27,6 +27,7 @@ console.log("bootstrap-policy-verified"); const childEnv = { ...process.env, GROK_BOT_TEST: inherited, NODE_ENV: "production" }; delete childEnv.NODE_TEST_CONTEXT; const result = spawnSync(process.platform === "win32" ? "npm.cmd" : "npm", ["run", "test:unit"], { + shell: process.platform === "win32", cwd: fixture, env: childEnv, encoding: "utf8", From d0d6f0af41176671cc4a34179af96488cc9e3f87 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Thu, 17 Sep 2026 02:16:32 +0000 Subject: [PATCH 2/2] test: retain the existing shell bridge guard --- test/desktop-shim.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/desktop-shim.test.js b/test/desktop-shim.test.js index 4d2fb02..a844671 100644 --- a/test/desktop-shim.test.js +++ b/test/desktop-shim.test.js @@ -1161,7 +1161,6 @@ ${script} test("wrapper exits without fallback while Desktop leaves stdout unread", { skip: !canRunShellBridge && "needs bash + python3", - skip: !canRunShellBridge && "needs bash + python3", }, async () => { const dir = mkdtempSync(join(tmpdir(), "gbot-shim-backpressure-")); const payload = Buffer.from(JSON.stringify({ method: "notice", params: { text: "x".repeat(2_000_000) } }));