Skip to content

Commit 69be04c

Browse files
committed
test(e2e): an empty --version is not an old client
252's guard compared `$MCPP_BOOT --version` against the PR binary's and treated "different" as "found an old client". In CI that entry is an xvm SHIM, and a shim resolves against the home it is asked in — under the e2e suite's environment it answers `xlings: 'mcpp' is not installed` and prints nothing. The empty string duly differed, so the test ran the real check against a binary that cannot run at all and reported a COMPATIBILITY FAILURE against a package that is perfectly readable. Three legs red for a reason that was in the test. The guard now requires a version-SHAPED answer. Anything else means "no usable old binary here", which is a note naming what it got, not a verdict — and the static half (the generated manifest's sections are a subset of the pre-existing vocabulary) still runs everywhere. Consequence worth stating: the real old-client check runs where a released mcpp binary is directly executable — locally, and in any job that points MCPP_BOOT at one rather than at a shim. It passed against 2026.8.15.3.
1 parent 0d871b3 commit 69be04c

1 file changed

Lines changed: 31 additions & 5 deletions

File tree

tests/e2e/252_pack_library_old_client.sh

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,27 @@ EOF
9292
|| { cat "$TMP/app/new.log"; echo "the PR binary could not consume its own package"; exit 1; }
9393
grep -q 'ok=42' "$TMP/app/new.log" || { cat "$TMP/app/new.log"; echo "wrong answer"; exit 1; }
9494

95-
if [[ -n "${MCPP_BOOT:-}" && -x "${MCPP_BOOT}" ]] \
96-
&& [[ "$("$MCPP_BOOT" --version 2>/dev/null)" != "$("$MCPP" --version 2>/dev/null)" ]]; then
97-
echo "old client: $("$MCPP_BOOT" --version)"
95+
# ⚠️ The boot entry each CI job bootstraps from is an xvm SHIM, and a shim
96+
# resolves against the home it is asked in — under the e2e suite's environment
97+
# it answers `xlings: 'mcpp' is not installed` and prints NOTHING for
98+
# `--version`. The first version of this guard compared that empty string
99+
# against the PR binary's version, found them "different", and concluded it had
100+
# found an old client — then reported a compatibility failure against a package
101+
# that is perfectly readable. So the guard demands a version-SHAPED answer;
102+
# anything else means "no usable old binary here", which is a note, not a
103+
# verdict.
104+
boot_ver=""
105+
new_ver="$("$MCPP" --version 2>/dev/null || true)"
106+
if [[ -n "${MCPP_BOOT:-}" && -x "${MCPP_BOOT}" ]]; then
107+
boot_ver="$("$MCPP_BOOT" --version 2>/dev/null || true)"
108+
fi
109+
usable=0
110+
case "$boot_ver" in
111+
mcpp\ [0-9]*) usable=1 ;;
112+
esac
113+
114+
if [[ "$usable" == 1 && "$boot_ver" != "$new_ver" ]]; then
115+
echo "old client: $boot_ver"
98116
rm -rf "$TMP/app/target"
99117
( cd "$TMP/app" && "$MCPP_BOOT" run > old.log 2>&1 ) || {
100118
cat "$TMP/app/old.log"
@@ -107,7 +125,15 @@ if [[ -n "${MCPP_BOOT:-}" && -x "${MCPP_BOOT}" ]] \
107125
cat "$TMP/app/old.log"; echo "the old client built it but ran it wrong"; exit 1; }
108126
echo "PASS: a released mcpp builds and runs against a package from this one"
109127
else
110-
echo "NOTE: \$MCPP_BOOT is unset or identical to \$MCPP — the real old-client"
111-
echo " check did not run here. The static section-vocabulary check did."
128+
if [[ -n "${MCPP_BOOT:-}" && "$usable" != 1 ]]; then
129+
echo "NOTE: \$MCPP_BOOT=${MCPP_BOOT} does not answer --version with a version"
130+
echo " (got: '${boot_ver}'), so it is not a usable old client here — a"
131+
echo " shim resolves against the home it is asked in. The REAL old-client"
132+
echo " check therefore did not run; run it with MCPP_BOOT pointing at a"
133+
echo " released mcpp binary directly."
134+
else
135+
echo "NOTE: \$MCPP_BOOT is unset or identical to \$MCPP — the real old-client"
136+
echo " check did not run here."
137+
fi
112138
echo "PASS: the generated manifest introduces no section an older mcpp cannot read"
113139
fi

0 commit comments

Comments
 (0)