NEPCON Hermes migration restore
결론
NEPCON은 이미 2026-04-14 batch J에서 nepcon-collector → ocJ-J000-nepcon으로 cutover 됐지만, 현재 Hermes jobs.json에는 해당 job이 사라져 있었다. OpenClaw 쪽은 이미 enabled=false라서 스케줄 공백 상태였다.
이번에 같은 Hermes id ocJ-J000-nepcon으로 shell job을 복구했고, 실제 Hermes cron 실행까지 확인했다.
1. 원본 위치
OpenClaw cron 정의
- 파일:
/Users/ron/.openclaw/cron/jobs.json - id:
nepcon-collector - 상태:
enabled=false - schedule:
37 1,7,13,19 * * * - 원래 command:
cd /Users/ron/.openclaw/workspace/scripts/pipeline && python3 nepcon_collector.py --collect
OpenClaw job에는 이미 migration metadata가 있었다.
{
"migrated_to": "hermes",
"hermes_id": "ocJ-J000-nepcon",
"batch": "J",
"cutover_at": "2026-04-14T06:33:38.095739+00:00"
}
스크립트 위치
- OpenClaw 원본:
/Users/ron/.openclaw/workspace/scripts/pipeline/nepcon_collector.py - Hermes 이전본:
/Users/ron/.hermes/workspace/scripts/pipeline/nepcon_collector.py
차이는 경로 상수만 Hermes 기준으로 바뀐 상태였다.
-WORKSPACE = Path(os.path.expanduser("~/.openclaw/workspace"))
-SECRETS_DIR = Path(os.path.expanduser("~/.openclaw/secrets"))
+WORKSPACE = Path(os.path.expanduser("~/.hermes/workspace"))
+SECRETS_DIR = Path(os.path.expanduser("~/.hermes/secrets"))
2. 왜 Hermes로 안 보였나
확인 결과는 “미이전”이 아니라 이전 후 유실이다.
근거:
~/knowledge-agent/400-reports/260414_hermes_batch_J_real.md에는ocJ-J000-nepcon이전 성공 기록이 있다.- OpenClaw job은
enabled=false이고hermes_id=ocJ-J000-nepcon을 가지고 있다. - 하지만 2026-04-16 현재
/Users/ron/.hermes/cron/jobs.json에는nepcon문자열이 없었다. /Users/ron/.hermes/migration/openclaw_cron_reconcile_20260416.json도nepcon-collector를target_missing으로 분류했다.
즉 4/15 이후 Hermes jobs 복구/축소 과정에서 batch J job들이 일부 빠진 것으로 보인다.
3. Hermes cron 정식 복구
백업:
/Users/ron/.hermes/cron/jobs.json.bak-nepcon-migration-20260416T093608
추가한 Hermes job:
{
"id": "ocJ-J000-nepcon",
"name": "nepcon-collector",
"enabled": true,
"state": "scheduled",
"type": "shell",
"job_type": "shell",
"kind": "shell",
"schedule": {
"kind": "cron",
"expr": "37 1,7,13,19 * * *",
"tz": "Asia/Seoul",
"display": "37 1,7,13,19 * * *"
},
"cwd": "/Users/ron/.hermes/workspace",
"command": "/usr/bin/python3 /Users/ron/.hermes/workspace/scripts/pipeline/nepcon_collector.py --collect",
"timeout_seconds": 900,
"deliver": "local",
"silent": false
}
검증:
JSON_OK
ocJ-J000-nepcon True scheduled 2026-04-16T13:37:00+09:00 2026-04-16T09:38:44.612696+09:00 ok None
Hermes list 확인:
ocJ-J000-nepcon [active]
Name: nepcon-collector
Schedule: 37 1,7,13,19 * * *
Repeat: ∞
Next run: 2026-04-16T13:37:00+09:00
Deliver: local
참고: hermes cron list는 “Gateway is not running” 경고를 냈지만, 실제로 127.0.0.1:18789/v1/health는 OK였고, 아래 one-shot repair job도 gateway scheduler가 집어가서 실행했다. 따라서 현재 CLI의 gateway PID 탐지는 false negative 가능성이 있다.
4. 1회 실제 실행 검증
명령:
cd /Users/ron/.hermes/hermes-agent
HERMES_HOME=/Users/ron/.hermes venv/bin/python -m hermes_cli.main cron run ocJ-J000-nepcon
HERMES_HOME=/Users/ron/.hermes venv/bin/python -m hermes_cli.main cron tick
결과 파일:
/Users/ron/.hermes/cron/output/ocJ-J000-nepcon/2026-04-16_09-38-44.md
핵심 stdout:
[2026-04-16 09:36:26] [dline1secret] 채널 폴링 완료: 20개
[2026-04-16 09:36:26] [sapiens] 채널 폴링 완료: 20개
[2026-04-16 09:36:26] 신규 아티클: 7건
...
[SECTOR_TRACE] send_sector(ideas) caller=nepcon_collector.py:608 text='*[네프콘] 신규 7건*...'
[2026-04-16 09:38:44] 텔레그램 DM 전송 완료
[2026-04-16 09:38:44] 완료: 7건 처리
job 상태:
{
"id": "ocJ-J000-nepcon",
"enabled": true,
"state": "scheduled",
"next_run_at": "2026-04-16T13:37:00+09:00",
"last_run_at": "2026-04-16T09:38:44.612696+09:00",
"last_status": "ok",
"last_error": null,
"repeat": {"times": null, "completed": 1}
}
5. 추가로 발견한 인증 프로필 누락과 복구
첫 cron 실행은 성공했지만 아래 경고가 있었다.
patchright 프로파일 없음 → agent-browser 세션으로 폴백
[WARN] 브라우저 프로파일 없음 → --setup 먼저 실행 필요
원인:
- OpenClaw에는
/Users/ron/.openclaw/secrets/naver_browser_profile존재 - Hermes에는
/Users/ron/.hermes/secrets/naver_browser_profile미존재
복구:
COPIED /Users/ron/.openclaw/secrets/naver_browser_profile -> /Users/ron/.hermes/secrets/naver_browser_profile
권한:
drwx------@ 22 ron staff ... /Users/ron/.hermes/secrets/naver_browser_profile
Codex sandbox 안에서 직접 Playwright 실행은 macOS Mach port 권한 문제로 실패했다.
FATAL: ... MachPortRendezvousServer... Permission denied (1100)
kill EPERM
그래서 Hermes cron one-shot shell job으로 7개 URL을 --no-telegram 재수집시켰고, gateway scheduler가 실제로 실행했다.
복구용 one-shot output:
/Users/ron/.hermes/cron/output/tmp-nepcon-repair-260416/2026-04-16_09-41-59.md
핵심 결과:
PDF 저장: 260416064603979nv.pdf
이미지: 15개 저장
노트 저장: 260416_dline1secret_260416064603979nv.md
...
PDF 저장: 260415105513917bw.pdf
이미지: 15개 저장
노트 저장: 260416_sapiens_260415105513917bw.md
Exit Code: 0
Duration: 68.64s
본문/PDF 확인:
260416_sapiens_260415105513917bw.md size 2392 body_chars 416 pdf_link True
260416_sapiens_260415195746736ll.md size 5353 body_chars 2016 pdf_link True
260416_dline1secret_260415081923000oq.md size 4529 body_chars 1370 pdf_link True
260416_dline1secret_260415142045400so.md size 3181 body_chars 738 pdf_link True
260416_dline1secret_260415182951863dz.md size 3599 body_chars 918 pdf_link True
260416_dline1secret_260415211743171ry.md size 1785 body_chars 108 pdf_link True
260416_dline1secret_260416064603979nv.md size 4108 body_chars 1129 pdf_link True
6. 출력 위치
운영 산출물은 아래에 쌓인다.
| 종류 | 위치 | 현재 확인 |
|---|---|---|
| Hermes state | /Users/ron/.hermes/workspace/memory/nepcon/state.json |
seen 47 / articles 47 |
| Vault note | /Users/ron/knowledge/100 수신함/120 지식사랑방/124 nepcon/ |
md 94개 |
/Users/ron/knowledge/100 수신함/120 지식사랑방/124 nepcon/pdfs/ |
pdf 68개 | |
| 이미지 | /Users/ron/knowledge/100 수신함/120 지식사랑방/124 nepcon/_attachments/YYYY-MM/ |
attachment 1158개 |
| Cron audit | /Users/ron/.hermes/cron/output/ocJ-J000-nepcon/ |
1회 실행 로그 생성 |
| Repair audit | /Users/ron/.hermes/cron/output/tmp-nepcon-repair-260416/ |
1회 실행 로그 생성 |
최종 카운트:
state /Users/ron/.hermes/workspace/memory/nepcon/state.json mtime 2026-04-16T09:41:59 seen 47 articles 47
vault /Users/ron/knowledge/100 수신함/120 지식사랑방/124 nepcon md_count 94
pdf_count 68
attach_count 1158
7. 남은 주의점
- 첫 복구 cron이 네이버 프로필 복사 전 실행되면서 제목 기반 빈 본문 노트 7개가 먼저 생겼다. 이후 content_id 기반 본문/PDF 포함 노트 7개를 재수집했다. 빈 중복 노트 삭제/정리는 이번 작업에서 하지 않았다.
- Hermes CLI의 gateway 상태 탐지가 현재 포트 health와 불일치한다.
curl /v1/health는 OK이고 one-shot job도 실행됐지만,hermes cron list/status는 gateway not running 경고를 낸다. 별도 진단 대상이다. - 직접 Codex sandbox에서 Playwright/Chromium 실행은 EPERM이 재현된다. 운영 경로에서는 Hermes scheduler가 실행해 성공했으나, 수동 검증은 Hermes cron 경유가 안전하다.
자체평가
- 정확성: 4.7/5 — 원본, 유실 원인, 정식 Hermes job 복구, 실제 실행을 확인했다.
- 완성도: 4.5/5 — 본문/PDF 복구까지 했지만 초기 빈 중복 노트 정리는 삭제 작업이라 남겼다.
- 검증: 4.8/5 — cron output, state, vault, PDF, attachment 카운트까지 확인했다.
- 최소 변경: 4.6/5 — Hermes cron job과 누락된 네이버 브라우저 프로필 복사만 수행했다. 코드 변경 없음.
- 종합: 4.65/5