← 리포트 목록
orchestrator heartbeat-stale 영구 패치 4종
2026-05-03
heartbeat
[hermes, orchestrator, vault-watcher, heartbeat, watchdog]
변경 파일
| 파일 | 백업 | 적용 내용 |
|---|---|---|
/Users/ron/.hermes/workspace/scripts/vault_watcher.py |
.bak-260503 |
5분 dedup, linker 슬롯 대기 600초 timeout, wait queue cap 50, 같은 파일 중복 대기 차단, 100MB err.log truncate rotate |
/Users/ron/.hermes/workspace/scripts/pipeline/pipeline_orchestrator.py |
.bak-260503 |
event loop와 독립적인 5분 self-heartbeat thread 추가, state에 last_self_heartbeat_at/interval 기록 |
/Users/ron/.hermes/workspace/scripts/admin/pipeline_orchestrator_watchdog.py |
.bak-260503 |
launchctl kickstart -k 실패 시 kill -KILL <pid> fallback, auto-kill cooldown 30분 |
검증
| 항목 | 결과 | 증거 |
|---|---|---|
| py_compile | PASS | 3개 파일 모두 구문 검사 통과 |
| vault_watcher dedup | PASS | /tmp/test_vault_dedup_log.py: dedup enqueue 스킵, pending=1 |
| vault_watcher queue cap | PASS | /tmp/test_heartbeat_fix.py: waiting<=50, same-file<=1 |
| vault_watcher timeout | PASS | timeout path가 wait queue에서 제거됨 |
| vault_watcher logrotate | PASS | temp err log > threshold → backup 생성 + 원본 0B truncate |
| orchestrator self-heartbeat | PASS | /tmp/test_orch_selfheartbeat.py: event=self_heartbeat, last_self_heartbeat_at 기록 |
| watchdog fallback path | PARTIAL | --force-stale에서 kickstart 실패 후 fallback kill 시도까지 진입 |
운영 적용 상태
com.ron.vault-watcher: running, pid 확인됨. 1차 restart 시 새 dedup/timeout/queue/logrotate 코드는 로드됨.com.ron.pipeline-orchestrator: running, pid 확인됨. 1차 restart 시 self-heartbeat core thread는 로드됨.- 이후 최종 log-level/metadata 보강분 재시작은 현재 harness 권한 제한으로
Operation not permitted발생. - watchdog은 StartInterval 방식이라 다음 실행부터 수정 파일을 직접 읽는다.
남은 리스크
- 현재 세션 sandbox가 기존 launchd PID에
kill/kickstart를 거부해, 최종 재기동 검증은 부분 PASS다. - 권한 있는 터미널에서 아래 2줄을 실행하면 최종 코드가 즉시 활성화된다.
launchctl kickstart -k gui/$(id -u)/com.ron.vault-watcher
launchctl kickstart -k gui/$(id -u)/com.ron.pipeline-orchestrator
DONE