Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

test(codex): match the installed-executable stub on Windows (#997)

quanticsoul477291ac5c119084
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 375bc9077..491f2468d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -150,7 +150,7 @@ jobs:
run: npm run check:boundaries
- name: Run focused onboarding tests
- run: node --test src/setupDoctor.test.mjs src/pinokioEnvironment.test.mjs src/pinokioPreflight.test.mjs src/pinokioLauncherContract.test.mjs src/keySetupHardening.test.mjs src/mapStartup.test.mjs src/hudSummaryResponse.test.mjs
+ run: node --test src/setupDoctor.test.mjs src/pinokioEnvironment.test.mjs src/pinokioPreflight.test.mjs src/pinokioLauncherContract.test.mjs src/keySetupHardening.test.mjs src/mapStartup.test.mjs src/hudSummaryResponse.test.mjs src/codexOauthRealtime.test.mjs
- name: Build production bundle
run: npm run build
diff --git a/src/codexOauthRealtime.test.mjs b/src/codexOauthRealtime.test.mjs
index 07e1a7dcc..4a577ac70 100644
--- a/src/codexOauthRealtime.test.mjs
+++ b/src/codexOauthRealtime.test.mjs
@@ -145,17 +145,20 @@ test('Codex OAuth reader enforces expiry margin and bounds tokens without exp by
test('Codex login resolves an installed executable before PATH and starts browser auth detached', async () => {
const checked = [];
+ // Built with path.join so the stub matches the resolver on Windows too,
+ // where the separators are backslashes.
+ const installed = path.join('/home/fixture', '.local', 'bin', 'codex');
assert.equal(
resolveCodexExecutable({
environment: {},
home: '/home/fixture',
access(candidate) {
checked.push(candidate);
- if (candidate.endsWith('/.local/bin/codex')) return;
+ if (candidate === installed) return;
throw new Error('missing');
},
}),
- path.join('/home/fixture', '.local', 'bin', 'codex'),
+ installed,
);
assert.equal(checked.length, 1);