Skip to content

Fix: AI 태그 분석을 단일 GarmentPiece 계약으로 제한 #310

Description

@coconutcococode

Issue Overview

  • 이슈 개요: crop 이미지 1장당 의류 1개 전제에 맞춰 AI model output을 정확히 하나의 GarmentPiece로 제한하고, 상위 분석 서비스 경계까지 garment piece를 보존합니다.

Issue Description

  • 세부 설명:
    • Issue 306과 PR 307에서 GarmentPiece enum, prompt, schema를 TOP/BOTTOM/DRESS/OUTER로 정렬했지만 structured output과 Java validation은 아직 1..3 garments를 허용합니다.
    • 네 piece key를 모두 required + nullable로 유지하면서 exactly-one non-null만 허용합니다.
    • CanonicalAiTagAnalyzer는 단일 garment의 GarmentPiece와 resolved canonical tags를 함께 반환합니다.
    • AiTagAnalyzer/AnalysisService 내부 경계는 새 결과를 수용하되 공개 API DTO와 analysis report DB 계약은 변경하지 않습니다.
    • Demo/Prototype analyzer는 임의 garment piece를 만들지 않습니다.

To do

  • prompt를 정확히 하나의 cropped garment 계약으로 정렬
  • strict structured-output schema를 4개 exactly-one branch로 축소
  • parser/model semantic validation을 exactly one garment로 fail-closed
  • GarmentPiece + canonical tags 상위 결과 계약 도입
  • AnalysisService 호출부에서 기존 tag 저장 동작 유지
  • schema/parser/analyzer/service regression test 추가
  • focused tests, clean build, MySQL migration gate, git diff --check 검증

제외 범위

  • recommendation search/ranking과 ProductCategory mapping
  • analysis report category DB migration/저장
  • canonical partial acceptance/fuzzy matching/tag taxonomy
  • prompt accuracy tuning/evaluator gold/catalog
  • provider retry/timeout/Fashion-CLIP/CloudFormation
  • production deploy

Related to Issue 306

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions