Skip to content

fix(agent-manager): treat only ESRCH as definitive process death - #164

Merged
codeaholicguy merged 1 commit into
mainfrom
feature-agent-registry-eperm-prune
Aug 14, 2026
Merged

fix(agent-manager): treat only ESRCH as definitive process death#164
codeaholicguy merged 1 commit into
mainfrom
feature-agent-registry-eperm-prune

Conversation

@codeaholicguy

Copy link
Copy Markdown
Owner

Summary

  • treat only ESRCH from process.kill(pid, 0) as definitive process death
  • preserve registry custom names and tmux metadata on EPERM and indeterminate probe failures
  • keep register and rename name-conflict handling conservative through the shared liveness predicate
  • add deterministic regressions for EPERM, ESRCH, unknown failures, conflict behavior, and two refresh cycles

Validation

  • npm test --workspace @ai-devkit/agent-manager -- AgentRegistry.test.ts AgentManager.test.ts (71 passed)
  • npm test --workspace @ai-devkit/agent-manager (518 passed)
  • npm test --workspace ai-devkit -- agent.service.test.ts agent.test.ts (104 passed)
  • npm run typecheck --workspace @ai-devkit/agent-manager
  • npm run lint --workspace @ai-devkit/agent-manager
  • npm run build --workspace @ai-devkit/agent-manager
  • npx ai-devkit@latest lint
  • mutation gate: old catch-all-dead behavior failed 6 targeted tests; restored fix passed all 71

Risks

  • Conservative unknown-probe handling can retain a stale row when the platform never returns ESRCH. This is intentional to avoid destructive pruning without definitive death evidence.
  • Existing API and SQLite schema are unchanged.

@codeaholicguy codeaholicguy changed the title fix(agent-manager): preserve registry entries on EPERM fix(agent-manager): treat only ESRCH as definitive process death Aug 14, 2026
@codeaholicguy
codeaholicguy merged commit b3dd3b9 into main Aug 14, 2026
7 checks passed
@codeaholicguy
codeaholicguy deleted the feature-agent-registry-eperm-prune branch August 14, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant