From b9d3602309e9d329db2d0ae0d2baf1e844007fad Mon Sep 17 00:00:00 2001 From: wenshao Date: Tue, 7 Apr 2026 08:58:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(review):=203=20Copilot=20comments=20?= =?UTF-8?q?=E2=80=94=20conditional=20cleanup,=20italic=20format,=20cache?= =?UTF-8?q?=20SHA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Step 11: conditional worktree removal — skip if Step 8 flagged preservation (autofix commit/push failure) 2. Standardize model attribution to _italic_ (was mixed *italic*) 3. Cache stores pre-autofix headRefOid (not worktree HEAD which may include the autofix commit) Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/core/src/skills/bundled/review/SKILL.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/core/src/skills/bundled/review/SKILL.md b/packages/core/src/skills/bundled/review/SKILL.md index d2e7716a5..32faaf60b 100644 --- a/packages/core/src/skills/bundled/review/SKILL.md +++ b/packages/core/src/skills/bundled/review/SKILL.md @@ -495,7 +495,7 @@ If reviewing a PR, update the review cache for incremental review support: 2. Write `.qwen/review-cache/pr-.json` with: ```json { - "lastCommitSha": "", + "lastCommitSha": "", "lastModelId": "{{model}}", "lastReviewDate": "", "findingsCount": , @@ -508,10 +508,12 @@ If reviewing a PR, update the review cache for incremental review support: Remove all temp files (`/tmp/qwen-review-{target}-context.md`, `/tmp/qwen-review-{target}-comment.txt`, `/tmp/qwen-review-{target}-summary.txt`). -If a PR worktree was created in Step 1, remove it and its local ref: +If a PR worktree was created in Step 1, **and Step 8 did NOT instruct to preserve it** (autofix commit/push failure), remove it and its local ref: -1. `git worktree remove .qwen/tmp/review-pr- --force` (the `--force` flag handles cases where autofix left uncommitted changes) -2. `git branch -D qwen-review/pr- 2>/dev/null || true` (clean up the local ref; ignore errors if already deleted) +1. `git worktree remove .qwen/tmp/review-pr- --force` +2. `git branch -D qwen-review/pr- 2>/dev/null || true` + +If Step 8 flagged the worktree for preservation (autofix failure), skip worktree removal but still clean up temp files. This step runs **after** Step 9 and Step 10 to ensure all review outputs are saved before cleanup.