Skip to content

The agent that grows with you

fix(desktop): bounded backend teardown on quit (main merge) + @dokterdok attribution mapping

teknium10d25ba667aee
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index b572a1306aa..41b250fcbe6 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -292,7 +292,7 @@ import { serializeJsonBody, setJsonRequestHeaders } from './oauth-net-request'
import { LEGACY_OAUTH_PARTITION, resolveOauthPartition } from './oauth-partition'
import { mintGatewayWsTicket as mintOauthGatewayWsTicket, requestWithOauthFallback } from './oauth-rest-request'
import { wireOauthSessionResponse } from './oauth-session-response'
-import { createParentStartMarkerResolver, parentWatchdogEnv } from './parent-process-identity'
+import { createParentStartMarkerResolver } from './parent-process-identity'
import { registerPetOverlayIpc } from './pet-overlay-ipc'
import {
pendingNotice as pendingPluginCompatNotice,
@@ -12126,7 +12126,8 @@ const backendShutdown = createBackendShutdownCoordinator(async () => {
const primary = backendConnectionState.invalidate()
stopBackendChild(primary)
- await Promise.all([waitForBackendExit(primary), stopAllPoolBackends()])
+ // Bounded: a backend that ignores SIGTERM must not wedge app quit (main's 7 s teardown budget).
+ await waitForTeardown([localShutdown, waitForBackendExit(primary), stopAllPoolBackends()], 7_000)
})
const quitTeardown = createQuitTeardownCoordinator(() => app.quit())
diff --git a/contributors/emails/[email protected] b/contributors/emails/[email protected]
new file mode 100644
index 00000000000..17fbdb5ef0c
--- /dev/null
+++ b/contributors/emails/[email protected]
@@ -0,0 +1 @@
+dokterdok