fix(bridge-watchdog): serialize restarts on an exclusive start lock (#970) - #982
Merged
Conversation
…970) The bot.pid freshness debounce covers restart racing restart, but during a dependency build there is no bot.pid at all — every 5-minute tick launched another start.sh whose dependency_bootstrap raced the first (cargo 'Text file busy' during the daegyo recovery, 2026-08-06). Take an exclusive flock around the whole down-detect -> start critical section: a tick that finds a start already in flight skips cleanly instead of piling on. Lock path overridable for tests. Closes #970
seoseo-ai
approved these changes
Aug 6, 2026
seoseo-ai
left a comment
Collaborator
There was a problem hiding this comment.
Approved after explicit operator authorization using the local seoseo-ai credential.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제 (#970)
5분 워치독의 유일한 race 가드는 bot.pid 신선도 디바운스 — restart vs restart만 커버. 의존성 빌드 중에는 bot.pid가 없어서 매 틱이 새 start.sh를 띄우고 각자 dependency_bootstrap을 같은 venv에 돌림 (daegyo 복구 중 cargo
Text file busy, cryptography 빌드가 폰에서 5분+ 소요).수정
down-detect → start 임계 구간 전체를 exclusive flock으로 직렬화:
BRIDGE_WATCHDOG_LOCK으로 오버라이드 가능(테스트 심)검증
Closes #970