Repository navigation
fix(literature): preserve book types in BibTeX export - #309
Merged
Merged
Conversation
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.
Problem and change
Fixes #107.
Crossref book imports lost their publication type, and the shared BibTeX exporter always emitted
@article. Preserve the source type and editors, and export known book types as@bookwith publisher and editor metadata. BibTeX and RIS book imports retain the same information, including RISBOOK,EBOOK, andEDBOOK.Journal articles keep their existing journal, volume, issue, and page fields. Records without a publication type retain the existing article fallback; this does not infer or migrate metadata that was already missing from historical records. No schema or dependency changes are included.
Validation
Implementation and validation used OpenAI Codex. The independent reviews were automated source reviews; no human review or manual validation is claimed.
Regression proof on base
d0353815faa94e998e8ac7db47bdc8ce7ba82af4: 9 failures, 3 passes, including the real isolated Library API/SQLite scenario. The initial automated review found two additional RIS aliases; both new cases failed before the correction and now pass.38 related checks passed on Ubuntu 24.04 WSL / Python 3.12.3, using the unmodified pinned
requirements.lock.txt:This exercises the actual import endpoint, persisted
SourcePapermetadata, and export endpoint. The DOI response is controlled only at the HTTP retrieval seam. Four Library scenarios run in independent interpreter/database processes; 46 unrelated API scenarios are deselected.23 literature checks passed on Windows 11 / Python 3.11.9:
A separate live smoke used the actual Crossref DOI from the issue,
10.1017/cbo9781139046855, through the real API with a disposable SQLite database: import/export both returned HTTP 200, the persisted type wasedited-book, and parsed output was@bookwith publisher and two editors.python scripts/export_api_contract.py --checkpassed: 185 operations across 142 paths. CLI--help, compilation of changed Python files, andgit diff --checkpassed.Frontend checks on Windows / Node 24.16.0:
npm --prefix apps/web run buildpassed;npm --prefix apps/web testpassed 102 tests in 20 files. No frontend source or appearance changes are included.Independent review of the final correction
9a88da8580e4a53f2214223e891d79f0705b932dmarked the prior RIS finding RESOLVED, reported no P0-P3 findings in that correction, and returned ACCEPT / HIGH confidence. The earlier full-candidate review found no other actionable defect.Limits and baseline comparison
The full Linux suite was attempted and then interrupted after repeated execution-environment failures: 23 failed, 310 passed, 7 skipped at that point. It did not complete, and this is not a full-suite pass.
The 23 observed failed test identities were rerun individually at exact base
d0353815faa94e998e8ac7db47bdc8ce7ba82af4, in the same Linux virtual environment. All 23 reproduced. Failure messages match after normalizing checkout paths and generated IDs. They report missing/usr/bin/bwrap, dependent worker failures, or waiting for worker states that never arrive. The task-owned test processes were cleaned up. Bubblewrap-dependent execution, PostgreSQL, macOS, browser interaction, and scientific/provider validation are not established by this change.Exact full-suite failures reproduced on the base
npm auditreports the existingsource-map-jsadvisory GHSA-68fv-2mgg-jv7q. The exact base reports the same advisory, andapps/web/package-lock.jsonhas the same Git blob ID (249499f6a41f4ab4f99b7e6ada4d05cd32383862) in both checkouts.The Windows-only setup could not install the lock's POSIX-only
uvloop, and the application importstermios; API validation therefore ran on Linux with the complete lock, rather than substituting those modules. No paid model, existing user research project, or working database was used.