Skip to content

Conversation

@machsh64
Copy link

No description provided.

  - 增加分批次审查功能
  - 提示词更新(但提示词效果并不好的样子 in qwen2.5-coder:32b-instruct)
@machsh64 machsh64 requested a review from sunmh207 as a code owner October 24, 2025 07:54
@Copilot Copilot AI review requested due to automatic review settings October 24, 2025 07:54
Copy link

Copilot AI left a 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_prompt template 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-是
Copy link

Copilot AI Oct 24, 2025

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.

Suggested change
# 启用批量审查 0-否 1-是
# 启用批量审查(0=禁用,1=启用)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant