mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
Detect and terminate orphaned Paperclip-owned Node-family runtime processes that linger across worktree-local dev restarts and hold embedded Postgres connections (the "too many clients" failure mode). - local-service-supervisor: ps + /proc snapshot scanning, ownership evidence via allowlisted env markers or known Paperclip entrypoints, cwd/command-line containment under repo/worktree/instance roots, skipping the current process group and registered runtime services. - index.ts: conservative pre-DB-startup cleanup hook (embedded PG only), gated by PAPERCLIP_STALE_RUNTIME_CLEANUP. - workspace-runtime: cleanup during startup reconciliation + env markers on spawned runtime services. - dev-runner: PAPERCLIP_MANAGED_RUNTIME / service-key env markers. - doc/DEVELOPING.md: document the startup repair path. - new server/src/__tests__/local-service-supervisor.test.ts (8 cases). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: Paperclip <noreply@paperclip.ing>