트릭 등록 팩토리 우회 금지 아키텍처 규칙 추가 (ArchUnit) - #266
Open
ckdals4600 wants to merge 1 commit into
Open
Conversation
Counter.builder 직접 호출을 global.metrics 패키지 외부에서 금지하는 ArchUnit 규칙 추가. 팩토리(#261)를 우회한 등록이 컴파일·기존 테스트를 통과하며 태그 키셋 불일치를 재발시키는 것을 구조적으로 차단. - archunit-junit5 의존성 추가 (testImplementation) - 규칙은 main 코드만 검사 (DoNotIncludeTests)
ckdals4600
force-pushed
the
feature/#263-ArchUnit
branch
from
July 27, 2026 15:26
327a2c5 to
5d08f2b
Compare
📊 코드 커버리지 리포트
|
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.
관련 이슈
PR 설명
#261 에서 도입한 메트릭 등록 팩토리(
AiClientMetrics,AsyncTaskMetrics)의 우회를 아키텍처 규칙으로 차단합니다.배경
팩토리는 태그 키셋을 메서드 시그니처로 고정하지만, 팩토리 사용 자체를 강제하는 장치는 없었습니다.
Counter.builder를 직접 호출하면 컴파일·기존 테스트를 모두 통과하면서 #259 에서 교정한 키셋 불일치가 조용히 재발할 수 있습니다. 이로써 재발 방지가 3중으로 완성됩니다:MetricsTagConsistencyTest— 등록된 키셋의 수렴 검증 (메트릭 태그 키셋 정합성 통일 및 등록 팩토리 도입 (ai.client.calls · async.task.failures) #261)변경 사항
archunit-junit5:1.3.0의존성 추가 (testImplementation — 프로덕션 빌드에 미포함)architecture테스트 패키지 신설,MetricsArchitectureTest추가global.metrics패키지 외부에서Counter.builder(String)호출 금지DoNotIncludeTests: 검사 대상은 main 코드만 (테스트 코드는 검증 목적의 직접 등록 허용)because)에 팩토리 경유 이유와 재발 메커니즘 명시 → 위반자가 메시지만으로 해결 방법을 알 수 있음architecture패키지는 향후 아키텍처 규칙(레이어 의존 등)의 확장 지점으로 사용참고