Skip to content

fix: server lifecycle recovery (EADDRINUSE + ghost server)#10

Merged
PresenceWith merged 4 commits intodevelopfrom
fix/server-lifecycle
Mar 11, 2026
Merged

fix: server lifecycle recovery (EADDRINUSE + ghost server)#10
PresenceWith merged 4 commits intodevelopfrom
fix/server-lifecycle

Conversation

@PresenceWith
Copy link
Copy Markdown
Owner

Summary

  • Health endpoint에 pid 추가하여 서버 identity 검증 가능하게 함
  • Electron EADDRINUSE 발생 시 기존 서버에 자동 연결하는 recovery 경로 추가
  • CLI에서 PID 파일 없을 때 포트 프로브로 기존 서버 발견 + PID 파일 자동 복구
  • runElectronregisterFile 추가하여 runDaemon과의 비대칭 해소

Test Plan

  • 67개 유닛 테스트 PASS
  • Scenario A: 정상 시작/종료 (regression 없음)
  • Scenario B: 고스트 서버 → 포트 프로브 발견 → PID 파일 복구 → 파일 등록
  • Scenario C: Electron EADDRINUSE recovery (수동 검증 필요)

Changes (~60 LOC, 3 files)

File Change
tools/server/server.ts health에 pid: process.pid 추가
tools/electron/main.ts EADDRINUSE catch → 기존 서버 연결 recovery
tools/cli/open.ts probePort() fallback + runElectron registerFile

🤖 Generated with Claude Code

PresenceWith and others added 4 commits March 12, 2026 02:12
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PresenceWith PresenceWith merged commit 7a747ca into develop Mar 11, 2026
1 check passed
@PresenceWith PresenceWith deleted the fix/server-lifecycle branch March 11, 2026 17:23
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