Skip to content

39 cache files use prefixes no citation resolves, and it is unclear whether anything reads them #703

Description

@realmarcin

Summary

references_cache/ holds 39 files whose prefix corresponds to no reference in
the corpus
: 20 pmc_, 9 europepmc_, 6 epmc_, 3 openalex_, 1
semanticscholar_. Nothing in this repository writes them and nothing resolves
them — every reader builds a stem from a doi: or PMID: citation, and those
are the only two prefixes any record uses.

Recorded rather than acted on, because "unused" and "safe to delete" are not the
same claim and I could not establish the second.

Evidence

$ grep -rhoE 'reference: *"?([A-Za-z]+):' kb/ data/ | sort | uniq -c
   4716 PMID:
   1096 doi:
      2 bioproject:
$ git ls-files references_cache/ | sed 's|.*/||' | grep -oE '^[A-Za-z]+_' | sort | uniq -c
    497 PMID_
    212 doi_
     20 pmc_
      9 europepmc_
      6 epmc_
      3 openalex_
      1 semanticscholar_

No script constructs or reads an uppercase PMC_-style name, and
grep -rn "pmc_\|europepmc_\|openalex_\|semanticscholar_" scripts/ src/ returns
only unrelated function names (openalex_locations, apply_pmc_conversions).

Why it came up

PR #702 adds scripts/normalize_cache_names.py, which renames cache files whose
prefix casing no citation resolves to. My first version listed all seven prefixes
as canonical — asserting a correct casing for five that have no citation to
derive one from, and putting 39 files inside the renamer's blast radius on the
strength of a guess. They are now in UNRESOLVED_CACHE_PREFIXES: neither renamed
nor flagged.

The questions worth answering

  1. Where did they come from? Probably an earlier fetching path, or a sibling
    repo's convention. git log --diff-filter=A -- references_cache/pmc_* should
    say.
  2. Does anything outside this repository read them? The cross-Mech tooling
    (culturebotai-claw, CultureMech) shares conventions with this cache; a file
    unused here may not be unused there.
  3. If the answer to 2 is no, should they be deleted? 39 files of committed
    evidence is not much weight, but a cache that nothing reads is a cache nobody
    is maintaining, and it dilutes references_cache/ as a place where every file
    means something.

Not urgent

They cost nothing but space and a little confusion. The reason to resolve it is
that the next person writing a cache-wide tool has to make the same judgement
call I did, with the same lack of information.

Acceptance test

Either the five prefixes are documented with what reads them, or the files are
removed and UNRESOLVED_CACHE_PREFIXES shrinks to empty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions