Skip to content

fix(id): include origin in file-list deduplication key (#5382) - #5617

Merged
dezren39 merged 1 commit into
mainfrom
queue/9691-5382-file-list-origin-dedup
Nov 4, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/9691-5382-file-list-origin-dedup

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Fixes #5382 (task 9691).

Problem

get_file_list in pkgs/id/src/web/routes.rs deduplicated files on hash, display name, and user tags only — before get_file_list_page applies 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

  • Include origin_node in 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.
  • Regression test file_list_dedup_preserves_same_content_files_with_distinct_origins: two tags over one blob with identical display name and user tags but origins node-alpha/node-beta; asserts both rows survive get_file_list and 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.
  • Note: a fresh worktree lacks the gitignored built frontend at pkgs/id/web/dist, which the web feature needs to compile; the built dist from the primary clone was copied in locally for the test run (not committed).

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

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.
@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 18:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T18:10:26.801351Z 76a34e1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id(web): file-list deduplication key excludes origin — same-content files from different nodes collapse before the origin filter (PR #5191)

1 participant