Skip to content

Commit 30a9a19

Browse files
michelabboudclaude
andcommitted
fix(mcp): final-review fixes — SERVER_VERSION drift + honest bundle-size verdict
From the final whole-branch code review. - Phase 4's SERVER_VERSION bump left each server's runServer({version}) literal at the old value, so all 10 bumped servers reported the new version in hello output but the old version over the MCP handshake (the drift Phase 2 fixed). Replaced every runServer version literal with the SERVER_VERSION constant across all 11 servers (+ dependency-management SBOM generator version) — one source of truth. - dependency-management estimate_bundle_size no longer reports "acceptable" for server-side packages (express: gzipped "N/A (server)" → parseInt NaN → NaN>50 false); non-numeric sizes now report "not applicable". Test asserts it. Spine → 2.11.13. All 11 servers build; 1317 MCP tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent 34c8ac1 commit 30a9a19

16 files changed

Lines changed: 45 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ We follow [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH):
1515

1616
---
1717

18+
## [2.11.13] - 2026-07-10
19+
20+
Fixes from the final whole-branch code review.
21+
22+
### Fixed
23+
- **Version drift reintroduced by the Phase 4 bump** — the Phase 4 `SERVER_VERSION` bump did not
24+
update the separate hardcoded `version:` literal in each server's `runServer({...})` call, so all
25+
10 bumped servers reported the new version in `hello` output but the *old* version over the MCP
26+
handshake (the exact drift class Phase 2 fixed). Replaced every `runServer` version literal with the
27+
`SERVER_VERSION` constant across all 11 servers (and the `dependency-management` SBOM generator-tool
28+
version) so the constant is the single source of truth — future bumps can't desync again.
29+
- **`dependency-management` bundle-size** reported "Bundle size is acceptable" for server-side packages
30+
like `express` whose size is `"N/A (server)"` (`parseInt``NaN`, `NaN > 50` → false). Non-numeric
31+
sizes now report "not applicable" instead of an unbacked verdict.
32+
1833
## [2.11.12] - 2026-07-10
1934

2035
Remediation close-out — dependency audit (rule 16).

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.11.12
1+
2.11.13

component-versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 2,
3-
"repoVersion": "2.11.12",
4-
"generatedAt": "2026-07-10T07:49:37.547Z",
3+
"repoVersion": "2.11.13",
4+
"generatedAt": "2026-07-10T07:56:53.861Z",
55
"components": {
66
"agents/code-reviewer": {
77
"type": "agent",

mcp-servers/api-specialist-mcp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ function buildHelloVerbose(): string {
11231123
}
11241124

11251125
// Start server
1126-
runServer({ name: "api-specialist-mcp", version: "1.0.0" }, (instance) => {
1126+
runServer({ name: "api-specialist-mcp", version: SERVER_VERSION }, (instance) => {
11271127
const { server, logger } = instance;
11281128

11291129
// Tool handlers

mcp-servers/cicd-pipeline/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ function buildHelloVerbose(): string {
683683
].join("\n");
684684
}
685685

686-
runServer({ name: "cicd-pipeline-mcp", version: "1.0.0" }, (instance) => {
686+
runServer({ name: "cicd-pipeline-mcp", version: SERVER_VERSION }, (instance) => {
687687
const { server, logger } = instance;
688688

689689
// Tool handlers

mcp-servers/code-review-mcp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function buildHelloVerbose(): string {
190190
// Start server
191191
runServer({
192192
name: "code-review-mcp",
193-
version: "1.0.0",
193+
version: SERVER_VERSION,
194194
healthChecks: [
195195
commandHealthCheck("eslint"),
196196
],

mcp-servers/database-operations/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ function buildHelloVerbose(): string {
434434
}
435435

436436
// MCP Server
437-
runServer({ name: "database-operations", version: "1.0.0" }, (instance) => {
437+
runServer({ name: "database-operations", version: SERVER_VERSION }, (instance) => {
438438
const { server, logger } = instance;
439439

440440
// Tool handlers

mcp-servers/dependency-management/src/index.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,13 @@ function estimateBundleSize(packageName: string, version?: string): BundleSizeRe
349349
size,
350350
alternatives: alternatives.length > 0 ? alternatives : undefined,
351351
tree_shakeable: ["react", "vue", "lodash-es"].includes(packageName),
352-
recommendation: known
353-
? (parseInt(size.gzipped) > 50
352+
recommendation: !known
353+
? "Bundle size unknown — check bundlephobia.com or bundle locally to measure"
354+
: Number.isNaN(parseInt(size.gzipped))
355+
? "Bundle size not applicable for this package (e.g. server-side only)"
356+
: parseInt(size.gzipped) > 50
354357
? "Consider using lighter alternative or tree-shaking"
355-
: "Bundle size is acceptable")
356-
: "Bundle size unknown — check bundlephobia.com or bundle locally to measure",
358+
: "Bundle size is acceptable",
357359
};
358360
}
359361

@@ -1388,6 +1390,8 @@ describe("estimateBundleSize", () => {
13881390
const result = estimateBundleSize("express");
13891391
expect(result.size.minified).toBe("N/A (server)");
13901392
expect(result.size.gzipped).toBe("N/A (server)");
1393+
// A non-numeric size must NOT be reported as "acceptable" (NaN > 50 = false).
1394+
expect(result.recommendation).toMatch(/not applicable/i);
13911395
});
13921396
});
13931397

mcp-servers/dependency-management/src/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,13 @@ function estimateBundleSize(packageName: string, version?: string): BundleSizeRe
379379
size,
380380
alternatives: alternatives.length > 0 ? alternatives : undefined,
381381
tree_shakeable: ["react", "vue", "lodash-es"].includes(packageName),
382-
recommendation: known
383-
? (parseInt(size.gzipped) > 50
382+
recommendation: !known
383+
? "Bundle size unknown — check bundlephobia.com or bundle locally to measure"
384+
: Number.isNaN(parseInt(size.gzipped))
385+
? "Bundle size not applicable for this package (e.g. server-side only)"
386+
: parseInt(size.gzipped) > 50
384387
? "Consider using lighter alternative or tree-shaking"
385-
: "Bundle size is acceptable")
386-
: "Bundle size unknown — check bundlephobia.com or bundle locally to measure",
388+
: "Bundle size is acceptable",
387389
};
388390
}
389391

@@ -442,7 +444,7 @@ function generateSBOM(deps: Record<string, string>, devDeps: Record<string, stri
442444
version: 1,
443445
metadata: {
444446
timestamp: new Date().toISOString(),
445-
tools: [{ vendor: "dependency-management-mcp", name: "sbom-generator", version: "1.0.0" }]
447+
tools: [{ vendor: "dependency-management-mcp", name: "sbom-generator", version: SERVER_VERSION }]
446448
},
447449
components: [...components, ...devComponents]
448450
};
@@ -508,7 +510,7 @@ function buildHelloVerbose(): string {
508510
}
509511

510512
// MCP Server
511-
runServer({ name: "dependency-management-mcp", version: "1.0.0" }, (instance) => {
513+
runServer({ name: "dependency-management-mcp", version: SERVER_VERSION }, (instance) => {
512514
const { server, logger } = instance;
513515

514516
// Tool handlers

mcp-servers/design-system-mcp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ function buildHelloVerbose(): string {
592592
}
593593

594594
// Start server with runServer factory
595-
runServer({ name: "design-system-mcp", version: "1.0.0" }, (instance) => {
595+
runServer({ name: "design-system-mcp", version: SERVER_VERSION }, (instance) => {
596596
const { server, logger } = instance;
597597
// Tool handlers
598598
server.setRequestHandler(ListToolsRequestSchema, async () => {

0 commit comments

Comments
 (0)