ci: gate CITATION.cff version against pyproject - #15
Merged
Conversation
Citation metadata records the version in a second place and nothing kept the two in sync. ghostcite shipped 0.5.0 while CITATION.cff said 0.4.0; plant-genomics-mcp drifted within two hours of the file being added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CITATION.cffrecords the release version in a second place, independent ofpyproject.toml, and nothing kept the two in agreement.This is not hypothetical — it has already happened twice:
v0.5.0while itsCITATION.cffstill said0.4.0.1.19.3vs1.19.4within two hours of thefile being added, when
v1.19.4was cut.Stale citation metadata is worse than none. It is machine-readable, GitHub renders it in
the Cite this repository panel, and Zenodo mints DOI records from it — so a wrong
version propagates into other people's bibliographies, where nobody will ever check it
against the tag.
What
Adds
.github/workflows/citation.yml: on every PR and push tomain, fail ifCITATION.cff'sversion:does not equalpyproject.toml'sversion.This deliberately mirrors the existing "tag matches pyproject version" release gate
(
release.yml), which exists for the same reason one layer down — refusing to publish amislabeled artifact. Same invariant, same failure mode, enforced earlier and on every change.
Self-contained new workflow rather than an edit to existing CI, so it cannot affect the
current test matrix.
Verification
The check was run against real repository data before being proposed, in both directions:
The failing case is real drift, not a synthetic fixture — so the gate is known to fire on
the exact condition it exists to catch, not merely to pass when things are fine.
🤖 Generated with Claude Code