Skip to content

Commit 5fd1bcb

Browse files
committed
the measurement can run against an engine that has not been released
Every ecosystem repository mcpp's changes reach already honours `MCPP_SOURCE_REF`: non-empty, it builds the engine from that ref and asserts that the binary on PATH is the one it built. This workflow was the gap, and it is the one that matters most --- mcpp's own CI cannot see a defect that appears only in a real dependency graph, and this repository holds thirty of them. THE COST OF THE GAP IS MEASURED, NOT HYPOTHETICAL. 2026.9.20.1 shipped on 2026-09-20. Within a day the four members that stop at `#include <windows.h>` through a borrowed `__CYGWIN__` --- archive, sqlite3, mimalloc, c-ares --- made a second release necessary. That reading was available from these same thirty graphs before the first release merged; nothing could produce it, because this job could only install a published engine. A release is not one build. It is a tag, four platform builds, two mirrors, a GET check per asset, an xim-pkgindex bump, an index artifact, and a consumer-side confirmation. What this closes is a second pass down that whole chain. Shape: the released engine the pin names is still installed, because mcpp builds itself and is its own bootstrap; the build from the ref then replaces it on PATH, and `MCPP_HOME` follows it. `.xlings.json` is removed from the clone first --- it pins the mcpp that compiles mcpp, does not move when mcpp is released, and would otherwise ask the index for a version it may no longer carry. The version under review is printed, because a PATH entry that does not win looks exactly like one that does until something has been measured with the wrong engine. The pins-agree check is unaffected: it compares this workflow's pin with pins.toml, and both still name the released version. A source ref is an override on top of that agreement, not a replacement for it.
1 parent 3c62571 commit 5fd1bcb

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/openkal-compat.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
description: "Space-separated members to measure (empty = every listed member)"
1818
required: false
1919
default: ""
20+
mcpp_ref:
21+
description: "Branch of mcpp-community/mcpp to build and measure against (empty = the released pin)"
22+
required: false
23+
default: ""
2024
pull_request:
2125
paths:
2226
- "pkgs/**/*.lua"
@@ -34,6 +38,22 @@ env:
3438
# pins.toml for why this pin, not just validate.yml's, is gated by the
3539
# index floor.
3640
MCPP_VERSION: "2026.9.20.1"
41+
# CROSS-VALIDATION BEFORE A RELEASE, NOT AFTER IT.
42+
#
43+
# Empty in an ordinary run, so this measurement keeps using the RELEASED
44+
# engine the pin above names. Set it -- workflow_dispatch input, or the
45+
# repository variable -- and the same measurement runs against mcpp built
46+
# from that ref instead.
47+
#
48+
# THIS EXISTS BECAUSE AN ENGINE CHANGE'S REAL LOAD IS HERE. mcpp's own CI
49+
# cannot see a defect that appears only in a real dependency graph; this
50+
# repository holds thirty such graphs and could not see the engine until it
51+
# had been published. 2026.9.20.1 shipped and, within a day, the four
52+
# members that stop at `windows.h` through a borrowed `__CYGWIN__` made a
53+
# second release necessary -- a reading this job could have produced before
54+
# the first one merged. Every ecosystem repository that mcpp's changes reach
55+
# already honours this variable; this workflow was the gap.
56+
MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF }}
3757
XLINGS_NON_INTERACTIVE: "1"
3858

3959
jobs:
@@ -76,6 +96,31 @@ jobs:
7696
echo "$root/bin" >> "$GITHUB_PATH"
7797
echo "MCPP_HOME=$root" >> "$GITHUB_ENV"
7898
99+
# The released engine above is the BOOTSTRAP when a ref is under
100+
# review: mcpp builds itself and there is no other compiler for it
101+
# here. The build replaces it on PATH, and MCPP_HOME follows, because
102+
# a PATH entry that does not win looks exactly like one that does
103+
# until something has been measured with the wrong engine.
104+
if [ -n "${MCPP_SOURCE_REF:-}" ]; then
105+
src="$RUNNER_TEMP/mcpp-src"
106+
git clone --quiet --depth 1 --branch "$MCPP_SOURCE_REF" \
107+
https://github.com/mcpp-community/mcpp.git "$src"
108+
# `.xlings.json` at mcpp's root pins the mcpp that compiles mcpp,
109+
# and that pin does not move when mcpp is released, so a build
110+
# inside the checkout would try to install a version the index may
111+
# no longer carry. What is wanted is the source compiled by the
112+
# engine installed above, which removing the file leaves.
113+
rm -f "$src/.xlings.json"
114+
( cd "$src" && "$root/bin/mcpp" build --release )
115+
built=$(find "$src/target" -type f -name mcpp | head -1)
116+
[ -n "$built" ] \
117+
|| { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
118+
bindir=$(cd "$(dirname "$built")" && pwd)
119+
echo "$bindir" >> "$GITHUB_PATH"
120+
echo "MCPP_HOME=$(dirname "$bindir")" >> "$GITHUB_ENV"
121+
echo "under review: $("$built" --version) (from $MCPP_SOURCE_REF)"
122+
fi
123+
79124
# The Windows cross headers of the host are installed deliberately. A
80125
# graph that reached them would build differently with them present, so a
81126
# result that is the same here and on a runner without them is evidence

0 commit comments

Comments
 (0)