Skip to content

fix(library): preserve distinct papers with matching titles - #304

Merged
mikamikasuki merged 2 commits into
mikamikasuki:mainfrom
Ehsan-hash:fix/library-source-identity
Oct 16, 2026
Merged

mikamikasuki merged 2 commits into
mikamikasuki:mainfrom
Ehsan-hash:fix/library-source-identity

Conversation

@Ehsan-hash

Copy link
Copy Markdown
Contributor

Why

Saving two papers with different DOIs but the same title returns success while retaining only the first paper. Use stable identifiers before the title fallback so both works remain in the Library.

Fixes #94.

What changed

  • Match existing papers by DOI or base arXiv ID, including arXiv version suffixes.
  • Use the normalized title only when neither record has a DOI or arXiv ID.
  • Add isolated API regressions for distinct sources, repeat imports, passages and project isolation.

Scope

  • Changes Library import deduplication.
  • Does not migrate existing records or recover previously discarded metadata.

Blast Radius

Imports with a shared stable identifier still reuse the existing record and its passages. An identified paper and an unidentified paper with the same title remain separate.

Verification

  • API integration: pytest -q tests/test_api.py, 48 passed. Literature/PDF import tests: 10 passed. Workspace analysis tests: 13 passed.
  • Real API checks preserve both DOIs, separate passages, bibliography export and persisted records; batch imports also pass. Frontend build and 102 frontend tests pass.
  • scripts/test.sh was stopped after 17 failures, 41 passes and 3 skips on macOS. Its first failure also reproduces on unchanged main because Linux Bubblewrap is unavailable. Full Linux, PostgreSQL and live-model validation remain unverified.

AI assistance was used for implementation and review.

@mikamikasuki
mikamikasuki merged commit fcbd0c6 into mikamikasuki:main Oct 16, 2026
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.

Library deduplication drops distinct works that share a title

2 participants