fix(mcp): resolve deprecated surface_id aliases in get_api_schema and get_fixture#2170
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2170 +/- ##
==========================================
+ Coverage 93.16% 93.18% +0.01%
==========================================
Files 52 52
Lines 8263 8272 +9
Branches 3032 3035 +3
==========================================
+ Hits 7698 7708 +10
+ Misses 97 96 -1
Partials 468 468
🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary
Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. This fix correctly extends deprecated-alias resolution to `get_api_schema` and `get_fixture`, which previously used the raw user-supplied `surface_id` directly as an artifact path key. The new `findCataloguedSurface` helper faithfully mirrors the two-step lookup (`findSurface` → lazy alias load) that `verify_integration` used inline, and the `resolveArtifactSurfaceId` fallback to the original id preserves the existing 404 behaviour for truly unknown surfaces. The refactor of `verify_integration` to call `findCataloguedSurface` is a clean DRY win, though it introduces a subtle latency cost. Nits (5)
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
surface_idthroughfindSurface+SURFACE_ALIASES_PATHinget_api_schemaandget_fixturebefore building artifact paths./metagraph/schemas/{id}.jsonand/metagraph/fixtures/{id}.json.Closes #2169
Why
Agent workflows often cache deprecated ids from older catalog snapshots. Verify works; schema/fixture do not — breaking the integration loop after renames.
Test plan
npm test -- tests/mcp-server.test.mjs tests/surface-aliases.test.mjs