From 5f9da0ee4a93c4a3818ed508f24910a465a95cd0 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Wed, 25 Mar 2026 21:33:01 +0100 Subject: [PATCH] Fix 3 CI failures: Windows .exe path, tre ssize_t, UI archive name 1. Windows install/update: append .exe to binary path on _WIN32 (was writing empty command to .claude.json) 2. Vendored tre: add ssize_t typedef for Windows (basetsd.h SSIZE_T) 3. Smoke server: copy UI archive under standard name too, so install.sh and update --standard work in UI variant smoke tests --- .github/workflows/dry-run.yml | 9 +++++++++ .github/workflows/release.yml | 9 +++++++++ src/cli/cli.c | 8 ++++++++ vendored/tre/tre-internal.h | 7 +++++++ 4 files changed, 33 insertions(+) diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml index 3c33fe871..51b762820 100644 --- a/.github/workflows/dry-run.yml +++ b/.github/workflows/dry-run.yml @@ -380,6 +380,11 @@ jobs: SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }} tar -czf "/tmp/smoke-server/codebase-memory-mcp${SUFFIX}-${OS}-${ARCH}.tar.gz" \ -C /tmp/smoke-server codebase-memory-mcp + # Also serve under standard name so install.sh + update --standard work + if [ -n "$SUFFIX" ]; then + cp "/tmp/smoke-server/codebase-memory-mcp${SUFFIX}-${OS}-${ARCH}.tar.gz" \ + "/tmp/smoke-server/codebase-memory-mcp-${OS}-${ARCH}.tar.gz" + fi cd /tmp/smoke-server sha256sum *.tar.gz > checksums.txt 2>/dev/null || shasum -a 256 *.tar.gz > checksums.txt python3 -m http.server 18080 -d /tmp/smoke-server & @@ -476,6 +481,10 @@ jobs: SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }} cd /tmp/smoke-server zip -q "codebase-memory-mcp${SUFFIX}-windows-amd64.zip" codebase-memory-mcp.exe + # Also serve under standard name + if [ -n "$SUFFIX" ]; then + cp "codebase-memory-mcp${SUFFIX}-windows-amd64.zip" "codebase-memory-mcp-windows-amd64.zip" + fi sha256sum *.zip > checksums.txt python3 -m http.server 18080 -d /tmp/smoke-server & diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d565f05e8..ef3a6bac1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -376,6 +376,11 @@ jobs: SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }} tar -czf "/tmp/smoke-server/codebase-memory-mcp${SUFFIX}-${OS}-${ARCH}.tar.gz" \ -C /tmp/smoke-server codebase-memory-mcp + # Also serve under standard name so install.sh + update --standard work + if [ -n "$SUFFIX" ]; then + cp "/tmp/smoke-server/codebase-memory-mcp${SUFFIX}-${OS}-${ARCH}.tar.gz" \ + "/tmp/smoke-server/codebase-memory-mcp-${OS}-${ARCH}.tar.gz" + fi cd /tmp/smoke-server sha256sum *.tar.gz > checksums.txt 2>/dev/null || shasum -a 256 *.tar.gz > checksums.txt python3 -m http.server 18080 -d /tmp/smoke-server & @@ -473,6 +478,10 @@ jobs: SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }} cd /tmp/smoke-server zip -q "codebase-memory-mcp${SUFFIX}-windows-amd64.zip" codebase-memory-mcp.exe + # Also serve under standard name + if [ -n "$SUFFIX" ]; then + cp "codebase-memory-mcp${SUFFIX}-windows-amd64.zip" "codebase-memory-mcp-windows-amd64.zip" + fi sha256sum *.zip > checksums.txt python3 -m http.server 18080 -d /tmp/smoke-server & diff --git a/src/cli/cli.c b/src/cli/cli.c index 1c59983f7..d3218497e 100644 --- a/src/cli/cli.c +++ b/src/cli/cli.c @@ -2682,7 +2682,11 @@ int cbm_cmd_install(int argc, char **argv) { /* Step 2: Binary path */ char self_path[1024]; +#ifdef _WIN32 + snprintf(self_path, sizeof(self_path), "%s/.local/bin/codebase-memory-mcp.exe", home); +#else snprintf(self_path, sizeof(self_path), "%s/.local/bin/codebase-memory-mcp", home); +#endif /* Step 3: Install/refresh all agent configs */ cbm_install_agent_configs(home, self_path, force, dry_run); @@ -3103,7 +3107,11 @@ int cbm_cmd_update(int argc, char **argv) { /* Step 5: Extract binary */ char bin_dest[1024]; +#ifdef _WIN32 + snprintf(bin_dest, sizeof(bin_dest), "%s/.local/bin/codebase-memory-mcp.exe", home); +#else snprintf(bin_dest, sizeof(bin_dest), "%s/.local/bin/codebase-memory-mcp", home); +#endif /* Ensure install directory exists */ char bin_dir[1024]; diff --git a/vendored/tre/tre-internal.h b/vendored/tre/tre-internal.h index d74f349e7..79916d9bc 100644 --- a/vendored/tre/tre-internal.h +++ b/vendored/tre/tre-internal.h @@ -9,6 +9,13 @@ #ifndef TRE_INTERNAL_H #define TRE_INTERNAL_H 1 +#ifdef _WIN32 +#include +typedef SSIZE_T ssize_t; +#else +#include /* ssize_t */ +#endif + #ifdef HAVE_WCHAR_H #include #endif /* HAVE_WCHAR_H */