-
Notifications
You must be signed in to change notification settings - Fork 212
feat: -增加分批次审查 #148
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
base: main
Are you sure you want to change the base?
feat: -增加分批次审查 #148
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a batch-based code review feature that divides code changes into smaller batches for AI review, then consolidates the results. This addresses issues where reviewing all changes at once caused the AI to lose context or forget prompt template requirements.
Key Changes:
- Added configurable batch review system with environment variables (
BATCH_REVIEW_ENABLED,BATCH_REVIEW_FILES_PER_BATCH) - Implemented
review_changes_in_batches()method that processes changes in configurable file batches - Created
summary_merge_review_prompttemplate for consolidating multiple batch reviews - Updated all webhook handlers to use the new batch review approach
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| conf/prompt_templates.yml | Added new summary_merge_review_prompt template and restructured code_review_prompt with stricter output format requirements and self-checking mechanisms |
| conf/.env.dist | Added batch review configuration variables (BATCH_REVIEW_ENABLED, BATCH_REVIEW_FILES_PER_BATCH) |
| biz/utils/code_reviewer.py | Implemented review_changes_in_batches() and _summarize_reviews() methods for batch processing and consolidation |
| biz/queue/worker.py | Updated all event handlers to use review_changes_in_batches() instead of review_and_strip_code() |
| BATCH_REVIEW_IMPLEMENTATION.md | Added comprehensive documentation explaining the batch review feature, configuration options, and performance characteristics |
Comments suppressed due to low confidence (1)
conf/prompt_templates.yml:1
- Inconsistency in scoring criteria labels between the definition section (line 13: '性能与资源利用效率(5分)') and the output format section (line 27: '性能与资源利用效率'). Additionally, the summary section (line 92) uses '性能与资源效率' (missing '利用'). All three instances should use the same label for consistency.
code_review_prompt:
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| 在 `conf/.env` 文件中添加: | ||
|
|
||
| ```bash | ||
| # 启用批量审查 0-否 1-是 |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Corrected comment punctuation and spacing: '启用批量审查 0-否 1-是' should be '启用批量审查(0=禁用,1=启用)' to match the style used in conf/.env.dist line 42.
| # 启用批量审查 0-否 1-是 | |
| # 启用批量审查(0=禁用,1=启用) |
No description provided.