feat(backend): Phase 3 MVP — Detection Model Registry 운영자 API #94
No reviewers
레이블
레이블 없음
마일스톤 없음
담당자 없음
참여자 2명
알림
마감일
마감일이 설정되지 않았습니다.
의존성
No dependencies set.
Reference: gc/kcg-ai-monitoring#94
불러오는 중...
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/phase3-detection-model-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
변경 요약
V034
detection_models/detection_model_versions에 대한 운영자 CRUD 경량 API.Phase 2 PoC 5 모델을 DRAFT→ACTIVE 승격할 수 있는 최소 범위.
엔드포인트 (8)
/api/ai/detection-models/api/ai/detection-models/{modelId}/api/ai/detection-models/{modelId}/dependencies/api/ai/detection-models/{modelId}/versions/api/ai/detection-models/{modelId}/versions/{versionId}/api/ai/detection-models/{modelId}/versions/api/ai/detection-models/{modelId}/versions/{versionId}/activate/api/ai/detection-models/{modelId}/versions/{versionId}/archive상태 전이
uk_detection_model_primarypartial index 중복 방지: 기존 PRIMARY 가 있는데 role=PRIMARY activate 시 409 Conflict 반환 (promote-primary 는 후속 PR)구성 요소 (
gc.mda.kcg.domain.ai)DetectionModel,DetectionModelVersion(JSONB params =JsonNode+@JdbcTypeCode(SqlTypes.JSON))DetectionModelRepository(+ native DAG query),DetectionModelVersionRepositoryDetectionModelService(READ only),DetectionModelVersionService(create/activate/archive, 전이 화이트리스트)권한
ai-operations:detection-models(V034 에서 이미 seed됨) — ADMIN 5 ops / OPERATOR READ+UPDATE / ANALYST·VIEWER READ로컬 검증
mvn -q compile성공 (warning 만, error 0)mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8081기동 성공versions로1.0.1-testDRAFT 생성 → activate SHADOW (ACTIVE/SHADOW) → archive (ARCHIVED/null role) 전이 사이클 검증범위 밖 (후속 PR)
promote-primary(SHADOW/CHALLENGER→PRIMARY 승격, 기존 PRIMARY 자동 ARCHIVED, 트랜잭션 내)enable토글 (카탈로그 수정)metrics/compare/runs조회 (PRIMARY vs SHADOW diff 집계)배포 영향
다음 단계
머지 후 운영 서버 백엔드 재배포 → 프런트엔드
AIModelManagement페이지 연동 (Mock 교체)V034 detection_models / detection_model_versions 에 대한 CRUD 경량 API. MVP 8 엔드포인트로 Phase 2 PoC 5 모델을 DRAFT→ACTIVE 승격 가능한 최소 범위. 엔드포인트 (/api/ai/detection-models): - GET / — 카탈로그 목록 - GET /{modelId} — 단건 - GET /{modelId}/dependencies — DAG 선행 - GET /{modelId}/versions — 버전 목록 - GET /{modelId}/versions/{versionId} — 버전 상세 - POST /{modelId}/versions — DRAFT 생성 [@Auditable] - POST /.../{versionId}/activate — DRAFT→ACTIVE(role) [@Auditable] - POST /.../{versionId}/archive — ACTIVE/DRAFT→ARCHIVED [@Auditable] 구성 요소 (gc.mda.kcg.domain.ai): - DetectionModel / DetectionModelVersion 엔티티 · JSONB params 는 Hibernate @JdbcTypeCode(SqlTypes.JSON) + JsonNode - DetectionModelRepository / DetectionModelVersionRepository - DetectionModelService (READ only) - DetectionModelVersionService (전이 화이트리스트 + uk_detection_model_primary 409) - 4 DTO record (Response 2, Request 3) 권한: ai-operations:detection-models (V034 에서 이미 seed) · READ (전체), CREATE (POST /versions), UPDATE (activate/archive) · ADMIN 5 ops / OPERATOR READ+UPDATE / ANALYST·VIEWER READ 검증: - mvn -q compile 성공 (warning 만, error 없음) - mvn spring-boot:run 로컬 기동 성공 (포트 8081) - admin 계정 쿠키 인증으로 8 엔드포인트 전수 smoke test: · GET /api/ai/detection-models → 5 모델 (dark/risk/gear/pair/transship) 반환 · GET /{modelId} 단건 + /dependencies (0 rows) 정상 · POST /versions (1.0.1-test DRAFT) → activate SHADOW → archive 전이 사이클 후속 PR: - promote-primary (SHADOW/CHALLENGER→PRIMARY, 기존 PRIMARY 자동 archive) - enable 토글, metrics / compare / runs 조회 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Phase 3 MVP 8 엔드포인트 + 전이 사이클 smoke test 통과. 감사 로그 + UNIQUE 중복 방지 + 전이 화이트리스트. LGTM