Skip to content

v0.4.0 - Keyless public API adapters and fusion hardening

Choose a tag to compare

@CerebroCanibalus CerebroCanibalus released this 04 Oct 02:05
· 13 commits to main since this release

Keyless public API adapters and fusion hardening.

New adapters

Three adapters for documented, keyless APIs, each with a pure fixture-tested parser:

  • OpenAlex — bibliographic index. Reconstructs abstracts from the inverted index the API ships instead of the abstract text.
  • Crossref — DOI-canonical metadata for the scholarly literature.
  • arXiv — Atom feed, whitespace-folded titles.

Profiles

search gained a profile argument. general keeps the web engines, academic serves only public APIs, so a paper search no longer spends HTML engine quota and vice versa. An unknown profile is rejected before any provider is contacted.

Fusion

Replaced the round-robin interleave with weighted RRF over canonical URLs: agreement between independent indexes outranks a single index's top hit, duplicate URLs are merged keeping the richest snippet, and at most two results per source host can reach the payload. Provider quality enters the vote, so the measured-poor HTML SERP cannot dominate a fused ranking.

Quota

  • 60-second successful-search cache with a per-key single-flight lock. Concurrent identical calls share one upstream request instead of both missing the cache.
  • Retry-After propagated from response headers into the typed errors, the per-provider status and the shared cooldown. OpenAlex additionally reads its JSON retryAfter field, so a polite Retry-After: 11 no longer costs the provider a full three minutes.
  • Default first wave reduced to 2 providers, fallback capacity raised to 5.

Bugs found by smoke testing real APIs

  • Crossref's /works rejects the page parameter with HTTP 400 → pagination is offset-based.
  • OpenAlex sends explicit JSON null for sparse records; a strict field type aborted the entire response.
  • Crossref writes DOI and URL in upper case and serde is case-sensitive — the parse silently produced zero results at HTTP 200.

Adds ARGOS_CONTACT_EMAIL for the OpenAlex/Crossref/PubMed polite pools. It is a contact address, not a key.