[bot] Add upstream-api-check workflow for AGR API changes - #169
Conversation
AGR restructured GET /api/gene/{id} in May 2026 with no warning, silently
breaking gene_to_uniprot_from_alliance (#159, fixed by #168). Following GO
feedback, AGR now pre-announces API changes and stages the next release
publicly, so this class of change is catchable before it reaches production.
- Add the .claude/skills/upstream-api-check skill: locate the announcement,
diff live response key paths between www and stage, and run the real parser
against the staged release.
- Document upstream API dependencies and where AGR announcements live in
AGENTS.md.
- Correct the gene_to_uniprot_from_alliance docstring, which claimed AGR
provided no versioning or deprecation notice. That is no longer accurate.
Verified against AGR 9.1.0 as staged at stage.alliancegenome.org: the upcoming
release does not affect go-fastapi. Its API changes are confined to
disease-annotation and phenotype endpoints and to download files, none of which
we call. The /api/gene/{id} key-path diff is additive apart from
taxon.species.assembly_curie, which we do not read.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
[bot] Comment by a Claude Code agent on behalf of @kltm. The red
|
[bot] Opened by a Claude Code agent on behalf of @kltm.
What
Adds a repeatable procedure for checking whether an announced upstream API change affects go-fastapi, and corrects a docstring that had frozen an out-of-date picture of how the Alliance (AGR) communicates those changes.
Three files:
.claude/skills/upstream-api-check/SKILL.md(new) — an invocable skill that walks the verification: find the announcement, establish which releases are in play, re-inventory our AGR call sites, diff live response key paths betweenwwwand the staged next release, run our real parser against that staged release, check the OpenAPI spec for endpoint removals, and confirm the live tests are green.AGENTS.md— a new "Upstream API dependencies" section naming what we depend on, where AGR announcements live, and when to run the skill.app/utils/mygene_utils.py— docstring correction only, no behavior change.Why
AGR restructured
GET /api/gene/{id}in May 2026 with no warning, which silently brokegene_to_uniprot_from_allianceand surfaced only as CI failures (#159, fixed by #168). Following GO feedback, AGR now pre-announces API changes and stages the next release publicly, so that class of change is catchable before it reaches production — but only if someone knows where to look, which is what this PR writes down.The docstring added in #168 states that AGR restructured the endpoint "with no public API versioning or deprecation notice (no
/api/swagger.json)". Both halves are now misleading. AGR publishes an OpenAPI spec athttps://www.alliancegenome.org/openapi?format=json— the/api/swagger.jsonpath we probed simply isn't where it lives — and publishes advance release notes ahead of a release. Leaving that claim in place tells the next person an early-warning system doesn't exist when it does.The check this encodes, run against AGR 9.1.0
Applying the procedure to the currently-staged release, as a working test of it:
stage.alliancegenome.orgserves 9.1.0 whilewwwserves 9.0.0, so 9.1.0 was diffable today.pubmedPubModIDs→pubmedPublications, retypedSet<String>→Set<CrossReference>) and to download files. We call neither./api/gene/{id}between the two releases is purely additive apart fromtaxon.species.assembly_curie, which we do not read. The two fields we do read —gene.crossReferences[].referencedCurieandgene.gcrpCrossReference.referencedCurie— are untouched.gene_to_uniprot_from_alliancerun against the staged release resolves every gene tested, including the load-bearingHGNC:12139/ TRAV39 GCRP-only case from Live-data QC test failures: GOlr annotation_class drift (17) + mygene/Alliance HGNC:12139 lookup (3) #159.Notably, none of that was derivable from the release notes alone — the #159 reshape was never mentioned in them either, which is why the skill leads with "do not conclude from the notes."
Testing
tests/unit/test_mygene_utils.py— 25 passed against live AGR and mygene.info.ruff check app/utils/mygene_utils.py— clean.codespellon all three files — clean.No test changes: this is documentation plus a docstring, and the existing live tests already cover the code path.
Note for reviewers
A related exposure turned up in another repo while doing this and is tracked separately at geneontology/gopreprocess#78 — that pipeline consumes AGR orthology download files, which are on a different change track and do need action. Out of scope here.
— Posted by Claude Code agent on behalf of @kltm.
🤖 Generated with Claude Code