Repository navigation
fix: #649 review round 1 -- add's store reads and exit codes, GitHub tags, a real MSRV job - #650
Merged
Merged
Conversation
…tags, a real MSRV job - doiget add stops on an unreadable store entry instead of writing over it; --from-dir and missing report one rather than dropping it silently. - add's exit codes follow docs/ERRORS.md §4 (they were swapped). - A GitHub tag with .., %, ?, # or whitespace is refused, from the URL and from the latest-release answer. - PdfLegStatus found_by is the FoundBy enum (with Unpaywall), not a String. - Declared MSRV 1.86 -> 1.88: rmcp 3.x already needed it, and the msrv job never saw it because rust-toolchain.toml overrode its toolchain. Both MSRV jobs now pin with RUSTUP_TOOLCHAIN. - preprint_allowlist's doc names each finder's own gate. - Tests: failed arXiv fallback keeps the block (404 / not a PDF), add's misuse / unreadable-entry / unresolved exits, coverage's error path. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: sotashimozono <[email protected]>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Round 1 of 3 of the review of the promotion PR #649. Bumps the version to 0.9.0-beta.28.
Fixed
doiget addand unreadable store entries (silent-failure review, HIGH). Astore.readerror, such as corrupt TOML or a lock timeout, was treated as "no entry". The entry was then re-resolved and overwritten, and its tags, collections and annotation were lost.addnow stops withUnreadableEntry, exit 4.add --from-dirandmissingnow print a warning for such an entry instead of dropping it silently.addexit codes were the reverse ofdocs/ERRORS.md§4: a failed resolve exited 4 and a store failure exited 1. A failed resolve now exits the wayfetchwould for the same error code (cli_exit_code), and a store failure exits 4.valid_tagcheck follows git's ref-name rules and also refuses%and#. It applies to tags taken from the URL and to the API'stag_name, so a tag cannot escape therepos/{owner}/{repo}path.msrvjob never caught this: it installed 1.86, butrust-toolchain.toml(stable) overrode it. The job log shows the override. The declared MSRV is now 1.88, and both MSRV jobs pin it withRUSTUP_TOOLCHAIN.docs/PUBLIC_API.md§7 allows raising the MSRV in a minor release with a CHANGELOG entry; 0.9.0 is a minor release.Changed
PdfLegStatus::{PreprintFallback, PreprintDoiFallback}.found_byis nowpreprint::FoundByinstead ofString, with a newFoundBy::Unpaywall. The wire values are unchanged.preprint_allowlistdoc comment now names each finder's own gate (bioRxiv, INSPIRE and ADS each have one).Tests added
blocked,suggested_arxiv_idand the block's message, and writes nothing.add: running it with no arguments is misuse (exit 2); an unreadable entry exits 4 and leaves the entry unchanged; an unresolvable DOI exits 1 (NOT_FOUND).coverage: a 404 from Crossref giveserror[NOT_FOUND], exit 1, and empty stdout.Not taken
RATE_LIMITED; only the default 60 s wait is GitHub-specific. Merging them would put all three sources' 404 rules behind one flag, which is a riskier change than this round should make.🤖 Generated with Claude Code