virtual-insanity
← 리포트 목록

phase_a

2026-04-14 hermes

Hermes Phase A 마이그레이션 보고서 (2026-04-14)

상태: Health gate 미완전 통과 → 실제 cron 이전 보류
이어받은 지점: 기존 보고서는 6줄짜리 header만 있었고, Phase 1 health 검증 도중 중단되어 있었다. 이번 실행은 그 지점에서 이어서 증거를 재수집했다.

0. 변경 여부

대상 상태
/Users/ron/.hermes/cron/jobs.json 수정 안 함
/Users/ron/.openclaw/cron/jobs.json 수정 안 함
OpenClaw cron 비활성화 0개
Hermes cron 추가 0개
코드 파일 수정 안 함

작업 중 수행한 쓰기성 검증: vault_control_sync.py report를 실행해 기존 OpenClaw memory report가 갱신됨. cron 설정/코드 변경은 아님.

1. Phase 1 — Health 재검증

1.1 Gateway listener / health

체크 결과 근거 판정
18789 LISTEN Python 45753 ... 127.0.0.1:18789 (LISTEN) lsof -nP -iTCP:18789 -sTCP:LISTEN
gateway pid/state PID 45753, gateway_state=running, api_server=connected, telegram=connected ~/.hermes/gateway.pid, ~/.hermes/gateway_state.json
/v1/health 직접 curl 현재 Codex sandbox에서는 localhost socket 접근이 Operation not permitted/curl 000로 막힘 직접 socket probe에서 PermissionError(1) 확인 ⚠️ 직접 검증 불가
/v1/health 실제 access log 13:35:27~13:36:33 사이 /v1/health 200 반복 기록 ~/.hermes/logs/gateway.log ✅ 간접 통과
/v1/models 실제 access log 13:01:17 /v1/models 200 기록 ~/.hermes/logs/gateway.log ✅ 간접 통과

판정: Gateway 프로세스와 access log 기준으로는 살아 있지만, 이번 Codex sandbox에서 직접 curl 재현은 불가했다. 안전 가드상 “lsof + curl /v1/health 직접 통과”가 문자 그대로 만족되지 않아 실제 이전은 보류했다.

1.2 Hermes cron scheduler 상태

항목 결과 판정
Hermes cron file /Users/ron/.hermes/cron/jobs.json 존재
현재 job 수 1개
enabled job vault-analyst-feedback 1개
last status ok
last run 2026-04-14T09:02:05.251202+09:00
next run 2026-04-15T09:00:00+09:00
deliver local

1.3 LLM 라우팅 5개 모델 검증

직접 POST 호출은 sandbox network 제한 때문에 수행하지 못했다. 대신 오늘의 ~/.openclaw/logs/llm/20260414.jsonl~/.hermes/logs/gateway.log에서 13:38~13:43 실제 호출 기록을 확인했다.

모델 관찰 결과 최근 증거 판정
openai-codex/gpt-5.4 성공 기록 있음. 일부 90초 timeout도 있음 13:39:17 ok=true, response_chars=1382 / 13:42:36 ok=true, response_chars=406 ✅ 라우팅 가능, ⚠️ timeout 위험
anthropic/claude-sonnet-4-6 성공 기록 있음. 이후 긴 작업은 timeout 12:53:34 ok=true, response 좋아요 괜찮아요; 13:41:19 timeout ✅ 라우팅 가능, ⚠️ 긴 작업 timeout
github-copilot/gpt-5-mini provider까지 도달하나 429 rate limit 13:38:16 RateLimitReached, 12/day 초과 ⚠️ 라우팅은 됨, 현재 사용 불가
openrouter/* key 없음으로 즉시 실패 missing OpenRouter API key ⚠️ 예상 실패. 설정 필요
ollama/qwen2.5:3b 성공 기록 있음 13:41:27 ok=true, response_chars=446

중요: gateway log에는 POST /v1/chat/completions 200도 있으나, 응답 body 0인 케이스가 있다. 따라서 smoke 기준은 HTTP 200만으로 두면 안 되고 ok=true, response_chars>0, error 없음까지 봐야 한다.

2. Phase 2 — Phase A 후보 선정

기준: LLM 없음/적음, 외부 DNS 없음, idempotent, 5분 내, 데이터 손실 위험 낮음.
분석 방식: enabled cron 157개에서 payload command를 추출하고, 스크립트 정적 스캔(llm/openai/anthropic/requests/httpx/urllib/telegram/notify/yfinance/pykrx/...)과 코드 앞부분/argparse를 확인했다.

2.1 최종 안전 후보 5개

# OpenClaw cron id 이름 schedule command LOC 선정 이유 dry-run/검증 결과
1 source-registry-updater 소스 레지스트리 업데이트 5 9 * * 1-5 python3 .../source_registry_updater.py 136 로컬 JSON registry 갱신, 외부 DNS/LLM/Telegram 없음 --dry-run 성공. 신규 소스 236개, 저장 생략
2 quant-signal-generator 퀀트 신호 생성 45 7 * * 1-5 python3 .../quant_signal_generator.py 154 로컬 price-history cache 기반, 외부 호출 없음 --dry-run 성공. 방법론 20개 실행, 저장 생략
3 data-quality-monitor 데이터 품질 모니터 15 7 * * * python3 .../data_quality_monitor.py 708 로컬 memory freshness/anomaly 리포트. 외부 호출 없음 --report 성공. 정상 1, 누락 31, 이상치 0
4 vault-control-sync 볼트 제어판 리포트 0 4 * * * ... vault_control_sync.py report 275 report 모드는 선언/실제 상태 비교 리포트만 생성. 외부 호출 없음 report 실행 성공. 이상 징후 2건 출력, latest_report 갱신
5 hypothesis-feedback 분석 결과 → 가설 환류 10 22 * * * python3 .../hypothesis_feedback.py 362 최근 vault 판단 노트와 hypothesis memory 연결. 외부 호출/LLM 없음 --dry-run 성공. 최근 24h 노트 0건, 업데이트 0건

2.2 탈락/보류 후보

후보 보류 이유
fed-liquidity-aggregator --dry-run 실패: 필수 데이터 없음 (2026-04-14): WALCL=None, RRP=None, TGA=None
cron-alert Telegram 알림 side effect 있음
memory-weekly-report memory guardian/Telegram 코드 경로 포함. 시스템 계열이라 Phase A 후순위
log-rotator 로그 삭제/압축/rename 수행. idempotent지만 파괴적 성격 있어 제외
chroma-mcp-recycle 서비스 재시작 side effect
blueprint-updater urllib/telegram/subprocess/sqlite 포함, 청사진 갱신 영향 범위 큼
domain-wiki-compiler LLM/Telegram 포함

3. Phase 3 — 실제 이전 상태

요청된 절차 기준 상태:

단계 결과 이유
1. OpenClaw 크론 코드 읽기 ✅ 완료 후보 5개 파일과 스케줄/command 확인
2. Hermes cron 스키마 변환 ⚠️ 설계만 가능 Hermes cron은 direct command schema가 아니라 agent prompt 기반. 실제 추가 전 health 직접 통과 필요
3. dual-run 모드 추가 ❌ 보류 Health gate 직접 curl 미통과/직접 POST 불가
4. 실행 결과 비교 ❌ 보류 Hermes job을 추가·실행하지 않음
5. OpenClaw 비활성 ❌ 금지 준수 dual-run 일치 검증 전 비활성 금지
6. rollback 변경 없음 rollback할 Hermes 추가분 없음

4. OpenClaw → Hermes 변환 초안

실제 적용은 하지 않았다. 아래는 다음 세션에서 health gate가 직접 통과하면 사용할 변환안이다.

OpenClaw id Hermes name 제안 Hermes prompt 핵심 deliver model/provider
source-registry-updater phase-a-source-registry-updater cd /Users/ron/.openclaw/workspace && python3 scripts/pipeline/source_registry_updater.py 실행 후 registry mtime/요약 보고 local ollama 우선 또는 기본값
quant-signal-generator phase-a-quant-signal-generator python3 .../quant_signal_generator.py 실행 후 quant-signals output 확인 local ollama 우선 또는 기본값
data-quality-monitor phase-a-data-quality-monitor python3 .../data_quality_monitor.py 실행 후 freshness/anomaly JSON 확인 local ollama 우선 또는 기본값
vault-control-sync phase-a-vault-control-sync ... vault_control_sync.py report 실행 후 latest_report 확인 local ollama 우선 또는 기본값
hypothesis-feedback phase-a-hypothesis-feedback python3 .../hypothesis_feedback.py 실행 후 log/update count 확인 local ollama 우선 또는 기본값

주의: Hermes cron scheduler는 내부적으로 AIAgent를 실행한다. 따라서 “LLM 호출 없는 cron”이라도 Hermes cron으로 옮기면 cron agent LLM 호출이 생긴다. Phase A는 provider 안정화를 위해 ollama/qwen2.5:3b 또는 안정 provider를 명시하는 편이 안전하다.

5. 최종 판정

HOLD / 마이그레이션 보류

이유:

  1. Health gate의 필수 조건인 “직접 curl /v1/health”를 이 Codex sandbox에서 재현하지 못했다.
  2. LLM 라우팅은 로그상 대부분 확인되지만, Copilot은 429, OpenRouter는 key 없음, Codex/Anthropic은 timeout 위험이 있다.
  3. Hermes cron은 direct shell cron이 아니라 agent-prompt cron이므로, 후보 5개를 추가하면 예상보다 LLM 의존이 커진다.
  4. dual-run 결과 일치 전 OpenClaw 비활성 금지 조건을 지키기 위해 OpenClaw cron은 그대로 유지했다.

다음 안전한 한 단계:

  • sandbox 밖 또는 Hermes 자체 health probe에서 curl -sS http://127.0.0.1:18789/v1/health와 5개 모델 최소 prompt를 직접 통과시킨 뒤, 위 5개 후보를 Hermes deliver=local + provider=ollama로 먼저 등록하고 next_run_at=now 1회 실행한다.

6. 파일 해시

파일 SHA256 상태
/Users/ron/.openclaw/cron/jobs.json dfdb65fe2bb573c662490fc13e6002d08ac8b1c9431b42ee7e5eff04951e99e8 수정 안 함
/Users/ron/.hermes/cron/jobs.json a3a1eaf21162e873d99f8259d907ccd2063ace1eb52876d85cb4985686f9a266 수정 안 함