Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

test: target 3.4.3 in updater checks

ogsamrat1ae4bea64573
diff --git a/.github/workflows/build-electron-desktop.yml b/.github/workflows/build-electron-desktop.yml
index 5e68efdf..69bbb358 100644
--- a/.github/workflows/build-electron-desktop.yml
+++ b/.github/workflows/build-electron-desktop.yml
@@ -10,7 +10,7 @@ on:
next_version:
description: "Version the updater end-to-end build is stamped with (above every published release)"
type: string
- default: "3.4.2"
+ default: "3.4.3"
push:
branches:
- electron-notary-test
@@ -203,6 +203,7 @@ jobs:
- { from: "3.3.8", label: next, feed: local }
- { from: "3.4.0", label: next, feed: local }
- { from: "3.4.1", label: next, feed: local }
+ - { from: "3.4.2", label: next, feed: local }
# The public feed as it is now (whatever release is marked Latest).
- { from: "3.3.8", label: public-latest, feed: public }
# The dead end: 3.3.8's own manifest as the feed.
@@ -245,14 +246,20 @@ jobs:
node scripts/release/windows-updater-e2e.mjs --from "$FROM" --expect none --feed same ;;
esac
+ - name: Collect app logs
+ if: always()
+ shell: bash
+ run: |
+ mkdir -p updater-e2e/app-logs
+ cp -r "$APPDATA/ai.omnirush.desktop/logs/." updater-e2e/app-logs/ 2>/dev/null || true
+ rm -f updater-e2e/*.exe
+
- name: Upload app logs
if: always()
uses: actions/upload-artifact@v4
with:
name: updater-e2e-logs-${{ matrix.from }}-${{ matrix.label }}
- path: |
- ${{ runner.temp }}/updater-e2e/*.log
- ~/AppData/Roaming/ai.omnirush.desktop/logs/**
+ path: updater-e2e/
if-no-files-found: ignore
electron-macos-notarization-smoke:
diff --git a/apps/desktop/electron/updater.test.mjs b/apps/desktop/electron/updater.test.mjs
index 4ecf6c3f..ab7e9449 100644
--- a/apps/desktop/electron/updater.test.mjs
+++ b/apps/desktop/electron/updater.test.mjs
@@ -1183,19 +1183,19 @@ describe("older builds and the release marked Latest", () => {
return harness;
}
- for (const installed of ["3.3.7", "3.3.8", "3.4.0", "3.4.1"]) {
- it(`${installed} downloads 3.4.2 from the Latest feed and installs it in place`, async () => {
- const { tempDir, handlers, feeds, downloaded, installs, updater } = await installedHarness(installed, "3.4.2");
+ for (const installed of ["3.3.7", "3.3.8", "3.4.0", "3.4.1", "3.4.2"]) {
+ it(`${installed} downloads 3.4.3 from the Latest feed and installs it in place`, async () => {
+ const { tempDir, handlers, feeds, downloaded, installs, updater } = await installedHarness(installed, "3.4.3");
try {
const checked = await handlers.get("omnirush:updater:check")(null, "stable");
assert.equal(checked.available, true);
- assert.equal(checked.latestVersion, "3.4.2");
+ assert.equal(checked.latestVersion, "3.4.3");
assert.equal(feeds.at(-1).url, STABLE_FEED, "the public feed follows the release marked Latest");
assert.equal(updater.allowDowngrade, false);
assert.deepEqual(await handlers.get("omnirush:updater:download")(), { ok: true, mode: "in-place" });
assert.deepEqual(await handlers.get("omnirush:updater:installAndRestart")(), { ok: true, mode: "in-place" });
- assert.deepEqual(downloaded, ["3.4.2"]);
- assert.deepEqual(installs, [{ version: "3.4.2", isSilent: false, isForceRunAfter: true }]);
+ assert.deepEqual(downloaded, ["3.4.3"]);
+ assert.deepEqual(installs, [{ version: "3.4.3", isSilent: false, isForceRunAfter: true }]);
} finally {
await rm(tempDir, { recursive: true, force: true });
}
diff --git a/scripts/release/windows-updater-e2e.mjs b/scripts/release/windows-updater-e2e.mjs
index 07e748b8..7eee045e 100644
--- a/scripts/release/windows-updater-e2e.mjs
+++ b/scripts/release/windows-updater-e2e.mjs
@@ -6,7 +6,7 @@
* required-update screen call (check, download, installAndRestart). Then waits
* for the installed version to change and checks the app data is still there.
*
- * node scripts/release/windows-updater-e2e.mjs --from 3.3.8 --expect 3.4.2 --feed <dir>
+ * node scripts/release/windows-updater-e2e.mjs --from 3.3.8 --expect 3.4.3 --feed <dir>
* node scripts/release/windows-updater-e2e.mjs --from 3.3.8 --expect 3.4.1 (the public Latest feed)
* node scripts/release/windows-updater-e2e.mjs --from 3.3.8 --expect none --feed <dir with 3.3.8's latest.yml>
*
@@ -32,7 +32,7 @@ function argValue(name) {
const from = argValue("--from");
const expect = argValue("--expect");
const feedDir = argValue("--feed");
-const workDir = path.resolve(argValue("--work") ?? path.join(process.env.RUNNER_TEMP ?? process.cwd(), "updater-e2e"));
+const workDir = path.resolve(argValue("--work") ?? path.join(process.cwd(), "updater-e2e"));
if (!from || !expect) {
console.error("Usage: windows-updater-e2e.mjs --from X.Y.Z --expect X.Y.Z|none [--feed dir] [--work dir]");
process.exit(2);
@@ -143,6 +143,24 @@ async function bridgePage(deadlineMs) {
throw new Error("the app window never exposed the updater bridge");
}
+function appProcesses() {
+ try {
+ const out = execFileSync("tasklist", ["/FI", "IMAGENAME eq OmniRush.ai.exe", "/FO", "CSV", "/NH"], { encoding: "utf8" });
+ return out.split(/\r?\n/).filter((line) => line.startsWith('"OmniRush.ai.exe"')).length;
+ } catch {
+ return 0;
+ }
+}
+
+async function waitForProcess(timeoutMs) {
+ const deadline = Date.now() + timeoutMs;
+ while (Date.now() < deadline) {
+ if (appProcesses() > 0) return true;
+ await sleep(2_000);
+ }
+ return false;
+}
+
function stopApp() {
try {
execFileSync("taskkill", ["/F", "/T", "/IM", "OmniRush.ai.exe"], { stdio: "ignore" });
@@ -219,7 +237,7 @@ async function main() {
log("executable version", version);
if (readFileSync(path.join(userData, "updater-e2e-marker.txt"), "utf8") !== "kept") throw new Error("app data was lost");
// The updated app relaunches by itself (quitAndInstall forceRunAfter).
- const relaunched = await bridgePage(180_000).then(() => true).catch(() => false);
+ const relaunched = await waitForProcess(120_000);
log("relaunched", relaunched);
stopApp();
feed?.server.close();