Skip to content

Commit c702e0c

Browse files
committed
tests: a check that ran is recognised by either wrapper spelling; the action PATH's one re-run is stated
On the MSVC ABI every action now runs through the named __action wrapper, which carries --path-prepend. e2e 780 recognised a check that ran by the positional __action-stamp spelling and failed on the Windows row; 780 and 790 accept both. The comment on the wrapper stated that an action's command line survives an upgrade; on the MSVC ABI it gains the toolset's runtime directory, so each action re-runs once after the upgrade, which the CHANGELOG now lists. The plan document gains its implementation record (section 8: departures from section 7 and six findings).
1 parent 940eaf0 commit c702e0c

5 files changed

Lines changed: 84 additions & 6 deletions

‎.agents/docs/2026-09-28-ecosystem-design-and-optimisation-plan.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,3 +619,72 @@ verify verify-published.sh against the new and the previous pair in fresh SubOS
619619
sandboxes with the CN mirror; GalTranslPP on Windows with the new mcpp and
620620
qt-base revision 1; then the issues are closed with their readings
621621
```
622+
623+
## 8. Implementation record (revision 4)
624+
625+
The tasks of §7 were implemented on 2026-09-28 in one pull request per
626+
repository: openxlings/xlings#628 (X1 to X6), mcpp-community/mcpp#730 (M1 to
627+
M9), an xim-pkgindex pull request (I1 to I3) and an mcpp-index pull request (N1,
628+
N2), with the issue mcpplibs/mcpp-index#482 (N3). This section states what
629+
landed where the implementation departed from §7, what was found while
630+
implementing it, and the readings.
631+
632+
### 8.1 Departures from §7
633+
634+
- **X3.** `prevLines` is kept, deprecated and always 0, rather than dropped: a
635+
minor protocol version only adds (interface specification 1.3).
636+
- **M4.** The edge-advice channel (SPEC-007 R4.5) is a rule for every build
637+
edge, not a mechanism of `place-dlls`: an action writes
638+
`.mcpp-advice/<its output>.advice` the same way. e2e 821 reads it through an
639+
action on both build paths, because on Linux no engine edge writes it.
640+
- **M5.** `check_workflow_assertions.py` also accepts a `PIPESTATUS` read on the
641+
line after the pipe (rule W2), which the workflows use.
642+
- **M8.** `verify-published.sh` takes `M` and `XS`, binaries to verify in place
643+
of the published ones, so that it can be rehearsed before a release; a run
644+
that uses either says so at its start and its end.
645+
- **I2.** `installed()` does not assert that the runtime files are absent. The
646+
packaging revision is what replaces an installed payload (xlings
647+
2026.9.27.1), and a line naming the runtime files would be the one the static
648+
test of I1 refuses.
649+
650+
### 8.2 Found while implementing
651+
652+
- **F1. A Windows test renamed a directory that a scanner still held.** E2E-01
653+
(`bootstrap_home_test.ps1`) renamed the portable home 0.2 s after `self init`
654+
and failed with "You do not have sufficient access rights"; the same failure
655+
had occurred on 2026-09-14 on a branch that did not touch init, and passed on
656+
that branch's next run. The test now renames with `[IO.Directory]::Move`,
657+
which either renames or leaves the tree intact, retries for at most 10 s, and
658+
on failure names the processes running from the tree.
659+
- **F2. A second producer of terminal frames.** Off a terminal, the sub-index
660+
build scripts (`xim-pkgindex-awesome`, `-scode`, `-d2x`) still write
661+
`\r[i/n] <ns>::<file>\033[K`; they run in-process and write to stdout
662+
directly. It is the class of #626 in a producer X4 did not cover, and it is
663+
present in 2026.9.28.1 (openxlings/xlings#629, open). `verify-published.sh`
664+
asserts the download lines and reports these frames as a reading.
665+
- **F3. The index's sweep alert could not open its issue.** The job checks
666+
nothing out, so `gh` could not infer the repository ("not a git
667+
repository"), and it watched only the `workspace` job. The two red sweeps of
668+
2026-09-26 therefore opened nothing (mcpplibs/mcpp-index#482). N2 sets
669+
`GH_REPO` and also runs the alert when `mirror-cn-reachable` fails.
670+
- **F4. A filtered unit run was reported as the unit suite.** A local run of
671+
the mcpp unit binaries under a `GTEST_FILTER` naming the new suites printed
672+
"134 passed", which counts binaries; the full suite had one stale expectation
673+
(the `place-dlls` command now carries `--crt`), found by the macOS self-host
674+
row. The unfiltered run passes.
675+
- **F5. The toolset on the Visual Studio runner is newer than the Qt payload's
676+
runtime.** The measurement recorded MSVC 14.51.36231 (Visual Studio 2026) as
677+
the toolset whose runtime directory the action `PATH` receives, against the
678+
14.44 copy `xim:qt-base` carried: the case D1 and D2 describe is the ordinary
679+
state of a current CI image.
680+
- **F6. The action PATH crossed the invariant that an action's command line
681+
survives an upgrade.** An action that declares neither `env` nor `cwd` kept
682+
the positional `__action-stamp` spelling so that its command line, and
683+
ninja's command hash, stayed the one an earlier engine wrote. D3 gives every
684+
action of an MSVC-ABI build the named wrapper with `--path-prepend`, so each
685+
such action re-runs once on the first build after the upgrade. The crossing
686+
had no test; e2e 780, which recognised a check that ran by the old spelling,
687+
failed on the Windows row and found it. The detector accepts both spellings,
688+
the comment in `cli.cppm` states the exception, and the CHANGELOG lists the
689+
one re-run.
690+

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
- 若干条件表命中同一目标、且字典序与具体程度给出不同次序的 manifest,其标量取值与列表参数的次序
7676
随之改变。
7777
- Windows 上以 GNU 方言编译的工程,编译命令多出 depfile 参数,升级后第一次构建完整重建一次。
78+
- 面向 MSVC ABI 的构建中,每个 action 的命令行多出工具集运行时目录(`__action --path-prepend`),
79+
升级后第一次构建中每个 action(包括 `check` 与 `prepare`)重新运行一次。
7880

7981
## [2026.9.28.1] - 2026-09-28
8082

‎src/cli.cppm‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,10 +1027,13 @@ int run(int argc, char** argv) {
10271027
// `--path-prepend` puts that directory first on the command's PATH, so a
10281028
// tool the action runs (Qt's moc.exe, a vcpkg port's generator) starts
10291029
// with the toolset's runtime and not with whatever copy a library package
1030-
// happened to ship beside it (the 2026-09-28 design, §2.9). An action that declares neither keeps the
1031-
// positional `__action-stamp` spelling above, so its command line -- and
1032-
// ninja's command hash for its edge -- is the one an earlier engine wrote,
1033-
// and upgrading re-runs no check and no `prepare`.
1030+
// happened to ship beside it (the 2026-09-28 design, §2.9). Elsewhere, an
1031+
// action that declares neither keeps the positional `__action-stamp`
1032+
// spelling above, so its command line -- and ninja's command hash for its
1033+
// edge -- is the one an earlier engine wrote, and upgrading re-runs no
1034+
// check and no `prepare`. On the MSVC ABI the first build after upgrading
1035+
// to 2026.9.28.2 re-runs each action once, because its command line gained
1036+
// the directory.
10341037
// `mcpp depfile-filter --raw <file> --out <file> -- <compiler argv>...`
10351038
// (internal: written into build.ninja for GCC on a Windows host, WS2 of
10361039
// the 2026-09-28 design). Runs the compile with inherited stdio and no

‎tests/e2e/780_a_passing_check_moves_its_stamp_past_a_changed_input.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ EOF
5050

5151
# `-v` prints each edge ninja runs; the check's is the one that goes through
5252
# the engine's stamp wrapper.
53-
ran() { grep -q '__action-stamp' "$1"; }
53+
# The check ran when its wrapper appears in the verbose log: the positional
54+
# `__action-stamp`, or the named `__action` that every action of an MSVC-ABI
55+
# build uses since 2026.9.28.2, because it puts the toolset's C++ runtime first
56+
# on the action's PATH.
57+
ran() { grep -qE '__action(-stamp)? ' "$1"; }
5458

5559
"$MCPP" build -v > b1.log 2>&1 || { cat b1.log; echo "FAIL: build failed"; exit 1; }
5660
ran b1.log || { cat b1.log; echo "FAIL: the first build did not run the check"; exit 1; }

‎tests/e2e/790_a_prepare_action_populates_an_unknown_directory.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int main() {
103103
EOF
104104

105105
MCPP="${MCPP:-mcpp}"
106-
ran_prepare() { grep -q 'PREPARE prep:install\|__action-stamp.*install\.sh' "$1"; }
106+
ran_prepare() { grep -qE 'PREPARE prep:install|__action(-stamp)? .*install\.sh' "$1"; }
107107

108108
# ── 1. first build: header compiles, program runs through runtime_search_dir
109109
"$MCPP" build -v > b1.log 2>&1 || { cat b1.log; echo "FAIL: first build failed"; exit 1; }

0 commit comments

Comments
 (0)