mirror of https://github.com/garrytan/gstack.git
The Windows branch spawned tasklist per probe. Two failure modes: (1) every call flashed a console window from console-less daemons — the terminal-agent watchdog probes once per 60s tick for the whole session (#1952); (2) node spawnSync reports a timeout via result.error without throwing, so a slow tasklist (>3s under load) read as empty stdout -> "dead" for a LIVE agent. A false "dead" makes the watchdog clear the live agent record and respawn a duplicate around it, while killAgentByRecord consults the same false probe and skips the kill — the split-brain observed in #2151. process.kill(pid, 0) is a pure OpenProcess existence check on Windows under both Node and Bun (verified on Windows 11, node 22 / bun 1.3.14: alive -> true, dead -> false, PID 4 System -> EPERM -> true). Unifying on signal-0 also fixes the old Unix branch collapsing EPERM (exists-but-unsignallable) to "dead", as proposed in #1952. Tests: EPERM-implies-alive case, plus a static tripwire rejecting any tasklist invocation in error-handling.ts. Fixes #1952. Fixes the split-brain trigger in #2151. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||