feat(agent-office): node_monitor에 naver-fetch(fetcher) 등재 + http-pull 링크

WORKER_REGISTRY에 naver-fetch(kind=fetcher, queue=None) 추가하고
collect_status()에 fetcher kind 분기(from=워커명, to=nas-realestate,
type=http-pull)를 추가. /nodes 관측·팀 규칙(모든 워커는 heartbeat+
registry 등재)에 맞춘 naver-fetch 워커 관측 준비.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqCYBhvTcdeCTUDX3RhWx9
This commit is contained in:
2026-07-10 00:34:47 +09:00
parent 13e3e558af
commit 54654af815
2 changed files with 22 additions and 0 deletions

View File

@@ -206,3 +206,21 @@ async def test_transition_send_failure_retries_next_cycle(monkeypatch):
result2 = await nm.check_and_alert(status=dead)
assert any("다운" in t for t in result2)
assert nm._node_state.get("music-render") is False # 이제 갱신
# ── naver-fetch(fetcher) 등재 ──────────────────────────────────────────────
def test_naver_fetch_registered():
from app.node_monitor import WORKER_REGISTRY
entry = next((w for w in WORKER_REGISTRY if w["name"] == "naver-fetch"), None)
assert entry is not None
assert entry["kind"] == "fetcher" and entry["queue"] is None
@pytest.mark.asyncio
async def test_naver_fetch_http_pull_link():
"""naver-fetch heartbeat 존재 시 links에 from=naver-fetch·to=nas-realestate·type=http-pull."""
r = FakeRedis(kv={"worker:naver-fetch:heartbeat": _hb("naver-fetch", "fetcher", "idle")})
st = await node_monitor.collect_status(redis=r)
link = next(l for l in st["links"] if l["from"] == "naver-fetch")
assert link["type"] == "http-pull" and link["to"] == "nas-realestate" and link["status"] == "healthy"