Repository navigation
feat(build): 어댑터 커버리지 임계 80% (CY-236) #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
044c2bf
feat(build): 어댑터 커버리지 임계 80%
UHeeJoon 569bd55
fix(journal): AIJ-0024 프론트매터와 로컬 검사
UHeeJoon ec7cc2a
fix(build): 어댑터 보고서 범위와 실패 시 생성
UHeeJoon 3d296ba
docs(journal): 커버리지 리뷰 지적 반영
UHeeJoon 00b1a13
fix(hooks): 프론트매터 닫는 구분자 확인
UHeeJoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| --- | ||
| id: AIJ-0024 | ||
| date: 2026-08-20 | ||
| kind: decision | ||
| phase: 3 | ||
| plan: [3.9.1] | ||
| jira: CY-236 | ||
| commits: [64e1f18, 0252dec, f864363] | ||
| agent: claude-opus-5 | ||
| confidence: medium | ||
| promoted-to: | ||
| --- | ||
|
|
||
| # 어댑터 커버리지 — 통합 exec 만으로는 엉뚱한 것을 잰다 | ||
|
|
||
| ## 무엇을 했나 | ||
|
|
||
| `adapterCoverageVerification`. `adapter.redis` 패키지 브랜치 커버리지가 80% | ||
| 미만이면 빌드가 실패한다 (G3.9). 보고용 `adapterCoverageReport` 를 같이 뒀다 — | ||
| 못 넘겼을 때 **어디가 빈지** 봐야 고칠 수 있다. | ||
|
|
||
| ## 실측이 계획을 고쳤다 | ||
|
|
||
| 태스크 이름은 "통합 테스트 커버리지 임계" 였다. 그대로 통합 exec 만 보게 | ||
| 만들고 재 봤더니 **27.1%** 였다. 임계를 80 으로 두면 그냥 못 넘긴다. | ||
|
|
||
| | exec | 브랜치 커버리지 | | ||
| |---|---| | ||
| | 통합만 | 13/48 = **27.1%** | | ||
| | 단위 + 통합 | 44/48 = **91.7%** | | ||
|
|
||
| 이유는 둘이다. | ||
|
|
||
| 1. **JaCoCo 는 Lua 를 못 본다.** 통합 시험이 실제로 검증하는 것은 스크립트인데 | ||
| 그건 계측 대상이 아니다. 통합 exec 에 남는 것은 그 주변 Java 뿐이다. | ||
| 2. **어댑터의 Java 는 대부분 순수 로직이다.** `RedisKeys`·`ShardHash`· | ||
| `ClockSkewTracker` 는 키를 만들고 해시를 돌린다. 그건 단위 시험이 도는 곳이다. | ||
|
|
||
| 그래서 통합 exec 만으로 재면 **낮은 숫자가 나오는 게 아니라 엉뚱한 것을 | ||
| 재게 된다.** 임계를 27% 로 낮추는 것은 더 나쁘다 — 통과하는데 아무것도 안 | ||
| 보는 게이트가 된다. 두 계층 exec 를 합쳐서 잰다. | ||
|
|
||
| ## CI 에 붙이는 방식 | ||
|
|
||
| 계층은 **잡으로 갈려** 있다 (TS-5 — 깨진 계층이 이름만 보고 드러나야 한다). | ||
| 그래서 각 잡은 자기 exec 만 남기고 한자리에 안 모인다. | ||
|
|
||
| 두 갈래가 있었다. | ||
|
|
||
| - **exec 를 아티팩트로 올려 합치는 잡을 하나 더 둔다** — 정석이지만 잡이 | ||
| 하나 늘고 업로드·다운로드 배선이 붙는다 | ||
| - **커버리지 잡 하나에서 두 계층을 함께 돌린다** — 단위·통합을 한 번 더 도는 | ||
| 비용이 든다 | ||
|
|
||
| 후자를 골랐다. 통합이 30초 안쪽이라 중복 비용이 배선 비용보다 싸다. **틀리면 | ||
| 바꾸기도 쉽다** — 아티팩트 배선은 한 번 깔면 걷어내기 번거롭다. 통합이 분 | ||
| 단위로 늘면 그때 전자로 옮긴다. | ||
|
|
||
| ## 리뷰에서 더 나온 것 | ||
|
|
||
| - **보고 대상을 어댑터로 좁혔다.** `sourceSets.main.output` 전체를 넣어 | ||
| 도메인과 부트 클래스가 보고서에 섞였다 — "어댑터 보고서" 라는 이름이 | ||
| 거짓이었다. | ||
| - **보고서를 검증의 finalizer 로 걸었다.** 임계를 못 넘긴 실행에서만 보고서가 | ||
| 없었다. **못 넘겼을 때가 보고서가 가장 필요한 때다.** | ||
| - **`description` 이 "통합 시험 기준" 이었다.** 실제로는 단위·통합을 합치는데 | ||
| CI 출력이 계산 범위를 잘못 안내했다. | ||
|
|
||
| ## 확신이 낮은 부분 | ||
|
|
||
| - **80 의 근거가 약하다.** 지금 실측이 91.7% 라 여유가 있어 잡은 값이다. | ||
| 어댑터가 커지면 이 여유가 먼저 줄고, 그때 80 이 맞는지 다시 봐야 한다. | ||
| - **Lua 는 여전히 커버리지 밖이다.** 스크립트 분기가 다 돌았는지는 이 숫자가 | ||
| 말해 주지 않는다. 그건 통합 시험의 단언이 보증할 몫이다. | ||
|
|
||
| ## 검증 | ||
|
|
||
| - 임계를 0.95 로 올리면 실패, 0.80 이면 통과 (게이트가 실제로 문다) | ||
| - `clean` 후 `test integrationTest adapterCoverageVerification` 통과 | ||
|
|
||
| ## 다음 사람에게 | ||
|
|
||
| **커버리지 숫자가 낮으면 먼저 "무엇을 재고 있는지" 를 의심해라.** 27% 를 | ||
| 보고 테스트를 더 쓰는 것은 틀린 대응이었다. 재는 대상이 어긋나 있었다. |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.