Skip to content

Commit 1159c33

Browse files
Testclaude
andcommitted
fix(mcpb): resolve binary naming conflict and update macOS runner
Critical fixes for MCPB bundle creation: 1. Binary Naming Conflict Resolution: - Binaries: mcpb-{platform} (no .mcpb extension) - Bundles: mcpb-{platform}.mcpb (ZIP with .mcpb extension) - Prevents bundle from overwriting binary during creation - Fixes 0-byte binary issue inside .mcpb bundles 2. macOS Runner Update: - Updated darwin-x64 from deprecated macos-13 to macos-15-intel - Addresses GitHub Actions deprecation warning 3. Workflow Updates: - Updated verify step to use new binary naming - Updated create-bundle step to use new binary naming - Bundle artifact paths remain unchanged (.mcpb extension) This ensures MCPB bundles contain valid binaries and can be installed in Claude Desktop. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d6da5c1 commit 1159c33

File tree

9 files changed

+14
-20
lines changed

9 files changed

+14
-20
lines changed

.github/workflows/release-mcpb.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
include:
1818
- os: ubuntu-latest
1919
platform: linux-x64
20-
- os: macos-13 # Intel Mac
20+
- os: macos-15-intel # Intel Mac (was macos-13, now deprecated)
2121
platform: darwin-x64
2222
- os: macos-latest # Apple Silicon Mac (M1/M2)
2323
platform: darwin-arm64
@@ -52,11 +52,11 @@ jobs:
5252
5353
- name: Verify binary
5454
run: |
55-
python scripts/build_binary.py verify --binary dist/mcpb-${{ matrix.platform }}${{ matrix.platform == 'windows-x64' && '.exe' || '.mcpb' }} --version ${{ steps.get_version.outputs.version }}
55+
python scripts/build_binary.py verify --binary dist/mcpb-${{ matrix.platform }}${{ matrix.platform == 'windows-x64' && '.exe' || '' }} --version ${{ steps.get_version.outputs.version }}
5656
5757
- name: Create bundle
5858
run: |
59-
python scripts/build_binary.py create-bundle --platform ${{ matrix.platform }} --binary dist/mcpb-${{ matrix.platform }}${{ matrix.platform == 'windows-x64' && '.exe' || '.mcpb' }} --version ${{ steps.get_version.outputs.version }} --output-dir dist
59+
python scripts/build_binary.py create-bundle --platform ${{ matrix.platform }} --binary dist/mcpb-${{ matrix.platform }}${{ matrix.platform == 'windows-x64' && '.exe' || '' }} --version ${{ steps.get_version.outputs.version }} --output-dir dist
6060
6161
- name: Upload artifact
6262
uses: actions/upload-artifact@v4

scripts/build_binary.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ def create_bundle(
217217
)
218218
command = f"server/mcpb-{platform_id}.exe"
219219
else:
220-
server_binary_name = f"server/mcpb-{platform_id}.mcpb"
220+
server_binary_name = (
221+
f"server/mcpb-{platform_id}" # No .mcpb extension inside bundle
222+
)
221223
entry_point = server_binary_name
222224
command = entry_point
223225

@@ -288,8 +290,7 @@ def build_binary(output_dir: Path, platform_id: Optional[str] = None) -> Path:
288290
binary_name = f"mcpb-{platform_id}"
289291
if platform_id.startswith("windows"):
290292
binary_name += ".exe"
291-
else:
292-
binary_name += ".mcpb"
293+
# Don't add .mcpb here - only the bundle gets .mcpb extension
293294

294295
# Find spec file
295296
spec_file = Path(__file__).parent.parent / "pyinstaller.spec"

src/code_indexer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
HNSW graph indexing (O(log N) complexity).
77
"""
88

9-
__version__ = "8.2.2"
9+
__version__ = "8.2.3"
1010
__author__ = "Seba Battig"

src/code_indexer/mcpb/bridge.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,7 @@ def main(): # pragma: no cover
217217
# Handle --diagnose flag
218218
if args.diagnose:
219219
try:
220-
result = diagnose_configuration(
221-
config_path=args.config, use_env=True
222-
)
220+
result = diagnose_configuration(config_path=args.config, use_env=True)
223221
print(result.format_output())
224222
sys.exit(0)
225223
except Exception as e:

src/code_indexer/mcpb/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import logging
88
import os
9-
import stat
109
from dataclasses import dataclass
1110
from pathlib import Path
1211
from typing import Optional
@@ -111,7 +110,6 @@ def load_config(
111110

112111
# Check file permissions (Story #517)
113112
file_stat = os.stat(path)
114-
file_mode = stat.filemode(file_stat.st_mode)
115113
# Get octal permissions (last 3 digits)
116114
file_perms = file_stat.st_mode & 0o777
117115

src/code_indexer/mcpb/manifest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ class PlatformManifest(BaseModel):
6060
name: str = Field(..., description="Package name")
6161
version: str = Field(..., description="Version string")
6262
description: str = Field(..., description="Package description")
63-
mcp_version: str = Field(
64-
default="2024-11-05", description="MCP protocol version"
65-
)
63+
mcp_version: str = Field(default="2024-11-05", description="MCP protocol version")
6664
platforms: dict[Platform, BinaryMetadata] = Field(
6765
default_factory=dict, description="Platform-specific binaries"
6866
)

tests/mcpb/test_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ class TestHTTPSValidation:
219219
def test_config_requires_https_url(self):
220220
"""Test that non-HTTPS URL raises validation error."""
221221
with pytest.raises(ValueError, match="server_url must use HTTPS"):
222-
BridgeConfig(server_url="http://cidx.example.com", bearer_token="test-token")
222+
BridgeConfig(
223+
server_url="http://cidx.example.com", bearer_token="test-token"
224+
)
223225

224226
def test_config_allows_https_url(self):
225227
"""Test that HTTPS URL is accepted."""

tests/mcpb/test_diagnostics.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
import json
88
import os
99
import tempfile
10-
from unittest.mock import AsyncMock, MagicMock, patch
10+
from unittest.mock import patch
1111

12-
import pytest
1312

14-
from code_indexer.mcpb.config import BridgeConfig
1513
from code_indexer.mcpb.diagnostics import (
1614
DiagnosticsResult,
1715
diagnose_configuration,

tests/unit/configuration/test_legacy_config_detection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ def test_reject_project_ports_config_in_json(self, tmp_path: Path):
141141
)
142142
assert "v8.0" in error_message or "8.0" in error_message
143143

144-
145144
def test_reject_invalid_embedding_provider(self, tmp_path: Path):
146145
"""Test that non-voyageai embedding providers are rejected."""
147146
config_path = tmp_path / ".code-indexer" / "config.json"

0 commit comments

Comments
 (0)