Skip to content

실패 code 비교의 계약 enum 전환 - #1242

Merged
m-a-king merged 2 commits into
devfrom
refactor/contract-stale-cleanup
Oct 18, 2026
Merged

m-a-king merged 2 commits into
devfrom
refactor/contract-stale-cleanup

Conversation

@m-a-king

Copy link
Copy Markdown
Collaborator

한눈에

추출 서비스의 실패 code 를 문자열 대신 계약 enum 으로 비교

  • 이전: 실패 code 이름을 문자열로 적어 두고 응답의 이름 문자열과 비교
    • 계약에서 code 이름이 바뀌어도 컴파일은 통과하고 조용히 일반 실패로 떨어짐
  • 계약에서 생성된 enum 값으로 비교
    • 이름이 바뀌면 컴파일에서 드러남
  • 옛 문서·삭제된 카탈로그를 가리키던 설명을 현행 계약으로 정정
  • 머지하면 dev 에 자동 배포됨. 동작 변화 없음

Situation

리뷰에서 드러난 잔재

Task

문자열 비교 제거와 설명 정정

  • 운영 로직 변화 없이 비교 대상만 enum 으로

Action

전환

대상 이전 이후
모델 프로브 422 code 문자열 상수 2개와 비교 계약 enum 값과 비교
확정 실패 번역 표 이름 문자열 키 12개 계약 enum 키
계약 대조 테스트 이름 문자열 집합 비교 enum 집합 비교
  • 모르는 code 는 전처럼 UNSPECIFIED 로 읽혀 표 밖 fallback 으로 감

설명 정정

대상 이전 이후
카탈로그 어휘 4곳 yaml 카탈로그 계약
프로브·링크 클라이언트 주석 extractor 문서·md 만 정본 proto(모양)·md(동작 규칙)
타임아웃 주석 2곳 55s 리터럴 계약의 호출자 타임아웃
HTTP 설정 주석 Jackson DTO 시절 실측 삭제
CLAUDE.md 변환 규칙 예시 응답 DTO 생성 응답 클래스

Result

남긴 것

  • registerDefaults 호출 자체의 제거는 테스트 3곳의 복제 설정과 함께 바꿔야 해 보류
  • 추출 경로 이름을 문자열로 비교하는 도메인 쪽은 계약 클래스를 도메인에 들이는 문제라 보류

연관 이슈

- 모델 프로브의 422 code 비교를 생성 enum 값으로 교체
  - 이전: 이름 문자열 상수 2개와 비교
  - 원인: 계약이 code 이름을 바꿔도 컴파일이 잡지 못하고 일반 거절로 떨어짐
- 확정 실패 번역 표의 키를 이름 문자열에서 생성 enum 으로 교체
  - 계약 대조 테스트도 enum 집합으로 비교
- 낡은 주석 정정: 카탈로그 어휘 4곳 · 55s 리터럴 2곳 · Jackson DTO 시절 실측 · 옛 응답 클래스명 · 옛 문서 경로
- CLAUDE.md 변환 규칙 예시를 생성 응답 클래스로 갱신
@m-a-king m-a-king added the refactor 구조 개선, 외부 동작 불변 label Oct 18, 2026
@m-a-king m-a-king self-assigned this Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: TeamPiKi/core/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6cfffc86-7493-42f9-8001-91acd8ce78ff
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다.

@m-a-king
m-a-king merged commit d4d37d0 into dev Oct 18, 2026
5 checks passed
@m-a-king
m-a-king deleted the refactor/contract-stale-cleanup branch October 18, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 구조 개선, 외부 동작 불변

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant