mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
fix(smoke): UI presence is the caller's claim, not every lane's assumption
Making REQUIRE_UI unconditional broke all three pr-smoke legs: FAIL 15a: SMOKE_REQUIRE_UI=1 but this binary serves no embedded UI assets The PR lane runs scripts/build.sh WITHOUT --with-ui on purpose, so an npm frontend build does not land on every product PR. Demanding embedded assets there asserts a property that lane deliberately does not produce. The guard still exists where it means something: scripts/ci/smoke-artifact.sh builds --with-ui, packages the real archive and smokes the EXTRACTED result, so it exports SMOKE_REQUIRE_UI=1 and a frontend-less binary fails there. That is the lane whose whole job is release fidelity. Deliberately NOT fixed by adding --with-ui to pr.yml: that would put `npm ci && npm run build` on three runners for every product PR to re-prove something the dry-run and release lanes already gate. PR CI cost is not free and this branch should not quietly raise it. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
1 parent
d602eb6edb
commit
39e02544cc
4 files changed
+26
-13
No files matched your search
@@ -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
|
||||
|
||||
+11
-6
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")"
|
||||
|
||||
Reference in new issue
Block a user