Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Make platform fixture faults observable on Windows

wyt34b38eab3256
diff --git a/test/main/features/local_access_policy.test.ts b/test/main/features/local_access_policy.test.ts
index 32bacd8b..5cef9cf5 100644
--- a/test/main/features/local_access_policy.test.ts
+++ b/test/main/features/local_access_policy.test.ts
@@ -387,7 +387,10 @@ describe('complete public material proof', () => {
if (fault === 'fstat') return fail();
const original = originalStat(fd);
const field = fault === 'changed-inode' ? 'ino' : fault === 'changed-device' ? 'dev' : 'size';
- return { ...original, [field]: Number(original[field]) + 1 };
+ // NTFS inode numbers can exceed Number.MAX_SAFE_INTEGER; adding one
+ // may leave the value unchanged and fail to inject the intended race.
+ const changed = Number(original[field]) === 0 ? 1 : 0;
+ return { ...original, [field]: changed };
}) as typeof fs.fstatSync);
syncBuiltinESMExports();
try {
diff --git a/test/main/features/local_agents/registry.test.ts b/test/main/features/local_agents/registry.test.ts
index cc3a1c86..2e627ee8 100644
--- a/test/main/features/local_agents/registry.test.ts
+++ b/test/main/features/local_agents/registry.test.ts
@@ -584,7 +584,9 @@ describe('local_agents/registry', () => {
it('discovers the official OpenCode install without shell PATH and preserves an explicit missing pin', async () => {
process.env.PATH = '';
const bin = writeMockCli(path.join(process.env.HOME!, '.opencode', 'bin', 'opencode'), MIN_VERSIONS.opencode);
- expect(await detectOne('opencode')).toMatchObject({ available: true, path: bin, version: MIN_VERSIONS.opencode });
+ const detected = await detectOne('opencode');
+ expect(detected).toMatchObject({ available: true, version: MIN_VERSIONS.opencode });
+ expect(isWindows ? detected.path?.toLowerCase() : detected.path).toBe(isWindows ? bin.toLowerCase() : bin);
process.env.ORKAS_OPENCODE_PATH = path.join(tmpDir, 'missing-pinned-opencode');
expect(await detectOne('opencode')).toMatchObject({ available: false, path: null, error: 'not_found' });
});