Repository navigation
refactor(similar_issue): unify corpus collection across vector backends - #5193
Open
PeterDaveHello wants to merge 1 commit into
Open
PeterDaveHello wants to merge 1 commit into
PeterDaveHello wants to merge 1 commit into
Conversation
Scan quotas, lazy pagination, and embedding eligibility have needed fixes in all three indexing paths. Keep these rules in one collector to prevent future changes from drifting between backends. Leave completion markers, persistence, and failure recovery with each backend to preserve their distinct write contracts.
There was a problem hiding this comment.
🟢 Approval recommended
The shared corpus-collection refactor has no active review issues.
No open issues 🎉
What changed in this PR
This refactor centralizes /similar_issue corpus collection so ingestion fixes no longer need to be repeated across three vector backends, with no intended indexing behavior changes.
Changes:
- Extracts
_collect_issue_corpus()for Pinecone, LanceDB, and Qdrant. - Preserves lazy iteration, scan quotas, comment filtering, embedding eligibility, record metadata, and progress logging.
- Keeps persistence, completion markers, empty-corpus handling, and failure recovery backend-specific.
| File | Description |
|---|---|
pr_agent/commands/pr_similar_issue.py |
Replaces three duplicate collection loops with one shared helper. |
Review effort: Balanced
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
⚙️ Agent run details
|
PR Code Suggestions ✨No code suggestions found for the PR. ⚙️ Agent run details
|
This branch has not been deployed
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.
User description
Why
Pinecone, LanceDB, and Qdrant independently maintain the same issue and comment collection logic. Fixes to scan limits, lazy pagination, comment filtering, and embedding eligibility have repeatedly required changes in all three paths (e.g. #3549, #3565, #4169, #4437). Keeping these rules separate makes future fixes easier to miss in one backend.
Changes
_collect_issue_corpus()helper.Impact
Three independently maintained collection implementations become one, removing 91 net lines of production code. No public API, configuration, dependency, or indexing behavior changes are intended. Existing ingestion and embedding regression tests remain unchanged.
PR Type
Other
Description
Unify issue collection across three vector backends.
Preserve filtering, scan limits, and record metadata.
Keep persistence and completion markers backend-specific.
Diagram Walkthrough
File Walkthrough
pr_similar_issue.py
Centralize issue corpus collection across vector backendspr_agent/commands/pr_similar_issue.py
_collect_issue_corpus()from the existing Pinecone collectionloop.
filtering, record identifiers, metadata, and progress logging.
failure recovery backend-specific.
⚙️ Agent run details