Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(e2e): escalate to SIGKILL when the certificate probe hangs
muzimu217434e06f5d238
diff --git a/scripts/e2e-provider-client-certificate.mjs b/scripts/e2e-provider-client-certificate.mjsindex 2876c7479..f29cb1484 100644--- a/scripts/e2e-provider-client-certificate.mjs+++ b/scripts/e2e-provider-client-certificate.mjs@@ -29,13 +29,34 @@ try {output += chunk;process.stdout.write(chunk);});- const timer = setTimeout(() => child.kill(), 60_000);+ // A probe that cannot start must fail this step, not hold the job open.+ // SIGTERM alone is not enough: Electron can ignore it while a renderer is+ // mid-init, and the `close` event then never arrives, so the step waits out+ // the job's 30-minute budget and is cancelled with no failing step to read+ // (#1751 hit exactly this). Escalate to SIGKILL after a short grace period.+ let killedBy = null;+ const termTimer = setTimeout(() => {+ killedBy = "SIGTERM";+ child.kill("SIGTERM");+ }, 60_000);+ const killTimer = setTimeout(() => {+ killedBy = "SIGKILL";+ child.kill("SIGKILL");+ }, 65_000);try {const code = await new Promise((resolve, reject) => {child.once("error", reject);child.once("close", resolve);});+ assert.equal(+ killedBy,+ null,+ `provider client certificate E2E hung and was killed by ${killedBy} after ${killedBy === "SIGKILL" ? 65 : 60}s: ${output}`,+ );assert.equal(code, 0, output);assert.match(output, /provider client certificate E2E passed/);- } finally { clearTimeout(timer); }+ } finally {+ clearTimeout(termTimer);+ clearTimeout(killTimer);+ }} finally { await rm(temp, { recursive: true, force: true }); }