Skip to content

Commit 86db528

Browse files
committed
docs(plan): index merges, published-state measurements, and the verification script's payload paths
1 parent de26942 commit 86db528

2 files changed

Lines changed: 25 additions & 14 deletions

File tree

.agents/docs/2026-09-05-heterogeneous-build-ecosystem-design-v2.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,28 +320,28 @@ Status is one of `done`, `open`, `deferred (reason)`.
320320
| # | task | criterion | depends on | status |
321321
|---|---|---|---|---|
322322
| P1 | Repository with `mcpp.toml` (`mcpp:plugins`), `src/plugins.cppm` (`mcpp.plugins`), `rules/cuda.cppm` (`mcpp.rules.cuda`), `rules/spirv.cppm` (`mcpp.rules.spirv`), features `rules-cuda`, `rules-spirv`, README stating the naming rule and the mcpp floors | a consumer with `features = ["rules-spirv"]` builds a shader through it | M1 | done (PR #1 open) |
323-
| P2 | CI: one consumer fixture per feature, built with the pinned mcpp | green on the PR head | P1, M6 for the spirv fixture | in progress: the first run exposed a host leak (clang's CUDA wrapper found `curand_mtgp32_kernel.h` in the host's /usr/include on the developer machine); `mcpp.rules.cuda` now requires and includes `xim:libcurand` and refuses the clang route without it; fixture and example 09 (mcpp#567) declare it; CI rerunning |
324-
| P3 | Release `v0.1.0`; GitHub archive and a GitCode release asset with identical bytes | both URLs return 200 and one sha256 | P2 | open |
323+
| P2 | CI: one consumer fixture per feature, built with the pinned mcpp | green on the PR head | P1, M6 for the spirv fixture | done: the first two runs exposed host leaks on the developer machine (clang's CUDA wrapper found `curand_mtgp32_kernel.h` and then `nv/target` in the host's /usr/include); `mcpp.rules.cuda` now requires `xim:libcurand` and `xim:cuda-cccl` on the clang route, adds their include directories, and refuses without them naming both entries; fixture and example 09 (mcpp#567) declare them; run 3 green |
324+
| P3 | Release `v0.1.0`; GitHub archive and a GitCode release asset with identical bytes | both URLs return 200 and one sha256 | P2 | done: PR #1 merged (be6d7ce), tag v0.1.0, GitHub release; `gitcode.com/mcpp-res/mcpp-plugins` release 0.1.0 carries the byte-identical archive (200, 26,953 bytes, sha256 adf1f9d6...) |
325325

326326
#### mcpp-index (PR #349)
327327

328328
| # | task | criterion | depends on | status |
329329
|---|---|---|---|---|
330-
| I1 | `pkgs/m/mcpp.plugins.lua` (GLOBAL and CN URLs, floor 2026.9.5.3); `mcpplibs:rules-cuda` kept, marked superseded | `mcpp add mcpp:plugins` resolves in a sandbox | P3, M6 | open |
330+
| I1 | `pkgs/m/mcpp.plugins.lua` (GLOBAL and CN URLs, floor 2026.9.5.3); `mcpplibs:rules-cuda` kept, marked superseded | `mcpp add mcpp:plugins` resolves in a sandbox | P3, M6 | done: `pkgs/m/mcpp.plugins.lua` (GLOBAL and CN, one sha256), `mcpplibs:rules-cuda` marked superseded; with the checkout as the `mcpp` index the released 2026.9.5.3 downloads `mcpp.plugins v0.1.0`, compiles it, and the SPIR-V probe answers `magic=07230203` |
331331
| I2 | `compat.vulkan-runtime` 2026.09.05: the pattern list is reduced to proprietary vendor userspace; an ICD's needs are computed by closing over the manifests' libraries; a farmed soname an installed payload also provides is re-pointed at the payload when the payload's versioned symbol set covers the host copy's (the `GLIBCXX`/`CXXABI` nodes of libstdc++ included); `HOST-SURFACE.txt` states the class of every entry | measured on this machine: 37 vendor entries, 20 payload substitutions, 8 host sonames no installed payload provides (`libbsd`, `libedit`, `libicudata`, `libicuuc`, `liblzma`, `libmd`, `libzstd`, `libtinfo`), 8 host Mesa ICDs, 3 host copies newer than the payload (`libdrm_amdgpu`, `libLLVM.so.20.1`, `libxml2`); example 10 still answers `12 24 36 48` | — | done: pattern list reduced to vendor userspace; closure from the manifests; payload-first with the symbol-set criterion; measured here 37 vendor, 20 substitutions, 8 host sonames without payload (`libbsd`, `libedit`, `libicudata`, `libicuuc`, `liblzma`, `libmd`, `libzstd`, `libtinfo`), 8 host Mesa ICDs, 3 host copies newer than the payload; example 10 still `12 24 36 48` |
332332
| I3 | `compat.opencl-headers`, `compat.opencl` verified with a probe (`tests/examples/opencl`, a workspace member); `compat.opencl-runtime` 2026.09.05 farms the libraries the host manifests name, their closure and the vendor family, prefers payloads, records the surface; payload entries of `OCL_ICD_FILENAMES` are left to the payload | the probe enumerates the NVIDIA platform on this machine and zero platforms on a runner; the pocl platform once X2 is installed | X2 for the pocl half | done for the host half: `tests/examples/opencl` lists `NVIDIA CUDA / RTX 4080` here and zero platforms on the Linux runner; with `OCL_ICD_FILENAMES=<pocl>/lib/libpocl.so` the same loader lists `Portable Computing Language` and `NVIDIA CUDA` in one process |
333-
| I4 | CI green; merge; index artifact published | `Publish Index Artifact` green on the merge commit | I1–I3 | open |
333+
| I4 | CI green; merge; index artifact published | `Publish Index Artifact` green on the merge commit | I1–I3 | done: PR #349 green (10 pass; the `full sweep` job skips by design), merged as 754d775, `Publish Index Artifact` green on it (run 33968256961) |
334334

335335
#### xim-pkgindex (PR #762)
336336

337337
| # | task | criterion | depends on | status |
338338
|---|---|---|---|---|
339339
| X1 | `zstd`, `xz`, `icu`, `libedit`, `libmd`, `xcb-util`, `xcb-util-image`, `xcb-util-keysyms`, `xcb-util-renderutil`, `xcb-util-wm`, `xcb-util-cursor`: conda-forge repacks for x86_64 and aarch64, published to `xlings-res/<name>` on both mirrors, recipes with `deps`, `exports`, `declare_libs`, headers and `.pc` | each installs; every `DT_NEEDED` of each payload library resolves inside payloads; CI green || done, pending CI: all eleven on both mirrors (44/44 GET checks by the agent, two re-verified by sha256 here); finding: an aarch64 install fails today because `xim:glibc`, `xim:gcc-runtime`, `xim:ncurses`, `xim:libxcb` publish no aarch64 asset and `deps` are per OS |
340-
| X1b | `libbsd` built in the subos harness (not on conda-forge), x86_64 | same | X1 (`libmd`) | open |
341-
| X2 | `pocl` 7.1 (CPU OpenCL) repacked for both architectures; its ICD reached through `OCL_ICD_FILENAMES` in the subos environment | `clinfo`-equivalent probe reports the pocl platform with no GPU || done, pending CI: pocl 7.1 for both architectures on both mirrors (x86_64 re-verified by sha256 here); the recipe declares `OCL_ICD_FILENAMES` and never `OCL_ICD_VENDORS` (the agent had wired the latter; corrected); finding: xlings 2026.9.3.2 does not persist a new package's `subos.env` declaration (openxlings/xlings#584), so the verification sets the variable explicitly |
340+
| X1b | `libbsd` built in the subos harness (not on conda-forge), x86_64 | same | X1 (`libmd`) | done, pending CI: libbsd 0.12.2 built by the subos harness (exit 0, inputs and payload host-free), `DT_NEEDED` libmd.so.0 and glibc only; two defects found by the agent and fixed: libbsd's `-isystem` self-overlay loses to the harness's `-I` (patched), and upstream's `make install` writes `lib/libbsd.so` as an ld script naming `/usr/lib` (replaced by a symlink); both mirrors verified |
341+
| X2 | `pocl` 7.1 (CPU OpenCL) repacked for both architectures; its ICD reached through `OCL_ICD_FILENAMES` in the subos environment | `clinfo`-equivalent probe reports the pocl platform with no GPU || done: pocl 7.1 for both architectures on both mirrors; after the index published, `xlings install pocl` from `xim:` installs 7.1 and the Khronos loader with `OCL_ICD_FILENAMES=<payload>/lib/libpocl.so` lists `Portable Computing Language` (cpu-haswell) and `NVIDIA CUDA` in one process; the recipe declares that variable and never `OCL_ICD_VENDORS` (the agent had wired the latter; corrected); finding: xlings 2026.9.3.2 does not persist a new package's `subos.env` declaration (openxlings/xlings#584), so the verification sets the variable explicitly |
342342
| X3 | `mesa-lavapipe` aarch64 payload | `archs` lists both; the aarch64 tarball is on both mirrors || done, pending CI: the aarch64 lavapipe payload (99,534,504 bytes) on both mirrors; four-file closure difference, none `DT_NEEDED` by `libvulkan_lvp.so` |
343343
| X4 | `xim:mesa` gains the Intel Vulkan driver | on an Intel machine `HOST-SURFACE.txt` has no driver entry | libclc and SPIRV-LLVM-Translator payloads | deferred: anv requires `intel_clc`, which needs a libclc and clang chain this index does not publish yet; the chain is a separate packaging round and is recorded here rather than approximated |
344-
| X5 | CI green; merge; index artifact published | `Publish Index Artifact` green on the merge commit | X1–X3 | open |
344+
| X5 | CI green; merge; index artifact published | `Publish Index Artifact` green on the merge commit | X1–X3 | done: PR #762 green on its pull_request-event runs (the push-event `linux-install-test` sees only the last push and fails on libbsd by construction, as the workflow header states), merged as 2d2a2ee; `Publish Index Artifact` green on it (run 33967729241) |
345345

346346
#### Verification
347347

.agents/docs/2026-09-05-heterogeneous-verify.sh

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@ section "A. identity"
2626
[ -x "$STORE" ] || fail "no released binary at $STORE"
2727
got=$("$STORE" --version 2>&1 | head -1)
2828
[ "$got" = "mcpp $VER" ] && ok "$got from the store path" || fail "version is '$got'"
29-
"$STORE" self config --mirror "${MCPP_VERIFY_MIRROR:-CN}" >/dev/null 2>&1 || fail "mcpp self config --mirror"
30-
"$XL" config --mirror "${MCPP_VERIFY_MIRROR:-CN}" >/dev/null 2>&1 || fail "xlings config --mirror"
31-
ok "mirror ${MCPP_VERIFY_MIRROR:-CN} configured for mcpp and xlings"
29+
# The setting is the criterion, not the exit code: the subos shim of a fresh
30+
# subos has been observed to return non-zero from `config --mirror` while the
31+
# value was written, so both tools are asked what they hold afterwards.
32+
"$STORE" self config --mirror "${MCPP_VERIFY_MIRROR:-CN}" >/dev/null 2>&1 || true
33+
"$XL" config --mirror "${MCPP_VERIFY_MIRROR:-CN}" >/dev/null 2>&1 || true
34+
xm=$("$XL" config 2>/dev/null | grep -i 'mirror' | head -1 | awk '{print $NF}')
35+
[ "$xm" = "${MCPP_VERIFY_MIRROR:-CN}" ] && ok "xlings mirror is $xm" || fail "xlings mirror is '$xm', not ${MCPP_VERIFY_MIRROR:-CN}"
36+
mm=$("$STORE" self config 2>/dev/null | grep -i 'mirror' | head -1 | awk '{print $NF}')
37+
[ -n "$mm" ] && ok "mcpp mirror is $mm" || printf 'note: mcpp self config does not print its mirror (%s)\n' "$("$STORE" self config 2>&1 | head -1)"
3238

3339
# -- B. the plugin collection resolves from the index -------------------------
3440
#
@@ -91,8 +97,12 @@ if [ -n "$SRC" ] && [ -d "$SRC/examples/10-vulkan-compute/app" ]; then
9197
ex10="$work/ex10"; cp -r "$SRC/examples/10-vulkan-compute/app" "$ex10"
9298
out=$(cd "$ex10" && "$STORE" build 2>&1); rc=$?
9399
[ $rc -eq 0 ] && ok "example 10 built" || fail "example 10 build: $(printf '%s' "$out" | tail -4 | tr '\n' ' ')"
94-
icd=$(ls "$ex10"/.mcpp/.xlings/data/xpkgs/xim-x-mesa-lavapipe/*/share/vulkan/icd.d/*.json 2>/dev/null | head -1)
95-
[ -n "$icd" ] || icd=$(ls "$HOME"/.xlings/data/xpkgs/xim-x-mesa-lavapipe/*/share/vulkan/icd.d/*.json 2>/dev/null | head -1)
100+
# mcpp provisions [xlings.workspace] payloads into its own registry
101+
# (~/.mcpp/registry), which is where the manifest lives; the other two
102+
# locations cover a project-local sandbox and a plain xlings install.
103+
icd=$(ls "$HOME"/.mcpp/registry/data/xpkgs/xim-x-mesa-lavapipe/*/share/vulkan/icd.d/*.json \
104+
"$ex10"/.mcpp/.xlings/data/xpkgs/xim-x-mesa-lavapipe/*/share/vulkan/icd.d/*.json \
105+
"$HOME"/.xlings/data/xpkgs/xim-x-mesa-lavapipe/*/share/vulkan/icd.d/*.json 2>/dev/null | head -1)
96106
[ -n "$icd" ] && ok "lavapipe manifest at $icd" || fail "no lavapipe ICD manifest in any store"
97107
out=$(cd "$ex10" && VK_DRIVER_FILES="$icd" "$STORE" run 2>&1)
98108
printf '%s\n' "$out" | grep -q '12 24 36 48' && ok "example 10 answered 12 24 36 48 on the payload driver" \
@@ -101,7 +111,8 @@ if [ -n "$SRC" ] && [ -d "$SRC/examples/10-vulkan-compute/app" ]; then
101111
out=$(cd "$ex10" && "$STORE" build --no-accel 2>&1 && "$STORE" run --no-accel 2>&1)
102112
printf '%s\n' "$out" | grep -q '12 24 36 48' && ok "example 10 --no-accel answered 12 24 36 48" \
103113
|| fail "example 10 --no-accel: $(printf '%s' "$out" | tail -3 | tr '\n' ' ')"
104-
hs=$(ls "$ex10"/.mcpp/.xlings/data/xpkgs/compat-x-vulkan-runtime/*/mcpp_generated/vulkan_runtime/HOST-SURFACE.txt 2>/dev/null | head -1)
114+
hs=$(ls "$HOME"/.mcpp/registry/data/xpkgs/compat-x-vulkan-runtime/*/mcpp_generated/vulkan_runtime/HOST-SURFACE.txt \
115+
"$ex10"/.mcpp/.xlings/data/xpkgs/compat-x-vulkan-runtime/*/mcpp_generated/vulkan_runtime/HOST-SURFACE.txt 2>/dev/null | head -1)
105116
if [ -n "$hs" ]; then
106117
printf -- '--- %s\n' "$hs"; sed -n '/^## farmed/,$p' "$hs" | head -60
107118
hostlines=$(grep -c -- '-- host;' "$hs" || true)
@@ -159,7 +170,7 @@ printf '%s\n' "$out" | grep -q '^platforms=' && ok "the loader linked and enumer
159170
|| fail "opencl probe: $(printf '%s' "$out" | tail -4 | tr '\n' ' ')"
160171
if "$XL" install pocl -y >/dev/null 2>&1; then
161172
ok "xim:pocl installed"
162-
lib=$(ls "$HOME"/.xlings/data/xpkgs/xim-x-pocl/*/lib/libpocl.so 2>/dev/null | head -1)
173+
lib=$(ls "$HOME"/.xlings/data/xpkgs/xim-x-pocl/*/lib/libpocl.so "$HOME"/.mcpp/registry/data/xpkgs/xim-x-pocl/*/lib/libpocl.so 2>/dev/null | head -1)
163174
out2=$(cd "$work/ocl" && OCL_ICD_FILENAMES="$lib" "$STORE" test 2>&1)
164175
printf '%s\n' "$out2" | grep -q 'Portable Computing Language' && ok "the pocl platform is enumerated through OCL_ICD_FILENAMES" \
165176
|| fail "pocl not enumerated: $(printf '%s' "$out2" | grep '^platform' | tr '\n' ' ')"

0 commit comments

Comments
 (0)