Skip to content

CrossRef journal search: filter by resolved ISSN, not a name boost - #8

Merged
mgoldey merged 1 commit into
mainfrom
fix/crossref-journal-filter
Sep 12, 2026
Merged

mgoldey merged 1 commit into
mainfrom
fix/crossref-journal-filter

Conversation

@mgoldey

@mgoldey mgoldey commented Sep 12, 2026

Copy link
Copy Markdown
Owner

What

feed.research / attest research --journal on CrossRef returned papers from the wrong journal. query.container-title is a ranking hint, not a filter: live, a search scoped to the Journal of Chemical Physics returned Chemical Engineering Science 12 of 12 times under sort=published and 0 of 12 of its own papers under relevance order. CrossRef's server-side container-title filter is exact-match on the registered title (0 hits without the leading "The").

The client now resolves the journal name through /journals (title equality after normalisation, one cached request per name per client) and passes filter=issn:<issn>, which returned 218 hits all from the journal. An unresolved name (an abbreviation such as "J Chem Phys", which /journals does not know) falls back to the boost plus an over-fetched page and a client-side container-title match, so it returns nothing rather than another journal's papers.

Verified

  • New tests: resolved path (ISSN filter, no over-fetch, cache hit on a re-spelled name), fallback path (abbreviation via short-container-title, "Nature" does not claim Nature Methods), and the pre-existing filter test re-routed.
  • Live: "machine learning force fields" in the Journal of Chemical Physics now returns three JCP papers; "covid" in the Lancet stores two Lancet papers and attest library export --bib renders them.
  • Gate: ruff, ty, uv-lock, complexity, bandit, xenon pass. Full pytest: 1801 passed, 2 failed. Both failures (test_cite_check_* in tests/test_citations.py) reproduce on the untouched merged tip: they open the live ~/.hermes/.../hermes.db, which another session migrated to schema version 10 today, ahead of the code in every worktree. Unrelated to this change; noted below.

Also observed

Those two citation tests read machine state (the live DB via resolve_db_path's skill-data fallback) rather than a fixture, so they fail whenever the live DB is ahead of the checkout. Worth repointing in conftest separately.

Spec amended with a dated "Measured" section; changelog entry under Fixed.

🤖 Generated with Claude Code

…measured live, a search scoped to the Journal of Chemical Physics returned Chemical Engineering Science 12 of 12 times under date order and 0 of 12 of its own papers under relevance order, because query.container-title is a ranking hint. The client now resolves the journal through /journals (title equality after normalisation, one cached request per name) and passes filter=issn:, which returned 218 hits all from the journal; an unresolved abbreviation falls back to the boost, an over-fetched page, and a client-side container-title match that returns nothing rather than another journal's papers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mgoldey
mgoldey merged commit 950c80e into main Sep 12, 2026
7 checks passed
@mgoldey
mgoldey deleted the fix/crossref-journal-filter branch September 12, 2026 20:40
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.

1 participant