test(api): read the expected MCP version dynamically instead of hardcoding it#4629
Conversation
…oding it src/services/mcp-compatibility.ts derives LATEST_RECOMMENDED_MCP_VERSION live from packages/gittensory-mcp/package.json, but these assertions hardcoded "0.7.0" -- every release-please version bump silently breaks them (confirmed: #4204's 0.7.0->0.7.1 bump fails validate-code on exactly these lines). Mirrors the mcpPackageJson.version pattern test/unit/mcp-cli-doctor.test.ts already uses, so this doesn't recur on the next release.
|
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 #4629 +/- ##
=======================================
Coverage 94.11% 94.11%
=======================================
Files 432 432
Lines 38348 38348
Branches 13979 13979
=======================================
Hits 36091 36091
Misses 1600 1600
Partials 657 657 🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 61df6ba | Commit Preview URL Branch Preview URL |
Jul 10 2026, 08:26 AM |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 08:38:32 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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
test/integration/api.test.tshardcoded"0.7.0"in 5 places assertinglatestRecommendedMcpVersion/latestRecommendedVersion/latestPackageVersion, butsrc/services/mcp-compatibility.ts'sLATEST_RECOMMENDED_MCP_VERSIONderives live frompackages/gittensory-mcp/package.json'sversionfield.validate-codeon exactly these assertions.mcpPackageJsonand referencemcpPackageJson.version, mirroring the patterntest/unit/mcp-cli-doctor.test.ts:178already uses for the same field.Test plan
npm run typechecknpx vitest run test/integration/api.test.ts— 43/43 passing