Skip to content

fix: a year finding needs a year CrossRef actually holds (0.6.2) - #30

Merged
musharna merged 1 commit into
mainfrom
fix/year-evidence
Sep 19, 2026
Merged

musharna merged 1 commit into
mainfrom
fix/year-evidence

Conversation

@musharna

Copy link
Copy Markdown
Owner

Answers the open question of whether one-year Tier B findings on search-matched entries should fail CI. They should, when the record can support the claim. The false ones were not caused by the search match.

On three published reference lists 0.6.1 raised three one-year year findings. Two were against correct citations:

  • Benton & Donoghue, Mol Biol Evol 24: CrossRef holds only the October 2006 online date. The article is in the 2007 volume and cited as 2007; the print date was never deposited.
  • Bininda-Emonds et al. in "Biocomputing 2001": the proceedings is named for 2001 and was printed in December 2000.

Both are readable from the record, so the year directly after an online-only date, and a year that names the container, become Tier C. Phillips et al. (PNAS 106, online and print both 2009, cited as 2010) stays Tier B.

Cost, stated in the changelog: an online-only journal also has no print date, so a citation one year late to such a journal drops from a failure to a note.

Also fixes the cache, which wrote years and never read it back. An online-first paper cited by its print year passed on the first run and failed on every cached run.

Verification

  • The three CrossRef records are stored verbatim under tests/data/crossref_years/.
  • The new tests failed before the change (3 of 4), with the Phillips control passing both before and after.
  • Four mutants, each killed by a named test: +1 to +2, dropping the no-print-date condition, dropping years from the cache read, dropping the digit boundary on the container match.
  • Real run on the two PDFs with an empty cache: Sanderson list exit 1 to 0; Parham list keeps Ogg 2010/2005 and Phillips 2010/2009 as Tier B.
  • 358 passed; ruff, mypy clean.

Bumps 0.6.2 including the Action pin, so tag after merge.

Two of three one-year Tier B findings on published reference lists were
against correct citations. Neither was a matching problem: CrossRef holds only
the 2006 online date for Benton & Donoghue (printed in the 2007 volume), and
"Biocomputing 2001" was printed in December 2000. Both are visible in the
record, so the year directly after an online-only date, and a year that names
the container, are now Tier C. A record with both dates still fails a year
that is one off.

Also reads `years` back from the cache. It was written and never read, so an
online-first paper cited by its print year failed on every cached run.
@musharna
musharna marked this pull request as ready for review September 19, 2026 02:49
@musharna
musharna merged commit b30bd8d into main Sep 19, 2026
11 checks passed
@musharna
musharna deleted the fix/year-evidence branch September 19, 2026 02:49
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