Wire the Incremental Review Path With Full Diff Fallback

未关闭
#182 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
backend, devtools

调研方向

Start with packages/core/src/review/phase.ts, then trace how previousCommitSha, getIncrementalDiffFiles, and loadSuppressedFingerprints are provided to the review phase. Add coverage for incremental reviews, missing-SHA fallback, and the setting-off path; the issue names npm run typecheck, npm test, and npm run lint as verification commands. Done means incremental jobs review only the commit-delta files, retain PR context, suppress duplicate findings, and record the reviewed commit range in the job summary.

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue

Goal

Wire the incremental review path into the review phase (packages/core/src/review/phase.ts) when config.review.incremental === true, including the full-diff fallback.

Background

This sub-issue connects the earlier pieces: the review.incremental setting, the resolved previousCommitSha, and getIncrementalDiffFiles. When the setting is on and a previous SHA exists, the LLM review runs only on the incremental file set. Otherwise the review falls back to the current full PR diff.

This sub-issue is part of the parent issue: incremental reviews on synchronize events.

What to Build

  • In the review phase, branch on config.review.incremental and the presence of previousCommitSha
  • When incremental: use getIncrementalDiffFiles and run LLM review only on those files
  • Retain PR-level context (title, description) for the review prompt and summary
  • Continue to suppress already-flagged findings via the existing loadSuppressedFingerprints mechanism so duplicate comments are not re-posted
  • Fall back to the full PR diff when previousCommitSha is missing (first push, or superseded prior job)
  • Update the job summary to note that the review was incremental and which commit range was reviewed

Done When

  • review.incremental: true with a valid previous SHA reviews only the commit-delta files
  • Missing previous SHA falls back gracefully to the full PR diff
  • Suppressed findings are not re-posted on incremental reviews
  • Job summary records the reviewed commit range for incremental jobs
  • Existing full reviews (auto-triggered and mention-triggered) are unchanged when the setting is off
  • Tests cover the incremental path, the fallback, and the off-by-default behavior
  • npm run typecheck, npm test, and npm run lint all pass
主要语言
TypeScript
星标
125
派生
23
平均合并
2 天 13 小时
30 天内合并 PR
12

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

devarshishimpi/codra 的其他 Issue

查看 devarshishimpi/codra 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。