Skip to content

Fix ID mismatch crash when arXiv submission year differs from publication year#1060

Merged
pancetta merged 2 commits intosourcefrom
copilot/check-action-logs-issue
Mar 15, 2026
Merged

Fix ID mismatch crash when arXiv submission year differs from publication year#1060
pancetta merged 2 commits intosourcefrom
copilot/check-action-logs-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

arxiv_to_publications_correct.py hard-asserted that the cite key generated from DOI metadata matched the original bib entry ID. This breaks whenever a paper's publication year differs from its arXiv submission year (e.g., BonteEtAl2024 published in 2026 → DOI metadata yields BonteEtAl2026AssertionError → exit code 1).

Changes

  • Removed hard assertion assert id == id_db — replaced with an informational print when the IDs differ
  • Use id_db throughout for all database operations (lookup, removal, and bib key assignment), preserving the original cite key for backward compatibility
# Before
assert id == id_db, f"ID generated with new DOI ({id}) is different than the original in database ({id_db})"
entries = db.get_entry_dict()
assert entries[id]["ENTRYTYPE"] == 'unpublished', ...
db.entries.remove(entries[id])
bib = "{".join([bType] + [','.join([id]+rest2)] + rest1[1:])

# After
if id != id_db:
    print(f'Note: ID generated with new DOI ({id}) differs from the original in database ({id_db}). Keeping original ID.')
entries = db.get_entry_dict()
assert entries[id_db]["ENTRYTYPE"] == 'unpublished', ...
db.entries.remove(entries[id_db])
bib = "{".join([bType] + [','.join([id_db]+rest2)] + rest1[1:])

Affected entries in the triggering run: BonteEtAl2024, MardalEtAl2024, DurastanteEtAl2025, HahnEtAl2025 — all submitted to arXiv in 2024/2025 but published in 2026.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…Xiv and publication IDs

Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate issue in action logs Fix ID mismatch crash when arXiv submission year differs from publication year Mar 15, 2026
Copilot AI requested a review from pancetta March 15, 2026 10:27
@pancetta pancetta marked this pull request as ready for review March 15, 2026 13:29
@pancetta pancetta merged commit 22cf4bd into source Mar 15, 2026
1 check passed
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.

2 participants