fix(mcp): report package version 0.6.0 - #751
Conversation
|
gittensory · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
…4161) packages/gittensory-mcp/bin/gittensory-mcp.js's packageVersion/packageName and src/services/mcp-compatibility.ts's LATEST_RECOMMENDED_MCP_VERSION were independently hardcoded literals that had to be bumped by hand every release (the exact bug #751 fixed last cycle by re-bumping the literal, not by removing it). Both now derive from packages/gittensory-mcp/package.json directly -- the bin script reads its own package.json at runtime (always present in any install, npm ships it regardless of the "files" allowlist), and mcp-compatibility.ts imports it the same way src/server.ts:14 already imports the root package.json. Two of the three hand-synced version-pin sites from today's release are now impossible to forget, by construction. Also makes the version-pinned test assertions in mcp-cli-basics.test.ts, mcp-cli-profiles.test.ts, mcp-cli-doctor.test.ts, and mcp-compatibility.test.ts derive from the real package.json/constants instead of hardcoded literals -- required for future release-please-automated version bumps to pass CI without a human editing these files every time. Verified genuinely self-updating by temporarily bumping the local package version and confirming all 95 tests still pass unmodified; that stress test also caught a real pre-existing fragility (mcp-cli-doctor.test.ts hardcoded latestVersion: "1.0.0" as "clearly above local", which silently breaks once the package naturally reaches 1.0.0) and fixed it the same way.
Motivation
packageVersionas0.5.0whilepackages/gittensory-mcp/package.jsonand API compatibility metadata were bumped to0.6.0, causing CLI output,x-gittensory-mcp-versiontelemetry, and compatibility/status checks to report a stale version.Description
packageVersionconstant inpackages/gittensory-mcp/bin/gittensory-mcp.jsfrom"0.5.0"to"0.6.0"so CLI output, server metadata, compatibility checks, and telemetry headers matchpackage.json.Testing
node --check packages/gittensory-mcp/bin/gittensory-mcp.js,node packages/gittensory-mcp/bin/gittensory-mcp.js --version(now prints@jsonbored/gittensory-mcp/0.6.0),npm run build:mcp, andnpm run test:mcp-pack, and all commands succeeded.Codex Task