Repository navigation
fix(id): include origin in file-list deduplication key (#5382) - #5617
Merged
Merged
Conversation
get_file_list deduplicated on hash, display name, and user tags before get_file_list_page applied its origin filter, so same-content files with distinct recorded origins collapsed to one row and the discarded origin became unqueryable. Add origin_node to the dedup key and a regression test covering same content/display name/user tags with distinct origins, verifying both rows survive and each origin filter returns its own row.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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 #5382 (task 9691).
Problem
get_file_listinpkgs/id/src/web/routes.rsdeduplicated files on hash, display name, and user tags only — beforeget_file_list_pageapplies its origin filter. Two same-content files with the same display name and user tags but distinct recorded origins collapsed to one row, making the discarded origin unqueryable.Change
origin_nodein the deduplication key, so files are only deduplicated when hash, display name, user tags, and recorded origin all match. Unknown-origin (None) files still deduplicate against each other exactly as before.file_list_dedup_preserves_same_content_files_with_distinct_origins: two tags over one blob with identical display name and user tags but originsnode-alpha/node-beta; asserts both rows surviveget_file_listand that filtering by either origin returns its own row.Tests
cargo test --features web --lib file_list_dedup_preserves_same_content_files_with_distinct_origins(pkgs/id workspace, on laptop) — PASS.pkgs/id/web/dist, which thewebfeature needs to compile; the built dist from the primary clone was copied in locally for the test run (not committed).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.