Add Incremental Reviews on Synchronize Events
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github, typescript
調査の方向性
Start with packages/core/src/review/diff-cache.ts and trace how review jobs obtain diffs and how ReviewGitProvider.getCompareDiff is used. Then inspect the synchronize job flow, review settings, dashboard job details, and related tests named by the work breakdown. Done means incremental reviews use the commit delta with a full diff fallback, preserve existing full-review behavior, show the reviewed commit range, and cover the listed paths across supported backends.
索引モデルが issue の本文から書いたものです。
説明
Summary
When a developer pushes a new commit to an open PR (synchronize event), Codra re-fetches the entire base-to-head PR diff and re-reviews every changed file from scratch. On a large PR with many files, this burns the full token budget and several minutes of wall-clock time, even if only a single file changed in the new commit.
This parent issue tracks adding optional incremental reviews. See sub-issues for each implementation step.
Work Breakdown
- Sub-issue: Add
review.incrementalschema setting and document it - Sub-issue: Store and resolve
previousCommitShafor synchronize jobs - Sub-issue: Add
getIncrementalDiffFilesto diff-cache.ts - Sub-issue: Wire incremental path in the review phase and add fallback logic
- Sub-issue: Show reviewed commit range in dashboard job details
Current Behavior
In packages/core/src/review/diff-cache.ts:
rawDiff = await github.getPullRequestDiff(job.owner, job.repo, job.prNumber);
This always fetches the full PR diff (base to head), regardless of how many files changed in the latest push. The existing getCompareDiff method on ReviewGitProvider already supports commit-to-commit comparison but is only used for the dashboard diff viewer, never for review execution.
Proposed Behavior
When review.incremental: true is set:
- On
synchronize, resolvepreviousCommitShafrom the most recently completed job on the same PR - Fetch
github.getCompareDiff(owner, repo, previousCommitSha, newHeadSha)to get only the commit-delta diff - Run the LLM review only on files in the incremental diff
- Retain PR-level context (title, description, existing finding fingerprints) for the summary
- Use the existing
loadSuppressedFingerprintsmechanism to avoid re-posting identical findings - Fall back to full PR diff if
previousCommitShais not available
Done When
-
review.incremental: truetriggers commit-delta diff fetching onsynchronizeevents - Only files changed between the previous and new commit are sent to LLM review
- Falls back to full PR diff gracefully when no previous commit SHA is available
- Existing auto-triggered and mention-triggered full reviews continue to work unchanged
- Job details in the dashboard show the reviewed commit range for incremental jobs
- Tests cover incremental path, full-diff fallback, and superseded-job resumption
- Any backend changes work in both Cloudflare Workers and Node/Docker
-
npm run typecheck,npm test, andnpm run lintall pass
- 主要言語
- TypeScript
- スター
- 125
- フォーク
- 23
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
devarshishimpi/codra のほかの issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
devarshishimpi/codra#178 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
devarshishimpi/codra#176 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
devarshishimpi/codra#186 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
devarshishimpi/codra#185 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
devarshishimpi/codra#184 ·
メンテナーはふだん 1 日以内に返信
devarshishimpi/codra の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
gofish-graphics/gofish-graphics#1384 ·
メンテナーはふだん 1 日以内に返信
-
adapter bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
Olanetsoft/agent-lookout#353 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vicharanashala/vibe#1542 ·
メンテナーはふだん 1 日以内に返信
-
bug chore P2 size:XS
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
josephfung/curia#2666 ·
メンテナーはふだん 1 日以内に返信
-
area: batch
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
inabagumi/shinju-date#7294 ·
メンテナーはふだん 1 日以内に返信