Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

fix: pin the engine signing identifier; launch check runs on macOS bash

ogsamrat19ccba671f34
diff --git a/apps/desktop/electron/build-variant.mjs b/apps/desktop/electron/build-variant.mjs
index d6dcb509..b6667ca1 100644
--- a/apps/desktop/electron/build-variant.mjs
+++ b/apps/desktop/electron/build-variant.mjs
@@ -67,7 +67,7 @@ function sha256File(file) {
/** The Apple Developer ID team that signs the app and its bundled engine. */
export const ENGINE_SIGNING_TEAM = "2KFG4BXC8K";
/** codesign requirement: a Developer ID certificate (Apple anchor) of that team. */
-export const ENGINE_SIGNING_REQUIREMENT = `anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;
+export const ENGINE_SIGNING_REQUIREMENT = `identifier "ai.omnirush.desktop" and anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;
/**
* macOS: whether `file` carries a valid signature by this app's team. Signing and
diff --git a/apps/desktop/electron/build-variant.test.mjs b/apps/desktop/electron/build-variant.test.mjs
index 4e482ec5..962c173e 100644
--- a/apps/desktop/electron/build-variant.test.mjs
+++ b/apps/desktop/electron/build-variant.test.mjs
@@ -122,7 +122,7 @@ test("macOS: signing changes the engine after its sha256 is recorded; this team'
const stat = () => ({ size: 1, mtimeMs: 1 });
assert.equal(engineSignedByTeam("/x/opencode", { platform: "darwin", run, stat }), true);
assert.deepEqual(calls[0], ["/usr/bin/codesign", "--verify", "--strict", `-R=${ENGINE_SIGNING_REQUIREMENT}`, "/x/opencode"]);
- assert.match(ENGINE_SIGNING_REQUIREMENT, /anchor apple generic and certificate leaf\[subject\.OU\] = "2KFG4BXC8K"/);
+ assert.match(ENGINE_SIGNING_REQUIREMENT, /^identifier "ai\.omnirush\.desktop" and anchor apple generic and certificate leaf\[subject\.OU\] = "2KFG4BXC8K"$/);
assert.equal(engineSignedByTeam("/x/other", { platform: "darwin", run: () => ({ status: 1 }), stat }), false);
// A pass is cached (same file, size, time): codesign is not asked again.
assert.equal(engineSignedByTeam("/x/opencode", { platform: "darwin", run, stat }), true);
diff --git a/apps/desktop/scripts/launch-check.sh b/apps/desktop/scripts/launch-check.sh
index 9842a2b7..c74732dd 100755
--- a/apps/desktop/scripts/launch-check.sh
+++ b/apps/desktop/scripts/launch-check.sh
@@ -19,7 +19,7 @@ trap cleanup EXIT
# Linux CI and test boxes have no setuid sandbox helper.
extra=(); [ "$(uname -s)" = Linux ] && extra=(--no-sandbox)
OMNIRUSH_ELECTRON_USERDATA="$work/profile" OMNIRUSH_DATA_DIR="$work/data" OMNIRUSH_AUTO_UPDATE=0 \
- OMNIRUSH_POSTHOG_HOST=http://127.0.0.1:9 "$exe" "${extra[@]}" > "$log" 2>&1 &
+ OMNIRUSH_POSTHOG_HOST=http://127.0.0.1:9 "$exe" ${extra[@]+"${extra[@]}"} > "$log" 2>&1 &
app_pid=$!
for _ in $(seq "$limit"); do
if grep -qE "engineStart failed|only runs the engine it ships with|bundled engine was changed" "$log"; then
diff --git a/apps/server/src/release-guard.ts b/apps/server/src/release-guard.ts
index 076660c0..5af0f9d9 100644
--- a/apps/server/src/release-guard.ts
+++ b/apps/server/src/release-guard.ts
@@ -81,7 +81,7 @@ async function fileSha256(path: string): Promise<string> {
/** The Apple Developer ID team that signs the app and its bundled engine (electron/build-variant.mjs). */
export const ENGINE_SIGNING_TEAM = "2KFG4BXC8K";
-export const ENGINE_SIGNING_REQUIREMENT = `anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;
+export const ENGINE_SIGNING_REQUIREMENT = `identifier "ai.omnirush.desktop" and anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;
/**
* macOS: whether `file` carries a valid signature by this app's team. Signing and