분산 워커 관측 시스템 — GET /api/agent-office/nodes(heartbeat 생사+큐깊이+
dead-letter 집계, web-ui /infra 소비) 엔드포인트 표 추가 + 핵심파일에
node_monitor.py 추가. 상세는 infra_distributed_workers.md 메모리.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LV86jBozkNhSFXJA412fq
I1: collect_status - heartbeat 키 존재 여부가 아닌 ts age 기반으로 alive 판정.
age > NODE_STALE_THRESHOLD_SEC(90s, env 주입 가능)이면 키 있어도 dead.
config.py에 NODE_STALE_THRESHOLD_SEC=90 추가.
I2: check_and_alert - 다운/복구 전이 시 send_raw 실패하면 _node_state 갱신 보류.
다음 사이클에서 동일 전이 재감지 → 재발송 시도 (다운 이벤트 유실 방지).
테스트: _hb 헬퍼 현재 시각 기본값으로 수정 + 신규 2개 (stale→dead, I2 재시도 회귀).
14 passed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LV86jBozkNhSFXJA412fq
- _dl_notified[name] = dl을 if ok: 블록 안으로 이동 — 텔레그램 실패 시 갱신 방지
- check_and_alert에 collect_status try/except 추가 — 스케줄러 잡 생존 보장
- tests: import app.node_monitor as nm 최상단 이동
- tests: test_dl_notified_not_updated_on_telegram_failure 회귀 테스트 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LV86jBozkNhSFXJA412fq
- per-worker 루프 전체를 try/except로 감싸 Redis 예외 시 redis_ok=False+break (Blocker)
- heartbeat 파싱 except에 UnicodeDecodeError 추가 (Important)
- hb.get('ts') or '' 로 null ts 안전 처리 (Minor)
- 테스트 3개 추가: paused 폴백·processing 집계·llen 예외 회귀
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LV86jBozkNhSFXJA412fq
- FastMCP가 기본 host(127.0.0.1)에서 DNS rebinding 보호를 자동 활성화 →
allowed_hosts=localhost만 허용 → nginx가 넘기는 Host gahusb.synology.me가 421.
- 실 보안은 nginx 앞단 Bearer 인증(MCP 도달 전 401)이므로 Host 검증 비활성화.
- 재현/회귀 테스트 추가 + config.CO_BUS_KEY import-순서 격리 버그 수정 (23 통과).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ActivityTimeline 프론트 NAS 라이브 반영 완료(SSH 직접 배포, Z: 매핑 우회).
56d0f5b 위 새 커밋 — feat/co-gahusb-team-bus가 56d0f5b를 base로 의존하므로
amend 대신 신규 커밋.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
에이전트 레지스트리가 2→7로 늘어 len==2/{stock,music} 고정 단언이 stale였음. 핵심 시드 subset 검증으로 변경(레지스트리 확장에 견고). 이번 세션 audit에서 반복 플래그된 부채.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Fix 1: retry_pipeline이 bg.add_task 직전 상태를 'retrying'으로 전이 → 동시 retry 409 방지
- Fix 2: test_retry_failed_pipeline_retriggers에 called[pid/step] assert 추가
- Fix 3: failed_step이 STEPS에 없으면 409 (엉뚱한 prefix 방지)
- Fix 4: STEP_RETRY_BACKOFF_SEC 빈 리스트 시 IndexError → 0으로 폴백
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
terminal failed 파이프라인을 마지막 실패 step부터 재개.
publish + youtube_video_id 있으면 중복 업로드 방지 409.
pytest.ini에 pythonpath=.. 추가 (PYTHONPATH=.. 없이 TestClient 테스트 구동).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
결함1: deep signal-check에서 curate_weekly가 CuratorError면 전체 check가 abort돼 sim/drift 시그널이 미평가되던 문제 → try/except로 confidence만 포기하고 sim/drift는 계속(curate_result=None fallthrough).
결함2: send_urgent_signal 실패가 outer except로 빠져 task 실패+미마킹이던 문제 → _send_urgent_with_retry(3회/60s) 추출, 최종 실패해도 raise 안 함(시그널 평가·태스크 보존), 성공 시에만 mark_signal_notified. TDD 3 신규 테스트.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
미사용 키워드 대량 누적 시 judge 프롬프트/응답이 토큰 한도를 넘어 파싱 실패→claude 신호 전부 null로 degrade되던 문제(프로덕션 확인됨) 해결. base score 상위 JUDGE_CANDIDATE_CAP(30)개만 judge·선별에 적용해 claude 신호 일관 보장.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>