Summary
GET /api/users/{orcid}/gp changed behavior in the Blazegraph→index migration (commit 4449261, PR #136, umbrella #137). The change was not called out in the PR and has no test coverage. It needs a deliberate, documented contract before/around the 0.4.0 cutover.
Observed behavior (v0.4.0 vs current production 0.3.9)
For ORCID 0000-0003-1813-6857 (the repo's valid_orcids test fixture) and 0000-0002-1706-4196:
0.4.0 (index-backed) — a bare JSON list of GO-CAM model IDs:
["59dc728000000351", "5f46c3b700001031", "60ad85f700001873", "..."] // 12 items
production 0.3.9 (SPARQL) — a JSON object reporting not-found (with HTTP 200):
{"status_code": 404, "detail": "Item with ID 0000-0003-1813-6857 not found", "headers": null}
So the old endpoint effectively returns nothing for these contributors — including the documented-valid fixture orcid — while the new one returns real data from the contributor index.
Points that need a decision
- Shape change (object → bare list) — a breaking change for any consumer; should be intentional and documented (changelog).
- Naming vs content — the route is
/gp (gene products) but the new payload is GO-CAM model IDs (gomodel ids), not gene products. Intended? Consider renaming/relabeling.
- Old endpoint returned 404/empty for valid orcids, so the new behavior is arguably an improvement — but the cutover should be a conscious choice, not a silent side effect.
No test coverage
tests/unit/test_users_endpoints.py (on main) contains only imports and orphaned fixtures (valid_orcids, gene_ids, …) and zero def test_ functions — the user-endpoint tests were removed during the migration and the fixtures left dangling. No test anywhere exercises /api/users/{orcid}/gp (the /gp references elsewhere in the suite are all the unrelated /api/gp/{id}/models route).
Proposed
- Confirm the intended contract (list-of-model-ids? rename? error shape on miss?).
- Add hit + miss test coverage for
/api/users/{orcid}/gp.
Context
PR #136 ("Remove blazegraph") intentionally removed the deprecated /api/users and /api/groups endpoints, but did not mention re-shaping the surviving /api/users/{orcid}/gp. Historical context on the old user endpoints: #92.
— Posted by Claude Code agent on behalf of @kltm.
Summary
GET /api/users/{orcid}/gpchanged behavior in the Blazegraph→index migration (commit4449261, PR #136, umbrella #137). The change was not called out in the PR and has no test coverage. It needs a deliberate, documented contract before/around the 0.4.0 cutover.Observed behavior (v0.4.0 vs current production 0.3.9)
For ORCID
0000-0003-1813-6857(the repo'svalid_orcidstest fixture) and0000-0002-1706-4196:0.4.0(index-backed) — a bare JSON list of GO-CAM model IDs:production
0.3.9(SPARQL) — a JSON object reporting not-found (with HTTP 200):{"status_code": 404, "detail": "Item with ID 0000-0003-1813-6857 not found", "headers": null}So the old endpoint effectively returns nothing for these contributors — including the documented-valid fixture orcid — while the new one returns real data from the contributor index.
Points that need a decision
/gp(gene products) but the new payload is GO-CAM model IDs (gomodelids), not gene products. Intended? Consider renaming/relabeling.No test coverage
tests/unit/test_users_endpoints.py(onmain) contains only imports and orphaned fixtures (valid_orcids,gene_ids, …) and zerodef test_functions — the user-endpoint tests were removed during the migration and the fixtures left dangling. No test anywhere exercises/api/users/{orcid}/gp(the/gpreferences elsewhere in the suite are all the unrelated/api/gp/{id}/modelsroute).Proposed
/api/users/{orcid}/gp.Context
PR #136 ("Remove blazegraph") intentionally removed the deprecated
/api/usersand/api/groupsendpoints, but did not mention re-shaping the surviving/api/users/{orcid}/gp. Historical context on the old user endpoints: #92.— Posted by Claude Code agent on behalf of @kltm.