Skip to content

2026.9.28.2: one resolver for the runtime beside a Windows program, header tracking on every host, one statement per fact, conditional tables by specificity - #730

Merged
Sunrisepeak merged 7 commits into
mainfrom
eco/one-authority-per-fact
Sep 28, 2026
Merged

Sunrisepeak merged 7 commits into
mainfrom
eco/one-authority-per-fact

Conversation

@speak-agent

@speak-agent speak-agent commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

The mcpp part of the 2026-09-28 ecosystem design (.agents/docs/2026-09-28-ecosystem-design-and-optimisation-plan.md, tasks M1 to M9; the review it answers is .agents/docs/2026-09-28-ecosystem-review-of-two-days-of-mcpp-and-xlings.md). Closes #728 and #729; completes the runtime-placement half of #718.

  • WS1: one resolver for the files beside a Windows program (src/build/runtime_placement.cppm, SPEC-006 §3.7.1). Declared outranks toolchain, toolchain outranks derived. The MSVC C++ runtime is one versioned set, read from VERSIONINFO: the toolset's set unless a search directory offers the complete set at a strictly newer version (then that set, with a note); a dependency's copy that is not placed is stated once as a packaging fault; a declared runtime file older than the toolset's is a warning; an unreadable version decides nothing. The contract governs the kind: toolchain-coupled carries, host-coupled places none and refuses a declared copy (crt-declared-under-host-coupled). The plan, place-dlls (--crt, --toolset-crt) and mcpp pack read one answer; resolution.json records it.
  • WS1, D3: the action PATH. Every action of an MSVC-ABI build has the toolset's runtime directory first on PATH (__action --path-prepend), so a host tool that a dependency ships without a runtime (Qt's moc.exe) starts.
  • WS2: header tracking on every host. A GNU depfile for every GNU-dialect compiler on every host; GCC's module depfile on Windows is filtered by mcpp depfile-filter, which runs the compile and needs no shell.
  • WS3: one statement per fact. mcpp.diag prints once per process; notes are a severity; a word inherited from [workspace.build] is attributed there; an edge's success-time statements go to .mcpp-advice/<stamp>.advice and are reported once, by one function called on the full and the fast path (SPEC-007 R4.5).
  • D7 (SPEC-004 says matching conditional tables apply in manifest order; the implementation applies them in selector text order #728): conditional tables by specificity (modules/manifest/src/cfg_selector.cppm, SPEC-004 §3.1.1).
  • WS8: defaults stated once. mcpp self env --format json reports defaultToolchain; check_default_toolchain_docs.py checks the tables of docs/01 and docs/20 against it on each CI host.
  • WS7 (CI: the LLVM toolchain job reports success while mcpp's self-build with [email protected] fails #729): CI integrity. check_workflow_assertions.py (W1 pipefail, W2 discarded status, W3 known-red with its issue) reports 7 problems on origin/main and none here; the LLVM self-build uses [email protected] under pipefail, with the function-size gate after it.
  • WS10: the release as a gate. Release canaries that the tag job needs (release-canaries.yml), tests/release/verify-published.sh, and this pull-request template.
  • Measurement (design §2.9): measure-windows-tool-crt.yml hides the system's C++ runtime and measures whether Qt's moc.exe and lrelease.exe, from a payload without a runtime copy, start from the action PATH alone, on a Visual Studio row and a bare row with a managed toolset. It gates the qt-base change in xim-pkgindex.

The xlings pin moves to 2026.9.28.2 (openxlings/xlings#628) once that release is published.

Criteria

Change Criterion Before (2026.9.28.1) After Where
WS1 resolver unit RuntimePlacement.* property test over kinds, versions and contracts; PE reader on synthesised images not built pass every host
WS1 place-dlls e2e 819 L1 to L6 (synthesised PE files) L6 is the old behaviour; L1 to L5 have no --crt pass every host
WS1, WS3 e2e 818 criterion 5: a prepare-filled directory's differing DLL is stated once without -v 0 statements 1 Linux, locally measured
WS1 on Windows e2e 820 W1 to W7 not measurable before (the resolver did not exist) pass: toolset MSVC 14.51.36231 (VS 2026) on the LLVM row, older and newer synthesised sets, host-coupled, the refusal, pack, the action PATH, the five-member workspace Windows e2e shard 1
D3 e2e 820 W6; the measurement workflow (run 36361809507), system runtime hidden, payload copy removed the tools do not start as actions of 2026.9.28.1 (M-c) moc.exe and lrelease.exe start as actions (M-b), on the Visual Studio row (14.51.36231) and the masked row (managed [email protected]); neither starts directly (M-a) Windows
WS2 e2e 118 asserts the rebuild on every host the Windows row asserted only the degradation message (no depfile) pass, clang leg included Windows e2e shard 1
D7 unit ConditionalOrder.*; the sandbox section #728 fails under lexical order pass every host
WS8 test_check_default_toolchain_docs.py; the docs check on each host row no defaultToolchain pass Linux, macOS, Windows, bare Windows
WS7 test_check_workflow_assertions.py; the lint on origin/main 7 problems 0 Linux static checks
WS10 verify-published.sh rehearsed against the candidate binaries n/a 24 ok; 3 failures, all expected until the xlings pin moves or a known open issue (see below) host rehearsal

| WS3 | e2e 821: an edge's advice on the full and the fast path | fails at A1 | pass (the fast path on Linux; macOS reads the full path, #400) | Linux, macOS |
| D3, R3.8 | e2e 799 D: --path-prepend before a declared PATH | unknown option | pass | Linux, macOS |

Sandbox readings (the previous pair and the new xlings). verify-published.sh in fresh SubOS with the CN mirror: mcpp 2026.9.28.1 with xlings 2026.9.28.1, 15 ok, 12 failed (every failure a section this round adds); mcpp 2026.9.28.1 with the published xlings 2026.9.28.2, 20 ok, 7 failed (the seven mcpp items). The new pair is read after the release.

Found in CI and fixed on this branch. A stale unit expectation (the place-dlls command carries --crt), which a filtered local run had not run; e2e 780, which recognised a check by the __action-stamp spelling while every MSVC-ABI action now uses the named wrapper (each action re-runs once after the upgrade, now in the CHANGELOG); e2e 821's fast-path criterion, which holds on Linux only (#400); and three harness defects of the measurement workflow.

The rehearsal's three failures: the registry xlings and the registry's .xlings-home wait for the xlings pin; an escape-sequence check was too broad and found a pre-existing defect in the sub-index build scripts' progress (openxlings/xlings#629), so the check now reads the download lines and reports the build-script frames as a reading.

Intersections

New rule or feature Invariant it crosses Test at the crossing
CRT placed by set rule one destination, one writer (SPEC-007 R4.3, #723) e2e 811, 818 criteria 1 to 4, 819 L2
CRT placed by set rule mcpp pack places what the build placed e2e 820 W5
host-coupled refuses a declared CRT a declared deploy is placed as declared (R4.2) e2e 820 W4
action PATH prepend an action's env PATH is its own (R3.8) unit NinjaBackendPeRuntime.EveryActionOfAWindowsTargetHasTheToolsetRuntimeOnPath (the graph); e2e 799 D (the wrapper: before a declared PATH, before the inherited one otherwise; fails on 2026.9.28.1)
action PATH prepend on the MSVC ABI an action's command line survives an upgrade (the __action-stamp spelling) none before CI; e2e 780 found it on the Windows row. The detector accepts both spellings, and the one re-run per action after the upgrade is in the CHANGELOG and the cli.cppm comment
depfile on Windows the fast path replays the last graph e2e 118 (a second build after the edit)
diag once per process --strict counts every degradation unit Diag.*
edge advice the fast path reports what the full path reports e2e 821 A1 to A3 (an action's advice file, on the full path, on the fast path, and not again; fails on 2026.9.28.1 at A1); e2e 818 criterion 6
D7 order list values append in application order unit ConditionalOrder.AMoreSpecificTableAppliesLater

Compatibility

  • A Windows program whose runtime search directories hold an older copy of the MSVC C++ runtime now receives the toolset's copy; the difference is a note, once, instead of a warning per link.
  • A manifest that declares an MSVC C++ runtime file under host-coupled is refused.
  • Where several conditional tables match one target and the lexical and the specificity order differ, a scalar's value and the order of list values change.
  • A Windows project compiled with a GNU-dialect compiler gains the depfile flags; the first build after the upgrade rebuilds fully.

Checks before merging

  • bash .github/tools/check_docs_style.sh, check_docs_structure.sh and check_version_pins.sh pass.
  • python3 .github/tools/check_workflow_assertions.py passes.
  • No commit on the branch carries an attribution trailer.
  • The squash merge is given an explicit subject and body.

…eader tracking on every host, one statement per fact, and conditional tables by specificity

The mcpp part of the 2026-09-28 ecosystem design
(.agents/docs/2026-09-28-ecosystem-design-and-optimisation-plan.md, tasks M1-M9).

- WS1: the files beside a PE program are decided by mcpp.build.runtime_placement:
  declared outranks toolchain, which outranks derived; the MSVC C++ runtime is
  one versioned set read from VERSIONINFO; the contract governs whether it is
  carried. The plan, place-dlls (--crt, --toolset-crt) and mcpp pack read the
  one answer, and resolution.json records it. A runtime file declared under
  host-coupled is refused (crt-declared-under-host-coupled).
- WS1/D3: every action of an MSVC-ABI build has the toolset's runtime directory
  first on PATH (__action --path-prepend).
- WS2: a GNU depfile for every GNU-dialect compiler on every host; GCC's module
  depfile on Windows is filtered by `mcpp depfile-filter`.
- WS3: mcpp.diag prints a fact once per process; notes are a severity; a word
  inherited from [workspace.build] is attributed there; an edge's success-time
  statements go through .mcpp-advice and are reported once by one function on
  the full and the fast path (SPEC-007 R4.5).
- D7 (#728): matching conditional tables apply by selector specificity, with
  the selector text breaking ties (SPEC-004 3.1.1).
- WS8: `self env --format json` reports defaultToolchain; the docs tables are
  checked against it on each CI host.
- WS7 (#729): check_workflow_assertions.py; pipefail on piped builds; the LLVM
  self-build on [email protected] with the function-size gate after it; known-red
  legs name their issue.
- WS10: release canaries gating the tag, tests/release/verify-published.sh,
  and the pull-request template's intersection table.
- Tests: unit test_runtime_placement, test_depfile, D7 and diag cases; e2e 818
  (criteria 5-6), 819, 820 (Windows), 118 on every host; the moc.exe
  measurement workflow for the qt-base change.

Closes #728. Closes #729.
… prepended PATH against a declared one (e2e 799 D)

The pull request's intersection table named two crossings without a test at
them. e2e 821: an action states a note through its advice file (SPEC-007
R4.5); the full path reports it once, the fast path reports it once when the
edge runs again, and a build without the edge reports nothing. It fails on
2026.9.28.1 at the first criterion. e2e 799 D: `__action --path-prepend` puts
the directory before a PATH the action declares with `env` (R3.8), and before
the inherited PATH otherwise; 2026.9.28.1 does not know the option.
…rement calls the released mcpp by its store path

NinjaBackend.PeProgramWithRuntimeSearchDirsGetsAPlacementEdge read the
place-dlls command without the --crt word the resolver now passes (a GNU PE
program: not-applicable). The macOS self-host row found it; a local run under
a gtest filter had not run it.

The measurement's before-reading ran $MCPP, the bootstrap's shim for this
repository's own pin, which refuses to run outside the repository. It now
installs mcpp 2026.9.28.1 and calls it by its store path, and a failure there
is a reading, not a failed measurement.
kXlingsVersion and every workflow pin (check_version_pins.sh). xlings
2026.9.28.2 (openxlings/xlings#628): interface protocol 1.3 with a stream id
on download_progress, one rebuild per update, and a declared home identity
(.xlings-home), which mcpp's registry receives on its first command.
… 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).
`ninja -t targets all` prints `<target>: <rule>`, and a Windows target begins
with a drive letter and its colon, so `cut -d: -f1` handed ninja the target
"D". The probe outputs also live under target/.build-mcpp/out, outside the
build directory the step searched. The step now takes the two edge targets,
cutting the rule at the last ": ", removes them, runs exactly those edges,
and reads their outputs by the same paths. Run 2 read M-a on the Visual
Studio row: with the system's runtime hidden, neither moc.exe nor lrelease.exe
starts from a payload without a copy.
The fast path serves only ELF products (#400). On macOS the second build
planned again, as it must there, and still reported the edge's advice once; the
test required the fast path on every unix-shell host. It now requires it on
Linux and reads the full path elsewhere.
@Sunrisepeak
Sunrisepeak merged commit f2df8db into main Sep 28, 2026
43 of 45 checks passed
Sunrisepeak added a commit to openxlings/xim-pkgindex that referenced this pull request Sep 28, 2026
… runtime (revision 1) (#898)

Tasks I1-I3 of the 2026-09-28 ecosystem design (decision D3). I1: tests/test_no_compiler_runtime_in_payloads.py refuses a recipe other than the toolset (msvc) that names the MSVC C++ runtime set or its redistributable; it failed on main at qt and qt-base. I2: qt-base and qt 6.11.1 revision 1 no longer pick the 14.44 redistributable into bin/, and installed() no longer asserts msvcp140.dll; xlings replaces an installed revision 0 on its next use. I3: docs/contributing.md 5.3. Gated by mcpp-community/mcpp#730's measurement (run 36361809507): with the system's runtime hidden and the payload's copy removed, moc.exe and lrelease.exe start as actions of mcpp 2026.9.28.2 on a Visual Studio row (toolset 14.51.36231) and on a masked row (managed [email protected]), and do not start directly or as actions of 2026.9.28.1. Both recipes install and uninstall in the Windows tests.
Sunrisepeak added a commit to openxlings/xim-pkgindex that referenced this pull request Sep 28, 2026
mcpp 2026.9.28.2 (mcpp-community/mcpp#730, #731): one resolver for the runtime beside a Windows program, header tracking on every host, one statement per fact, and conditional tables by specificity; it pins xlings 2026.9.28.2. The four sha256 values equal the release's sidecars.
Sunrisepeak added a commit to Sunrisepeak/GalTranslPP that referenced this pull request Sep 28, 2026
… a program is the toolset's and Qt's tools start from the action PATH (mcpp-community/mcpp#730)
Sunrisepeak added a commit to mcpplibs/mcpp-index that referenced this pull request Sep 28, 2026
… names its issue (#483)

N1: validate.yml runs every member with mcpp 2026.9.28.2 (mcpp-community/mcpp#730) and latest_mcpp moves to it; min_mcpp does not move. The full sweep on the branch (run 36376460690) passed all 22 shards. N2: tests/known-red.tsv lists the members known to fail with the issue that owns each; the job 'red members name their issues' (tests/red_members.py, self-test in lint) lists every failing member with its issue and fails when one has none. The sweep alert sets GH_REPO, which it lacked when the sweep of 2026-09-26 failed, and also runs when mirror-cn-reachable fails (#482).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SPEC-004 says matching conditional tables apply in manifest order; the implementation applies them in selector text order

2 participants