Conversation
Add simple CI and dev compose
에이전트 하네스와 협업 문서 추가
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive suite of AI agent configurations, reusable skills, pre/post-tool hooks, and project guidelines (such as CLAUDE.md and AGENTS.md) for a Python/FastAPI AI service. The review feedback highlights a critical bug in the find-polluter.sh script where patterns without a leading ./ fail to match any files, and notes that several debugging guides and script examples are written with TypeScript/JavaScript syntax and file patterns instead of Python/pytest. It is recommended to apply the suggested script fixes and update the documentation examples to align with the project's Python stack.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> | ||
| # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts' | ||
|
|
||
| set -e | ||
|
|
||
| if [ $# -ne 2 ]; then | ||
| echo "Usage: $0 <file_to_check> <test_pattern>" | ||
| echo "Example: $0 '.git' 'src/**/*.test.ts'" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
이 프로젝트는 Python/FastAPI 기반이며 테스트 도구로 pytest를 사용합니다. 하지만 스크립트 내의 사용 예시가 TypeScript 패턴(src/**/*.test.ts)으로 작성되어 있어 프로젝트 환경과 일치하지 않습니다. pytest로 TypeScript 파일을 실행하면 테스트가 정상적으로 수행되지 않으므로, 예시를 Python 테스트 패턴(예: tests/**/test_*.py)으로 변경하는 것이 좋습니다.
| # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> | |
| # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts' | |
| set -e | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <file_to_check> <test_pattern>" | |
| echo "Example: $0 '.git' 'src/**/*.test.ts'" | |
| exit 1 | |
| fi | |
| # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> | |
| # Example: ./find-polluter.sh '.git' 'tests/**/test_*.py' | |
| set -e | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <file_to_check> <test_pattern>" | |
| echo "Example: $0 '.git' 'tests/**/test_*.py'" | |
| exit 1 | |
| fi |
| # Get list of test files | ||
| TEST_FILES=$(find . -path "$TEST_PATTERN" | sort) |
There was a problem hiding this comment.
find . 명령어는 기본적으로 ./로 시작하는 상대 경로를 반환합니다 (예: ./tests/test_foo.py). 하지만 사용자가 tests/**/*.py와 같은 패턴을 전달하면, find . -path "tests/**/*.py"는 leading ./가 없기 때문에 아무 파일도 매칭하지 못합니다. 이로 인해 TEST_FILES가 빈 값이 되고, 테스트를 전혀 실행하지 않은 채 "No polluter found" 메시지를 출력하며 정상 종료되는 심각한 버그가 발생합니다.
패턴이 ./로 시작하지 않는 경우 자동으로 ./를 앞에 붙여주도록 수정하여 이 문제를 해결할 수 있습니다.
| # Get list of test files | |
| TEST_FILES=$(find . -path "$TEST_PATTERN" | sort) | |
| # Get list of test files | |
| if [[ ! "$TEST_PATTERN" =~ ^\./ ]]; then | |
| TEST_PATTERN="./$TEST_PATTERN" | |
| fi | |
| TEST_FILES=$(find . -path "$TEST_PATTERN" | sort) |
| # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> | ||
| # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts' | ||
|
|
||
| set -e | ||
|
|
||
| if [ $# -ne 2 ]; then | ||
| echo "Usage: $0 <file_to_check> <test_pattern>" | ||
| echo "Example: $0 '.git' 'src/**/*.test.ts'" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
이 프로젝트는 Python/FastAPI 기반이며 테스트 도구로 pytest를 사용합니다. 하지만 스크립트 내의 사용 예시가 TypeScript 패턴(src/**/*.test.ts)으로 작성되어 있어 프로젝트 환경과 일치하지 않습니다. pytest로 TypeScript 파일을 실행하면 테스트가 정상적으로 수행되지 않으므로, 예시를 Python 테스트 패턴(예: tests/**/test_*.py)으로 변경하는 것이 좋습니다.
| # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> | |
| # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts' | |
| set -e | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <file_to_check> <test_pattern>" | |
| echo "Example: $0 '.git' 'src/**/*.test.ts'" | |
| exit 1 | |
| fi | |
| # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> | |
| # Example: ./find-polluter.sh '.git' 'tests/**/test_*.py' | |
| set -e | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <file_to_check> <test_pattern>" | |
| echo "Example: $0 '.git' 'tests/**/test_*.py'" | |
| exit 1 | |
| fi |
| # Get list of test files | ||
| TEST_FILES=$(find . -path "$TEST_PATTERN" | sort) |
There was a problem hiding this comment.
find . 명령어는 기본적으로 ./로 시작하는 상대 경로를 반환합니다 (예: ./tests/test_foo.py). 하지만 사용자가 tests/**/*.py와 같은 패턴을 전달하면, find . -path "tests/**/*.py"는 leading ./가 없기 때문에 아무 파일도 매칭하지 못합니다. 이로 인해 TEST_FILES가 빈 값이 되고, 테스트를 전혀 실행하지 않은 채 "No polluter found" 메시지를 출력하며 정상 종료되는 심각한 버그가 발생합니다.
패턴이 ./로 시작하지 않는 경우 자동으로 ./를 앞에 붙여주도록 수정하여 이 문제를 해결할 수 있습니다.
| # Get list of test files | |
| TEST_FILES=$(find . -path "$TEST_PATTERN" | sort) | |
| # Get list of test files | |
| if [[ ! "$TEST_PATTERN" =~ ^\./ ]]; then | |
| TEST_PATTERN="./$TEST_PATTERN" | |
| fi | |
| TEST_FILES=$(find . -path "$TEST_PATTERN" | sort) |
| ```typescript | ||
| // ❌ BEFORE: Guessing at timing | ||
| await new Promise(r => setTimeout(r, 50)); | ||
| const result = getResult(); | ||
| expect(result).toBeDefined(); | ||
|
|
||
| // ✅ AFTER: Waiting for condition | ||
| await waitFor(() => getResult() !== undefined); | ||
| const result = getResult(); | ||
| expect(result).toBeDefined(); | ||
| ``` |
| ```typescript | ||
| function createProject(name: string, workingDirectory: string) { | ||
| if (!workingDirectory || workingDirectory.trim() === '') { | ||
| throw new Error('workingDirectory cannot be empty'); | ||
| } | ||
| if (!existsSync(workingDirectory)) { | ||
| throw new Error(`workingDirectory does not exist: ${workingDirectory}`); | ||
| } | ||
| if (!statSync(workingDirectory).isDirectory()) { | ||
| throw new Error(`workingDirectory is not a directory: ${workingDirectory}`); | ||
| } | ||
| // ... proceed | ||
| } | ||
| ``` |
| ```typescript | ||
| await execFileAsync('git', ['init'], { cwd: projectDir }); | ||
| ``` | ||
|
|
||
| ### 3. Ask: What Called This? | ||
| ```typescript | ||
| WorktreeManager.createSessionWorktree(projectDir, sessionId) | ||
| → called by Session.initializeWorkspace() | ||
| → called by Session.create() | ||
| → called by test at Project.create() | ||
| ``` |
| ```typescript | ||
| await execFileAsync('git', ['init'], { cwd: projectDir }); | ||
| ``` | ||
|
|
||
| ### 3. Ask: What Called This? | ||
| ```typescript | ||
| WorktreeManager.createSessionWorktree(projectDir, sessionId) | ||
| → called by Session.initializeWorkspace() | ||
| → called by Session.create() | ||
| → called by test at Project.create() | ||
| ``` |
| Use the bisection script `find-polluter.sh` in the scripts directory: | ||
|
|
||
| ```bash | ||
| ./scripts/find-polluter.sh '.git' 'src/**/*.test.ts' |
| Use the bisection script `find-polluter.sh` in the scripts directory: | ||
|
|
||
| ```bash | ||
| ./scripts/find-polluter.sh '.git' 'src/**/*.test.ts' |
✨ 작업 내용
🔍 리뷰 시 참고사항
✅ 체크리스트
.env.example등) 변경이 필요한 경우 작성 또는 수정했나요?📎 관련 이슈(선택)