Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughClaudeClient의 시스템 프롬프트에서 이모지 권장 및 응답 길이 제한을 제거하고 응답은 질문에만 하도록 변경했습니다. SlackAIService에 마크다운 이탤릭 정규식 패턴을 추가하고 convertMarkdownToSlack에서 볼드 변환 후 이탤릭 변환을 적용했습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.java`:
- Around line 180-181: The single-asterisk replace at MARKDOWN_ITALIC_PATTERN is
a no-op for already-unescaped "*text*" and doesn't handle escaped forms like
"\*text\*"; update convertMarkdownToSlack to first unescape escaped asterisks
(replace "\\*([\\s\\S]+?)\\*" -> "*$1*"), then apply MARKDOWN_BOLD_PATTERN
replacement to produce "**$1**", then apply MARKDOWN_ITALIC_PATTERN to produce
"*$1*" (ensuring the regexes match unescaped forms only and order is bold ->
italic), and add unit tests for convertMarkdownToSlack covering "*text*",
"**text**", and "\*text\*" inputs to assert expected Slack-formatted outputs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d3705ba9-bf48-4cf8-9c1e-3de7f2176d11
📒 Files selected for processing (2)
src/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.javasrc/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.java
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
src/main/java/**/*.java
⚙️ CodeRabbit configuration file
src/main/java/**/*.java: 아래 원칙으로 리뷰 코멘트를 작성한다.
- 코멘트는 반드시 한국어로 작성한다.
- 반드시 수정이 필요한 항목만 코멘트로 남기고, 단순 취향 차이는 지적하지 않는다.
- 각 코멘트 첫 줄에 심각도를
[LEVEL: high|medium|low]형식으로 반드시 표기한다.- 심각도 기준: high=운영 장애 가능, medium=품질 저하, low=개선 권고.
- 각 코멘트는 "문제 -> 영향 -> 제안" 순서로 3문장 이내로 간결하게 작성한다.
- 가능하면 재현 조건 및 실패 시나리오도 포함한다.
- 제안은 현재 코드베이스(Spring Boot + JPA + Flyway) 패턴과 일치해야 한다.
- 보안, 트랜잭션 경계, 예외 처리, N+1, 성능 회귀 가능성을 우선 점검한다.
- 가독성: 변수/메서드 이름이 의도를 바로 드러내는지, 중첩과 메서드 길이가 과도하지 않은지 점검한다.
- 단순화: 불필요한 추상화, 중복 로직, 과한 방어 코드가 있으면 더 단순한 대안을 제시한다.
- 확장성: 새 요구사항 추가 시 변경 범위가 최소화되는 구조인지(하드코딩 분기/값 여부 포함) 점검한다.
Files:
src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.javasrc/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.java
**/*
⚙️ CodeRabbit configuration file
**/*: 공통 리뷰 톤 가이드:
- 모든 코멘트는 첫 줄에
[LEVEL: ...]태그를 포함한다.- 과장된 표현 없이 사실 기반으로 작성한다.
- 한 코멘트에는 하나의 이슈만 다룬다.
- 코드 예시가 필요하면 최소 수정 예시를 제시한다.
- 가독성/단순화/확장성 이슈를 발견하면 우선순위를 높여 코멘트한다.
Files:
src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.javasrc/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.java
🧠 Learnings (1)
📚 Learning: 2026-02-16T09:45:12.135Z
Learnt from: CR
Repo: BCSDLab/KONECT_BACK_END PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-16T09:45:12.135Z
Learning: Always respond in Korean
Applied to files:
src/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.java
| String result = MARKDOWN_BOLD_PATTERN.matcher(text).replaceAll("*$1*"); | ||
| return MARKDOWN_ITALIC_PATTERN.matcher(result).replaceAll("*$1*"); |
There was a problem hiding this comment.
[LEVEL: medium]
문제: Line 181의 단일 별표 변환은 *text*를 다시 *text*로 치환하는 no-op이라 실제 변환 동작이 없습니다.
영향: CAM-208 재현 케이스에서 입력/출력이 동일해 Slack 렌더링 문제가 그대로 남을 수 있습니다.
제안: 실제 실패 입력(예: 이스케이프된 \*text\* 등)을 기준으로 변환 규칙을 수정하고, convertMarkdownToSlack에 *text*/**text**/\*text\* 케이스 단위 테스트를 추가해 기대 결과를 고정해 주세요.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.java`
around lines 180 - 181, The single-asterisk replace at MARKDOWN_ITALIC_PATTERN
is a no-op for already-unescaped "*text*" and doesn't handle escaped forms like
"\*text\*"; update convertMarkdownToSlack to first unescape escaped asterisks
(replace "\\*([\\s\\S]+?)\\*" -> "*$1*"), then apply MARKDOWN_BOLD_PATTERN
replacement to produce "**$1**", then apply MARKDOWN_ITALIC_PATTERN to produce
"*$1*" (ensuring the regexes match unescaped forms only and order is bold ->
italic), and add unit tests for convertMarkdownToSlack covering "*text*",
"**text**", and "\*text\*" inputs to assert expected Slack-formatted outputs.
There was a problem hiding this comment.
Pull request overview
Slack에서 Claude AI 응답의 마크다운 강조 표기(*text*, **text**)가 의도대로 볼드로 렌더링되도록 변환 로직을 확장하는 PR입니다.
Changes:
SlackAIService에 단일 별표(*text*) 매칭 패턴을 추가하고, 변환 순서를** → *다음* → *로 적용ClaudeClient의 SYSTEM_PROMPT 응답 규칙 문구 일부를 수정
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/java/gg/agit/konect/infrastructure/slack/ai/SlackAIService.java | Slack용 마크다운 변환에서 단일 별표 강조 처리 추가 |
| src/main/java/gg/agit/konect/infrastructure/claude/client/ClaudeClient.java | Claude 시스템 프롬프트의 응답 규칙 문구 조정 |
| private static final Pattern MARKDOWN_BOLD_PATTERN = | ||
| Pattern.compile("\\*\\*(.+?)\\*\\*", Pattern.DOTALL); | ||
| private static final Pattern MARKDOWN_ITALIC_PATTERN = | ||
| Pattern.compile("(?<!\\*)\\*(?!\\*)(.+?)(?<!\\*)\\*(?!\\*)", Pattern.DOTALL); |
| ## 응답 규칙 | ||
| - 반드시 한국어로 응답 | ||
| - 이모지를 적절히 사용하여 친근하게 | ||
| - 간결하게 2-3문장으로 답변 | ||
| - 답변은 질문한 것에 대해서만 할 것 | ||
| - 모르는 테이블이 있으면 먼저 탐색 후 답변 | ||
| - 예측/미래 추론 질문은 현재까지의 데이터만 제공하고 예측은 어렵다고 안내 | ||
| - 데이터베이스에 정말 없는 정보만 정중히 거절 |
🔍 개요
*text*(단일 별표) 형식으로 강조 표현을 사용하는 경우, Slack에서 볼드 처리가 되지 않는 문제를 개선합니다.**text**(이중 별표)만 Slack 볼드(*text*)로 변환하고 있었으나, 단일 별표도 동일하게 처리합니다.🚀 주요 변경 내용
SlackAIService—MARKDOWN_ITALIC_PATTERN추가 ((?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*))convertMarkdownToSlack메서드에서**text**변환 후*text*순서로 처리💬 참고 사항
**text**의*가 single 패턴에 잘못 매칭될 수 있음MARKDOWN_BOLD_PATTERN의Pattern.DOTALL특성과 동일하게 적용됨✅ Checklist (완료 조건)