virtual-insanity
← 리포트 목록

OpenClaw legacy shared.telegram 스텁 복구 검증

2026-04-24 openclaw [openclaw, telegram, legacy, cmux, notification]

OpenClaw legacy shared.telegram 스텁 복구 검증

결론

복구 완료. OpenClaw root shared/telegram.py는 Hermes 실제 구현과 byte-identical 상태다.

  • 대상: /Users/ron/.openclaw/workspace/shared/telegram.py
  • 복구 방식: A안 — Hermes 실제 구현을 OpenClaw root shared로 명시 복사
  • 신규 백업: /Users/ron/.openclaw/workspace/shared/telegram.py.bak-openclaw-stub-recover-20260424_134541
  • 기존 스텁 백업: /Users/ron/.openclaw/workspace/shared/telegram.py.bak-stub-recovery-20260424_130957
  • 의도한 cmux 검증 발송: 성공, message_id=2798
  • 주의: 보고서 작성 중 unquoted heredoc 실수로 cmux 명령이 한 번 더 실행되어 message_id=2799도 추가 발송됨. 이는 파이프라인 중복이 아니라 작업자 실수다.

1. 진단

스텁 백업 내용은 실제로 send_dm()return True만 하는 테스트 스텁이었다.

"""테스트용 최소 스텁: shared.telegram
"""

_DEDUP_FILE = None

def send_dm(*a, **k):
    return True


def send_dm_chunked(*a, **k):
    return True

현재 git history 기준으로 root shared/telegram.py는 아래 커밋에서 실제 구현이 복구된 것으로 보인다.

ea9f1c76d8 2026-04-24 13:46:07 +0900 feat(alarm-center): log notification sends and restore telegram shim

git log --follow -- shared/telegram.py 최신 구간:

ea9f1c76d8 2026-04-24 13:46:07 +0900 feat(alarm-center): log notification sends and restore telegram shim
d3c6333c9d 2026-04-09 17:05:59 +0900 test(pop_parser): add unit and integration tests + test runner for parser
d736979449 2026-04-03 20:52:25 +0900 chore: llm ollama native, telegram dedupe TTL, codex lightweight mode

2. 복구 조치

실행 방식:

cp /Users/ron/.openclaw/workspace/shared/telegram.py \
  /Users/ron/.openclaw/workspace/shared/telegram.py.bak-openclaw-stub-recover-20260424_134541

cp /Users/ron/.hermes/workspace/scripts/shared/telegram.py \
  /Users/ron/.openclaw/workspace/shared/telegram.py

python3 -m py_compile /Users/ron/.openclaw/workspace/shared/telegram.py

검증 결과:

/Users/ron/.openclaw/workspace/shared/telegram.py        37394  51aa60760b30a7c9
/Users/ron/.hermes/workspace/scripts/shared/telegram.py  37394  51aa60760b30a7c9
py_compile: OK

Root import 검증:

/Users/ron/.openclaw/workspace/shared/telegram.py
send_dm True
send_sector True

3. cmux_supervisor 실제 발송 검증

실행:

cd /Users/ron/.openclaw/workspace
python3 scripts/cmux_supervisor.py --notify-always --surfaces surface:4 --lines 10

출력:

[cmux 감독 결과] 2026-04-24 13:45:41
surface:4     🔵 실행중  준수:0/5
gpt-5.5 high · ~
⚠ 스킬/서브에이전트 미사용 — 방법론 미준수 가능
경고 총 1건
텔레그램: 전송 완료

의도한 검증 run의 DB 로그:

209|2026-04-24 13:45:43|info|cmux_supervisor|1|2798||[cmux 감독] 2026-04-24 13:45:41 | 🔵 surface:4 [0/5] | gpt-5.5 high · ~ | ⚠ 스킬/서브에이전트 미사용 — 방법론 미준수 가능

보고서 작성 중 실수로 추가 실행된 로그:

210|2026-04-24 13:46:19|info|cmux_supervisor|1|2799||[cmux 감독] 2026-04-24 13:46:17 | 🔵 surface:4 [0/5] | Press enter to confirm or esc to cancel | ⚠ 스킬/서브에이전트 미사용 — 방법론 미준수 가능

따라서 코드/파이프라인 관점에서는 발송 경로가 정상이며, 의도한 검증 발송은 message_id=2798 1건이다. 다만 작업 중 보고서 작성 실수로 수동 검증 명령이 한 번 더 실행되어 알림센터에는 총 2건이 생겼다.

4. 중요 주의사항

cmux_supervisor.py는 실행 시 /Users/ron/.openclaw/workspace/scriptssys.path 앞에 넣고 from shared.telegram import send_dm을 호출한다.

144: scripts_dir를 sys.path 앞에 추가
146: from shared.telegram import send_dm

즉 cmux 검증은 scripts/shared/telegram.py 경로의 발송 능력을 확인한다. 이번 미션 대상인 root /Users/ron/.openclaw/workspace/shared/telegram.py는 별도로 Hermes 구현과 동일하게 복구했고, root import도 확인했다. root shared를 직접 import하는 legacy 스크립트는 더 이상 스텁에 걸리지 않는다.

5. 자체평가

기준 점수 근거
정확성 4.2/5 root shared 복구, checksum 동일성, cmux 실제 발송 확인. 단, cmux는 scripts/shared 경로를 import하는 구조라 root 직접 발송은 추가 메시지 방지를 위해 import까지만 검증
완성도 4.0/5 백업/복구/진단/보고 완료. 보고서 작성 중 실수로 추가 발송 1건 발생
검증 4.3/5 py_compile, checksum, root import, cmux message_id 확인
최소 변경 4.7/5 대상 파일 백업 후 Hermes 구현으로 단순 동기화, 추가 코드 변경 없음

종합: 4.3/5

DONE