feat(review): AI-ревью PR — diff через GitHub + RAG (доки+код) - #13
Merged
Conversation
Пайплайн автоматического код-ревью пул-реквеста: - получает diff и изменённые файлы через GitHub (gh); - подмешивает RAG-контекст по двум индексам — документация и код (CompositeRetrievalEngine); - LLM выдаёт структурированный разбор: баги / архитектура / рекомендации. Слои: - domain/review.py::PrDiff; app/pr_review.py::review_pull_request (use case); - порты app.ports.DiffProvider/ReviewPublisher; - infra: GhDiffProvider, GhReviewPublisher, gh.run_gh, CompositeRetrievalEngine; - CLI /review <PR> (печатает); review_pr.py — CI-энтрипойнт (постит комментарий); - GitHub Action .github/workflows/ai-review.yml (self-hosted, on: pull_request). Тесты на фейках (18 шт.), pytest зелёный (492 passed). Второй индекс по коду — CODE_INDEX_PATH (по умолчанию ~/rag-kotlin/index_jarvis_full). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPCiJi7DVBdV2fjN2x3HMd
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.
Что это
Автоматическое AI-ревью пул-реквеста. Пайплайн:
gh);CompositeRetrievalEngine);Как устроено (по слоям)
domain/review.py::PrDiffapp/pr_review.py::review_pull_request, портыDiffProvider/ReviewPublisherGhDiffProvider,GhReviewPublisher,gh.run_gh,CompositeRetrievalEngine/review <PR>(cli/review_commands.py) — печатает ревьюreview_pr.py(постит комментарий),.github/workflows/ai-review.yml(self-hosted,on: pull_request)Второй индекс по коду —
CODE_INDEX_PATH(по умолчанию~/rag-kotlin/index_jarvis_full).Проверки
pytest— 492 passed (+18 новых тестов на фейках).gh→ diff + 12 файлов → RAG on (в источниках и доки, и код) → ревью в трёх разделах.Запуск пайплайна вручную
```
python3 review_pr.py # сгенерировать + запостить комментарий
python3 review_pr.py --no-comment # только напечатать
```
Что нужно на стороне репозитория
DEEPSEEK_API_KEY(в CI ключ из.envнедоступен — он gitignored).🤖 Generated with Claude Code
https://claude.ai/code/session_01WPCiJi7DVBdV2fjN2x3HMd