hotfix(critical): single-instance lock — SQLite race 방지 (v0.2.5) #23
Reference in New Issue
Block a user
Delete Branch "hotfix/single-instance-lock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Critical hotfix. 앱 아이콘 클릭 시 새 process 가 매번 뜨면서 트레이 아이콘 여러 개 + SQLite/AiWorker/HealthChecker 동시 접근 → 데이터 corruption 위험. dogfood 도중 발견.
Root cause
app.requestSingleInstanceLock()호출 부재. Electron default 가 multi-instance 이므로.exe실행마다 별도 main process. 이로 인해:Fix
src/main/index.ts진입점 (whenReady 직전):gotLock = false→app.quit()즉시 종료second-instance이벤트가 trigger → 기존 inbox 창 restore + show + focus (사용자 의도 = "앱 보기")Gates
Version
0.2.4→0.2.5(critical hotfix patch).Test Plan
다음
머지 후 binary v0.2.5 빌드 (Windows + Mac) + Gitea release 즉시 — 데이터 안전 영향이라 v0.2.4 사용자 즉시 업그레이드 권장.
Critical hotfix review — APPROVE
Important (defer to v0.2.6)
Hidden-start race: NSIS installer 가 설치 직후
inkling.exe(사용자 클릭) + autostartinkling.exe --hidden두 instance 를 짧은 간격에 spawn 시 — 첫 lock 보유자에 따라 visible 여부 race. 본 cut 의second-instancehandler 는 무조건 inbox 창 띄움 (사용자 클릭 = 보고 싶다는 강한 시그널 가정). 매우 드문 시나리오 + lock 자체는 정상 동작. v0.2.6 에서requestSingleInstanceLock의additionalDataarg +second-instance(event, argv, cwd, additionalData)로 hidden flag 전달 → 두 번째가 hidden 이면 창 안 띄움 정책 검토.Skip (acknowledge)
Verdict
APPROVE — Critical 데이터 안전 hotfix. 즉시 머지 권장. Important 는 매우 드문 시나리오 + lock 정상 동작이라 v0.2.6 검토.
머지 후 binary v0.2.5 빌드 + Gitea release.