Repository navigation
fix(download-ref): add identifier fields when appending preprint BibTeX - #82
Merged
GiggleLiu merged 1 commit intoNov 6, 2026
Merged
Conversation
Semantic Scholar's citationStyles.bibtex for an arXiv-only preprint has no eprint or doi field and is typed @Inproceedings without a booktitle. append_bibtex.py wrote it verbatim, so a freshly built KB failed kb_doctor with "bib-md-sync: no rendered entry" for every such paper and "bib-required-keys: missing booktitle" for the preprints, and the append helper's own duplicate check could not recognise the paper on a re-run. ensure_identity_fields() now injects eprint/archiveprefix and doi from the cached metadata when the entry lacks them, and retypes a booktitle-less @Inproceedings as @misc. Entries that already carry identifiers are left unchanged. Both propose and append go through it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
Building a fresh KB with
how-to-download-ref(36 refs, 31 from arXiv) ended withkb_doctor.pyreporting 81 FAIL findings even though every paper had been fetched, rendered, and appended:bib-md-sync <key>: no rendered entryandbib-md-sync <file>.md: no bibliography entryfor every paperbib-required-keys <key>: missing booktitlefor every arXiv-only preprintCause: Semantic Scholar's
citationStyles.bibtexfor a preprint carries neithereprintnordoi, and types the entry@Inproceedingswith nobooktitle.append_bibtex.pywrote it verbatim, soverify_bib.extract_arxiv/extract_doifound no identifier to match against the rendered file. The same gap meantcmd_append's own duplicate check could not recognise the paper on a second run.Fix
ensure_identity_fields(bibtex, meta)inappend_bibtex.py:eprint = {…}+archiveprefix = {arXiv}and/ordoi = {…}from the cached metadata when the entry lacks them@Inproceedingsas@miscBoth
propose(so the user sees what will be written) andappendgo through it.Test
test_append_adds_identity_fields_to_preprint_bibtexseeds S2-shaped preprint metadata, appends, and assertskb_doctor.check_kbis clean, the re-append is detected as a duplicate, and an already-complete entry is unchanged.python3 scripts/validate_skills.py,pytest -q,git diff --checkall pass.🤖 Generated with Claude Code