Skip to content

Sync MCP server version with binary version#774

Merged
DeusData merged 1 commit into
DeusData:mainfrom
minorityre:codex/sync-mcp-server-version
Jul 3, 2026
Merged

Sync MCP server version with binary version#774
DeusData merged 1 commit into
DeusData:mainfrom
minorityre:codex/sync-mcp-server-version

Conversation

@minorityre

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the MCP initialize response so serverInfo.version comes from the same version source used by the binary instead of a hard-coded 0.10.0 string.

This also initializes the shared CLI version state from CBM_VERSION during startup, so release builds stamped with scripts/build.sh --version ... report the same version through --version, update checks, and MCP initialize.

Checklist

  • Every commit is signed off (git commit -s) - required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test) - not run: this Windows environment has no make/gcc, and WSL fails to mount its distro VHDX.
  • Lint passes (make -f Makefile.cbm lint-ci) - not run for the same local toolchain limitation.
  • New behavior is covered by a test (reproduce-first for bug fixes)

Local checks run:

  • git diff --check -- src/main.c src/mcp/mcp.c tests/test_mcp.c

Signed-off-by: armand <armandhell123@gmail.com>
@minorityre minorityre marked this pull request as ready for review July 2, 2026 16:08
@minorityre minorityre requested a review from DeusData as a code owner July 2, 2026 16:08
@DeusData DeusData added bug Something isn't working editor/integration Editor compatibility and CLI integration priority/normal Standard review queue; useful PR with ordinary maintainer urgency. labels Jul 3, 2026
@DeusData

DeusData commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Thanks for the version-reporting fix. Triage: MCP/editor integration bug.

Review will check that serverInfo.version, CLI --version, update checks, and release-stamped builds all read from the same source without hard-coded drift. The compatibility constraint is that initialize response shape stays otherwise unchanged for MCP clients.

@DeusData

DeusData commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Thank you — this turned out to fix more than the title says. Besides serverInfo reporting a nonexistent 0.10.0, nothing ever called cbm_cli_set_version, so release builds self-identified as "dev" and the update-check compared the latest tag against 0.0.0 — meaning the 'Update available' nag fired on every release build. Your one-liner fixes both, and the test is a genuine red-first guard. Merging.

@DeusData DeusData merged commit 3a1387e into DeusData:main Jul 3, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working editor/integration Editor compatibility and CLI integration priority/normal Standard review queue; useful PR with ordinary maintainer urgency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants