taskplane 0.30.4 → 0.30.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -236,8 +236,13 @@ export function isProcessAlive(pid: number): boolean {
236
236
  try {
237
237
  process.kill(pid, 0);
238
238
  return true;
239
- } catch {
240
- return false;
239
+ } catch (err: unknown) {
240
+ // #631: only a confirmed "no such process" means dead. EPERM means the
241
+ // process EXISTS but we lack permission to signal it; any other probe
242
+ // error is unknown. Safety gates (engine liveness, worker reconciliation)
243
+ // must fail closed, so unknown → alive.
244
+ const code = (err as { code?: string } | null)?.code;
245
+ return code !== "ESRCH";
241
246
  }
242
247
  }
243
248