@@ -139,6 +139,7 @@ jobs:
139139 run : scripts/smoke-test.sh ./codebase-memory-mcp
140140 env :
141141 SMOKE_DOWNLOAD_URL : http://localhost:18080
142+ SMOKE_UPDATE_FIXTURE_DIR : /tmp/smoke-server
142143
143144 - name : Security audits
144145 run : |
@@ -210,17 +211,27 @@ jobs:
210211 SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }}
211212 ARCH=${{ matrix.arch }}
212213 unzip -o "codebase-memory-mcp${SUFFIX}-windows-${ARCH}.zip"
213- [ -n "$SUFFIX" ] && cp "codebase-memory-mcp${SUFFIX}.exe" codebase-memory-mcp.exe || true
214+ test -s codebase-memory-mcp.exe
215+ test -s codebase-memory-mcp.payload.exe
216+ PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
217+ LAUNCH_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-version.XXXXXX")"
218+ trap 'rm -rf "$LAUNCH_DIR"' EXIT
219+ cp codebase-memory-mcp.exe codebase-memory-mcp.payload.exe "$LAUNCH_DIR/"
220+ "$LAUNCH_DIR/codebase-memory-mcp.payload.exe" --version
221+ "$LAUNCH_DIR/codebase-memory-mcp.exe" --version
214222
215223 - name : Start artifact server
216224 shell : msys2 {0}
217225 run : |
218226 mkdir -p /tmp/smoke-server
219- cp codebase-memory-mcp.exe /tmp/smoke-server/
227+ cp codebase-memory-mcp.exe codebase-memory-mcp.payload.exe \
228+ LICENSE install.ps1 THIRD_PARTY_NOTICES.md /tmp/smoke-server/
220229 SUFFIX=${{ matrix.variant == 'ui' && '-ui' || '' }}
221230 ARCH=${{ matrix.arch }}
222231 cd /tmp/smoke-server
223- zip -q "codebase-memory-mcp${SUFFIX}-windows-${ARCH}.zip" codebase-memory-mcp.exe
232+ zip -q "codebase-memory-mcp${SUFFIX}-windows-${ARCH}.zip" \
233+ codebase-memory-mcp.exe codebase-memory-mcp.payload.exe \
234+ LICENSE install.ps1 THIRD_PARTY_NOTICES.md
224235 if [ -n "$SUFFIX" ]; then
225236 cp "codebase-memory-mcp${SUFFIX}-windows-${ARCH}.zip" "codebase-memory-mcp-windows-${ARCH}.zip"
226237 fi
@@ -232,35 +243,51 @@ jobs:
232243
233244 - name : Smoke test
234245 shell : msys2 {0}
235- run : scripts/smoke-test.sh ./codebase-memory-mcp.exe
246+ run : |
247+ PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
248+ SMOKE_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-smoke.XXXXXX")"
249+ trap 'rm -rf "$SMOKE_DIR"' EXIT
250+ cp codebase-memory-mcp.exe codebase-memory-mcp.payload.exe "$SMOKE_DIR/"
251+ CBM_CACHE_DIR="$(cygpath -m "$SMOKE_DIR/cache")" \
252+ SMOKE_TEMP_ROOT="$SMOKE_DIR" \
253+ scripts/smoke-test.sh "$SMOKE_DIR/codebase-memory-mcp.exe"
236254 env :
237255 SMOKE_DOWNLOAD_URL : http://127.0.0.1:18080
256+ SMOKE_UPDATE_FIXTURE_DIR : /tmp/smoke-server
238257 SMOKE_ARCH : ${{ matrix.arch }}
239258
240259 - name : Security audits
241260 shell : msys2 {0}
242261 run : |
243262 scripts/security-strings.sh ./codebase-memory-mcp.exe
244- scripts/security-install.sh ./codebase-memory-mcp.exe
263+ scripts/security-strings.sh ./codebase-memory-mcp.payload.exe
264+ PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
265+ SECURITY_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-security.XXXXXX")"
266+ trap 'rm -rf "$SECURITY_DIR"' EXIT
267+ cp codebase-memory-mcp.exe codebase-memory-mcp.payload.exe "$SECURITY_DIR/"
268+ TMPDIR="$SECURITY_DIR" \
269+ scripts/security-install.sh "$SECURITY_DIR/codebase-memory-mcp.exe"
245270
246271 - name : Windows Defender scan
247272 shell : pwsh
248273 run : |
249274 & "C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate 2>$null
250- $result = & "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "$PWD\codebase-memory-mcp.exe" -DisableRemediation
251- $code = $LASTEXITCODE
252- Write-Host $result
253- # MpCmdRun -Scan exit codes: 0 = clean, 2 = threat found. Any OTHER non-zero
254- # means the scan engine could not run at all (e.g. hr=0x800106ba: the Defender
255- # antimalware service is unavailable on the runner) — that is NOT a detection.
256- # Fail soft on an engine failure so a transient runner-side AV outage can't
257- # false-fail a release; only a real detection (exit 2) hard-blocks.
258- if ($code -eq 2) {
259- Write-Host "BLOCKED: Windows Defender flagged binary!"; exit 1
260- } elseif ($code -ne 0) {
261- Write-Host "::warning::Windows Defender scan could not run (exit $code) - skipping AV gate on this runner"
262- } else {
263- Write-Host "=== Windows Defender: clean ==="
275+ foreach ($binary in @("codebase-memory-mcp.exe", "codebase-memory-mcp.payload.exe")) {
276+ $result = & "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "$PWD\$binary" -DisableRemediation
277+ $code = $LASTEXITCODE
278+ Write-Host $result
279+ # MpCmdRun -Scan exit codes: 0 = clean, 2 = threat found. Any OTHER non-zero
280+ # means the scan engine could not run at all (e.g. hr=0x800106ba: the Defender
281+ # antimalware service is unavailable on the runner) — that is NOT a detection.
282+ # Fail soft on an engine failure so a transient runner-side AV outage can't
283+ # false-fail a release; only a real detection (exit 2) hard-blocks.
284+ if ($code -eq 2) {
285+ Write-Host "BLOCKED: Windows Defender flagged $binary!"; exit 1
286+ } elseif ($code -ne 0) {
287+ Write-Host "::warning::Windows Defender scan could not run for $binary (exit $code) - skipping AV gate on this runner"
288+ } else {
289+ Write-Host "=== Windows Defender: $binary clean ==="
290+ }
264291 }
265292
266293 smoke-linux-portable :
0 commit comments