Skip to content

Commit 63804c5

Browse files
committed
test(645): a host whose fast path declines for another reason is reported, not failed
macOS and Windows CI found an unchanged second build resolving the toolchain: try_fast_build requires an ELF runtime-validation verdict for every artefact, which Mach-O and PE never record (#400). The control now compares the toolchain= lines the two builds record; identical lines report the host as not measured and print the entry, differing lines fail. The design record notes the ELF-only fast path as outside this change.
1 parent f4e646d commit 63804c5

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.agents/docs/2026-09-12-engine-gaps-after-the-sdk-batch.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,3 +594,12 @@ code, and what was built instead.
594594
leg switches to a second installed version of the same family and asserts
595595
the version string in the artefact; it reports itself as not measured where
596596
no second version is installed.
597+
11. **Outside this change: the fast path is taken only for ELF artefacts.**
598+
tests/e2e/645's control, two unchanged plain builds, found the second one
599+
resolving the toolchain on macOS and on Windows CI. `try_fast_build`
600+
requires `validated_artifact_snapshot`, which requires a `Pass`
601+
runtime-validation verdict for every artefact, and only an ELF artefact
602+
records one; a Mach-O or PE build therefore always takes the full path. The
603+
decline predates this change (#400). 645 distinguishes the two causes by the
604+
`toolchain=` lines the two builds record: identical lines report the host as
605+
not measured, and differing lines fail.

tests/e2e/645_the_fast_path_compares_the_toolchain_request.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,23 @@ TOML
4242
"$MCPP" build > a1.log 2>&1 || fail "the first build failed" a1.log
4343
own=$(sed -n 's/.*Resolved \([^ ]*\) .*/\1/p' a1.log | head -1)
4444
[ -n "$own" ] || fail "could not learn this platform's toolchain" a1.log
45+
first_request=$(grep '^toolchain=' target/.build_cache 2>/dev/null | head -1)
4546
"$MCPP" build > a2.log 2>&1 || fail "the second build failed" a2.log
46-
[ "$(resolutions a2.log)" = 0 ] \
47-
|| fail "control: an unchanged second build resolved the toolchain, so the fast path was not taken and nothing below can fail" a2.log
47+
if [ "$(resolutions a2.log)" != 0 ]; then
48+
# THE CONTROL FAILED, AND WHAT DECIDES THE VERDICT IS WHY. Two plain builds
49+
# make the same request, so identical `toolchain=` lines in the entries they
50+
# recorded mean the fast path declined for a reason this test does not
51+
# measure. Measured on macOS and Windows CI: the fast path requires an ELF
52+
# runtime-validation verdict for every artefact (execute.cppm,
53+
# try_fast_build), which a Mach-O or PE artefact never records.
54+
second_request=$(grep '^toolchain=' target/.build_cache 2>/dev/null | head -1)
55+
if [ -n "$first_request" ] && [ "$first_request" = "$second_request" ]; then
56+
echo "NOT MEASURED: an unchanged second build did not take the fast path on this host, and both builds recorded the same request ($first_request)"
57+
echo "--- the recorded entry ---"; cat target/.build_cache
58+
exit 0
59+
fi
60+
fail "control: an unchanged second build resolved the toolchain, and the recorded requests differ ('$first_request', then '$second_request')" a2.log
61+
fi
4862

4963
# ── B ───────────────────────────────────────────────────────────────────────
5064
"$MCPP" build --toolchain "$own" > b1.log 2>&1 || fail "--toolchain $own failed" b1.log

0 commit comments

Comments
 (0)