kcg-ai-monitoring/prediction/models_core
htlee 2ceeb966d8 feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강
- models_core 패키지 신설 — BaseDetectionModel / ModelContext / ModelResult
  + Registry (ACTIVE 버전 인스턴스화, DAG 순환 검출, topo 플랜)
  + DAGExecutor (PRIMARY→ctx.shared 주입, SHADOW persist-only 오염 차단)
  + params_loader (5분 TTL 캐시), feature_flag (PREDICTION_USE_MODEL_REGISTRY)
- V034 스키마 정합성 사전 검증 + silent error 3건 선제 방어
  · model_id VARCHAR(64) 초과 시 __init__ 에서 즉시 ValueError
  · metric_key VARCHAR(64) 초과는 경고 후 drop (다른 metric 는 저장)
  · persist 가 ctx.conn 재사용 (pool maxconn=5 고갈 방지)
- scheduler.py — 10단계 feature flag 분기 (기본 0, 구 경로 보존)
- partition_manager — detection_model_run_outputs 월별 파티션 자동 생성/DROP
- 유닛테스트 15 케이스 전체 통과 (DAG 순환, SHADOW 오염 차단, 길이 검증)
- snapshot 스크립트 (hourly/diagnostic) 개선
  · spoofing gt0/gt03/gt05/gt07 세분화 — 'silent fault' vs 'no signal' 구분
  · V030 gear_identity_collisions 원시 섹션 (CRITICAL 51건 OPEN 포착)
  · V034 detection_model_* 모니터링 섹션 (Phase 2 대비)
  · stage timing 집계 + stats_hourly vs events category drift 감시

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 08:07:29 +09:00
..
registered feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00
__init__.py feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00
base.py feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00
executor.py feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00
feature_flag.py feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00
params_loader.py feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00
registry.py feat(prediction): Phase 1-2 detection model registry + snapshot 관찰 보강 2026-04-20 08:07:29 +09:00