Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ closes #

## 리뷰 요청 사항
<!-- 리뷰어가 특별히 확인해줬으면 하는 부분을 작성해주세요 (선택) -->

## @codex review 수동 트리거 댓글로 작성 요망

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Codex 자동 리뷰를 실행할 workflow도 함께 추가하세요

현재 저장소 기준으로 .github/workflows 아래에는 deploy.yml만 있고, 이번 diff는 PR template에 @codex review 수동 댓글 안내만 추가합니다. 그래서 커밋 설명과 달리 Codex review가 자동으로 실행되지는 않으며, 실제 운영에서는 리뷰 누락이나 계속된 수동 호출을 유발합니다. pull_request 등으로 트리거되는 workflow 파일을 실제로 추가하거나, 자동화가 준비되기 전까지는 이 안내 문구를 넣지 않는 쪽이 안전합니다.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이슈와 달리 task가 바뀜. 커밋 내역 참고해서 리뷰 넘길게요.

Comment thread
alphabeen marked this conversation as resolved.
Resolved
Comment thread
alphabeen marked this conversation as resolved.
Resolved
Comment thread
alphabeen marked this conversation as resolved.
Resolved
87 changes: 87 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# AGENTS.md

## Review guidelines

- Always write review comments in Korean.
- Keep technical terms in English when they are standard in software engineering or machine learning.
- Be concise, but explain why the issue matters and how to fix it.
- Prioritize real bugs, regressions, security issues, deployment risks, and ML/data issues over style nitpicks.
- Avoid commenting on trivial formatting unless it can cause misunderstanding.

## Project context

This repository is for an AI-Ops / MLOps style platform that includes:
- FastAPI backend
- OpenStack-related deployment/infrastructure integration
- ML-based prediction and anomaly detection pipelines
- Docker / GitHub Actions / self-hosted runner based deployment
- Database and metrics processing logic

When reviewing code, use this context and focus on operational safety and production reliability.

## What to focus on

### 1. Backend / API correctness
- Check for broken FastAPI route logic, invalid request/response handling, and exception paths.
- Flag missing validation, weak error handling, and inconsistent response formats.
- Check whether authentication or authorization-related logic is missing or bypassable.
- Watch for blocking I/O or heavy computation inside request handlers.

### 2. ML / data pipeline risks
- Look for possible data leakage between train/validation/test.
- Check whether feature generation uses future information accidentally.
- Flag inconsistent preprocessing between training and inference.
- Check whether saved model artifacts, metadata, and scalers stay in sync.
- Watch for silent fallback behavior that could hide model failure.
- Flag suspicious metric calculations or evaluation logic.
- Check whether anomaly thresholds, smoothing, aggregation, or time-window logic can produce misleading alerts.

### 3. Time-series / forecasting issues
- Be sensitive to ordering bugs, timestamp alignment problems, resampling errors, and off-by-one mistakes.
- Flag train/test splits that ignore temporal order.
- Check whether forward fill, interpolation, clipping, normalization, or lag feature generation can distort real behavior.
- Watch for target leakage through rolling statistics or future-dependent transformations.

### 4. Infra / deployment safety
- Check whether Docker, GitHub Actions, and deployment logic can break production unexpectedly.
- Flag risky shell commands, destructive cleanup, and commands that may impact unrelated containers or files.
- Check for mistakes in image tags, registry login flow, compose commands, and self-hosted runner cleanup.
- Watch for secrets accidentally exposed in logs, code, workflow files, or exception messages.

### 5. Database / persistence
- Flag schema mismatches, unsafe migrations, missing transactions, and inconsistent model persistence behavior.
- Check whether writes are idempotent where needed.
- Watch for race conditions or duplicate inserts in metric/history/alert flows.

### 6. Security
- Flag hardcoded secrets, tokens, endpoints, or credentials.
- Flag missing permission checks.
- Flag dangerous deserialization, shell injection risks, path traversal risks, and unsafe subprocess usage.
- Be strict about logging sensitive operational data.

## Review style

For each important issue:
- State the problem clearly in Korean.
- Explain why it is risky.
- Suggest a concrete fix.
- If severity is high, say so explicitly.

Preferred tone example:
- "이 부분은 `train/test leakage` 가능성이 있습니다."
- "현재 구현은 예측 시점 이후의 정보를 참조할 수 있어 시계열 평가가 왜곡될 수 있습니다."
- "이 workflow 단계는 self-hosted runner 환경에서 과도하게 파괴적일 수 있습니다."

## What to ignore unless severe

- Minor naming preferences
- Personal style preferences
- Formatting differences already handled by formatter/linter
- Non-critical refactors that do not affect correctness, safety, or maintainability

## Extra instructions

- When possible, prefer comments on correctness, reliability, and production impact.
- For ML-related pull requests, review like a careful ML engineer, not just a general code reviewer.
- For deployment-related pull requests, review like a cautious DevOps engineer.
- If a change looks intentional but risky, call out the risk without assuming the author is wrong.
Loading