The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): widen probe-budget fix to sibling boot-path probes
kshitijk4poor74f8e5987756
diff --git a/apps/desktop/electron/backend-probes.ts b/apps/desktop/electron/backend-probes.tsindex 6f5b0b43927..7133342141e 100644--- a/apps/desktop/electron/backend-probes.ts+++ b/apps/desktop/electron/backend-probes.ts@@ -92,6 +92,7 @@ function execProbeSync(command: string,args: string[],options: {+ cwd?: stringenv?: NodeJS.ProcessEnvstdio: 'ignore'timeout: number@@ -211,6 +212,7 @@ function verifyHermesCli(hermesCommand: string, opts?: { shell?: boolean }) {export {canImportHermesCli,DEFAULT_PROBE_TIMEOUT_MS,+ execProbeSync,hermesRuntimeImportProbe,PROBE_TIMEOUT_MS,resolveProbeTimeoutMs,diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.tsindex 80d77d4a34a..b8a5cc78834 100644--- a/apps/desktop/electron/main.ts+++ b/apps/desktop/electron/main.ts@@ -37,7 +37,7 @@ import { dashboardFallbackArgs, sourceDeclaresServe } from './backend-command'import { createBackendConnectionState } from './backend-connection-state'import { buildDesktopBackendEnv, normalizeHermesHomeRoot } from './backend-env'import { isReauthRequiredError, waitForHermesReady } from './backend-health'-import { canImportHermesCli, shouldTrustHermesOverride, verifyHermesCli } from './backend-probes'+import { canImportHermesCli, execProbeSync, PROBE_TIMEOUT_MS, shouldTrustHermesOverride, verifyHermesCli } from './backend-probes'import { waitForDashboardPortAnnouncement } from './backend-ready'import { shouldLatchBackendStartFailure, shouldLatchRemoteReauthFailure } from './backend-start-failure'import { detectRemoteDisplay, isWindowsBinaryPathInWsl, isWslEnvironment } from './bootstrap-platform'@@ -1886,10 +1886,16 @@ function backendSupportsServe(backend) {if (supported === null) {try {const prefix = backend.args && backend.args[0] === '-m' ? backend.args.slice(0, 2) : []- execFileSync(backend.command, [...prefix, 'serve', '--help'], {+ // Same cold-Windows Python-startup class as the runtime probes+ // (#61764/#72632/#72707): `serve --help` imports at least as much as+ // `hermes --version` (~10.5s measured cold), and a false negative here+ // is cached for the process lifetime, silently routing a modern+ // runtime through the legacy `dashboard` form. Share the probe budget+ // and its timeout-only retry instead of a thinner local bound.+ execProbeSync(backend.command, [...prefix, 'serve', '--help'], {cwd: backend.root || undefined,env: { ...process.env, HERMES_HOME, ...(backend.env || {}) },- timeout: 15000,+ timeout: PROBE_TIMEOUT_MS,stdio: 'ignore',windowsHide: true})@@ -3879,17 +3885,20 @@ function resolveHermesBackend(backendArgs) {// through to the install-script bootstrap if the optional probe times// out under load; the pinned backend is the only valid runtime there.if (shouldTrustHermesOverride(hermesOverride) || verifyHermesCli(hermesCommand, { shell: shellForProbe })) {- return (- unwrapWindowsVenvHermesCommand(hermesCommand, backendArgs) || {- label: `existing Hermes CLI at ${hermesCommand}`,- command: hermesCommand,- args: backendArgs,- bootstrap: false,- env: {},- kind: 'command',- shell: shellForProbe- }- )+ // `unwrapped` above already answered "is this a Windows venv shim?" —+ // it was null (not a shim, or its import probe failed). Do NOT re-run+ // unwrapWindowsVenvHermesCommand here: the second call repeats the+ // same un-memoized import probe, costing up to another full probe+ // timeout on the boot path for an answer we already have.+ return {+ label: `existing Hermes CLI at ${hermesCommand}`,+ command: hermesCommand,+ args: backendArgs,+ bootstrap: false,+ env: {},+ kind: 'command',+ shell: shellForProbe+ }}rememberLog(