Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(smoke): UI presence is the caller's claim, not every lane's assumption

Martin Vogel39e02544cc49
diff --git a/scripts/ci/smoke-artifact.sh b/scripts/ci/smoke-artifact.sh
index be3f487f9..b9da34a5f 100755
--- a/scripts/ci/smoke-artifact.sh
+++ b/scripts/ci/smoke-artifact.sh
@@ -55,6 +55,9 @@ for arg in "$@"; do
done
[ -n "$GOOS" ] && [ -n "$GOARCH" ] || { usage >&2; exit 2; }
UI_FLAG=(--with-ui)
+# This lane builds and packages the SHIPPED composition, so a binary that serves
+# no frontend is a defect here, not a documented skip.
+export SMOKE_REQUIRE_UI=1
case "$GOARCH" in
*-portable) BUILD_ARGS+=("STATIC=1") ;;
esac
diff --git a/scripts/smoke-local.sh b/scripts/smoke-local.sh
index c40aaf935..4a58f1293 100755
--- a/scripts/smoke-local.sh
+++ b/scripts/smoke-local.sh
@@ -22,9 +22,11 @@ destination override neutralized.
Arguments:
<binary> Product binary to smoke (e.g. build/c/codebase-memory-mcp).
-One composition ships and it carries the embedded UI, so Phase 15's "no assets"
-outcome is always a FAILURE here (SMOKE_REQUIRE_UI=1): a binary built without
---with-ui cannot pass this smoke.
+Environment:
+ SMOKE_REQUIRE_UI=1 Phase 15's "no embedded assets" SKIP becomes a FAILURE.
+ Set by scripts/ci/smoke-artifact.sh, which builds and
+ packages the shipped --with-ui composition. Unset in the
+ fast PR lane, which builds without the frontend.
Environment:
CBM_SMOKE_ARTIFACT_DIR Release mode: an EXTRACTED release artifact
@@ -56,9 +58,12 @@ if [ ! -x "$BINARY" ]; then
echo "smoke-local: binary is not executable: $BINARY" >&2
exit 2
fi
-# Every shipped binary carries the embedded UI, so Phase 15's documented
-# "no embedded assets" SKIP is always a failure here.
-REQUIRE_UI=1
+# Whether the UI must be present is the CALLER's claim, not this script's:
+# scripts/ci/smoke-artifact.sh builds --with-ui and packages the real archive, so
+# it sets SMOKE_REQUIRE_UI=1 and Phase 15's "no embedded assets" SKIP becomes a
+# FAILURE there. The fast PR lane deliberately builds without the frontend to
+# skip an npm build on every product PR, so it must not assert UI presence.
+REQUIRE_UI="${SMOKE_REQUIRE_UI:-0}"
# Unset (the local + PR default): synthesize the release sidecars from this
# checkout. Set: take them from an EXTRACTED release artifact, so the release
diff --git a/scripts/smoke-test.sh b/scripts/smoke-test.sh
index 2cc59dad3..d4ffcb80d 100755
--- a/scripts/smoke-test.sh
+++ b/scripts/smoke-test.sh
@@ -3506,10 +3506,12 @@ fi
# ── Phase 15: UI HTTP server reachability ──
# Only runs if the binary was built with embedded UI assets.
#
-# SMOKE_REQUIRE_UI=1 (set by the wrappers for a -ui variant) makes the
-# no-assets outcome a FAILURE instead of a SKIP: a ui run that smoked a
-# standard binary under a ui name would otherwise pass green, and a skip that
-# cannot fail is not a gate.
+# SMOKE_REQUIRE_UI=1 makes the no-assets outcome a FAILURE instead of a SKIP.
+# scripts/ci/smoke-artifact.sh sets it because that lane builds --with-ui and
+# packages the real archive, so a binary serving no frontend is a defect there.
+# The fast PR lane builds without the frontend on purpose and leaves it unset --
+# a skip that cannot fail is not a gate, but neither is asserting a property the
+# lane deliberately does not produce.
SMOKE_REQUIRE_UI="${SMOKE_REQUIRE_UI:-0}"
smoke_ui_missing() {
if [ "$SMOKE_REQUIRE_UI" = "1" ]; then
diff --git a/test-infrastructure/vm/vm-smoke.sh b/test-infrastructure/vm/vm-smoke.sh
index c646707ee..37184080e 100755
--- a/test-infrastructure/vm/vm-smoke.sh
+++ b/test-infrastructure/vm/vm-smoke.sh
@@ -73,9 +73,12 @@ case "$SMOKE_ARCH" in
arm64 | amd64) ;;
*) echo "vm-smoke: SMOKE_ARCH must be arm64 or amd64. Please consult --help." >&2; exit 2 ;;
esac
-# Every shipped binary carries the embedded UI, so Phase 15's documented
-# "no embedded assets" SKIP is always a failure here.
-REQUIRE_UI=1
+# Whether the UI must be present is the CALLER's claim, not this script's:
+# scripts/ci/smoke-artifact.sh builds --with-ui and packages the real archive, so
+# it sets SMOKE_REQUIRE_UI=1 and Phase 15's "no embedded assets" SKIP becomes a
+# FAILURE there. The fast PR lane deliberately builds without the frontend to
+# skip an npm build on every product PR, so it must not assert UI presence.
+REQUIRE_UI="${SMOKE_REQUIRE_UI:-0}"
PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
SMOKE_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-vm-smoke.XXXXXX")"