[config] sandrone 봇과 설정 파일 공유하도록 네임스페이스 지원 - #23
Merged
Conversation
Contributor
|
Collaborator
Author
|
/review |
Contributor
There was a problem hiding this comment.
🤖 코드 리뷰
설정 파일 공유를 위한 네임스페이스 지원 기능을 추가한 PR 입니다. BOT_NAMESPACES 상수와 pickRepoConfig() 함수를 통해 it-play: 블록을 파싱하고, 다른 봇의 블록은 안전하게 건너뛰도록 구현되었습니다.
변경 사항:
- 타입 가드
isRecord()추가 및 안전한 타입 처리 - 네임스페이스 블록 순차 적용 로직 (뒤가 이기는 순서)
- 외부 입력 키에 대한 개수만 로그 기록 (보안 고려)
- 설정 파일에 공유 규칙 주석 명시
sandrone 봇과의 대칭성을 유지하며, 기존 평면 설정 파일도 호환됩니다. 타입 검사와 빌드가 통과했고, 명확한 문서화가 되어 있습니다.
지적 사항 없음 — 변경분에서 문제를 찾지 못했다.
모델 darwin-35b-q4_k_m.gguf · 파일 2개 리뷰 · 토큰 9,339 in / 501 out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
.reviewbot/config.yml한 장을 여러 리뷰 봇이 나눠 쓸 수 있도록, 봇 이름을 키로 둔 네임스페이스 블록을 파싱하게 하였습니다.배경
같은 조직의
sandrone-code-review-bot과 설정 파일을 공유하기로 하였습니다. 그쪽은 이미 최상위 키(공통 설정) 위에sandrone:블록을 덮어쓰는 구조로 구현되어 있고(internal/adapter/outbound/settings/configloader.go), 자기 것이 아닌 블록은 무시합니다. 이 봇도 대칭이 되도록it-play:블록을 읽게 하였습니다.변경 사항
src/config.tsBOT_NAMESPACES상수를 추가하였습니다. 값은it-play와 별칭itplay이며, 앞에서부터 순서대로 적용되어 뒤가 이깁니다.pickRepoConfig()을 추가하였습니다. 최상위 공통 설정을 먼저 뽑은 뒤 이 봇의 네임스페이스 블록을 그 위에 덮어씁니다. 네임스페이스 블록은 최상위와 동일한 키 스키마를 사용합니다.기본값→파일 최상위→it-play 블록→환경변수가 되었습니다..reviewbot/config.yml에는 파일 공유 규칙을 주석으로 명시하였습니다.동작 결정 사항
exclude는 누적하지 않고 레이어 단위로 덮어씁니다. 최상위와it-play:양쪽에exclude가 있으면 최종 값은기본 제외 목록 + it-play 목록이 됩니다.sandrone쪽mergeReviewSetting이 동일하게 동작하기 때문으로, 같은 파일을 읽은 두 봇이 서로 다른 파일 집합을 리뷰하는 상황을 피하는 편을 택하였습니다. 공통 제외 규칙은 최상위에만 두면 됩니다.상대 봇 전용 키(
tone,autoReviewOnPush,summaryPlacement등)는 이 봇의 스키마에 없으므로 최상위든 네임스페이스 안이든 무시됩니다.기존의 네임스페이스 없는 평면 설정 파일은 그대로 동작합니다.
검증
npm run typecheck,npm run build통과하였습니다.loadConfig를 번들하여 직접 호출해 확인하였습니다.it-play:,sandrone:이 함께 있는 공유 설정에서it-play값만 반영되었습니다.language: jp+it-play: {language: en}→en이었습니다.language: jp+sandrone: {language: en}→jp로, 상대 봇 블록은 무시되었습니다.