arXiv app rejects valid versioned solv-int paper IDs
The arXiv get_paper_details tool rejects valid legacy IDs whose archive name contains v: solv-int/9701001v1, arXiv:solv-int/9701001v1, and https://arxiv.org/abs/solv-int/9701001v1 all return “Provide a valid arXiv paper ID” without requesting arXiv. The unversioned solv-int/9701001 passes this validation. The versioned paper exists on arXiv. Reproduced against 02b6c3a85139aa762eaac92fa30124a5e4c5c8bf; the affected files are also unchanged in 898118d6e410325116e98a1ede1d1e81d233871b.
The cause is _safe_paper_id: after recognizing a valid versioned ID, split("v", 1) truncates at the v in solv-int, producing sol. Splitting from the right preserves the archive and removes only the recognized version suffix.
Prepared locally with AI assistance: a one-line fix plus endpoint regression tests. The regression fails in five versioned-input subcases before the fix; all 46 plugin tests pass after it (python -S plugins/omi-arxiv-app/test_main.py). The tests cover raw IDs, both URL schemes, the arXiv: prefix, a multi-digit version, an unversioned control, and malformed versions that must not call the upstream service. A separate real FastAPI/TestClient check using the pinned dependencies and a mocked arXiv HTTP transport also passes. A live arXiv API attempt returned HTTP 406, so live upstream success is not claimed. Full repository preflight is not passed: Git HTTPS retrieval failed and the sparse checkout is missing files required by manifest validation. No PR has been opened.
@josancamon19 @kodjima33 — following the contribution guide's bounty suggestion process, would this small fix and regression coverage be eligible for a $25 bounty, subject to your approval and eventual PR acceptance? This is a proposal, not an existing approved bounty. The complete proposed patch is attached for review.
/try
@orimoshe123 is picking this up.
Platform: algora · apply: /try · pay: /claim
cc @aike9966 @josancamon19 @kodjima33
Submitted fix with regression test coverage in PR #14405:
- Replaced
split("v", 1)[0]withrsplit("v", 1)[0]in_safe_paper_idto prevent legacy archive names containing "v" (likesolv-int/9701001v1) from being sliced tosol. - Added hermetic unit and endpoint regression tests covering raw legacy IDs,
arXiv:/arxiv:prefixes, and full URL formats. - All 48 tests pass under
python3 -Sin 0.16s.
Closing as already fixed on current main.
Current main plugins/omi-arxiv-app _safe_paper_id returns the full candidate (regex allows solv-int/...vN) and no longer split('v',1)