Skip to content

Commit 1c16786

Browse files
committed
fix(smoke): stage cbm-integrations.json in the Windows smoke path too
The Windows pr-smoke uses test-infrastructure/vm/vm-smoke.sh, the Windows analog of smoke-local.sh, which had the same three staging gaps the Unix fix closed: its required-sidecar check, fixture copy, and zip member list all omitted cbm-integrations.json, so the served archive lacked the asset and install/ uninstall failed closed with "integration assets missing". Plus one Windows-specific spot: vm-smoke.sh copies the smoke binary into $SMOKE_DIR and runs smoke-test.sh against it there, but the asset only reached $FIXTURE_DIR — so Phase 14 (which hand-stages the binary and drives an uninstall, resolving the asset next to the binary) missed it. Now staged next to the binary in $SMOKE_DIR as well. build.sh already places it next to build/c/*.exe, so the non-artifact source is $(dirname BINARY_SRC); artifact mode takes the release copy. Member set + order in the zip mirror scripts/package-release.sh (Windows). vm-smoke.sh lives under test-infrastructure/, outside the license gate's scan set, so the cbm-integrations.json/LICENSE adjacency raises no ScanCode finding there. Syntax-checked; vm-worktree-manifest, smoke-fixture and windows-bundle contracts pass. The Unix smoke already runs clean through all 16 phases; this mirrors that staging onto the one path I cannot exercise locally. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent faf08a0 commit 1c16786

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

‎test-infrastructure/vm/vm-smoke.sh‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ARTIFACT_DIR="${CBM_SMOKE_ARTIFACT_DIR:-}"
5959
if [ -n "$ARTIFACT_DIR" ]; then
6060
ARTIFACT_DIR="$(cd "$ARTIFACT_DIR" && pwd)"
6161
for required in codebase-memory-mcp.exe \
62-
LICENSE install.ps1 THIRD_PARTY_NOTICES.md; do
62+
cbm-integrations.json LICENSE install.ps1 THIRD_PARTY_NOTICES.md; do
6363
[ -s "$ARTIFACT_DIR/$required" ] ||
6464
{ echo "vm-smoke: release artifact is missing $required" >&2; exit 2; }
6565
done
@@ -146,22 +146,37 @@ MSYS2_ARG_CONV_EXCL='*' powershell.exe -NoProfile -ExecutionPolicy Bypass \
146146
-SmokeRoot "$(cygpath -w "$SMOKE_DIR")"
147147
cp "$BINARY_SRC" "$SMOKE_DIR/codebase-memory-mcp.exe"
148148
cp "$SMOKE_DIR/codebase-memory-mcp.exe" "$FIXTURE_DIR/"
149+
# The integration asset must sit next to the smoke binary in $SMOKE_DIR: phases
150+
# that invoke it directly (Phase 14 stages it by hand and drives an uninstall)
151+
# resolve the asset next to the binary, and without it those render-template
152+
# operations fail closed. Its own copy lands in the served archive below.
153+
if [ -n "$ARTIFACT_DIR" ]; then
154+
ASSET_SRC="$ARTIFACT_DIR/cbm-integrations.json"
155+
else
156+
ASSET_SRC="$(dirname "$BINARY_SRC")/cbm-integrations.json"
157+
fi
158+
cp "$ASSET_SRC" "$SMOKE_DIR/cbm-integrations.json"
149159
# The install/update phases fetch these out of the served archive, so they must
150160
# be the artifact's own copies whenever one was supplied — regenerating them
151161
# here would smoke a sidecar the release never ships.
152162
if [ -n "$ARTIFACT_DIR" ]; then
153-
cp "$ARTIFACT_DIR/LICENSE" "$ARTIFACT_DIR/install.ps1" \
154-
"$ARTIFACT_DIR/THIRD_PARTY_NOTICES.md" "$FIXTURE_DIR/"
163+
cp "$ARTIFACT_DIR/cbm-integrations.json" "$ARTIFACT_DIR/LICENSE" \
164+
"$ARTIFACT_DIR/install.ps1" "$ARTIFACT_DIR/THIRD_PARTY_NOTICES.md" "$FIXTURE_DIR/"
155165
else
156-
cp LICENSE install.ps1 "$FIXTURE_DIR/"
166+
# build.sh stages cbm-integrations.json next to the binary; ship it in the
167+
# archive so the installed binary can verify and render its templates.
168+
cp "$(dirname "$BINARY_SRC")/cbm-integrations.json" LICENSE install.ps1 "$FIXTURE_DIR/"
157169
scripts/gen-third-party-notices.sh "$FIXTURE_DIR/THIRD_PARTY_NOTICES.md"
158170
fi
159171

172+
# Member set + ORDER mirror scripts/package-release.sh (Windows): the install
173+
# verifies cbm-integrations.json against the binary's embedded SHA-256 and fails
174+
# closed without it.
160175
EXPECTED_ARTIFACT="codebase-memory-mcp${SUFFIX}-windows-${SMOKE_ARCH}.zip"
161176
(
162177
cd "$FIXTURE_DIR"
163178
zip -q "$EXPECTED_ARTIFACT" \
164-
codebase-memory-mcp.exe LICENSE install.ps1 THIRD_PARTY_NOTICES.md
179+
codebase-memory-mcp.exe cbm-integrations.json LICENSE install.ps1 THIRD_PARTY_NOTICES.md
165180
if [ -n "$SUFFIX" ]; then
166181
cp "$EXPECTED_ARTIFACT" "codebase-memory-mcp-windows-${SMOKE_ARCH}.zip"
167182
fi

0 commit comments

Comments
 (0)