fix(review): pin ordinary commit and range inputs before loading diffs
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 50/100
調査の方向性
Start by tracing validateResumeIdentity, Provider.GetDiffSet, ParseDiffText, and Agent.loadDiffs, along with the existing endpoint-resolution and Args.SealedInput machinery. Add focused regression tests that move a ref between admission and diff/content loading and verify consistent resolved head and content for Commit and Range, plus workspace and invalid-ref behavior. Run make check, make test, make build, and OCR self-review; report which checks were actually completed.
索引モデルが issue の本文から書いたものです。
説明
Problem
Ordinary non-resume Commit/Range reviews can read different commits within a single input when a named Git ref moves during the review. This follows the first question in Discussion #1658; the separate Resume duplicate-computation proposal is outside this issue.
At main 182898cf522da3d04157b422752d028417974e19:
validateResumeIdentityreturns no sealed input when no resume state exists.Provider.GetDiffSetobtains the diff using the original--to/--commitref, thenParseDiffTextreads each changed file through that same mutable ref.Agent.loadDiffsresolves manifest endpoints after obtaining the diff.
For ocr review --from main --to feature, moving feature from B to C after the diff command can therefore pair an A→B patch with C's NewFileContent or record C as the manifest head. --commit HEAD has the same window. This report is based on current code-path analysis, not a reproduced occurrence in a running LLM review.
Expected behavior
The patch, complete changed-file content, recorded resolved endpoints, and commit-backed tool reads should refer to the same immutable input for the run. Workspace review should retain its current live-working-tree behavior.
Proposed narrow fix
Resolve ordinary Commit/Range endpoints before loading a diff, reusing the existing endpoint-resolution and Args.SealedInput machinery. Carry one resolution through the existing diff provider and reader construction without introducing another diff/selection pass. Preserve original user ref strings as requested-input metadata; reject an unresolvable endpoint before creating a session. Leave Resume reuse/computation and fetching out of scope.
Related work: #1586 seals the endpoints of the opt-in --fetch path and explicitly retains existing behavior without --fetch; this issue concerns default non-fetch reviews. #1627 pins the shared tool reader after diff loading for corrective-read evidence; it does not pin the diff/full-content/manifest inputs before loading. This proposal should reuse compatible endpoint plumbing rather than duplicate either feature.
Validation plan
Add focused repository regression coverage that moves a ref between admission and diff/content loading, asserts consistent resolved head/content for Commit and Range, and covers workspace and invalid-ref behavior. Run the repository-required make check, make test, make build, and OCR self-review; report actual results and unperformed checks.
Environment
- Version: source snapshot at main
182898cf522da3d04157b422752d028417974e19; no installed release was used for the code-path analysis. - OS: macOS, arm64.
- Installation method: source checkout inspected locally; no CLI installation was used for this report.
- LLM provider: not applicable; the finding is in Git input preparation before any model call.
Steps / race schedule
This is the concrete schedule supported by the code, not a claimed executed end-to-end reproduction:
- Start a non-resume range review using moving refs, such as
ocr review --from main --to feature, wherefeaturepoints at B. - Allow the provider to generate
git diff <merge-base> featurewhilefeaturestill points at B. - Move
featureto C before the per-filegit show feature:<path>or laterResolveInputoperation. - The original patch describes B, while complete file content or the recorded resolved head can describe C. The analogous commit case uses
ocr review --commit HEADand moves HEAD in the same interval.
Workaround: pass full commit SHAs for endpoints. No runtime logs are attached because a running LLM review has not been reproduced.
AI assistance
Codex with GPT-6.1-sol performed the code-path analysis and prepared this proposal; GPT-6-luna gathered the current discussion, contribution rules, and related implementation evidence.
- 主要言語
- Go
- スター
- 46.9k
- フォーク
- 3.4k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 41
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
alibaba/open-code-review のほかの issue
-
fix(action): show warnings in zero-finding PR summaries対応中かも @hyy321 が 5 日前に担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alibaba/open-code-review#1752 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug(tool): handle invalid regular expression syntax in code_search対応中かも @MeiSiristhebest が 24 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alibaba/open-code-review#1570 ·
メンテナーはふだん 1 日以内に返信
-
findSummaryIssueComment matches any comment containing the marker substring, no author check -- can overwrite a human comment対応中かも @ydflow が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
alibaba/open-code-review#1557 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
alibaba/open-code-review#1554 ·
メンテナーはふだん 1 日以内に返信
-
Add Qwen Cloud Token Plan as a built-in provider preset対応中かも @nothingyuancando が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
alibaba/open-code-review#1390 ·
メンテナーはふだん 1 日以内に返信
alibaba/open-code-review の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
devlikeapro/waha#2322 ·
メンテナーはふだん 2 日以内に返信
-
validateDeclaredPath lets control characters through into the Gradle init script's Groovy literalオープンagent-butler-finding agent-research bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jordansmall/spindrift#5821 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
[rmqctl][Bug] Windows build script fails when the output directory is absent対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/rocketmq-dashboard#7243 ·
メンテナーはふだん 3 日以内に返信