feat: add native Zotero Local API resolution#13
Conversation
be57378 to
924ddaa
Compare
|
Thanks for the substantial contribution — the Local API integration, safety boundaries, documentation, and test coverage are thoughtfully implemented.
|
|
@917Dhj Thanks for the detailed review. I’ve addressed all three identity-safety issues in separate commits: 44807e4 — Title-based Zotero lookup now requires an exact normalized title match, preventing fuzzy matches such as “Cats” vs. “Dogs”. d4fb86f — Strong identifiers from title-based web enrichment are accepted only after title, leading-author, and publication-year validation. ea44e4d — Malformed attachment URLs are converted to zotero_unsafe_file_url without discarding the already-confirmed parent metadata. I also added regression tests for each case. The local suite passes with 761 passed, 1 skipped, and both the macOS and Windows CI jobs are green. |
Summary
auto,off, andrequiredlookup policies through the resolver and pipelineResolution behavior
auto(default): prefer a unique local match; fall back to existing providers for title, DOI, and arXiv missesoff: make no Local API request and preserve the previous resolution pathrequired: require a unique Zotero match, while trusted JSON artifacts and explicit local PDFs remain authoritativeSafety
GETrequests, no API key, no SQLite access, and bounded response sizesfile://validation rejects remote UNC paths, ports, queries, fragments, invalid UTF-8, and encoded NULsTesting
python -m pytest -q— 756 passed, 1 skippedgit diff --check origin/develop...HEAD