Skip to content

The agent that grows with you

fix(nix): port main's pinned-backend Desktop check to the attach model

teknium1493bb4397d3e
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 65a967b35ff..7f460d8e734 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -4797,6 +4797,7 @@ async function ensureRuntime(
assertStillOwned()
if (!backend.bootstrap) {
+ rememberLog(`[backend] using ${backend.label}`)
await advanceBootProgress('runtime.external', `Using ${backend.label}`, 32)
return backend
@@ -12093,6 +12094,7 @@ async function startHermes(requestedProfile?: string) {
backendConnectionState.assertCurrentAttempt(connectionAttempt)
backendStartFailure = null
+ rememberLog('[backend] Hermes gateway is ready')
updateBootProgress({ phase: 'backend.ready', message: 'Hermes gateway is ready', progress: 94, running: true, error: null })
bootstrapRepairAttempt = 0
diff --git a/nix/tests/desktop-backend.py b/nix/tests/desktop-backend.py
index 6d0c6072903..904dbde9b13 100644
--- a/nix/tests/desktop-backend.py
+++ b/nix/tests/desktop-backend.py
@@ -79,8 +79,10 @@ with tempfile.TemporaryDirectory(prefix="hermes-desktop-backend-") as temporary:
output += desktop_log.read_text()
assert "WRONG_BACKEND_SELECTED" not in output, output
assert child.poll() is None, output
- if "HERMES_BACKEND_READY port=" in output:
- assert f"existing Hermes CLI at {expected}" in output, output
+ # Desktop attaches to `hermes gateway ensure` (the daemon serves the dashboard), so
+ # readiness is Desktop's own attach line, not a spawned `hermes serve` sentinel.
+ if "[backend] Hermes gateway is ready" in output:
+ assert f"[backend] using existing Hermes CLI at {expected}" in output, output
print("PASS: packaged desktop selected its pinned backend over the mutable install")
break
time.sleep(0.1)