Repository navigation
fix(preview): scope preview totals to the tracked changeset - #1241
Merged
lizhengfeng101 merged 1 commit intoSep 15, 2026
Merged
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
Contributor
|
@anmolxlight anmolxlight seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
anmolxlight
force-pushed
the
fix-1235-untracked-provider-preview
branch
from
September 14, 2026 11:35
853b3e3 to
a35a9d2
Compare
This was referenced Sep 14, 2026
Githab-capibara
added a commit
to Githab-capibara/open-code-review
that referenced
this pull request
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1235.
What
Narrows the preview totals promise to tracked changes (option 3 from the issue). Untracked provider-directory files are dropped in
untrackedFilesListbefore any diff exists, so they are neither listed nor counted. Counting them (options 1/2) would mean reading every file under an untrackednode_modules//target/on every review, not just--preview, since that list feeds the normal workspace path too. The gap needs a provider dir that is neither tracked nor gitignored, which is narrower than the read cost.Changes
internal/agent/preview.go:Previewdoc + inline comment now say totals match the tracked Git changeset, with the reason recorded.cmd/opencodereview/output_helpers_test.go:vendor/lib.gopairs withExcludeProviderDirectory(that combination is the only one possible after fix(preview): show provider-excluded diffs #1223).internal/agent/preview_run_test.go: newTestPreviewOmitsUntrackedProviderDirFile(untrackedmain.go+ untrackedtarget/demo.go; asserts notarget/entry, totals exactly 1 file / +1).FAQ wording left alone: provider_directory "never reviewable, even when included" stays accurate, nothing about reviewability moved.
Gates
make testpass,make checkpass,make coverage91.5% (threshold 90%).AI/LLM disclosure
Per AGENTS.md: this change was implemented with Claude Code (Claude Opus 5) from the issue spec, then reviewed, verified (all gates re-run locally), and submitted by me. I understand every line and can explain it on review.