From c5c95e06364458cb95a51ef355ab27fdb36d9784 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 03:28:51 +0900 Subject: [PATCH 01/47] feat: checkpoint the ONNX Runtime CPU SDK provider --- .gitignore | 6 +++ pkgs/c/compat.onnxruntime.lua | 59 +++++++++++++++++++++++ tests/mwrap/onnxruntime-sdk/mcpp.toml | 10 ++++ tests/mwrap/onnxruntime-sdk/tests/sdk.cpp | 14 ++++++ 4 files changed, 89 insertions(+) create mode 100644 pkgs/c/compat.onnxruntime.lua create mode 100644 tests/mwrap/onnxruntime-sdk/mcpp.toml create mode 100644 tests/mwrap/onnxruntime-sdk/tests/sdk.cpp diff --git a/.gitignore b/.gitignore index 9f58afa2..ad886326 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,9 @@ tests/examples/*/imgui.ini __pycache__/ *.pyc tests/openkal-work/ + +# mwrap consumer build/fetch artifacts +tests/mwrap/*/target/ +tests/mwrap/*/.mcpp/ +tests/mwrap/*/compile_commands.json +tests/mwrap/*/mcpp.lock diff --git a/pkgs/c/compat.onnxruntime.lua b/pkgs/c/compat.onnxruntime.lua new file mode 100644 index 00000000..cd7f214a --- /dev/null +++ b/pkgs/c/compat.onnxruntime.lua @@ -0,0 +1,59 @@ +-- Official ONNX Runtime CPU SDK. The module interface is owned by +-- mcpplibs.mwrap.onnxruntime; this package owns the headers and shared runtime. +local version = "1.25.1" +local function archive(name, sha256) + return { + url = "https://github.com/microsoft/onnxruntime/releases/download/v" .. version .. "/" .. name, + sha256 = sha256, + } +end + +package = { + spec = "1", + namespace = "compat", + name = "onnxruntime", + description = "ONNX Runtime 1.25.1 official CPU C/C++ SDK", + licenses = { "MIT" }, + repo = "https://github.com/microsoft/onnxruntime", + type = "package", + xpm = { + linux = { ["1.25.1"] = archive("onnxruntime-linux-x64-1.25.1.tgz", + "eb566a49cfc49ef0642f809b69340b5bb656c7c4905ba873526d226f2c005816") }, + macosx = { ["1.25.1"] = archive("onnxruntime-osx-arm64-1.25.1.tgz", + "18987ec3187b5f29ba798109750f6135060560ad4e0a52678fcc753ee8fb3091") }, + windows = { ["1.25.1"] = archive("onnxruntime-win-x64-1.25.1.zip", + "33f2e8a63774811f99a5fc224cac32f4eed8c27643d46c6cc685319fa8f18019") }, + }, + mcpp = { + language = "c++23", + import_std = false, + include_dirs = { "*/include" }, + sources = { "mcpp_generated/sdk.cpp" }, + generated_files = { ["mcpp_generated/sdk.cpp"] = [=[ +#include +static_assert(ORT_API_VERSION == 25, "ONNX Runtime SDK headers must match 1.25.1"); +#if defined(__APPLE__) +#if !defined(__aarch64__) && !defined(_M_ARM64) +#error "This ONNX Runtime SDK package supplies macOS arm64 only" +#endif +#elif !defined(__x86_64__) && !defined(_M_X64) +#error "This ONNX Runtime SDK package supplies Linux/Windows x86_64 only" +#endif +]=] }, + linux = { runtime = { + libraries = { "onnxruntime" }, + link_library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, + library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, + } }, + macosx = { runtime = { + libraries = { "onnxruntime" }, + link_library_dirs = { "onnxruntime-osx-arm64-1.25.1/lib" }, + library_dirs = { "onnxruntime-osx-arm64-1.25.1/lib" }, + } }, + windows = { runtime = { + libraries = { "onnxruntime" }, + link_library_dirs = { "onnxruntime-win-x64-1.25.1/lib" }, + library_dirs = { "onnxruntime-win-x64-1.25.1/lib" }, + } }, + }, +} diff --git a/tests/mwrap/onnxruntime-sdk/mcpp.toml b/tests/mwrap/onnxruntime-sdk/mcpp.toml new file mode 100644 index 00000000..ee3a14b8 --- /dev/null +++ b/tests/mwrap/onnxruntime-sdk/mcpp.toml @@ -0,0 +1,10 @@ +[package] +name = "onnxruntime-sdk" +version = "1.25.1" +description = "Exercise the official ONNX Runtime SDK through the local index" + +[indices] +compat = { path = "../../.." } + +[dependencies.compat] +onnxruntime = "1.25.1" diff --git a/tests/mwrap/onnxruntime-sdk/tests/sdk.cpp b/tests/mwrap/onnxruntime-sdk/tests/sdk.cpp new file mode 100644 index 00000000..0ebea475 --- /dev/null +++ b/tests/mwrap/onnxruntime-sdk/tests/sdk.cpp @@ -0,0 +1,14 @@ +#include +#include + +int main() { + const auto* api = OrtGetApiBase(); + if (!api || std::strcmp(api->GetVersionString(), "1.25.1") != 0) return 1; + Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "mwrap-sdk-test"); + Ort::SessionOptions options; + options.SetIntraOpNumThreads(1); + const auto providers = Ort::GetAvailableProviders(); + for (const auto& provider : providers) + if (provider == "CPUExecutionProvider") return 0; + return 2; +} From 3067e52abc0165b453ea3acac4022895ebf7d9bc Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 05:29:54 +0900 Subject: [PATCH 02/47] fix: declare the ONNX Runtime SDK Linux runtime closure --- pkgs/c/compat.onnxruntime.lua | 70 +++++++++++++++++++++++++-- tests/mwrap/onnxruntime-sdk/mcpp.toml | 3 ++ 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/pkgs/c/compat.onnxruntime.lua b/pkgs/c/compat.onnxruntime.lua index cd7f214a..bbb9ff7e 100644 --- a/pkgs/c/compat.onnxruntime.lua +++ b/pkgs/c/compat.onnxruntime.lua @@ -17,8 +17,11 @@ package = { repo = "https://github.com/microsoft/onnxruntime", type = "package", xpm = { - linux = { ["1.25.1"] = archive("onnxruntime-linux-x64-1.25.1.tgz", - "eb566a49cfc49ef0642f809b69340b5bb656c7c4905ba873526d226f2c005816") }, + linux = { + deps = { "xim:gcc-runtime@15.1.0", "xim:glibc@2.44.3" }, + ["1.25.1"] = archive("onnxruntime-linux-x64-1.25.1.tgz", + "eb566a49cfc49ef0642f809b69340b5bb656c7c4905ba873526d226f2c005816"), + }, macosx = { ["1.25.1"] = archive("onnxruntime-osx-arm64-1.25.1.tgz", "18987ec3187b5f29ba798109750f6135060560ad4e0a52678fcc753ee8fb3091") }, windows = { ["1.25.1"] = archive("onnxruntime-win-x64-1.25.1.zip", @@ -39,9 +42,15 @@ static_assert(ORT_API_VERSION == 25, "ONNX Runtime SDK headers must match 1.25.1 #elif !defined(__x86_64__) && !defined(_M_X64) #error "This ONNX Runtime SDK package supplies Linux/Windows x86_64 only" #endif +#if defined(__linux__) && !defined(__GLIBC__) +#error "The official ONNX Runtime Linux SDK requires glibc; musl needs a separate build" +#endif +#if defined(_WIN32) && !defined(_MSC_VER) +#error "The official ONNX Runtime Windows SDK requires the MSVC ABI" +#endif ]=] }, linux = { runtime = { - libraries = { "onnxruntime" }, + libraries = { "onnxruntime", "stdc++" }, link_library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, } }, @@ -57,3 +66,58 @@ static_assert(ORT_API_VERSION == 25, "ONNX Runtime SDK headers must match 1.25.1 } }, }, } + +import("xim.libxpkg.pkginfo") +import("xim.libxpkg.log") + +local function quote(value) + return "'" .. value:gsub("'", "'\\''") .. "'" +end + +function install() + local platform = os.host() + local wrap = platform == "linux" and "onnxruntime-linux-x64-1.25.1" + or platform == "macosx" and "onnxruntime-osx-arm64-1.25.1" + or "onnxruntime-win-x64-1.25.1" + local prefix = pkginfo.install_dir() + os.mkdir(prefix) + os.mv(wrap, path.join(prefix, wrap)) + if platform == "linux" then + -- ORT carries RUNPATH=$ORIGIN: inherited executable RPATH cannot + -- supply its libstdc++ dependency. Use the declared SDK runtime, + -- never an undeclared host library or a scan of arbitrary stores. + local runtime = pkginfo.dep_install_dir("xim:gcc-runtime", "15.1.0") + if not runtime then + log.error("compat.onnxruntime: declared gcc-runtime@15.1.0 is unavailable") + return false + end + local directory = path.join(prefix, wrap, "lib") + for _, name in ipairs({ "libstdc++.so.6", "libgcc_s.so.1" }) do + local source = path.join(runtime, "lib64", name) + if not os.isfile(source) then + log.error("compat.onnxruntime: missing declared runtime file %s", source) + return false + end + os.exec("ln -sfn " .. quote(source) .. " " .. quote(path.join(directory, name))) + end + -- Explicitly link this shared standard library before the driver's + -- implicit static one, so GCC consumers load one implementation. + os.exec("ln -sfn libstdc++.so.6 " .. quote(path.join(directory, "libstdc++.so"))) + -- These are the empty compatibility stubs merged into libc since + -- glibc 2.34. Do not copy libc, libm or a second ELF loader. + local libc = pkginfo.dep_install_dir("xim:glibc", "2.44.3") + if not libc then + log.error("compat.onnxruntime: declared glibc compatibility stubs are unavailable") + return false + end + for _, name in ipairs({ "libdl.so.2", "librt.so.1", "libpthread.so.0" }) do + local source = path.join(libc, "lib64", name) + if not os.isfile(source) then + log.error("compat.onnxruntime: missing compatibility stub %s", source) + return false + end + os.exec("ln -sfn " .. quote(source) .. " " .. quote(path.join(directory, name))) + end + end + return true +end diff --git a/tests/mwrap/onnxruntime-sdk/mcpp.toml b/tests/mwrap/onnxruntime-sdk/mcpp.toml index ee3a14b8..be25297a 100644 --- a/tests/mwrap/onnxruntime-sdk/mcpp.toml +++ b/tests/mwrap/onnxruntime-sdk/mcpp.toml @@ -8,3 +8,6 @@ compat = { path = "../../.." } [dependencies.compat] onnxruntime = "1.25.1" + +[target.x86_64-linux-gnu] +cxx_runtime = "toolchain-coupled" From 1d6bc23218eaba29fcba4b767d786c6a5aaf77d6 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 05:36:49 +0900 Subject: [PATCH 03/47] feat: register mwrap consumers and document wrapper package contracts --- .../docs/2026-10-24-add-mwrap-and-ort-plan.md | 11 ++ .../skills/add-mcpp-index-package/SKILL.md | 50 +++--- .github/workflows/openkal-compat.yml | 2 +- .github/workflows/validate.yml | 27 +-- .github/workflows/xpkgindex-update.yml | 2 +- docs/mwrap.md | 156 ++++++++++++++++++ docs/repository-and-schema.md | 6 +- docs/zh/mwrap.md | 106 ++++++++++++ docs/zh/repository-and-schema.md | 6 +- index.toml | 2 +- mcpp.toml | 6 +- tests/openkal/pins.toml | 6 +- tests/plan_shards.lua | 11 +- tests/run_members.sh | 6 +- 14 files changed, 339 insertions(+), 58 deletions(-) create mode 100644 .agents/docs/2026-10-24-add-mwrap-and-ort-plan.md create mode 100644 docs/mwrap.md create mode 100644 docs/zh/mwrap.md diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md new file mode 100644 index 00000000..306f0606 --- /dev/null +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -0,0 +1,11 @@ +# mwrap category and ONNX Runtime SDK implementation + +The new mwrap category is flat under pkgs/mwrap. Existing clients scan one category level and the publishing script copies pkgs unchanged; no staging conversion or mcpp engine change is required. Consumers live under tests/mwrap and participate in the same selection/shard/timing entry points as existing examples. + +compat.onnxruntime owns the official MIT-licensed 1.25.1 CPU SDK, including exact platform checksums. The module wrapper remains in mcpplibs/onnxruntime-m and exposes upstream Ort/C names. The provider supports Linux glibc x86_64, macOS arm64 and Windows x86_64 MSVC ABI. Unsupported architectures/libcs fail explicitly. Linux runtime closure declares gcc-runtime and glibc; it never farms libc or an ELF loader from the host. + +Local checks: strict descriptor parse, cross-package references, duplicate/platform version lint and shard inclusion passed. Isolated SDK installation and real inference/header coexistence passed with LLVM 23.1.3; GCC 16.1.0 also passed, followed by actual template creation/build/inference. Native wrapper CI pins SDK provider commit 3067e52abc0165b453ea3acac4022895ebf7d9bc. + +The formal English/Chinese mwrap specification records upstream[.N] versions, modules versus API namespaces, macros, optional features and executable quickstart templates. The package skill links this common specification. Autoupdate is not enabled for the SDK yet: updating it requires changing archive directory names, API inventory and ABI verification, rather than only replacing a URL version. + +Checkpoint state: SDK provider and category infrastructure first. The opencv/onnxruntime wrapper descriptors must be added only after immutable source archives and checksums are verified and install/template consumers execute through this index. No placeholder published versions, release tags or merges are performed here. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 907c4bd8..3a3b273d 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -1,6 +1,6 @@ --- name: add-mcpp-index-package -description: Use when adding a new third-party library/package to the mcpp-index repo — writing a pkgs/*/*.lua descriptor, setting up a GitCode CN mirror via gtc, adding a minimal example, and opening a green PR. Covers the four package shapes (C-source compat / header-only / C++23 module / external Form-A module repo), the GLOBAL+CN mirror table, lint rules, the feature (sources-only) gate, and local + CI verification. +description: Use when adding a new third-party library/package to the mcpp-index repo — writing a descriptor, registering and running consumers, and opening a green PR. Includes traditional compat packages and mcpplibs.mwrap module adapters, source/runtime feature dependencies, runnable project templates, mirrors, and local plus CI verification. --- # 向 mcpp-index 新增一个库(标准作业流程) @@ -19,6 +19,7 @@ description: Use when adding a new third-party library/package to the mcpp-index 配套参考文档位于仓库 `docs/` 目录(英文为默认版本,中文版在 `docs/zh/`,内容对等),供人工与 agent 共同使用, 可按需查阅(下列链接指向中文版): +- [mwrap 规范](../../../docs/zh/mwrap.md) —— 为传统头文件库增加模块入口时读取;涵盖命名、上游版本尾号、目录、宏、feature 与必须运行的快捷模板。 - [docs/zh/package-types.md](../../../docs/zh/package-types.md) —— 四种库形态的描述符模板与样例路径。 - [docs/zh/cn-mirror.md](../../../docs/zh/cn-mirror.md) —— CN 镜像闭环,含无 `mcpp-res` 权限时的回退方案。 - [docs/zh/automatic-updates.md](../../../docs/zh/automatic-updates.md) —— 自动更新适用条件、声明、每日 bot PR 和候选 CI。 @@ -56,13 +57,13 @@ description: Use when adding a new third-party library/package to the mcpp-index 以保证字节一致(sha 相同)。**在不具备 `mcpp-res` 写权限时**,不应构造镜像表,而应使用纯字符串形式 `url = ""`(lint 允许此形式,CN 用户将回退至上游源),镜像由维护者后续补充。详见 [docs/zh/cn-mirror.md](../../../docs/zh/cn-mirror.md)。 -4. **编写描述符** `pkgs//.lua`。 +4. **编写描述符**:传统包使用 `pkgs//.lua`,`mcpplibs.mwrap` 包使用 `pkgs/mwrap/<完整包身份>.lua`。 - 目录 `` **取完整包名首字母**(`compat.eigen` 对应 `pkgs/c/`,`nlohmann.json` 对应 `pkgs/n/`), - 而非短名。放置错误将导致本地 path index 报 `not found in local index`。 + 而非短名。mwrap 是明确的分类例外,文件平铺于 pkgs/mwrap;当前客户端 fallback 按声明身份扫描一级分类目录,不要求目录名为单字母。不增加 pkgs/mwrap/o 等额外层级,也不转换发布路径。 - `xpm` 须覆盖三平台(linux/macosx/windows),每个版本包含 `url = { GLOBAL=…, CN=… }` 与 `sha256`。 - 版本号采用**裸版本**(如 `"1.2.3"`),不含前导 `v`;下载 URL 中可保留上游的 `…/v1.2.3.tar.gz` 形式。 -5. **识别可门控的可选组件并实现 feature**(参见下文“feature 机制”)。feature 仅能门控 **sources**。 -6. **编写测试工程(workspace 成员)** `tests/examples//`(`short` 为包名去除 `compat.`/`mcpplibs.` +5. **识别可门控组件并实现 feature**(见下文)。核对 pinned mcpp 的 sources、defines、flags、implies、依赖转发和 feature-deps;不要沿用 0.0.68 的 sources-only 限制。 +6. **编写测试工程(workspace 成员)**:mwrap 使用 `tests/mwrap//`,传统包使用 `tests/examples//`(`short` 为包名去除 `compat.`/`mcpplibs.` 前缀后的结果;公开模块包用 `-module`),并把它加进仓根 `mcpp.toml` 的 `[workspace].members`。 - 包含 `mcpp.toml` 与 `tests/*.cpp`,后者须包含**可失败的有效断言**(`return ok ? 0 : 1`)。 - 成员声明**恰好一条** `[indices] = { path = "../../.." }`,把所消费命名空间重定向到 @@ -100,30 +101,25 @@ description: Use when adding a new third-party library/package to the mcpp-index 用户明确要求整理文档或说明确有变化时才改入口文档。新增包通常也不改 `.xpkgindex.json`。 - 详细字段、例外和认证机制见 [自动更新文档](../../../docs/zh/automatic-updates.md)。 -## feature 机制 +## feature 与模板 -mcpp **0.0.68** 的包描述符 `features` 表**仅能门控 `sources`**;其余子字段会被解析器忽略(经 `manifest.cppm` 的 -features 解析逻辑确认)。 +当前 manifest feature 支持 sources、defines、flags、implies、forward、requires/provides;可选依赖写在 +`[feature-deps.]`,不将 deps 当成 manifest feature table 的有效成员。索引内联描述符的同类依赖 +仍使用其 Lua schema 的 deps 字段。以 CI 固定 mcpp 的 parser 为准,先运行 `mcpp xpkg parse`。 -```lua -mcpp = { - sources = { "*/core.c" }, -- 默认始终编译 - features = { - ["extra"] = { sources = { "*/extra.c" } }, -- 默认排除;请求 features=["extra"] 时编入同一 lib 目标 - }, -} -``` +feature 只增加能力,依赖图请求取并集。依赖声明支持 `default-features = false`;显式 features 仍激活, +其他边的默认请求不会被取消。根项目没有 `--no-default-features` CLI。可选大依赖使用命名 feature 门控。 +后端命名沿用上游模块和正式供应者名,如 highgui-gtk3、videoio-ffmpeg、dnn-onnxruntime。 +capability 选择不会自动移除别的 provider 对象,不能用它掩盖两份同符号运行库。 + +须验证启用后的真实行为,以及不启用时不编译/获取可选依赖。只看到符号常量或配置名称不证明后端可用。 +Linux 本地执行;Windows/macOS 用原生 CI,缺少真实设备时明确报告 build-only/未执行项。 -- 消费侧声明:`dep = { version = "…", features = ["extra"] }`。 -- 既有实例:`compat.gtest` 的 `main`(gtest_main.cc)、`compat.cjson` 的 `utils`(cJSON_Utils.c)、`compat.eigen` - 的 `blas`(`*/blas/*.cpp` 与 `*/blas/f2c/*.c`)。 -- 判定某可选组件能否实现为 feature 的准则:该组件是否为**额外的可编译源码**。若是,则可门控。纯头文件(如 Eigen 的 - `unsupported/`,与核心共享 include 根,无法隐藏)不可门控;编译期 **define**(如 `EIGEN_MPL2_ONLY`、 - `EIGEN_USE_BLAS`)当前无法由 feature 表携带,因而不可门控,应在描述符中加注释说明,待 mcpp 支持 define/cflags - 后再实现。 -- glob 规则:支持 `*`(段内匹配)与 `**`(跨段匹配),因此 `*/blas/*.cpp`、`*/foo/**/*.c` 均合法。 -- **须进行负向验证**:在不启用 feature 时,对应的符号或源码应**确实缺失**(表现为链接期 `undefined reference` - 或编译期找不到),以此证明门控确实生效,而非默认即被编入。 +每个新建或重构的 -m 库至少提供一个默认 mcpp 快捷模板。实际执行 `mcpp new --template <完整包身份>@<版本>`, +再 build/run 生成工程。当前 `{{self.name}}` 是完整包选择器,应写 `"{{self.name}}"` 为单个依赖 key, +不能再放到另一层 namespace 表中;版本用 self.version,所需 feature 显式声明。 +未发布候选可用隔离的已安装包 fixture,但必须先检查渲染身份和版本,再施加本地依赖覆盖。 +参见 [mwrap 规范](../../../docs/zh/mwrap.md)。 ## 本地验证(与 CI 同版本) @@ -150,7 +146,7 @@ rm -rf "tests/examples//target" "tests/examples//.mcpp" # 冷 | 错误做法 | 正确做法 | |----------|----------| -| 将 `compat.foo.lua` 置于 `pkgs/f/` | 置于 `pkgs/c/`,目录取完整包名首字母 | +| 将 mwrap 也强制放到首字母桶,或增加 pkgs/mwrap/o 层级 | mwrap 平铺于 pkgs/mwrap;传统包仍按完整包名首字母分桶 | | 版本写作 `"v1.2.3"` | 采用裸版本 `"1.2.3"`,lint 会拦截前导 v | | CN 镜像上传经改动的包(与 GLOBAL 不一致) | 上传与 GLOBAL 相同的 tarball,sha 一致,以维持 GLOBAL/CN 一致性 | | 仅执行 `mcpp build` 而不 `run`,或示例缺少有效断言 | 实际运行,并以 `return ok ? 0 : 1` 断言 | diff --git a/.github/workflows/openkal-compat.yml b/.github/workflows/openkal-compat.yml index 606683c1..c9b9de84 100644 --- a/.github/workflows/openkal-compat.yml +++ b/.github/workflows/openkal-compat.yml @@ -42,7 +42,7 @@ env: # run if this drifts from pins.toml. See the comment beside `mcpp` in # pins.toml for why this pin, not just validate.yml's, is gated by the # index floor. - MCPP_VERSION: "2026.9.26.1" + MCPP_VERSION: "2026.10.21.1" # CROSS-VALIDATION BEFORE A RELEASE, NOT AFTER IT. # # Empty in an ordinary run, so this measurement keeps using the RELEASED diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2b9592c0..91384afc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -431,7 +431,7 @@ env: # one module map of what it reaches; every unit of an ELF target is compiled # position-independent; `mcpp pack` states its build; `[build] jobs` bounds # `test` and `pack` (#751, #753). - MCPP_VERSION: "2026.10.1.2" + MCPP_VERSION: "2026.10.21.1" jobs: lint: @@ -837,27 +837,28 @@ jobs: # members list, so that alone must NOT force a full run: # select the added members; anything else in this file # (indices, settings) affects everyone → full. - if ! diff -q <(git show "$base:mcpp.toml" | grep -v 'tests/examples/') \ - <(grep -v 'tests/examples/' mcpp.toml) >/dev/null; then + if ! diff -q <(git show "$base:mcpp.toml" | grep -vE 'tests/(examples|mwrap)/') \ + <(grep -vE 'tests/(examples|mwrap)/' mcpp.toml) >/dev/null; then widen "mcpp.toml non-member change" fi - for p in $(comm -13 <(git show "$base:mcpp.toml" | grep -o 'tests/examples/[A-Za-z0-9._-]*' | sort -u) \ - <(grep -o 'tests/examples/[A-Za-z0-9._-]*' mcpp.toml | sort -u)); do - add "${p#tests/examples/}" + for p in $(comm -13 <(git show "$base:mcpp.toml" | grep -oE 'tests/(examples|mwrap)/[A-Za-z0-9._-]+' | sort -u) \ + <(grep -oE 'tests/(examples|mwrap)/[A-Za-z0-9._-]+' mcpp.toml | sort -u)); do + add "${p##*/}" done ;; - tests/examples/*) - m=${f#tests/examples/}; m=${m%%/*} + tests/examples/*|tests/mwrap/*) + m=${f#tests/}; m=${m#*/}; m=${m%%/*} # A deleted/renamed member dir implies a mcpp.toml edit, # which already forces a full run above. - [ -d "tests/examples/$m" ] && add "$m" ;; + if [ -d "tests/examples/$m" ] || [ -d "tests/mwrap/$m" ]; then add "$m"; fi ;; pkgs/*.lua|pkgs/*/*.lua) # A DELETED descriptor is in the diff but not on disk, and its # CN urls are gone with it — nothing left to reach. if [ -f "$f" ]; then pkgsel="$pkgsel $f"; fi - lib=$(basename "$f" .lua); lib=${lib#compat.} + lib=$(basename "$f" .lua); lib=${lib##*.} hit=0 - for mt in tests/examples/*/mcpp.toml; do - if grep -q "$lib" "$mt"; then add "$(basename "$(dirname "$mt")")"; hit=1; fi + for mt in tests/examples/*/mcpp.toml tests/mwrap/*/mcpp.toml; do + [ -f "$mt" ] || continue + if grep -Fq "$lib" "$mt"; then add "$(basename "$(dirname "$mt")")"; hit=1; fi done [ "$hit" = 1 ] || echo "note: no workspace member exercises $f" ;; # tools/ holds OFFLINE descriptor-generation and publishing @@ -1607,7 +1608,7 @@ jobs: echo "::group::$log" tail -80 "$log" echo "::endgroup::" - done < <(find tests/examples "$HOME/.mcpp/registry" -name 'mcpp_*_build.log' 2>/dev/null) + done < <(find tests/examples tests/mwrap "$HOME/.mcpp/registry" -name 'mcpp_*_build.log' 2>/dev/null) [ "$found" = 1 ] || echo "no install() build logs found" # ── Where the time went ─────────────────────────────────────────────── diff --git a/.github/workflows/xpkgindex-update.yml b/.github/workflows/xpkgindex-update.yml index 9dededda..9b6aaeef 100644 --- a/.github/workflows/xpkgindex-update.yml +++ b/.github/workflows/xpkgindex-update.yml @@ -25,7 +25,7 @@ concurrency: env: PYTHONUTF8: '1' - MCPP_VERSION: '2026.10.1.2' + MCPP_VERSION: '2026.10.21.1' MCPP_INDEX_MIRROR: GLOBAL jobs: diff --git a/docs/mwrap.md b/docs/mwrap.md new file mode 100644 index 00000000..b8db9076 --- /dev/null +++ b/docs/mwrap.md @@ -0,0 +1,156 @@ +# Module wrappers: mcpplibs.mwrap + +`mcpplibs.mwrap` contains C++ module interfaces for existing C and C++ header +libraries. Native module projects remain directly under their own namespace. +A wrapper changes how a library is imported while preserving its upstream +public names, namespaces, type identities, overloads and behavior. + +[简体中文](zh/mwrap.md) + +## Names and ownership + +| Artifact | Convention | Example | +|---|---|---| +| Repository | `-m` | `mcpplibs/opencv-m` | +| Package namespace | `mcpplibs.mwrap` | same for C and C++ wrappers | +| Package short name | upstream library name, one atomic segment | `opencv` | +| Root module | complete package identity | `mcpplibs.mwrap.opencv` | +| Submodule | upstream module grouping | `mcpplibs.mwrap.opencv.core` | +| Public API | original upstream spelling | `cv::Mat`, `Ort::Session` | +| Macro mapping module | `.macros` | `mcpplibs.mwrap.opencv.macros` | + +Do not add `-m` to package/module names or relocate ordinary upstream entities +into a new C++ namespace. Preserve legacy published package identities and bytes; +publish a new mwrap identity rather than rewriting old releases. + +Use `compat.` for an independently reusable traditional implementation. +A wrapper should depend on it when its configuration and ABI are sufficient. +Complex implementations may instead vendor pinned sources under `upstream/`. +Each implementation has one owner in a program: do not link both a vendored copy +and a compat copy of the same library. + +## Repository layout + +```text +-m/ + mcpp.toml + build.mcpp # only when generation/adaptation needs it + .xlings.json # exact tested mcpp release + upstream/ # source pins, checksums, licenses; sources if vendored + patches/ # minimal reproducible patches and their reasons + port/ # compatibility implementation, headers and config templates + src/.cppm # public lib root + src/macros.cppm + generated/ # reproducible stable outputs, if needed + templates// # mcpp quickstart templates + tests/ # API, behavior, header/module and installed consumers + tools/ # upstream import, generation and auditing +``` + +Separate upstream code from wrapper and platform adaptations. Record source +URL, tag/commit, SHA256, pruning and licenses. Keep feature/target-specific +generated files in the build output directory, so concurrent configurations +cannot overwrite shared source files. Build-time downloads belong to package +providers, not module compilation or an undeclared build script. + +## Versions + +Package versions follow the upstream version, with at most one numeric wrapper +revision appended: `5.0.0`, `5.0.0.1`, `5.0.0.2`. A new upstream `5.0.1` starts +again at `5.0.1`. Revisions start at **1**: never publish both `5.0.0` and +`5.0.0.0`, which compare equally. Do not use an unrelated wrapper `0.x` version +or change the upstream patch number to describe a wrapper fix. + +Record upstream identity separately in `[package.metadata.mwrap]` and source +pins. A wrapper revision does not excuse undocumented breaking interface changes. +Non-numeric/prerelease upstream schemes need an explicit mapping preserving +their meaning. Build metadata (`+...`) is not a sortable wrapper revision. + +## Public interfaces and macros + +Prefer exporting the upstream entities with `export using`. Each entity has one +export owner; the root re-exports the enabled public module closure. Audit public +C/C++ headers, including templates and overloads. Language-binding annotations +alone are not a complete C++ API inventory. Record unsupported/internal-linkage +adaptations and test their semantics instead of silently pruning failed exports. + +Named modules cannot export preprocessing macros. A `.macros` module may map +object constants to `inline constexpr` and suitable computation macros to +functions. Put these additions in +`mcpplibs::mwrap::::macros`, retaining the original macro name. +Token concatenation, stringification, conditional compilation and control-flow +macros stay in `/macros.hpp>`, included before imports. +Preserve argument evaluation and call-site behavior; an assertion macro is not +automatically equivalent to a function. Active macros expand even in qualified +names, so test and document raw-header versus mapped-constant usage. + +## Features + +Use lowercase kebab-case and recognizable upstream vocabulary: + +- Modules: `dnn`, `highgui`, `stitching`. +- Implementations: `-`, such as `highgui-gtk3`, + `videoio-ffmpeg`, `dnn-onnxruntime`. +- Formats: `imgcodecs-png`, `imgcodecs-tiff`. +- Cross-module dependencies: `opencl`, `tbb`, `lapack`. +- Extras: `contrib-`. +- A module-only aggregate: `all-modules`; explicitly state its expansion. + +Features are additive and unify across dependency edges. Use `implies`, +dependency feature forwarding, `[feature-deps.]` and target conditions. +Consumers may use `default-features = false` on a dependency edge. Explicit +features still activate, and another edge may request defaults again. Keep +heavyweight or replaceable providers behind named features. A module API and its runtime backend are different +capabilities. Reject unavailable targets and incompatible provider combinations +explicitly; do not silently skip a requested backend. + +Capabilities select and validate providers; they do **not** remove another +provider's object files from the link. Avoid duplicate implementations before +they enter the graph. Record ABI, runtime, CPU baseline and SDK constraints. + +## Every -m package ships a runnable template + +At least one default `templates//template.toml` and project skeleton is +required. A default template runs without a GPU, camera, desktop session or a +separate model/data download. Advanced templates may declare those requirements. + +```sh +mcpp new vision --template mcpplibs.mwrap.opencv@5.0.0 +mcpp new --list-templates mcpplibs.mwrap.opencv@5.0.0 +mcpp new viewer --template mcpplibs.mwrap.opencv@5.0.0:window +``` + +Templates are data, without execution hooks. With the pinned current mcpp, +`{{self.name}}` is the **qualified package selector**, not merely its short name: + +```toml +[dependencies] +"{{self.name}}" = { version = "{{self.version}}", features = ["imgproc", "imgcodecs-png"] } +``` + +Quote the selector as one key; do not place it under another namespace table. +Declare required features explicitly and keep the library version tied to +`{{self.version}}`. Test actual `mcpp new`, then build and run the generated +project. A source candidate may use an isolated preseeded installed-package +fixture, but must verify the rendered identity/version before applying local +dependency overrides. Also test the release archive includes the templates. + +## Index and verification + +Descriptors live directly in `pkgs/mwrap/.lua`; consumers live in +`tests/mwrap//`. Do not add an extra alphabetic directory level. The +existing client scans immediate subdirectories of `pkgs` by declared identity, +and publication copies `pkgs` unchanged: no staging path conversion is needed. +Register consumers as workspace members and cover them in selection/sharding, +lint, mirrors, search and the site. Traditional providers remain under compat. + +Use the latest tested stable mcpp release, pinned consistently across manifests, +CI, examples and templates. Check current remote main before relying on source. +Run Linux tests locally and repeat release gates in CI; cover Windows/macOS in +native CI. Distinguish build-only checks from executed GUI, provider and hardware +tests. Validate cold index consumption and runtime deployment, including libraries +loaded dynamically rather than appearing on a link line. + +Each repository's PR retains checkpoint commits. Record commands and actual +results, inspect the final dependency/ABI/API graph, and wait for every relevant +CI check before reporting merge/release readiness. diff --git a/docs/repository-and-schema.md b/docs/repository-and-schema.md index 5128da34..9499191e 100644 --- a/docs/repository-and-schema.md +++ b/docs/repository-and-schema.md @@ -2,11 +2,13 @@ **English** | [简体中文](zh/repository-and-schema.md) +Module wrapper descriptors use `pkgs/mwrap/.lua` and their consumers use `tests/mwrap//`; see [the mwrap specification](mwrap.md). The category is flat and published unchanged. The workspace test source uses the current pinned mcpp; `index.toml` separately states the descriptor compatibility floor. + ## Repository layout ``` pkgs//.lua descriptors. is the initial of the full package name (compat.* → c, nlohmann.json → n, imgui → i) -mcpp.toml workspace manifest (the members list) + the root-level [indices] compat = { path = "." }, +mcpp.toml workspace manifest (the members list) + the root-level [workspace.indices] compat = { path = "." }, inherited by members (relative paths resolve against the workspace root, mcpp >= 0.0.97) tests/examples// one test project per library (a workspace member; is the package name minus its mcpp.toml prefix, or -module for module packages). Members consuming compat write no @@ -108,7 +110,7 @@ resolves. What the test surface has to validate is **the descriptors in the checkout**, not the published remote index, and `[indices]` is what redirects a namespace into this repository to make that happen. -**Root-level inheritance**: the workspace root's `mcpp.toml` declares `[indices] compat = { path = "." }`, whose +**Root-level inheritance**: the workspace root's `mcpp.toml` declares `[workspace.indices] compat = { path = "." }`, whose relative path resolves against the **workspace root** (mcpp >= 0.0.97, [mcpp#224](https://github.com/mcpp-community/mcpp/issues/224)), and members inherit it directly instead of each writing their own `path = "../../.."`. diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md new file mode 100644 index 00000000..95526a60 --- /dev/null +++ b/docs/zh/mwrap.md @@ -0,0 +1,106 @@ +# 模块化封装:mcpplibs.mwrap + +`mcpplibs.mwrap` 为已有 C/C++ 头文件库提供模块入口;原生模块项目仍位于各自的直接命名空间下。 +封装保持上游 API 名称、namespace、类型身份、重载与行为。这里不重新设计上游 API。 + +[English](../mwrap.md) + +## 命名与实现归属 + +| 对象 | 约定 | 示例 | +|---|---|---| +| 仓库 | `<上游库名>-m` | mcpplibs/opencv-m | +| 包命名空间 | mcpplibs.mwrap | C/C++ 封装统一分类 | +| 包短名 | 上游库名,单个原子段 | opencv | +| 根模块 | 完整包身份 | mcpplibs.mwrap.opencv | +| 子模块 | 沿用上游功能分组 | mcpplibs.mwrap.opencv.core | +| API | 保留上游 | cv::Mat、Ort::Session | +| 宏映射模块 | `<根模块>.macros` | mcpplibs.mwrap.opencv.macros | + +包和模块名不带 -m,不创建另一套普通 API namespace。已发布旧身份、版本和内容保持不可变, +通过新 mwrap 身份迁移。简单实现优先依赖 compat.xxx;复杂库可以 vendor 到 upstream/。 +同一程序的同一实现只能有一个所有者,不能把 compat 与 vendored 实现重复链接。 + +## 仓库分层 + +```text +<库名>-m/ + mcpp.toml / build.mcpp / .xlings.json + upstream/ 来源、版本、校验和、许可证;需要时含原始源码 + patches/ 最小可重放补丁与原因 + port/ 适配实现、兼容头、配置模板 + src/<库名>.cppm 公共根模块 + src/macros.cppm + generated/ 必须提交的稳定可复现生成物 + templates/<名称>/ 快捷模板 + tests/ API、行为、混用与安装后消费 + tools/ 同步、生成与审计 +``` + +上游与适配分开,记录 tag/commit、SHA256、裁剪与许可。按 feature/target 变化的生成文件 +写入构建输出目录,不能覆盖共享源码。获取依赖由 provider 负责,不在模块编译时偷偷下载。 + +## 版本 + +版本与上游一致,最多追加一个数字封装修订段,例如 5.0.0、5.0.0.1、5.0.0.2。 +上游升级到 5.0.1 后从 5.0.1 重新开始;修订从 1 开始,不发布排序等同原版本的 .0。 +不使用独立 0.x 封装版本,不修改上游 patch 号冒充封装修复,不使用 +build 进行升级排序。 +metadata 与上游锁文件仍明确记录来源。破坏性模块/API 变化必须附迁移说明。 +非数字或预发布上游版本需要明确映射规则,保持原版本含义。 + +## 导出与宏 + +优先 export using 上游实体,每个实体仅有一个导出归属,根模块聚合已启用的公共模块闭包。 +以公共 C/C++ 头文件审计模板、重载和函数,不把绑定标记当完整清单,不静默 prune 失败导出。 +内部链接实体确需替换时列出清单并验证语义。 + +模块不能传递预处理宏。常量可映射为 constexpr,可保持语义的计算宏可映射为函数; +映射置于 mcpplibs::mwrap::<库名>::macros,保留原宏名。字符串化、token 拼接、条件编译、 +控制流宏通过 `/macros.hpp>` 保留,在 import 前 include。 +限定名仍会被宏展开;原始宏与映射常量的用法必须分别测试,断言函数不能默认代替断言宏。 + +## feature + +采用小写 kebab-case,复用上游术语:模块 dnn/highgui/stitching;后端 highgui-gtk3、 +videoio-ffmpeg、dnn-onnxruntime;格式 imgcodecs-png/imgcodecs-tiff;跨模块依赖 opencl/tbb/lapack; +扩展 contrib-<上游模块名>;模块全集 all-modules 必须给出展开清单。 + +feature 为加法并集,通过 implies、依赖转发、feature-deps 与 target 条件表达。 +消费者可通过依赖边的 default-features=false 关闭该边的默认集合,显式 feature 仍激活;其他边仍可能要求默认项。 +可替换/大体积后端使用明确命名的 feature 门控。 +模块 API 与实际运行后端分开说明,缺失目标/SDK 与冲突组合明确报错,不能静默跳过。 +capability 选择不会自动移除另一份实现对象文件,必须先防止重复运行库进入图。 +记录 ABI、CPU baseline、C++ runtime 和 SDK 约束。 + +## 每个 -m 包必须有可运行快捷模板 + +至少提供一个默认 templates/<名称>/template.toml 与项目骨架。默认模板不要求 GPU、摄像头、 +桌面会话或另行下载模型/数据;高级模板单独说明前提。 + +```sh +mcpp new vision --template mcpplibs.mwrap.opencv@5.0.0 +mcpp new --list-templates mcpplibs.mwrap.opencv@5.0.0 +mcpp new viewer --template mcpplibs.mwrap.opencv@5.0.0:window +``` + +模板是纯数据,不执行 hook。当前 mcpp 的 self.name 为完整包选择器,应作为一个带引号的 key: + +```toml +[dependencies] +"{{self.name}}" = { version = "{{self.version}}", features = ["imgproc", "imgcodecs-png"] } +``` + +不能再把 self.name 放入另一层 namespace 表。版本与 self.version 绑定,明确所需 feature。 +测试必须执行实际 mcpp new 后 build/run;未发布候选可使用隔离的已安装包 fixture, +先确认渲染的身份与版本,再添加本地依赖覆盖。发布归档也必须携带模板。 + +## 索引与验收 + +描述符平铺于 pkgs/mwrap/<完整身份>.lua,消费者置于 tests/mwrap/<成员>/,不再增加字母子目录。 +客户端按声明身份扫描 pkgs 的一级分类目录,发布原样复制,无需 staging 转换。 +测试注册 workspace,并接入选择器、分片、lint、镜像、搜索与站点;传统供应者仍归 compat。 + +使用最新已测试稳定 mcpp,在清单、CI、模板与例子中精确固定。核查源码前更新 remote main。 +Linux 本地执行,CI 重跑发布门槛;Windows/macOS 原生 CI。区分编译验证与实际 GUI/设备/GPU 运行, +覆盖冷索引消费和动态加载库的运行时分发。每仓库一个 PR,保留 checkpoint commits; +逐项核查最终 API/ABI/依赖图,并等待相关 CI 全通过后报告合入与发布就绪。 diff --git a/docs/zh/repository-and-schema.md b/docs/zh/repository-and-schema.md index 58e2ff08..85375f2c 100644 --- a/docs/zh/repository-and-schema.md +++ b/docs/zh/repository-and-schema.md @@ -2,11 +2,13 @@ [English](../repository-and-schema.md) | **简体中文** +模块封装描述符使用 `pkgs/mwrap/<完整身份>.lua`,消费者使用 `tests/mwrap//`,见 [mwrap 规范](mwrap.md)。分类目录平铺并原样发布。workspace 测试源码使用当前固定的 mcpp;`index.toml` 单独声明描述符兼容下限。 + ## 仓库布局 ``` pkgs//.lua 描述符。 取完整包名首字母(compat.* → c,nlohmann.json → n,imgui → i) -mcpp.toml workspace 清单(members 列表)+ 根级 [indices] compat = { path = "." }, +mcpp.toml workspace 清单(members 列表)+ 根级 [workspace.indices] compat = { path = "." }, 由成员继承(相对路径按 workspace 根解析,mcpp ≥ 0.0.97) tests/examples// 每库测试工程(workspace 成员; 为包名去前缀,模块包为 mcpp.toml -module)。消费 compat 的成员不写 [indices];消费其他 @@ -91,7 +93,7 @@ namespace = "mcpplibs", name = "capi.lua" -- 短名仍带点 测试面要验证的是 **checkout 里的描述符**,而不是已发布的远程索引,这靠 `[indices]` 把命名空间重定向到本仓完成。 -**根级继承**:workspace 根的 `mcpp.toml` 声明 `[indices] compat = { path = "." }`,相对路径按 **workspace 根**解析(mcpp ≥ 0.0.97,[mcpp#224](https://github.com/mcpp-community/mcpp/issues/224)),成员直接继承,不必各写一份 `path = "../../.."`。 +**根级继承**:workspace 根的 `mcpp.toml` 声明 `[workspace.indices] compat = { path = "." }`,相对路径按 **workspace 根**解析(mcpp ≥ 0.0.97,[mcpp#224](https://github.com/mcpp-community/mcpp/issues/224)),成员直接继承,不必各写一份 `path = "../../.."`。 **为什么只有一条,而且是 `compat`**: diff --git a/index.toml b/index.toml index 30cadd5e..c121b4f7 100644 --- a/index.toml +++ b/index.toml @@ -177,4 +177,4 @@ [index] spec = "1" min_mcpp = "2026.9.18.3" -latest_mcpp = "2026.10.1.2" +latest_mcpp = "2026.10.21.1" diff --git a/mcpp.toml b/mcpp.toml index 9d9ea35e..4b952ead 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -5,8 +5,12 @@ # `mcpp test --workspace` (or `mcpp test -p `). "Eat our own dog food." # See .agents/docs/2026-06-29-mcpp-native-workspace-ci-design.md and # mcpp .agents/docs/2026-06-30-workspace-test-and-zero-shell-index-design.md. +[workspace.package] +mcpp = ">=2026.10.21.1" + [workspace] members = [ + "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", "tests/examples/argparse", @@ -236,5 +240,5 @@ members = [ # asio itself comes from the published index while its `ssl` feature dep, # compat.openssl, resolves from this checkout — which is what lets an # unmerged compat descriptor be tested through a feature that activates it. -[indices] +[workspace.indices] compat = { path = "." } diff --git a/tests/openkal/pins.toml b/tests/openkal/pins.toml index a446ca5d..f8f8f0b2 100644 --- a/tests/openkal/pins.toml +++ b/tests/openkal/pins.toml @@ -18,10 +18,10 @@ toolchain = "llvm@22.1.8" # index requires mcpp >= 2026.9.18.1 but this is mcpp 2026.9.17.3 [E0006]" # before a single line of the member's own source is read. # -# 2026-09-26 (fourth move): `runtime` -> 0.15.2 and `mcpp` -> 2026.9.26.1, +# 2026-09-26 (fourth move): `runtime` -> 0.15.2 and `mcpp` -> 2026.10.21.1, # AND THE GRAPH'S OWN LINUX TARGETS JOIN THE MEASUREMENT. # -# mcpp 2026.9.26.1 links a program over a graph-supplied C library with no +# mcpp 2026.10.21.1 links a program over a graph-supplied C library with no # host library directory in its search (mcpp-community/mcpp#696). Before it, # clang derived `/usr/lib/x86_64-linux-gnu` and its siblings for such a link, # so a member's `-lm` on x86_64-linux-musl linked the HOST's glibc objects into @@ -136,7 +136,7 @@ toolchain = "llvm@22.1.8" # openkal-musl 0.16.0 and openkal-llvm-runtime 0.12.0), because a pin that # moves onto an unreachable or divergent asset fails every member at once and # reports it as a compatibility result. -mcpp = "2026.9.26.1" +mcpp = "2026.10.21.1" # The Windows target is named for the C environment the graph presents there, # which is musl's (openkal-musl declares `[c-abi] presents = "posix"`), not diff --git a/tests/plan_shards.lua b/tests/plan_shards.lua index 67663135..863a8496 100644 --- a/tests/plan_shards.lua +++ b/tests/plan_shards.lua @@ -67,10 +67,12 @@ end if #members == 0 then local toml = read_file("mcpp.toml") or error("cannot read mcpp.toml") local seen = {} - for name in toml:gmatch("tests/examples/([A-Za-z0-9._%-]+)") do - if name ~= "" and not seen[name] then - local probe = io.open("tests/examples/" .. name .. "/mcpp.toml", "r") - if probe then probe:close(); seen[name] = true; members[#members + 1] = name end + for _, category in ipairs({"examples", "mwrap"}) do + for name in toml:gmatch("tests/" .. category .. "/([A-Za-z0-9._%-]+)") do + if name ~= "" and not seen[name] then + local probe = io.open("tests/" .. category .. "/" .. name .. "/mcpp.toml", "r") + if probe then probe:close(); seen[name] = true; members[#members + 1] = name end + end end end table.sort(members) @@ -172,6 +174,7 @@ end -- ── dependency signature, for affinity ──────────────────────────────────── local function deps_of(member) local toml = read_file("tests/examples/" .. member .. "/mcpp.toml") + or read_file("tests/mwrap/" .. member .. "/mcpp.toml") if not toml then return {} end local set = {} -- The package names a member depends on. Deliberately crude: exact diff --git a/tests/run_members.sh b/tests/run_members.sh index a6c36de3..a724c96c 100755 --- a/tests/run_members.sh +++ b/tests/run_members.sh @@ -66,10 +66,10 @@ done if [ "$all" = 1 ]; then while IFS= read -r m; do [ -n "$m" ] || continue - [ -d "tests/examples/$m" ] || continue + if [ ! -d "tests/examples/$m" ] && [ ! -d "tests/mwrap/$m" ]; then continue; fi members+=("$m") - done < <(grep -o 'tests/examples/[A-Za-z0-9._-]*' mcpp.toml \ - | sed 's|tests/examples/||' | sort -u) + done < <(grep -oE 'tests/(examples|mwrap)/[A-Za-z0-9._-]+' mcpp.toml \ + | sed -E 's|tests/(examples|mwrap)/||' | sort -u) fi if [ "${#members[@]}" -eq 0 ]; then From 587e6eb3dd0a88461a89d75c75030f86c0c9528a Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 05:41:22 +0900 Subject: [PATCH 04/47] fix: preserve per-member index replacement semantics --- .agents/docs/2026-10-24-add-mwrap-and-ort-plan.md | 2 ++ docs/repository-and-schema.md | 4 ++-- docs/zh/repository-and-schema.md | 4 ++-- mcpp.toml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index 306f0606..5414b3c8 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -9,3 +9,5 @@ Local checks: strict descriptor parse, cross-package references, duplicate/platf The formal English/Chinese mwrap specification records upstream[.N] versions, modules versus API namespaces, macros, optional features and executable quickstart templates. The package skill links this common specification. Autoupdate is not enabled for the SDK yet: updating it requires changing archive directory names, API inventory and ABI verification, rather than only replacing a URL version. Checkpoint state: SDK provider and category infrastructure first. The opencv/onnxruntime wrapper descriptors must be added only after immutable source archives and checksums are verified and install/template consumers execute through this index. No placeholder published versions, release tags or merges are performed here. + +CI caught a semantic difference in migrating root [indices] to [workspace.indices]: the latter merges namespace entries into members, registering the same physical index twice for non-compat members and triggering xlings ambiguity. Keep the existing root [indices] replacement semantics deliberately; this is supported compatibility behavior in the pinned client. No engine patch or per-member mass rewrite is needed. Reproduction: graphics side-effects job 120643941884 failed before installing any graphics package. diff --git a/docs/repository-and-schema.md b/docs/repository-and-schema.md index 9499191e..cbf19352 100644 --- a/docs/repository-and-schema.md +++ b/docs/repository-and-schema.md @@ -8,7 +8,7 @@ Module wrapper descriptors use `pkgs/mwrap/.lua` and their consum ``` pkgs//.lua descriptors. is the initial of the full package name (compat.* → c, nlohmann.json → n, imgui → i) -mcpp.toml workspace manifest (the members list) + the root-level [workspace.indices] compat = { path = "." }, +mcpp.toml workspace manifest (the members list) + the root-level [indices] compat = { path = "." }, inherited by members (relative paths resolve against the workspace root, mcpp >= 0.0.97) tests/examples// one test project per library (a workspace member; is the package name minus its mcpp.toml prefix, or -module for module packages). Members consuming compat write no @@ -110,7 +110,7 @@ resolves. What the test surface has to validate is **the descriptors in the checkout**, not the published remote index, and `[indices]` is what redirects a namespace into this repository to make that happen. -**Root-level inheritance**: the workspace root's `mcpp.toml` declares `[workspace.indices] compat = { path = "." }`, whose +**Root-level inheritance**: the workspace root's `mcpp.toml` declares `[indices] compat = { path = "." }`, whose relative path resolves against the **workspace root** (mcpp >= 0.0.97, [mcpp#224](https://github.com/mcpp-community/mcpp/issues/224)), and members inherit it directly instead of each writing their own `path = "../../.."`. diff --git a/docs/zh/repository-and-schema.md b/docs/zh/repository-and-schema.md index 85375f2c..05abaa3a 100644 --- a/docs/zh/repository-and-schema.md +++ b/docs/zh/repository-and-schema.md @@ -8,7 +8,7 @@ ``` pkgs//.lua 描述符。 取完整包名首字母(compat.* → c,nlohmann.json → n,imgui → i) -mcpp.toml workspace 清单(members 列表)+ 根级 [workspace.indices] compat = { path = "." }, +mcpp.toml workspace 清单(members 列表)+ 根级 [indices] compat = { path = "." }, 由成员继承(相对路径按 workspace 根解析,mcpp ≥ 0.0.97) tests/examples// 每库测试工程(workspace 成员; 为包名去前缀,模块包为 mcpp.toml -module)。消费 compat 的成员不写 [indices];消费其他 @@ -93,7 +93,7 @@ namespace = "mcpplibs", name = "capi.lua" -- 短名仍带点 测试面要验证的是 **checkout 里的描述符**,而不是已发布的远程索引,这靠 `[indices]` 把命名空间重定向到本仓完成。 -**根级继承**:workspace 根的 `mcpp.toml` 声明 `[workspace.indices] compat = { path = "." }`,相对路径按 **workspace 根**解析(mcpp ≥ 0.0.97,[mcpp#224](https://github.com/mcpp-community/mcpp/issues/224)),成员直接继承,不必各写一份 `path = "../../.."`。 +**根级继承**:workspace 根的 `mcpp.toml` 声明 `[indices] compat = { path = "." }`,相对路径按 **workspace 根**解析(mcpp ≥ 0.0.97,[mcpp#224](https://github.com/mcpp-community/mcpp/issues/224)),成员直接继承,不必各写一份 `path = "../../.."`。 **为什么只有一条,而且是 `compat`**: diff --git a/mcpp.toml b/mcpp.toml index 4b952ead..a9fd06fb 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -240,5 +240,5 @@ members = [ # asio itself comes from the published index while its `ssl` feature dep, # compat.openssl, resolves from this checkout — which is what lets an # unmerged compat descriptor be tested through a feature that activates it. -[workspace.indices] +[indices] compat = { path = "." } From d418997b235ec5d3918df134bb75d7992601e250 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 06:06:09 +0900 Subject: [PATCH 05/47] feat: validate the indexed ORT archive and unmodified quickstart consumer --- .../docs/2026-10-24-add-mwrap-and-ort-plan.md | 2 + .../skills/add-mcpp-index-package/SKILL.md | 9 ++-- .github/workflows/validate.yml | 5 ++ .gitignore | 1 + docs/mwrap.md | 6 +++ docs/zh/mwrap.md | 10 ++++ mcpp.toml | 1 + pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua | 32 ++++++++++++ tests/mwrap/check_installed_template.py | 51 +++++++++++++++++++ tests/mwrap/onnxruntime-cpu/mcpp.toml | 14 +++++ .../mwrap/onnxruntime-cpu/tests/inference.cpp | 25 +++++++++ tests/mwrap/onnxruntime-cpu/tests/model.hpp | 2 + .../onnxruntime-cpu/tests/public_surface.cpp | 22 ++++++++ tests/prepare_mwrap_indices.py | 44 ++++++++++++++++ tests/run_members.sh | 6 +++ 15 files changed, 227 insertions(+), 3 deletions(-) create mode 100644 pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua create mode 100644 tests/mwrap/check_installed_template.py create mode 100644 tests/mwrap/onnxruntime-cpu/mcpp.toml create mode 100644 tests/mwrap/onnxruntime-cpu/tests/inference.cpp create mode 100644 tests/mwrap/onnxruntime-cpu/tests/model.hpp create mode 100644 tests/mwrap/onnxruntime-cpu/tests/public_surface.cpp create mode 100644 tests/prepare_mwrap_indices.py diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index 5414b3c8..2d220a36 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -11,3 +11,5 @@ The formal English/Chinese mwrap specification records upstream[.N] versions, mo Checkpoint state: SDK provider and category infrastructure first. The opencv/onnxruntime wrapper descriptors must be added only after immutable source archives and checksums are verified and install/template consumers execute through this index. No placeholder published versions, release tags or merges are performed here. CI caught a semantic difference in migrating root [indices] to [workspace.indices]: the latter merges namespace entries into members, registering the same physical index twice for non-compat members and triggering xlings ambiguity. Keep the existing root [indices] replacement semantics deliberately; this is supported compatibility behavior in the pinned client. No engine patch or per-member mass rewrite is needed. Reproduction: graphics side-effects job 120643941884 failed before installing any graphics package. + +The real wrapper archive de3a0a9 was downloaded twice and pinned as SHA256 24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251. Its CPU inference and public SDK helper consumer passed through index installation. Testing the wrapper and compat SDK together confirmed both namespace-routing constraints on the current client; tests/prepare_mwrap_indices.py now provides unchanged namespace-scoped test views, while check_installed_template.py independently tests the complete unchanged published layout with no source pre-seeding or dependency rewriting. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 3a3b273d..44dbf2ee 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -66,9 +66,12 @@ description: Use when adding a new third-party library/package to the mcpp-index 6. **编写测试工程(workspace 成员)**:mwrap 使用 `tests/mwrap//`,传统包使用 `tests/examples//`(`short` 为包名去除 `compat.`/`mcpplibs.` 前缀后的结果;公开模块包用 `-module`),并把它加进仓根 `mcpp.toml` 的 `[workspace].members`。 - 包含 `mcpp.toml` 与 `tests/*.cpp`,后者须包含**可失败的有效断言**(`return ok ? 0 : 1`)。 - - 成员声明**恰好一条** `[indices] = { path = "../../.." }`,把所消费命名空间重定向到 - 本 checkout(公开模块包用 `default`,即内建 mcpplibs 命名空间;mcpp ≥ 0.0.97)。 - 单条是硬约束:xlings 对 >1 个项目级 index repo 静默失败(mcpp#238);根级集中化待其修复。 + - 普通成员用一条 `[indices] = { path = "../../.." }` 将所消费命名空间重定向到 checkout。 + 不把同一个完整索引路径注册成多个 namespace:当前 xlings 会将同一实体报为歧义。 + mwrap wrapper + compat SDK 的组合测试先运行 `python3 tests/prepare_mwrap_indices.py`, + 再将两条 namespace 路由指向 `tests/mwrap/.indices/` 中字节不变的测试视图。 + `tests/run_members.sh` 自动准备这些视图;它们不提交、不发布,也不改变 pkgs/mwrap 的正式布局。 + 正常发布布局另由 `tests/mwrap/check_installed_template.py` 在独立 MCPP_HOME 中使用单一完整索引验收。 - 非全平台包按 `[target.'cfg(...)'.dependencies]` 门控依赖,测试源码在被门控掉的平台上 编译为 no-op `main`(`#ifdef __linux__ … #else int main(){return 0;} #endif` 模式)。 - 如需测试 feature,依赖采用长式声明 `name = { version = "…", features = ["…"] }`。 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 91384afc..a5a7c13b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1518,6 +1518,11 @@ jobs: run: | "$MCPP" index update + - name: Installed mwrap archive and actual project template + if: contains(format(' {0} ', env.MEMBERS), ' onnxruntime-cpu ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" + - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash run: | diff --git a/.gitignore b/.gitignore index ad886326..69704682 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ tests/mwrap/*/target/ tests/mwrap/*/.mcpp/ tests/mwrap/*/compile_commands.json tests/mwrap/*/mcpp.lock +tests/mwrap/.indices/ diff --git a/docs/mwrap.md b/docs/mwrap.md index b8db9076..c750fbf4 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -154,3 +154,9 @@ loaded dynamically rather than appearing on a link line. Each repository's PR retains checkpoint commits. Record commands and actual results, inspect the final dependency/ABI/API graph, and wait for every relevant CI check before reporting merge/release readiness. + +## Candidate index tests across namespaces + +The pinned client routes each requested namespace independently. Registering the same full checkout twice makes xlings report duplicate project candidates. Local wrapper/SDK tests therefore call tests/prepare_mwrap_indices.py and route each namespace to a test-only view under tests/mwrap/.indices. Every descriptor is copied unchanged and its source SHA256 is recorded; no aliases share a descriptor. These views are ignored build outputs, not a publication format. + +Normal installed consumers are tested independently by tests/mwrap/check_installed_template.py: it copies the complete pkgs/index.toml publication layout into one isolated built-in index, downloads the real checksummed source archive, runs mcpp new and builds/runs the generated manifest without a path substitution. The Git and published pkgs/mwrap directory layout remains identical. diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index 95526a60..e7df4bf3 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -104,3 +104,13 @@ mcpp new viewer --template mcpplibs.mwrap.opencv@5.0.0:window Linux 本地执行,CI 重跑发布门槛;Windows/macOS 原生 CI。区分编译验证与实际 GUI/设备/GPU 运行, 覆盖冷索引消费和动态加载库的运行时分发。每仓库一个 PR,保留 checkpoint commits; 逐项核查最终 API/ABI/依赖图,并等待相关 CI 全通过后报告合入与发布就绪。 + +## 候选索引的跨 namespace 测试 + +固定客户端按请求 namespace 分别路由;同一个完整 checkout 注册两次会让 xlings 报项目候选歧义。 +本地 wrapper/SDK 组合测试先执行 tests/prepare_mwrap_indices.py,再分别指向 tests/mwrap/.indices 中的测试视图。 +各描述符字节不变并记录源 SHA256,视图之间不重复登记实体。它们是不提交、不发布的构建输出,不是新的发布格式。 + +正常安装由 tests/mwrap/check_installed_template.py 独立验证:把完整 pkgs/index.toml 发布布局放进独立 MCPP_HOME 的单一内置索引, +下载真实且带校验的源码归档,执行 mcpp new,再原样构建/运行生成清单,不替换为 path 依赖。 +Git 与发布的 pkgs/mwrap 目录始终一致。 diff --git a/mcpp.toml b/mcpp.toml index a9fd06fb..f52e16a6 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -10,6 +10,7 @@ mcpp = ">=2026.10.21.1" [workspace] members = [ + "tests/mwrap/onnxruntime-cpu", "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", diff --git a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua new file mode 100644 index 00000000..51d4c2e0 --- /dev/null +++ b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua @@ -0,0 +1,32 @@ +-- Immutable candidate source archive; the CPU SDK is owned by compat.onnxruntime. +-- No release tag is created by this descriptor. Updates require a verified source +-- revision and archive checksum, not a URL-only automatic version substitution. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "onnxruntime", + description = "ONNX Runtime 1.25.1 CPU C/C++ APIs through upstream-preserving modules", + licenses = { "MIT" }, + repo = "https://github.com/mcpplibs/onnxruntime-m", + type = "package", + xpm = { + linux = { + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/de3a0a9da143f4ae52eb5e1a0302ba3fdf623b6d.tar.gz", + sha256 = "24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251", + }, + }, + macosx = { + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/de3a0a9da143f4ae52eb5e1a0302ba3fdf623b6d.tar.gz", + sha256 = "24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251", + }, + }, + windows = { + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/de3a0a9da143f4ae52eb5e1a0302ba3fdf623b6d.tar.gz", + sha256 = "24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251", + }, + }, + }, +} diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py new file mode 100644 index 00000000..569e5dd0 --- /dev/null +++ b/tests/mwrap/check_installed_template.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +"""Install real archives from the unchanged candidate index and run a template.""" +import argparse +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import tomllib + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--mcpp", default="mcpp") + parser.add_argument("--toolchain", default="llvm@23.1.3") + parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") + args = parser.parse_args() + root = Path(__file__).resolve().parents[2] + identity, version = args.package.rsplit("@", 1) + with tempfile.TemporaryDirectory(prefix="mwrap-installed-template-") as directory: + temporary = Path(directory) + home = temporary / "home" + index = home / "indices/mcpplibs" + index.mkdir(parents=True) + # Exactly the publication layout, with all namespaces in one built-in + # index. No namespace views, source pre-seeding or dependency rewriting. + shutil.copytree(root / "pkgs", index / "pkgs") + shutil.copyfile(root / "index.toml", index / "index.toml") + env = dict(os.environ, MCPP_HOME=str(home)) + commands = [[args.mcpp, "self", "config", "--mirror", "GLOBAL"], + [args.mcpp, "new", "--list-templates", args.package], + [args.mcpp, "new", "installed-quickstart", "--template", args.package]] + for command in commands: + print("+", " ".join(command), flush=True) + subprocess.run(command, cwd=temporary, env=env, check=True) + project = temporary / "installed-quickstart" + manifest = tomllib.loads((project / "mcpp.toml").read_text()) + dependency = manifest["dependencies"][identity] + actual_version = dependency if isinstance(dependency, str) else dependency["version"] + assert actual_version == version, dependency + if isinstance(dependency, dict): + assert "path" not in dependency and "git" not in dependency, dependency + for command in ([args.mcpp, "build", "--strict", "--toolchain", args.toolchain], + [args.mcpp, "run", "--toolchain", args.toolchain]): + print("+", " ".join(command), flush=True) + subprocess.run(command, cwd=project, env=env, check=True) + print("Verified real indexed archive installation and unmodified template consumer", flush=True) + + +if __name__ == "__main__": + main() diff --git a/tests/mwrap/onnxruntime-cpu/mcpp.toml b/tests/mwrap/onnxruntime-cpu/mcpp.toml new file mode 100644 index 00000000..383d4e14 --- /dev/null +++ b/tests/mwrap/onnxruntime-cpu/mcpp.toml @@ -0,0 +1,14 @@ +[package] +name = "onnxruntime-cpu" +version = "1.25.1" +description = "Install the immutable mwrap archive and execute CPU inference" + +[indices] +"mcpplibs.mwrap" = { path = "../.indices/mcpplibs.mwrap" } +compat = { path = "../.indices/compat" } + +[dependencies."mcpplibs.mwrap"] +onnxruntime = "1.25.1" + +[target.x86_64-linux-gnu] +cxx_runtime = "toolchain-coupled" diff --git a/tests/mwrap/onnxruntime-cpu/tests/inference.cpp b/tests/mwrap/onnxruntime-cpu/tests/inference.cpp new file mode 100644 index 00000000..b747b8da --- /dev/null +++ b/tests/mwrap/onnxruntime-cpu/tests/inference.cpp @@ -0,0 +1,25 @@ +#include "model.hpp" +import std; +import mcpplibs.mwrap.onnxruntime; + +int main() { + if (Ort::GetVersionString() != "1.25.1") return 1; + static_assert(mcpplibs::mwrap::onnxruntime::macros::ORT_API_VERSION == 25); + Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "mwrap-inference"); + Ort::SessionOptions options; + options.SetIntraOpNumThreads(1); + Ort::Session session(env, identity_model, sizeof(identity_model), options); + const char* names[]{"x"}; + const char* outputs[]{"y"}; + std::array input{0.5f, -4.0f, 8.0f}; + std::array shape{3}; + auto memory = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + auto value = Ort::Value::CreateTensor(memory, input.data(), input.size(), shape.data(), shape.size()); + auto result = session.Run(Ort::RunOptions{nullptr}, names, &value, 1, outputs, 1); + if (result.size() != 1 || !result[0].IsTensor()) return 2; + auto dimensions = result[0].GetTensorTypeAndShapeInfo().GetShape(); + if (dimensions != std::vector{3}) return 3; + const float* actual = result[0].GetTensorData(); + for (std::size_t i = 0; i < input.size(); ++i) + if (actual[i] != input[i]) return 4; +} diff --git a/tests/mwrap/onnxruntime-cpu/tests/model.hpp b/tests/mwrap/onnxruntime-cpu/tests/model.hpp new file mode 100644 index 00000000..e7932940 --- /dev/null +++ b/tests/mwrap/onnxruntime-cpu/tests/model.hpp @@ -0,0 +1,2 @@ +#pragma once +inline constexpr unsigned char identity_model[] = {0x08, 0x08, 0x12, 0x0d, 0x6d, 0x77, 0x72, 0x61, 0x70, 0x2d, 0x66, 0x69, 0x78, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x44, 0x0a, 0x10, 0x0a, 0x01, 0x78, 0x12, 0x01, 0x79, 0x22, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x6d, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5a, 0x0f, 0x0a, 0x01, 0x78, 0x12, 0x0a, 0x0a, 0x08, 0x08, 0x01, 0x12, 0x04, 0x0a, 0x02, 0x08, 0x03, 0x62, 0x0f, 0x0a, 0x01, 0x79, 0x12, 0x0a, 0x0a, 0x08, 0x08, 0x01, 0x12, 0x04, 0x0a, 0x02, 0x08, 0x03, 0x42, 0x02, 0x10, 0x0d}; diff --git a/tests/mwrap/onnxruntime-cpu/tests/public_surface.cpp b/tests/mwrap/onnxruntime-cpu/tests/public_surface.cpp new file mode 100644 index 00000000..c6efd3bb --- /dev/null +++ b/tests/mwrap/onnxruntime-cpu/tests/public_surface.cpp @@ -0,0 +1,22 @@ +import std; +import mcpplibs.mwrap.onnxruntime; +import mcpplibs.mwrap.onnxruntime.config; + +int main() { + static_assert(sizeof(OrtEpApi) > 0); + static_assert(std::is_pointer_v); + static_assert(std::is_class_v>); + static_assert(std::is_same_v); + static_assert(cpu_resource_offset == 0); + CustomOpContext context; + onnxruntime::ProviderOptions provider_options{{"example", "value"}}; + if (provider_options.at("example") != "value") return 1; + Ort::SessionOptions options; + if (std::string_view(kOrtSessionOptionsConfigDisablePrepacking) != "session.disable_prepacking") return 3; + options.AddConfigEntry(kOrtSessionOptionsConfigDisablePrepacking, "1"); + OrtStatus* status = OrtSessionOptionsAppendExecutionProvider_CPU(options, 1); + if (status) { + Ort::GetApi().ReleaseStatus(status); + return 2; + } +} diff --git a/tests/prepare_mwrap_indices.py b/tests/prepare_mwrap_indices.py new file mode 100644 index 00000000..19630176 --- /dev/null +++ b/tests/prepare_mwrap_indices.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +"""Create test-only namespace views without changing the published index layout. + +The pinned client routes descriptors by namespace, while xlings rejects two +project aliases of one physical full index as ambiguous. Each view contains +unchanged descriptor bytes for just its namespace. Normal published consumers +use one complete built-in index instead. +""" +import hashlib +import json +from pathlib import Path +import re +import shutil + + +def main(): + root = Path(__file__).resolve().parents[1] + namespaces = {name: [] for name in ("compat", "mcpplibs.mwrap")} + for source in sorted((root / "pkgs").glob("*/*.lua")): + match = re.search(r'^\s*namespace\s*=\s*[\'"]([^\'"]+)[\'"]', source.read_text(), re.M) + if match and match[1] in namespaces: + namespaces[match[1]].append(source) + for namespace, sources in namespaces.items(): + view = root / "tests/mwrap/.indices" / namespace + payload = view / "pkgs/view" + payload.mkdir(parents=True, exist_ok=True) + expected = {source.name for source in sources} + for stale in payload.glob("*.lua"): + if stale.name not in expected: + stale.unlink() + provenance = {} + for source in sources: + dest = payload / source.name + shutil.copyfile(source, dest) + digest = hashlib.sha256(source.read_bytes()).hexdigest() + assert hashlib.sha256(dest.read_bytes()).hexdigest() == digest + provenance[source.relative_to(root).as_posix()] = digest + shutil.copyfile(root / "index.toml", view / "index.toml") + (view / "source-manifest.json").write_text(json.dumps(provenance, indent=2) + "\n") + print(f"Test view {namespace}: {len(sources)} unchanged descriptors") + + +if __name__ == "__main__": + main() diff --git a/tests/run_members.sh b/tests/run_members.sh index a724c96c..961cd9bb 100755 --- a/tests/run_members.sh +++ b/tests/run_members.sh @@ -112,6 +112,12 @@ if [ -n "$shard" ]; then fi [ -n "$cache" ] && export MCPP_BUILD_CACHE="$cache" +for m in "${members[@]}"; do + if [ -d "tests/mwrap/$m" ]; then + python3 tests/prepare_mwrap_indices.py || exit $? + break + fi +done echo "cache mode: ${MCPP_BUILD_CACHE:-global (default)}" rows=$(mktemp) From e38774bb71e1581ae364b1f336b3a049345bb673 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 06:15:17 +0900 Subject: [PATCH 06/47] fix: audit immutable wrapper snapshots without inventing release updates --- .../docs/2026-10-24-add-mwrap-and-ort-plan.md | 2 + docs/automatic-updates.md | 3 ++ docs/zh/automatic-updates.md | 3 ++ tests/autoupdate/ci.py | 49 ++++++++++++++---- tests/autoupdate/test_ci.py | 51 +++++++++++++++++++ 5 files changed, 97 insertions(+), 11 deletions(-) diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index 2d220a36..552a2a2e 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -13,3 +13,5 @@ Checkpoint state: SDK provider and category infrastructure first. The opencv/onn CI caught a semantic difference in migrating root [indices] to [workspace.indices]: the latter merges namespace entries into members, registering the same physical index twice for non-compat members and triggering xlings ambiguity. Keep the existing root [indices] replacement semantics deliberately; this is supported compatibility behavior in the pinned client. No engine patch or per-member mass rewrite is needed. Reproduction: graphics side-effects job 120643941884 failed before installing any graphics package. The real wrapper archive de3a0a9 was downloaded twice and pinned as SHA256 24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251. Its CPU inference and public SDK helper consumer passed through index installation. Testing the wrapper and compat SDK together confirmed both namespace-routing constraints on the current client; tests/prepare_mwrap_indices.py now provides unchanged namespace-scoped test views, while check_installed_template.py independently tests the complete unchanged published layout with no source pre-seeding or dependency rewriting. + +The unchanged full-index installed-template flow passed in a fresh home: real wrapper/SDK archives and LLVM were installed, mcpp new rendered the default inference project, and its original dependency resolved and ran Identity inference. The updater audit now implements the documented immutable-commit exception rather than demanding a fake release template. All 14 updater adapter tests and the full real audit passed (85 automatic declarations, one manual snapshot), retaining historical-byte guards. Candidate selection/preparation also recognizes tests/mwrap and fully qualified dependency keys. diff --git a/docs/automatic-updates.md b/docs/automatic-updates.md index a0b7f575..4819ca96 100644 --- a/docs/automatic-updates.md +++ b/docs/automatic-updates.md @@ -42,6 +42,9 @@ Use `package.repo` as a fallback when the URL does not identify a GitHub repo. Commit snapshots, independent source/package version mappings, prereleases, non-GitHub providers and upgrades requiring recipe changes need manual handling. Do not invent a rule to opt them in; explain the exception in the PR instead. +The CI audit records descriptors whose resources all use full 40/64-digit commit +archive URLs as manual snapshots. Their historical version/resource guards still +apply; an ordinary release/tag descriptor without an update declaration still fails. The current xim adapter does not advance `latest.ref`. ## Verify a declaration diff --git a/docs/zh/automatic-updates.md b/docs/zh/automatic-updates.md index 1aa704d2..5a28b324 100644 --- a/docs/zh/automatic-updates.md +++ b/docs/zh/automatic-updates.md @@ -87,3 +87,6 @@ GitHub 自动产生的原生 PR 审批请求无需批准;验证使用显式 di 一般只改描述符、消费测试和必要的 workspace 登记,符合条件就补上自动更新声明; 不适用时在 PR 中说明。站点会从描述符发现包,普通包 PR 不向两份根 README 追加包介绍、 示例或更新记录,也不修改站点配置。只有文档整理或用户明确要求时才调整 README。 + +固定 commit 归档的 CI 审计按完整 40/64 位提交 URL 识别,并在报告中记录为人工更新; +已有版本和资源的不可静默改写检查仍然执行。普通 release/tag 描述符缺少自动更新声明仍会失败。 diff --git a/tests/autoupdate/ci.py b/tests/autoupdate/ci.py index 5ac9b733..2f1d472c 100644 --- a/tests/autoupdate/ci.py +++ b/tests/autoupdate/ci.py @@ -24,8 +24,28 @@ def base_descriptors(base: str) -> set[str]: return {name for name in files.splitlines() if name.endswith(".lua")} +def immutable_commit_snapshot(info: dict) -> bool: + """Commit archives have no release-version substitution to automate.""" + urls = [] + for platform in info["platforms"].values(): + for value in platform["entries"].values(): + entry = value.plain() + if "ref" in entry: + continue + url = entry.get("url") + if isinstance(url, dict): + url = url.get("GLOBAL") + if not isinstance(url, str): + return False + urls.append(url) + return bool(urls) and all(re.fullmatch( + r"https://github\.com/[^/]+/[^/]+/archive/[0-9a-fA-F]{40}(?:[0-9a-fA-F]{24})?\.(?:tar\.gz|zip)", + url) for url in urls) + + def audit(base: str, output: Path): records = [] + manual = [] previous = base_descriptors(base) infos = inventory(ROOT) removed = previous - {info["path"] for info in infos} @@ -68,10 +88,15 @@ def audit(base: str, output: Path): f"{info['id']} {plat}/{version}") if info["direct"]: if info["autoupdate"] is None: + if immutable_commit_snapshot(info): + manual.append({"id": info["id"], "path": info["path"], + "reason": "immutable commit archive; update requires a reviewed source revision"}) + continue raise RuntimeError(f"missing autoupdate: {info['id']}") records.append({k: info[k] for k in ("id", "path", "direct", "autoupdate")}) - output.write_text(json.dumps({"covered": len(records), "packages": records}, indent=2)) - print(f"All {len(records)} GitHub-direct descriptors declared; all existing versions preserved.") + output.write_text(json.dumps({"covered": len(records), "packages": records, "manual": manual}, indent=2)) + print(f"All {len(records)} updateable GitHub-direct descriptors declared; " + f"{len(manual)} immutable snapshots require manual updates; all existing versions preserved.") def _literal_field(source: str, name: str) -> int | None: @@ -89,13 +114,14 @@ def selection(base: str, output: Path): def direct_member(identity: str) -> str | None: namespace, name = identity.split(":", 1) candidates = [] - for path in (ROOT / "tests/examples").glob("*/mcpp.toml"): - text = path.read_text(encoding="utf-8") - # Metadata-only selection; prepare() and the lock assertion verify actual resolution. - if re.search(rf"(?m)^\s*{re.escape(name)}\s*=", text) and ( - f"dependencies.{namespace}]" in text or f"dependencies.{namespace}." in text - ): - candidates.append(path.parent.name) + for category in ("examples", "mwrap"): + for path in (ROOT / "tests" / category).glob("*/mcpp.toml"): + deps = tomllib.loads(path.read_text(encoding="utf-8")).get("dependencies", {}) + nested = deps + for part in namespace.split("."): + nested = nested.get(part, {}) if isinstance(nested, dict) else {} + if (f"{namespace}.{name}" in deps or name in deps.get(namespace, {}) or name in nested): + candidates.append(path.parent.name) if not candidates: return None return min(candidates, key=lambda value: (len(value), value)) @@ -159,12 +185,13 @@ def prepare(plan: Path, identity: str, output: Path): member = direct_member(identity) output.mkdir(parents=True, exist_ok=True) if member: - source = ROOT / "tests/examples" / member + paths = [ROOT / "tests" / category / member for category in ("examples", "mwrap")] + source = next(path for path in paths if (path / "mcpp.toml").is_file()) shutil.copytree(source, output, dirs_exist_ok=True, ignore=shutil.ignore_patterns("target", ".mcpp", "mcpp.lock")) text = (output / "mcpp.toml").read_text(encoding="utf-8") text, replacements = re.subn( - rf'(?m)^(\s*{re.escape(name)}\s*=\s*(?:\{{\s*version\s*=\s*)?")[^"]+(".*)$', + rf'(?m)^(\s*(?:{re.escape(name)}|"{re.escape(namespace)}\.{re.escape(name)}")\s*=\s*(?:\{{\s*version\s*=\s*)?")[^"]+(".*)$', lambda m: m[1] + version + m[2], text) if not replacements: raise RuntimeError("candidate dependency was not replaced") diff --git a/tests/autoupdate/test_ci.py b/tests/autoupdate/test_ci.py index 0b8da9e2..a4ae4147 100644 --- a/tests/autoupdate/test_ci.py +++ b/tests/autoupdate/test_ci.py @@ -2,6 +2,7 @@ import json import subprocess import tempfile +import tomllib import unittest from pathlib import Path from unittest.mock import patch @@ -24,6 +25,56 @@ def descriptor(name): class BaselineTests(unittest.TestCase): + def test_commit_snapshot_is_manual_but_historical_bytes_are_still_guarded(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + path = root / "pkgs/mwrap/mcpplibs.mwrap.example.lua" + path.parent.mkdir(parents=True) + original = '''package = { +spec="1", namespace="mcpplibs.mwrap", name="example", +xpm={linux={["1.0.0"]={ +url="https://github.com/acme/example/archive/1111111111111111111111111111111111111111.tar.gz", +sha256="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", +}}}, +}''' + path.write_text(original) + for args in (("init",), ("add", "."), + ("-c", "user.name=Test", "-c", "user.email=test@example.com", "commit", "-m", "baseline")): + subprocess.run(["git", *args], cwd=root, check=True, capture_output=True) + with patch.object(ci, "ROOT", root): + report = root / "coverage.json" + ci.audit("HEAD", report) + self.assertEqual(len(json.loads(report.read_text())["manual"]), 1) + path.write_text(original.replace("a" * 64, "b" * 64)) + with self.assertRaisesRegex(RuntimeError, "without a revision bump"): + ci.audit("HEAD", report) + path.write_text(original) + release = path.with_name("mcpplibs.mwrap.release.lua") + release.write_text(original.replace('name="example"', 'name="release"').replace( + 'archive/1111111111111111111111111111111111111111', 'archive/refs/tags/v1.0.0')) + with self.assertRaisesRegex(RuntimeError, "missing autoupdate"): + ci.audit("HEAD", report) + + def test_mwrap_candidate_uses_its_actual_member_and_qualified_dependency(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + source = root / "tests/mwrap/example" + (source / "tests").mkdir(parents=True) + (source / "mcpp.toml").write_text( + '[package]\nname="consumer"\nversion="0.1.0"\n' + '[dependencies]\n"mcpplibs.mwrap.example"="1.0.0"\n') + (source / "tests/probe.cpp").write_text('int main() { return 0; }\n') + plan = root / "plan.json" + plan.write_text(json.dumps({"packages": [ + {"id": "mcpplibs.mwrap:example", "candidate": "1.0.1"}]})) + with patch.object(ci, "ROOT", root): + self.assertEqual(ci.direct_member("mcpplibs.mwrap:example"), "example") + dest = root / "candidate" + ci.prepare(plan, "mcpplibs.mwrap:example", dest) + result = tomllib.loads((dest / "mcpp.toml").read_text()) + self.assertEqual(result["dependencies"]["mcpplibs.mwrap.example"], "1.0.1") + self.assertEqual((dest / "tests/probe.cpp").read_text(), 'int main() { return 0; }\n') + def test_added_descriptor_and_removed_historical_descriptor(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) From a4130c75a49c6e9df03690743467696ef81d3a19 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 06:23:16 +0900 Subject: [PATCH 07/47] fix: preserve UTF-8 views and share cross-image runtime adapters --- .agents/docs/2026-10-24-add-mwrap-and-ort-plan.md | 2 ++ pkgs/c/compat.vulkan-runtime.lua | 5 ++++- pkgs/c/compat.xorgproto.lua | 4 +++- tests/mwrap/check_installed_template.py | 2 +- tests/prepare_mwrap_indices.py | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index 552a2a2e..c7ac79f2 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -15,3 +15,5 @@ CI caught a semantic difference in migrating root [indices] to [workspace.indice The real wrapper archive de3a0a9 was downloaded twice and pinned as SHA256 24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251. Its CPU inference and public SDK helper consumer passed through index installation. Testing the wrapper and compat SDK together confirmed both namespace-routing constraints on the current client; tests/prepare_mwrap_indices.py now provides unchanged namespace-scoped test views, while check_installed_template.py independently tests the complete unchanged published layout with no source pre-seeding or dependency rewriting. The unchanged full-index installed-template flow passed in a fresh home: real wrapper/SDK archives and LLVM were installed, mcpp new rendered the default inference project, and its original dependency resolved and ran Identity inference. The updater audit now implements the documented immutable-commit exception rather than demanding a fake release template. All 14 updater adapter tests and the full real audit passed (85 automatic declarations, one manual snapshot), retaining historical-byte guards. Candidate selection/preparation also recognizes tests/mwrap and fully qualified dependency keys. + +Cross-platform CI correction: namespace-view metadata is explicitly decoded as UTF-8 on Windows. The ecosystem Vulkan check also exposed two header/runtime adapter anchors defaulting to static while reachable from several shared images; their providers now default to shared form, with explicit packaging revision 1 on current entries and unchanged source URLs/hashes. The consumer can still choose linkage. Llama Vulkan CI pins this candidate index commit rather than requiring the PR to merge first. diff --git a/pkgs/c/compat.vulkan-runtime.lua b/pkgs/c/compat.vulkan-runtime.lua index a85a6f67..0b527ae6 100644 --- a/pkgs/c/compat.vulkan-runtime.lua +++ b/pkgs/c/compat.vulkan-runtime.lua @@ -121,6 +121,7 @@ package = { -- A new key because install() output is baked into the installed -- payload. ["2026.09.11"] = { + revision = 1, url = "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Loader/vulkan-sdk-1.4.357.0/README.md", sha256 = "21ec0987a05bd680ecd11f8be747e27744d7558f7318736f6cb8a5c5ec1b8ba8", }, @@ -175,7 +176,9 @@ package = { import_std = false, c_standard = "c11", sources = { "mcpp_generated/vulkan_runtime_empty.c" }, - targets = { ["vulkan_runtime"] = { kind = "lib" } }, + -- Both the loader and its program reach this adapter. One shared + -- form avoids placing a static provider in several runtime images. + targets = { ["vulkan_runtime"] = { kind = "lib", linkage = "shared" } }, deps = {}, runtime = { library_dirs = { "mcpp_generated/vulkan_runtime/lib" }, diff --git a/pkgs/c/compat.xorgproto.lua b/pkgs/c/compat.xorgproto.lua index fe538ce3..199161ae 100644 --- a/pkgs/c/compat.xorgproto.lua +++ b/pkgs/c/compat.xorgproto.lua @@ -10,6 +10,7 @@ package = { xpm = { linux = { ["2025.1"] = { + revision = 1, url = { GLOBAL = "https://xorg.freedesktop.org/releases/individual/proto/xorgproto-2025.1.tar.gz", CN = "https://gitcode.com/mcpp-res/xorgproto/releases/download/2025.1/xorgproto-2025.1.tar.gz", @@ -29,7 +30,8 @@ package = { ["mcpp_generated/xorgproto_empty.c"] = "int mcpp_compat_xorgproto_headers_anchor(void) { return 0; }\n", }, sources = {"mcpp_generated/xorgproto_empty.c"}, - targets = { ["xorgproto"] = { kind = "lib" } }, + -- X11, Xau, Xdmcp and their consumers can be separate shared images. + targets = { ["xorgproto"] = { kind = "lib", linkage = "shared" } }, deps = {}, }, } diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 569e5dd0..f2ee9d5a 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -34,7 +34,7 @@ def main(): print("+", " ".join(command), flush=True) subprocess.run(command, cwd=temporary, env=env, check=True) project = temporary / "installed-quickstart" - manifest = tomllib.loads((project / "mcpp.toml").read_text()) + manifest = tomllib.loads((project / "mcpp.toml").read_text(encoding="utf-8")) dependency = manifest["dependencies"][identity] actual_version = dependency if isinstance(dependency, str) else dependency["version"] assert actual_version == version, dependency diff --git a/tests/prepare_mwrap_indices.py b/tests/prepare_mwrap_indices.py index 19630176..a65979b4 100644 --- a/tests/prepare_mwrap_indices.py +++ b/tests/prepare_mwrap_indices.py @@ -17,7 +17,7 @@ def main(): root = Path(__file__).resolve().parents[1] namespaces = {name: [] for name in ("compat", "mcpplibs.mwrap")} for source in sorted((root / "pkgs").glob("*/*.lua")): - match = re.search(r'^\s*namespace\s*=\s*[\'"]([^\'"]+)[\'"]', source.read_text(), re.M) + match = re.search(r'^\s*namespace\s*=\s*[\'"]([^\'"]+)[\'"]', source.read_text(encoding="utf-8"), re.M) if match and match[1] in namespaces: namespaces[match[1]].append(source) for namespace, sources in namespaces.items(): From 8d0f3cb90b8184397e4d9b8eee0a3b1a49e28aa4 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 07:05:08 +0900 Subject: [PATCH 08/47] fix: deploy ORT notices and verify relocated inference bundles --- .github/workflows/validate.yml | 4 +- pkgs/c/compat.onnxruntime.lua | 12 ++++++ tests/mwrap/check_installed_template.py | 57 +++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a5a7c13b..4d36f79c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1518,10 +1518,10 @@ jobs: run: | "$MCPP" index update - - name: Installed mwrap archive and actual project template + - name: Installed mwrap archive, project template and relocated deployment if: contains(format(' {0} ', env.MEMBERS), ' onnxruntime-cpu ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --deploy - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash diff --git a/pkgs/c/compat.onnxruntime.lua b/pkgs/c/compat.onnxruntime.lua index bbb9ff7e..a86483af 100644 --- a/pkgs/c/compat.onnxruntime.lua +++ b/pkgs/c/compat.onnxruntime.lua @@ -50,16 +50,28 @@ static_assert(ORT_API_VERSION == 25, "ONNX Runtime SDK headers must match 1.25.1 #endif ]=] }, linux = { runtime = { + deploy = { + { from = "onnxruntime-linux-x64-1.25.1/LICENSE", to = "licenses/onnxruntime" }, + { from = "onnxruntime-linux-x64-1.25.1/ThirdPartyNotices.txt", to = "licenses/onnxruntime" }, + }, libraries = { "onnxruntime", "stdc++" }, link_library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, } }, macosx = { runtime = { + deploy = { + { from = "onnxruntime-osx-arm64-1.25.1/LICENSE", to = "licenses/onnxruntime" }, + { from = "onnxruntime-osx-arm64-1.25.1/ThirdPartyNotices.txt", to = "licenses/onnxruntime" }, + }, libraries = { "onnxruntime" }, link_library_dirs = { "onnxruntime-osx-arm64-1.25.1/lib" }, library_dirs = { "onnxruntime-osx-arm64-1.25.1/lib" }, } }, windows = { runtime = { + deploy = { + { from = "onnxruntime-win-x64-1.25.1/LICENSE", to = "licenses/onnxruntime" }, + { from = "onnxruntime-win-x64-1.25.1/ThirdPartyNotices.txt", to = "licenses/onnxruntime" }, + }, libraries = { "onnxruntime" }, link_library_dirs = { "onnxruntime-win-x64-1.25.1/lib" }, library_dirs = { "onnxruntime-win-x64-1.25.1/lib" }, diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index f2ee9d5a..1382f2ab 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -1,10 +1,13 @@ #!/usr/bin/env python3 """Install real archives from the unchanged candidate index and run a template.""" import argparse +import hashlib +import json import os from pathlib import Path import shutil import subprocess +import sys import tempfile import tomllib @@ -14,6 +17,7 @@ def main(): parser.add_argument("--mcpp", default="mcpp") parser.add_argument("--toolchain", default="llvm@23.1.3") parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") + parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify SDK notices") args = parser.parse_args() root = Path(__file__).resolve().parents[2] identity, version = args.package.rsplit("@", 1) @@ -45,6 +49,59 @@ def main(): print("+", " ".join(command), flush=True) subprocess.run(command, cwd=project, env=env, check=True) print("Verified real indexed archive installation and unmodified template consumer", flush=True) + if args.deploy: + mode = "self-contained" if sys.platform.startswith("linux") else "vendored" + command = [args.mcpp, "pack", "--toolchain", args.toolchain, "--mode", mode, + "--format", "dir", "--output", "deployment-audit"] + print("+", " ".join(command), flush=True) + subprocess.run(command, cwd=project, env=env, check=True) + bundle = project / "target/dist/deployment-audit" + relocated = temporary / "relocated/bundle" + shutil.copytree(bundle, relocated, symlinks=True) + notices = list(relocated.rglob("licenses/onnxruntime/ThirdPartyNotices.txt")) + assert len(notices) == 1 and notices[0].stat().st_size, notices + installed = [] + for entry in json.loads((project / "compile_commands.json").read_text(encoding="utf-8")): + arguments = entry["arguments"] + for number, argument in enumerate(arguments): + directory = (arguments[number + 1] if argument in ("-I", "/I") else + argument[2:] if argument.startswith(("-I", "/I")) else "") + include = Path(directory) + if directory and (include / "onnxruntime_c_api.h").is_file(): + installed.append(include.parent / "ThirdPartyNotices.txt") + expected = hashlib.sha256(notices[0].read_bytes()).hexdigest() + assert any(p.is_file() and hashlib.sha256(p.read_bytes()).hexdigest() == expected + for p in installed), installed + runtime_env = {key: value for key, value in os.environ.items() + if key not in {"MCPP_HOME", "XLINGS_HOME", "LD_LIBRARY_PATH", "LD_PRELOAD", + "DYLD_LIBRARY_PATH", "DYLD_FALLBACK_LIBRARY_PATH"}} + empty_home = temporary / "empty-home" + empty_home.mkdir() + runtime_env.update(HOME=str(empty_home), USERPROFILE=str(empty_home)) + if sys.platform.startswith("linux"): + runtime_env["PATH"] = "/usr/bin:/bin" + launcher = relocated / "run.sh" + else: + filename = "installed-quickstart" + (".exe" if os.name == "nt" else "") + launcher = relocated / "bin" / filename + if not launcher.exists(): + launcher = relocated / filename + if os.name == "nt": + system_root = os.environ.get("SystemRoot", r"C:\Windows") + runtime_env["PATH"] = os.pathsep.join([system_root, str(Path(system_root) / "System32")]) + subprocess.run([str(launcher)], cwd=empty_home, env=runtime_env, check=True) + if sys.platform.startswith("linux"): + loader = relocated / "lib/ld-linux-x86-64.so.2" + listing = subprocess.run([str(loader), "--library-path", str(relocated / "lib"), + "--list", str(relocated / "bin/installed-quickstart")], + cwd=empty_home, env=runtime_env, text=True, capture_output=True, check=True) + for line in listing.stdout.splitlines(): + if "=>" not in line: + continue + resolved = line.split("=>", 1)[1].strip().split(" ", 1)[0] + if resolved.startswith("/"): + assert Path(resolved).resolve().is_relative_to(relocated.resolve()), line + print("Verified relocated inference bundle and byte-identical SDK notices", flush=True) if __name__ == "__main__": From 7d8b3ffe99bcbc76e69b244eac39326d96254a36 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 07:07:38 +0900 Subject: [PATCH 09/47] fix: declare the relocatable macOS ORT loader search path --- pkgs/c/compat.onnxruntime.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/c/compat.onnxruntime.lua b/pkgs/c/compat.onnxruntime.lua index a86483af..a6f4cd67 100644 --- a/pkgs/c/compat.onnxruntime.lua +++ b/pkgs/c/compat.onnxruntime.lua @@ -58,7 +58,10 @@ static_assert(ORT_API_VERSION == 25, "ONNX Runtime SDK headers must match 1.25.1 link_library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, library_dirs = { "onnxruntime-linux-x64-1.25.1/lib" }, } }, - macosx = { runtime = { + -- The SDK install name is @rpath/libonnxruntime.1.25.1.dylib. + -- Consumers must also search beside their executable so pack can + -- place the dylib there and the relocated program can load it. + macosx = { ldflags = { "-Wl,-rpath,@loader_path" }, runtime = { deploy = { { from = "onnxruntime-osx-arm64-1.25.1/LICENSE", to = "licenses/onnxruntime" }, { from = "onnxruntime-osx-arm64-1.25.1/ThirdPartyNotices.txt", to = "licenses/onnxruntime" }, From 4018413f17742a038a6386751039f86f9d9495b8 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 07:41:54 +0900 Subject: [PATCH 10/47] feat: index runnable llama CPU templates and validate the latest mcpp release --- .../skills/add-mcpp-index-package/SKILL.md | 4 +++ .github/workflows/openkal-compat.yml | 2 +- .github/workflows/validate.yml | 7 +++- .github/workflows/xpkgindex-update.yml | 2 +- docs/mwrap.md | 4 +++ docs/zh/mwrap.md | 5 ++- index.toml | 2 +- mcpp.toml | 1 + pkgs/g/ggml-org.llamacpp.lua | 18 ++++++++++ pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua | 12 +++---- tests/mwrap/check_installed_template.py | 28 +++++++++++++-- tests/mwrap/llamacpp-cpu/mcpp.toml | 10 ++++++ tests/mwrap/llamacpp-cpu/tests/api.cpp | 35 +++++++++++++++++++ 13 files changed, 116 insertions(+), 14 deletions(-) create mode 100644 tests/mwrap/llamacpp-cpu/mcpp.toml create mode 100644 tests/mwrap/llamacpp-cpu/tests/api.cpp diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 44dbf2ee..0b2dad03 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -118,6 +118,10 @@ capability 选择不会自动移除别的 provider 对象,不能用它掩盖 须验证启用后的真实行为,以及不启用时不编译/获取可选依赖。只看到符号常量或配置名称不证明后端可用。 Linux 本地执行;Windows/macOS 用原生 CI,缺少真实设备时明确报告 build-only/未执行项。 +共享 SDK 还须验收 `mcpp pack` 后的搬迁运行与运行库闭包;显式通过 `runtime.deploy` 部署 +LICENSE 和 ThirdPartyNotices 等通知,并与解析到的 SDK 原文件逐字节比较。 +不能把安装目录中的运行成功当作可分发包已验收,也不能靠修改 mcpp 引擎绕过库的部署声明。 + 每个新建或重构的 -m 库至少提供一个默认 mcpp 快捷模板。实际执行 `mcpp new --template <完整包身份>@<版本>`, 再 build/run 生成工程。当前 `{{self.name}}` 是完整包选择器,应写 `"{{self.name}}"` 为单个依赖 key, 不能再放到另一层 namespace 表中;版本用 self.version,所需 feature 显式声明。 diff --git a/.github/workflows/openkal-compat.yml b/.github/workflows/openkal-compat.yml index c9b9de84..ca077376 100644 --- a/.github/workflows/openkal-compat.yml +++ b/.github/workflows/openkal-compat.yml @@ -42,7 +42,7 @@ env: # run if this drifts from pins.toml. See the comment beside `mcpp` in # pins.toml for why this pin, not just validate.yml's, is gated by the # index floor. - MCPP_VERSION: "2026.10.21.1" + MCPP_VERSION: "2026.10.24.1" # CROSS-VALIDATION BEFORE A RELEASE, NOT AFTER IT. # # Empty in an ordinary run, so this measurement keeps using the RELEASED diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4d36f79c..a68ea4d6 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -431,7 +431,7 @@ env: # one module map of what it reaches; every unit of an ELF target is compiled # position-independent; `mcpp pack` states its build; `[build] jobs` bounds # `test` and `pack` (#751, #753). - MCPP_VERSION: "2026.10.21.1" + MCPP_VERSION: "2026.10.24.1" jobs: lint: @@ -1523,6 +1523,11 @@ jobs: shell: bash run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --deploy + - name: Installed llama.cpp-m archive and actual CPU project template + if: contains(format(' {0} ', env.MEMBERS), ' llamacpp-cpu ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ggml-org.llamacpp@b10069.3 --legacy-exact-key + - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash run: | diff --git a/.github/workflows/xpkgindex-update.yml b/.github/workflows/xpkgindex-update.yml index 9b6aaeef..33bd380b 100644 --- a/.github/workflows/xpkgindex-update.yml +++ b/.github/workflows/xpkgindex-update.yml @@ -25,7 +25,7 @@ concurrency: env: PYTHONUTF8: '1' - MCPP_VERSION: '2026.10.21.1' + MCPP_VERSION: '2026.10.24.1' MCPP_INDEX_MIRROR: GLOBAL jobs: diff --git a/docs/mwrap.md b/docs/mwrap.md index c750fbf4..4a14f62e 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -150,6 +150,10 @@ Run Linux tests locally and repeat release gates in CI; cover Windows/macOS in native CI. Distinguish build-only checks from executed GUI, provider and hardware tests. Validate cold index consumption and runtime deployment, including libraries loaded dynamically rather than appearing on a link line. +When a runtime SDK ships LICENSE and third-party notices, declare their deployment +alongside the runtime files. Verify those bytes in a relocated consumer bundle; +automatic license discovery may copy LICENSE while omitting additional notices. +Use `runtime.deploy` for explicit relative destinations without changing the engine. Each repository's PR retains checkpoint commits. Record commands and actual results, inspect the final dependency/ABI/API graph, and wait for every relevant diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index e7df4bf3..86222c99 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -102,7 +102,10 @@ mcpp new viewer --template mcpplibs.mwrap.opencv@5.0.0:window 使用最新已测试稳定 mcpp,在清单、CI、模板与例子中精确固定。核查源码前更新 remote main。 Linux 本地执行,CI 重跑发布门槛;Windows/macOS 原生 CI。区分编译验证与实际 GUI/设备/GPU 运行, -覆盖冷索引消费和动态加载库的运行时分发。每仓库一个 PR,保留 checkpoint commits; +覆盖冷索引消费和动态加载库的运行时分发。SDK 附带 LICENSE 与第三方通知时,通过 +`runtime.deploy` 显式声明它们的相对部署位置,并在搬迁后的消费方分发包中校验字节; +自动许可证收集可能只复制 LICENSE 而遗漏其他通知,无需为此修改引擎。 +每仓库一个 PR,保留 checkpoint commits; 逐项核查最终 API/ABI/依赖图,并等待相关 CI 全通过后报告合入与发布就绪。 ## 候选索引的跨 namespace 测试 diff --git a/index.toml b/index.toml index c121b4f7..d107789e 100644 --- a/index.toml +++ b/index.toml @@ -177,4 +177,4 @@ [index] spec = "1" min_mcpp = "2026.9.18.3" -latest_mcpp = "2026.10.21.1" +latest_mcpp = "2026.10.24.1" diff --git a/mcpp.toml b/mcpp.toml index f52e16a6..53d483c8 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -11,6 +11,7 @@ mcpp = ">=2026.10.21.1" [workspace] members = [ "tests/mwrap/onnxruntime-cpu", + "tests/mwrap/llamacpp-cpu", "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", diff --git a/pkgs/g/ggml-org.llamacpp.lua b/pkgs/g/ggml-org.llamacpp.lua index a7c82f7a..c09f3b81 100644 --- a/pkgs/g/ggml-org.llamacpp.lua +++ b/pkgs/g/ggml-org.llamacpp.lua @@ -67,6 +67,12 @@ package = { -- consumer wanting a feature must be able to name the revision that -- has it, and one that cannot use the newer engine must still find a -- revision it can build. + -- Candidate b10069.3 adds runnable templates; immutable source + -- bytes are verified before the release tag exists. + ["b10069.3"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/f5a046c332a0929281692a102c5819bc2d40f172.tar.gz", + sha256 = "543c19018aa05a7e6813f692a3535b6c5953842fdd70041e63266b5864435ddd", + }, ["b10069.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", @@ -87,6 +93,12 @@ package = { }, }, macosx = { + -- Candidate b10069.3 adds runnable templates; immutable source + -- bytes are verified before the release tag exists. + ["b10069.3"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/f5a046c332a0929281692a102c5819bc2d40f172.tar.gz", + sha256 = "543c19018aa05a7e6813f692a3535b6c5953842fdd70041e63266b5864435ddd", + }, ["b10069.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", @@ -107,6 +119,12 @@ package = { }, }, windows = { + -- Candidate b10069.3 adds runnable templates; immutable source + -- bytes are verified before the release tag exists. + ["b10069.3"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/f5a046c332a0929281692a102c5819bc2d40f172.tar.gz", + sha256 = "543c19018aa05a7e6813f692a3535b6c5953842fdd70041e63266b5864435ddd", + }, ["b10069.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", diff --git a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua index 51d4c2e0..693fe9ac 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/de3a0a9da143f4ae52eb5e1a0302ba3fdf623b6d.tar.gz", - sha256 = "24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/2c3495fb2f6a108404871aaee996b1b104635e0a.tar.gz", + sha256 = "26a89e349d3eb01e339d3c091ff0371ccc4401026f94698bef8e607ad27bc407", }, }, macosx = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/de3a0a9da143f4ae52eb5e1a0302ba3fdf623b6d.tar.gz", - sha256 = "24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/2c3495fb2f6a108404871aaee996b1b104635e0a.tar.gz", + sha256 = "26a89e349d3eb01e339d3c091ff0371ccc4401026f94698bef8e607ad27bc407", }, }, windows = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/de3a0a9da143f4ae52eb5e1a0302ba3fdf623b6d.tar.gz", - sha256 = "24d4bc26d2f426e3643f21d289d92e7a23b3ba54524a099a1079c1c490915251", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/2c3495fb2f6a108404871aaee996b1b104635e0a.tar.gz", + sha256 = "26a89e349d3eb01e339d3c091ff0371ccc4401026f94698bef8e607ad27bc407", }, }, }, diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 1382f2ab..cc072a19 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -18,6 +18,9 @@ def main(): parser.add_argument("--toolchain", default="llvm@23.1.3") parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify SDK notices") + parser.add_argument("--run-arg", action="append", default=[]) + parser.add_argument("--legacy-exact-key", action="store_true", + help="allow only mcpp's nonnumeric exact-version diagnostic; fail other build warnings") args = parser.parse_args() root = Path(__file__).resolve().parents[2] identity, version = args.package.rsplit("@", 1) @@ -44,10 +47,29 @@ def main(): assert actual_version == version, dependency if isinstance(dependency, dict): assert "path" not in dependency and "git" not in dependency, dependency - for command in ([args.mcpp, "build", "--strict", "--toolchain", args.toolchain], - [args.mcpp, "run", "--toolchain", args.toolchain]): + build = [args.mcpp, "build", "--toolchain", args.toolchain] + if not args.legacy_exact_key: + build.append("--strict") + else: + assert not version[0].isdigit(), "This exception is only for upstream nonnumeric release keys" + for command in (build, [args.mcpp, "run", "--toolchain", args.toolchain] + + (["--", *args.run_arg] if args.run_arg else [])): print("+", " ".join(command), flush=True) - subprocess.run(command, cwd=project, env=env, check=True) + if args.legacy_exact_key and command is build: + # This is a supported exact index key, not a numeric range. + # --strict promotes its planner warning to an error. Preserve + # that upstream identity, but reject every other warning, + # including module/ABI compatibility degradations. + result = subprocess.run(command, cwd=project, env=env, text=True, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + print(result.stdout, end="", flush=True) + result.check_returncode() + allowed = f"[dependencies] {identity} = '{version}' is not a version RANGE " + for line in result.stdout.splitlines(): + if "warning:" in line: + assert line.split("warning:", 1)[1].strip().startswith(allowed), line + else: + subprocess.run(command, cwd=project, env=env, check=True) print("Verified real indexed archive installation and unmodified template consumer", flush=True) if args.deploy: mode = "self-contained" if sys.platform.startswith("linux") else "vendored" diff --git a/tests/mwrap/llamacpp-cpu/mcpp.toml b/tests/mwrap/llamacpp-cpu/mcpp.toml new file mode 100644 index 00000000..320539b2 --- /dev/null +++ b/tests/mwrap/llamacpp-cpu/mcpp.toml @@ -0,0 +1,10 @@ +[package] +name = "llamacpp-cpu" +version = "b10069.3" +description = "Install the immutable llama.cpp-m archive and exercise the CPU API" + +[indices] +ggml-org = { path = "../../.." } + +[dependencies.ggml-org] +llamacpp = "b10069.3" diff --git a/tests/mwrap/llamacpp-cpu/tests/api.cpp b/tests/mwrap/llamacpp-cpu/tests/api.cpp new file mode 100644 index 00000000..074b1f5a --- /dev/null +++ b/tests/mwrap/llamacpp-cpu/tests/api.cpp @@ -0,0 +1,35 @@ +import std; +import llamacpp; + +int main() { + static_assert(LLAMA_DEFAULT_SEED == 0xFFFFFFFFu); + static_assert(LLAMA_TOKEN_NULL == llama_token{-1}); + + llama_backend_init(); + + const auto model_params = llama_model_default_params(); + const bool gpu_offload_available = llama_supports_gpu_offload(); + llama_sampler * chain = llama_sampler_chain_init( + llama_sampler_chain_default_params() + ); + llama_sampler * greedy = llama_sampler_init_greedy(); + + if (!chain || !greedy) { + if (chain) { + llama_sampler_free(chain); + } else if (greedy) { + llama_sampler_free(greedy); + } + llama_backend_free(); + return 1; + } + + llama_sampler_chain_add(chain, greedy); + llama_sampler_free(chain); + llama_backend_free(); + + std::cout << "gpu_offload_available=" << gpu_offload_available + << " default_gpu_layers=" << model_params.n_gpu_layers << '\n' + << "LLAMACPP_MWRAP_CPU_INDEX_TEST=PASS\n"; + return 0; +} From 11dde87f6e7fde4ad10906540d75ade269f7ae70 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 07:45:33 +0900 Subject: [PATCH 11/47] fix: align the OpenKAL measurement client pin with CI --- tests/openkal/pins.toml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/openkal/pins.toml b/tests/openkal/pins.toml index f8f8f0b2..797e9c37 100644 --- a/tests/openkal/pins.toml +++ b/tests/openkal/pins.toml @@ -6,10 +6,10 @@ # version names the whole graph. runtime = "0.15.2" toolchain = "llvm@22.1.8" -# `mcpp` here moves together with index.toml's `min_mcpp` and -# .github/workflows/openkal-compat.yml's own MCPP_VERSION (that workflow -# checks the two agree, and fails loudly if they do not) -- not because this -# is the same pin as validate.yml's, but because compat.py's `prepare()` +# `mcpp` here must match .github/workflows/openkal-compat.yml's MCPP_VERSION +# (the workflow checks equality), and must satisfy index.toml's min_mcpp. +# Advancing the test engine does not itself raise that client floor. +# The floor still matters because compat.py's `prepare()` # opens THIS repository as a live index (`[indices] compat = { path = ... }`) # to measure against uncommitted descriptor changes, so index.toml's # min_mcpp gates this measurement exactly as it gates every other client. @@ -18,6 +18,9 @@ toolchain = "llvm@22.1.8" # index requires mcpp >= 2026.9.18.1 but this is mcpp 2026.9.17.3 [E0006]" # before a single line of the member's own source is read. # +# 2026-10-24: measurement engine updated to 2026.10.24.1; runtime and +# toolchain pins below remain unchanged. The index client floor is unchanged. +# # 2026-09-26 (fourth move): `runtime` -> 0.15.2 and `mcpp` -> 2026.10.21.1, # AND THE GRAPH'S OWN LINUX TARGETS JOIN THE MEASUREMENT. # @@ -136,7 +139,7 @@ toolchain = "llvm@22.1.8" # openkal-musl 0.16.0 and openkal-llvm-runtime 0.12.0), because a pin that # moves onto an unreachable or divergent asset fails every member at once and # reports it as a compatibility result. -mcpp = "2026.10.21.1" +mcpp = "2026.10.24.1" # The Windows target is named for the C environment the graph presents there, # which is musl's (openkal-musl declares `[c-abi] presents = "posix"`), not From f0f8e48c396dad2ac67315f2ac54a197772e6555 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 08:25:48 +0900 Subject: [PATCH 12/47] test: validate current llama CPU and Metal consumers against revision 3 --- tests/examples/llamacpp-metal/mcpp.toml | 2 +- tests/examples/llamacpp/mcpp.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/examples/llamacpp-metal/mcpp.toml b/tests/examples/llamacpp-metal/mcpp.toml index 4a34299d..e85c2f90 100644 --- a/tests/examples/llamacpp-metal/mcpp.toml +++ b/tests/examples/llamacpp-metal/mcpp.toml @@ -7,4 +7,4 @@ name = "llamacpp-metal-tests" version = "0.1.0" [target.'cfg(macos)'.dependencies.ggml-org] -llamacpp = { version = "b10069.2", features = ["backend-metal"] } +llamacpp = { version = "b10069.3", features = ["backend-metal"] } diff --git a/tests/examples/llamacpp/mcpp.toml b/tests/examples/llamacpp/mcpp.toml index b5e9e0cb..12e0758d 100644 --- a/tests/examples/llamacpp/mcpp.toml +++ b/tests/examples/llamacpp/mcpp.toml @@ -7,10 +7,10 @@ name = "llamacpp-tests" version = "0.1.0" [target.'cfg(linux)'.dependencies.ggml-org] -llamacpp = "b10069.2" +llamacpp = "b10069.3" [target.'cfg(macos)'.dependencies.ggml-org] -llamacpp = "b10069.2" +llamacpp = "b10069.3" [target.'cfg(windows)'.dependencies.ggml-org] -llamacpp = "b10069.2" +llamacpp = "b10069.3" From b22a9a8a436beabffe92982da7c08266476042a6 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 10:34:30 +0900 Subject: [PATCH 13/47] feat: index runnable legacy wrapper revisions and enforce mwrap repository norms --- .../docs/2026-10-24-add-mwrap-and-ort-plan.md | 19 +++++++++ .../skills/add-mcpp-index-package/SKILL.md | 14 +++++++ .github/workflows/validate.yml | 42 +++++++++++++++++++ docs/mwrap.md | 31 ++++++++++++++ docs/zh/mwrap.md | 23 ++++++++++ mcpp.toml | 3 ++ pkgs/f/ffmpeg.ffmpeg.lua | 21 ++++++++++ pkgs/g/ggml-org.llamacpp.lua | 12 +++--- pkgs/g/grpc-plugin.lua | 22 ++++++++++ pkgs/g/grpc.lua | 17 ++++++++ pkgs/g/grpcgen.lua | 22 ++++++++++ pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua | 12 +++--- pkgs/o/ocornut.imgui.lua | 22 ++++++++++ tests/mwrap/ffmpeg-cpu/mcpp.toml | 10 +++++ tests/mwrap/ffmpeg-cpu/tests/behavior.cpp | 32 ++++++++++++++ tests/mwrap/grpc-cpu/mcpp.toml | 13 ++++++ tests/mwrap/grpc-cpu/tests/behavior.cpp | 13 ++++++ tests/mwrap/imgui-headless/mcpp.toml | 10 +++++ tests/mwrap/imgui-headless/tests/behavior.cpp | 28 +++++++++++++ 19 files changed, 354 insertions(+), 12 deletions(-) create mode 100644 tests/mwrap/ffmpeg-cpu/mcpp.toml create mode 100644 tests/mwrap/ffmpeg-cpu/tests/behavior.cpp create mode 100644 tests/mwrap/grpc-cpu/mcpp.toml create mode 100644 tests/mwrap/grpc-cpu/tests/behavior.cpp create mode 100644 tests/mwrap/imgui-headless/mcpp.toml create mode 100644 tests/mwrap/imgui-headless/tests/behavior.cpp diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index c7ac79f2..db7f59a1 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -17,3 +17,22 @@ The real wrapper archive de3a0a9 was downloaded twice and pinned as SHA256 24d4b The unchanged full-index installed-template flow passed in a fresh home: real wrapper/SDK archives and LLVM were installed, mcpp new rendered the default inference project, and its original dependency resolved and ran Identity inference. The updater audit now implements the documented immutable-commit exception rather than demanding a fake release template. All 14 updater adapter tests and the full real audit passed (85 automatic declarations, one manual snapshot), retaining historical-byte guards. Candidate selection/preparation also recognizes tests/mwrap and fully qualified dependency keys. Cross-platform CI correction: namespace-view metadata is explicitly decoded as UTF-8 on Windows. The ecosystem Vulkan check also exposed two header/runtime adapter anchors defaulting to static while reachable from several shared images; their providers now default to shared form, with explicit packaging revision 1 on current entries and unchanged source URLs/hashes. The consumer can still choose linkage. Llama Vulkan CI pins this candidate index commit rather than requiring the PR to merge first. + +## Existing-wrapper template archive checkpoint + +- All six -m repositories now use concise root READMEs (normally <=100 lines per language), with detailed usage under docs/. The bilingual mwrap spec and authoring skill record the shared structure and the local aggregate resource limit. +- Added immutable candidate versions for FFmpeg 8.1.2.1, ImGui 1.92.8.1 and gRPC/runtime-plugin-rule 1.83.0.1. Published older version blocks are unchanged. Existing package/module identities remain compatible. ImGui and gRPC now declare tag-based automatic update URLs; coupled gRPC manifests are still version-checked by source CI. +- CPU/headless workspace consumers live in tests/mwrap/{ffmpeg-cpu,imgui-headless,grpc-cpu}/tests, so mcpp test executes their behavior checks rather than merely building an application. Windows gRPC explicitly remains unavailable with the declared OpenSSL provider. +- Each candidate's full-commit archive was downloaded twice with identical SHA256. Updated the unpublished ORT/llama candidates to include the reviewed README revisions. Archive references at this checkpoint: + +- onnxruntime-m: `576c780bfcbd792c7f4194942c90324f183a48aa`, SHA256 `3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1`. +- llama.cpp-m: `5028a1aa4f741db4dbd86d6ebd1928ef21027147`, SHA256 `9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de`. +- imgui-m: `ffebf83be99ba0eec2677cc197dea3316a72b501`, SHA256 `9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f`. +- grpc-m: `839b61e94fff14892a1dfb2c211a4a8e66342239`, SHA256 `b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4`. +- ffmpeg-m: `1e8bce6ee12c50e43058245df42515ffbabfc78f`, SHA256 `595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2`. + +Local evidence: OpenCV LLVM/GCC all-module strict tests each pass fourteen binaries; the GCC ORT adapter fix also passes actual CPU-profile inference. FFmpeg's managed-NASM default template strictly builds and decodes three generated frames. The full index audit covers 90 automatic declarations plus one manual snapshot and preserves all historical version blocks; fourteen updater regressions and changed-descriptor all-platform grammar/name/syntax checks pass. + +The new complete-index ImGui archive/template check is running in a fresh MCPP_HOME. Final fresh-archive checks for changed source revisions, the new workspace test entries and native CI are not yet complete. gRPC's cold installed-template check has its own Linux/macOS jobs with a 210-minute limit; it does not consume a workspace shard's existing 90-minute allowance. No release readiness is inferred from source CI or archive checksums alone. + +Local heavy commands run serially in mwrap-tests.slice with CPUQuota=1600%, MemoryHigh=28 GiB, MemoryMax=32 GiB, TasksMax=512, taskset 0-15 and MCPP_JOBS=6 on this 32-logical-CPU/62-GiB host. Check current available resources and disk before each check; retain at least 6 GiB free during builds. No engine change, merge or tag is included. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 0b2dad03..1d512247 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -104,6 +104,20 @@ description: Use when adding a new third-party library/package to the mcpp-index 用户明确要求整理文档或说明确有变化时才改入口文档。新增包通常也不改 `.xpkgindex.json`。 - 详细字段、例外和认证机制见 [自动更新文档](../../../docs/zh/automatic-updates.md)。 +## -m 仓库 README + +新增或重构 `<库名>-m` 时,README 使用统一简洁风格,原则上每种语言不超过 100 行。 +顺序为一句定位、快捷模板、依赖与最小 import 用法、关键平台/能力边界、详细文档与许可证链接。 +架构、完整矩阵、后端细节、排错与验证历史进入 docs/;不向 README 追加 checkpoint、长表格或徽章墙。 +保留候选版本状态、必要 SDK/设备前提与关键限制,不靠超长行压缩,不为此增加用户审批。 +检查行数、示例身份/版本和文档链接;已有翻译保持结构对应。完整规则见 docs/zh/mwrap.md。 + +## 本地测试资源 + +所有本地测试及子进程合计不得超过本机有效 CPU/内存的 80%,默认预留更多余量。 +先检查负载,限制构建并发和重型任务数量;使用 MCPP_JOBS,必要时用共享 cgroup/slice 约束整个进程树。 +不能为各并发任务分别分配 80%;接近上限时减少本任务并发,不停止用户其他进程,不跳过验证。 + ## feature 与模板 当前 manifest feature 支持 sources、defines、flags、implies、forward、requires/provides;可选依赖写在 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a68ea4d6..951ebc79 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1221,6 +1221,38 @@ jobs: "$MCPP" self config --mirror GLOBAL 2>/dev/null || true bash tests/check_graphics_install_side_effects.sh + grpc-installed-template: + name: installed gRPC template (${{ matrix.platform }}) + needs: select + if: needs.select.outputs.members == '__ALL__' || contains(format(' {0} ', needs.select.outputs.members), ' grpc-cpu ') + runs-on: ${{ matrix.os }} + # A fresh SDK + protoc/plugin + gRPC build is independent of the timed + # workspace shards. It must not consume their shared 90-minute allowance. + timeout-minutes: 210 + strategy: + fail-fast: false + matrix: + include: + - platform: linux + os: ubuntu-latest + suffix: linux-x86_64 + toolchain: gcc@16.1.0 + - platform: macos + os: macos-15 + suffix: macosx-arm64 + toolchain: llvm@23.1.3 + steps: + - uses: actions/checkout@v4 + - name: Install pinned mcpp + shell: bash + run: | + archive="mcpp-${MCPP_VERSION}-${{ matrix.suffix }}.tar.gz" + curl -L -fsS -o "$archive" "https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/$archive" + tar -xzf "$archive" + echo "MCPP=$PWD/mcpp-${MCPP_VERSION}-${{ matrix.suffix }}/bin/mcpp" >> "$GITHUB_ENV" + - name: Immutable archive, default scaffold, strict build and loopback RPC + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package grpc.grpc@1.83.0.1 --toolchain "${{ matrix.toolchain }}" + workspace: # The shard suffix appears only when the platform is actually split, and # the toolchain only when it is not mcpp's default — so the existing job @@ -1528,6 +1560,16 @@ jobs: shell: bash run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ggml-org.llamacpp@b10069.3 --legacy-exact-key + - name: Installed FFmpeg wrapper archive and actual default project template + if: contains(format(' {0} ', env.MEMBERS), ' ffmpeg-cpu ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ffmpeg.ffmpeg@8.1.2.1 + + - name: Installed ImGui wrapper archive and actual headless default template + if: contains(format(' {0} ', env.MEMBERS), ' imgui-headless ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ocornut.imgui@1.92.8.1 + - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash run: | diff --git a/docs/mwrap.md b/docs/mwrap.md index 4a14f62e..5ccc3725 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -108,6 +108,24 @@ Capabilities select and validate providers; they do **not** remove another provider's object files from the link. Avoid duplicate implementations before they enter the graph. Record ABI, runtime, CPU baseline and SDK constraints. +## README style + +Every `-m` repository uses a consistent, concise entry page, normally +**no more than 100 lines**. Existing translations follow the same structure and +length target and stay aligned. + +Use this order: project name and one-sentence purpose; quickstart template; +existing-project dependency and minimal import example; essential capability and +platform boundaries; links to detailed docs, examples and the license. Show full +package identities and directly runnable commands first. + +Move architecture, complete feature/API matrices, backend setup, troubleshooting, +validation evidence and history into `docs/`. Avoid badge walls, repeated +navigation, large tables, implementation essays and appended checkpoint logs. +Do not meet the target with excessively long lines or by removing prerequisites. +State unpublished-candidate status and important device/SDK requirements briefly. +The line target is an editorial guideline, not an additional user approval gate. + ## Every -m package ships a runnable template At least one default `templates//template.toml` and project skeleton is @@ -135,6 +153,19 @@ project. A source candidate may use an isolated preseeded installed-package fixture, but must verify the rendered identity/version before applying local dependency overrides. Also test the release archive includes the templates. +## Local test resource budget + +Local tests must collectively stay below **80%** of the machine's effective CPU +and memory resources, accounting for affinity and container/cgroup limits. +Reserve additional desktop headroom by default. This covers concurrent tests, +dependency builds, code generation, compilers and AST subprocesses together. + +Check load and available memory before heavy work, limit build jobs and concurrent +heavy tasks, and monitor usage. A task-specific cgroup/systemd slice can enforce +aggregate limits on Linux; MCPP_JOBS controls build concurrency. Reduce this +task's concurrency near the budget, without stopping unrelated user processes +or dropping validation gates. + ## Index and verification Descriptors live directly in `pkgs/mwrap/.lua`; consumers live in diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index 86222c99..18d9956a 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -72,6 +72,19 @@ feature 为加法并集,通过 implies、依赖转发、feature-deps 与 targe capability 选择不会自动移除另一份实现对象文件,必须先防止重复运行库进入图。 记录 ABI、CPU baseline、C++ runtime 和 SDK 约束。 +## README 风格 + +所有 `<库名>-m` 仓库使用统一、简洁的入口风格,README 原则上不超过 **100 行**。 +已有多语言 README 各自遵守同一结构和长度目标,内容保持对应。 + +推荐顺序:项目名与一句定位 → 快捷模板 → 已有项目接入与最小 import 示例 → +关键能力/平台边界 → 详细文档、示例与许可证入口。快速开始优先展示完整包身份和可直接执行的命令。 + +只保留影响首次使用的必要信息;架构、完整 feature/API 矩阵、后端配置、排错、验证记录 +及版本历史放入 `docs/`,从 README 链接。避免徽章墙、重复导航、大表格、长篇实现解释、 +checkpoint 日志及“后面继续追加”的更新记录,也不要用超长行或删掉必要前提来凑行数。 +未发布候选、设备/SDK 前提和重要使用限制仍须简短说明;约 100 行是编辑目标,不新增用户审批环节。 + ## 每个 -m 包必须有可运行快捷模板 至少提供一个默认 templates/<名称>/template.toml 与项目骨架。默认模板不要求 GPU、摄像头、 @@ -94,6 +107,16 @@ mcpp new viewer --template mcpplibs.mwrap.opencv@5.0.0:window 测试必须执行实际 mcpp new 后 build/run;未发布候选可使用隔离的已安装包 fixture, 先确认渲染的身份与版本,再添加本地依赖覆盖。发布归档也必须携带模板。 +## 本地测试资源预算 + +本地测试合计 CPU 与内存占用不得超过本机有效资源的 **80%**;按物理资源、CPU affinity +与容器/cgroup 限额取实际可用值,默认预留更多桌面余量。上限覆盖全部并发测试及其依赖构建、 +代码生成、编译器和 AST 子进程,不能让每个任务各占 80%。 + +启动前检查负载与可用内存,限制构建并发和同时运行的重型任务;运行中监测资源。 +Linux 可使用任务专属 cgroup/systemd slice 设置 CPU/内存共享上限,并用 MCPP_JOBS 控制构建并发。 +接近预算时降低并发或等待本任务的构建结束,不停止用户的其他进程;资源限制不替代验证门槛。 + ## 索引与验收 描述符平铺于 pkgs/mwrap/<完整身份>.lua,消费者置于 tests/mwrap/<成员>/,不再增加字母子目录。 diff --git a/mcpp.toml b/mcpp.toml index 53d483c8..cbbed95d 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -12,6 +12,9 @@ mcpp = ">=2026.10.21.1" members = [ "tests/mwrap/onnxruntime-cpu", "tests/mwrap/llamacpp-cpu", + "tests/mwrap/ffmpeg-cpu", + "tests/mwrap/imgui-headless", + "tests/mwrap/grpc-cpu", "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", diff --git a/pkgs/f/ffmpeg.ffmpeg.lua b/pkgs/f/ffmpeg.ffmpeg.lua index cb1f31aa..a8ffb0d0 100644 --- a/pkgs/f/ffmpeg.ffmpeg.lua +++ b/pkgs/f/ffmpeg.ffmpeg.lua @@ -15,9 +15,20 @@ package = { licenses = {"MIT"}, repo = "https://github.com/mcpplibs/ffmpeg-m", type = "package", + extensions = { + autoupdate = { + tag = "v${version}", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/${tag}.tar.gz", + }, + }, xpm = { linux = { + -- Immutable candidate: wrapper/template revision; upstream SDK stays 8.1.2. + ["8.1.2.1"] = { + url = "https://github.com/mcpplibs/ffmpeg-m/archive/1e8bce6ee12c50e43058245df42515ffbabfc78f.tar.gz", + sha256 = "595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2", + }, ["8.1.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", @@ -27,6 +38,11 @@ package = { }, }, macosx = { + -- Immutable candidate: wrapper/template revision; upstream SDK stays 8.1.2. + ["8.1.2.1"] = { + url = "https://github.com/mcpplibs/ffmpeg-m/archive/1e8bce6ee12c50e43058245df42515ffbabfc78f.tar.gz", + sha256 = "595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2", + }, ["8.1.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", @@ -36,6 +52,11 @@ package = { }, }, windows = { + -- Immutable candidate: wrapper/template revision; upstream SDK stays 8.1.2. + ["8.1.2.1"] = { + url = "https://github.com/mcpplibs/ffmpeg-m/archive/1e8bce6ee12c50e43058245df42515ffbabfc78f.tar.gz", + sha256 = "595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2", + }, ["8.1.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", diff --git a/pkgs/g/ggml-org.llamacpp.lua b/pkgs/g/ggml-org.llamacpp.lua index c09f3b81..7b3c3775 100644 --- a/pkgs/g/ggml-org.llamacpp.lua +++ b/pkgs/g/ggml-org.llamacpp.lua @@ -70,8 +70,8 @@ package = { -- Candidate b10069.3 adds runnable templates; immutable source -- bytes are verified before the release tag exists. ["b10069.3"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/f5a046c332a0929281692a102c5819bc2d40f172.tar.gz", - sha256 = "543c19018aa05a7e6813f692a3535b6c5953842fdd70041e63266b5864435ddd", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/5028a1aa4f741db4dbd86d6ebd1928ef21027147.tar.gz", + sha256 = "9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de", }, ["b10069.2"] = { url = { @@ -96,8 +96,8 @@ package = { -- Candidate b10069.3 adds runnable templates; immutable source -- bytes are verified before the release tag exists. ["b10069.3"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/f5a046c332a0929281692a102c5819bc2d40f172.tar.gz", - sha256 = "543c19018aa05a7e6813f692a3535b6c5953842fdd70041e63266b5864435ddd", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/5028a1aa4f741db4dbd86d6ebd1928ef21027147.tar.gz", + sha256 = "9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de", }, ["b10069.2"] = { url = { @@ -122,8 +122,8 @@ package = { -- Candidate b10069.3 adds runnable templates; immutable source -- bytes are verified before the release tag exists. ["b10069.3"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/f5a046c332a0929281692a102c5819bc2d40f172.tar.gz", - sha256 = "543c19018aa05a7e6813f692a3535b6c5953842fdd70041e63266b5864435ddd", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/5028a1aa4f741db4dbd86d6ebd1928ef21027147.tar.gz", + sha256 = "9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de", }, ["b10069.2"] = { url = { diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index 7cc49c64..4e40633e 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -27,8 +27,20 @@ package = { repo = "https://github.com/mcpplibs/grpc-m", type = "package", + extensions = { + autoupdate = { + tag = "v${version}", + url = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/${tag}.tar.gz", + }, + }, + xpm = { linux = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", @@ -38,6 +50,11 @@ package = { }, }, macosx = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", @@ -47,6 +64,11 @@ package = { }, }, windows = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", diff --git a/pkgs/g/grpc.lua b/pkgs/g/grpc.lua index c33d7b9c..165a1404 100644 --- a/pkgs/g/grpc.lua +++ b/pkgs/g/grpc.lua @@ -55,8 +55,20 @@ package = { repo = "https://github.com/mcpplibs/grpc-m", type = "package", + extensions = { + autoupdate = { + tag = "v${version}", + url = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/${tag}.tar.gz", + }, + }, + xpm = { linux = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", @@ -66,6 +78,11 @@ package = { }, }, macosx = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index be94ded1..b8be840b 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -27,8 +27,20 @@ package = { repo = "https://github.com/mcpplibs/grpc-m", type = "package", + extensions = { + autoupdate = { + tag = "v${version}", + url = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/${tag}.tar.gz", + }, + }, + xpm = { linux = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", @@ -38,6 +50,11 @@ package = { }, }, macosx = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", @@ -47,6 +64,11 @@ package = { }, }, windows = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.83.0.1"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", + sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", diff --git a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua index 693fe9ac..b4b5c88b 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/2c3495fb2f6a108404871aaee996b1b104635e0a.tar.gz", - sha256 = "26a89e349d3eb01e339d3c091ff0371ccc4401026f94698bef8e607ad27bc407", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/576c780bfcbd792c7f4194942c90324f183a48aa.tar.gz", + sha256 = "3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1", }, }, macosx = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/2c3495fb2f6a108404871aaee996b1b104635e0a.tar.gz", - sha256 = "26a89e349d3eb01e339d3c091ff0371ccc4401026f94698bef8e607ad27bc407", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/576c780bfcbd792c7f4194942c90324f183a48aa.tar.gz", + sha256 = "3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1", }, }, windows = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/2c3495fb2f6a108404871aaee996b1b104635e0a.tar.gz", - sha256 = "26a89e349d3eb01e339d3c091ff0371ccc4401026f94698bef8e607ad27bc407", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/576c780bfcbd792c7f4194942c90324f183a48aa.tar.gz", + sha256 = "3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1", }, }, }, diff --git a/pkgs/o/ocornut.imgui.lua b/pkgs/o/ocornut.imgui.lua index 2156bfe0..feb05437 100644 --- a/pkgs/o/ocornut.imgui.lua +++ b/pkgs/o/ocornut.imgui.lua @@ -19,8 +19,20 @@ package = { repo = "https://github.com/mcpplibs/imgui-m", type = "package", + extensions = { + autoupdate = { + tag = "${version}", + url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/${tag}.tar.gz", + }, + }, + xpm = { linux = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.92.8.1"] = { + url = "https://github.com/mcpplibs/imgui-m/archive/ffebf83be99ba0eec2677cc197dea3316a72b501.tar.gz", + sha256 = "9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f", + }, ["1.92.8"] = { url = { GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", @@ -30,6 +42,11 @@ package = { }, }, macosx = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.92.8.1"] = { + url = "https://github.com/mcpplibs/imgui-m/archive/ffebf83be99ba0eec2677cc197dea3316a72b501.tar.gz", + sha256 = "9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f", + }, ["1.92.8"] = { url = { GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", @@ -39,6 +56,11 @@ package = { }, }, windows = { + -- Immutable candidate; published upstream versions remain unchanged. + ["1.92.8.1"] = { + url = "https://github.com/mcpplibs/imgui-m/archive/ffebf83be99ba0eec2677cc197dea3316a72b501.tar.gz", + sha256 = "9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f", + }, ["1.92.8"] = { url = { GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", diff --git a/tests/mwrap/ffmpeg-cpu/mcpp.toml b/tests/mwrap/ffmpeg-cpu/mcpp.toml new file mode 100644 index 00000000..a001508d --- /dev/null +++ b/tests/mwrap/ffmpeg-cpu/mcpp.toml @@ -0,0 +1,10 @@ +[package] +name = "ffmpeg-cpu" +version = "8.1.2.1" +description = "Consume the immutable FFmpeg wrapper revision and decode a real raw frame" + +[indices] +ffmpeg = { path = "../../.." } + +[dependencies] +"ffmpeg.ffmpeg" = "8.1.2.1" diff --git a/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp b/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp new file mode 100644 index 00000000..fbaf8adf --- /dev/null +++ b/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp @@ -0,0 +1,32 @@ +import std; +import ffmpeg.av; + +int main() { + if (std::string_view(av_version_info()) != "8.1.2") return 1; + const auto* codec = avcodec_find_decoder(AV_CODEC_ID_RAWVIDEO); + if (!codec) return 2; + struct Decoder { + AVCodecContext* context = nullptr; + AVPacket* packet = nullptr; + AVFrame* frame = nullptr; + ~Decoder() { av_frame_free(&frame); av_packet_free(&packet); avcodec_free_context(&context); } + } decoder; + decoder.context = avcodec_alloc_context3(codec); + decoder.packet = av_packet_alloc(); + decoder.frame = av_frame_alloc(); + if (!decoder.context || !decoder.packet || !decoder.frame) return 3; + decoder.context->width = 16; + decoder.context->height = 16; + decoder.context->pix_fmt = AV_PIX_FMT_YUV420P; + if (avcodec_open2(decoder.context, codec, nullptr) < 0) return 4; + if (av_new_packet(decoder.packet, 16 * 16 * 3 / 2) < 0) return 5; + std::fill_n(decoder.packet->data, 16 * 16, 64); + std::fill_n(decoder.packet->data + 16 * 16, 2 * 8 * 8, 128); + if (avcodec_send_packet(decoder.context, decoder.packet) < 0 || + avcodec_receive_frame(decoder.context, decoder.frame) < 0) return 6; + if (decoder.frame->width != 16 || decoder.frame->height != 16 || + decoder.frame->data[0][0] != 64 || decoder.frame->data[1][0] != 128 || + decoder.frame->data[2][0] != 128) return 7; + std::println("FFmpeg {} decoded a 16x16 YUV420 frame", av_version_info()); + return 0; +} diff --git a/tests/mwrap/grpc-cpu/mcpp.toml b/tests/mwrap/grpc-cpu/mcpp.toml new file mode 100644 index 00000000..885f3ac6 --- /dev/null +++ b/tests/mwrap/grpc-cpu/mcpp.toml @@ -0,0 +1,13 @@ +[package] +name = "grpc-cpu" +version = "1.83.0.1" +description = "Consume the immutable gRPC wrapper revision and check module status semantics" + +[indices] +grpc = { path = "../../.." } + +[target.'cfg(unix)'.dependencies] +"grpc.grpc" = "1.83.0.1" + +[target.'cfg(unix)'.build] +defines = ["MCPP_TEST_GRPC"] diff --git a/tests/mwrap/grpc-cpu/tests/behavior.cpp b/tests/mwrap/grpc-cpu/tests/behavior.cpp new file mode 100644 index 00000000..b8b93ef3 --- /dev/null +++ b/tests/mwrap/grpc-cpu/tests/behavior.cpp @@ -0,0 +1,13 @@ +#if defined(MCPP_TEST_GRPC) +import grpc; +int main() { + if (!grpc::Status::OK.ok()) return 1; + const grpc::Status error(grpc::StatusCode::INVALID_ARGUMENT, "indexed module"); + if (error.ok() || error.error_code() != grpc::StatusCode::INVALID_ARGUMENT || + error.error_message() != "indexed module") return 2; + auto credentials = grpc::InsecureChannelCredentials(); + return credentials ? 0 : 3; +} +#else +int main() { return 0; } // Windows: declared OpenSSL provider is unavailable. +#endif diff --git a/tests/mwrap/imgui-headless/mcpp.toml b/tests/mwrap/imgui-headless/mcpp.toml new file mode 100644 index 00000000..6b5311cb --- /dev/null +++ b/tests/mwrap/imgui-headless/mcpp.toml @@ -0,0 +1,10 @@ +[package] +name = "imgui-headless" +version = "1.92.8.1" +description = "Consume the immutable ImGui wrapper and render actual headless draw data" + +[indices] +ocornut = { path = "../../.." } + +[dependencies] +"ocornut.imgui" = "1.92.8.1" diff --git a/tests/mwrap/imgui-headless/tests/behavior.cpp b/tests/mwrap/imgui-headless/tests/behavior.cpp new file mode 100644 index 00000000..937ece7a --- /dev/null +++ b/tests/mwrap/imgui-headless/tests/behavior.cpp @@ -0,0 +1,28 @@ +import std; +import imgui.core; + +int main() { + struct Context { + ImGuiContext* value = ImGui::CreateContext(); + ~Context() { if (value) ImGui::DestroyContext(value); } + } context; + if (!context.value) return 1; + ImGui::SetCurrentContext(context.value); + auto& io = ImGui::GetIO(); + io.DisplaySize = ImVec2(320, 240); + unsigned char* pixels = nullptr; + int width = 0, height = 0; + io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); + if (!pixels || width <= 0 || height <= 0) return 2; + for (int frame = 0; frame < 3; ++frame) { + ImGui::NewFrame(); + ImGui::Begin("Indexed ImGui"); + ImGui::TextUnformatted("Hello from import imgui.core"); + ImGui::End(); + ImGui::Render(); + } + const auto* draw = ImGui::GetDrawData(); + if (!draw || draw->CmdListsCount <= 0 || draw->TotalVtxCount <= 0) return 3; + std::println("Dear ImGui {}: {} vertices generated without a window", ImGui::GetVersion(), draw->TotalVtxCount); + return 0; +} From ba9a72e5b91c319763b24139e43654ae11f75352 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 10:42:48 +0900 Subject: [PATCH 14/47] fix: validate target and host-tool wrapper consumers in candidate CI --- .../docs/2026-10-24-add-mwrap-and-ort-plan.md | 8 +++++ mcpp.toml | 1 + tests/autoupdate/ci.py | 28 +++++++++++----- tests/autoupdate/test_ci.py | 33 +++++++++++++++++++ tests/mwrap/grpc-tools/build.mcpp | 19 +++++++++++ tests/mwrap/grpc-tools/mcpp.toml | 14 ++++++++ tests/mwrap/grpc-tools/tests/host_binary.cpp | 10 ++++++ tests/prepare_mwrap_indices.py | 2 +- 8 files changed, 106 insertions(+), 9 deletions(-) create mode 100644 tests/mwrap/grpc-tools/build.mcpp create mode 100644 tests/mwrap/grpc-tools/mcpp.toml create mode 100644 tests/mwrap/grpc-tools/tests/host_binary.cpp diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index db7f59a1..541ab0c9 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -36,3 +36,11 @@ Local evidence: OpenCV LLVM/GCC all-module strict tests each pass fourteen binar The new complete-index ImGui archive/template check is running in a fresh MCPP_HOME. Final fresh-archive checks for changed source revisions, the new workspace test entries and native CI are not yet complete. gRPC's cold installed-template check has its own Linux/macOS jobs with a 210-minute limit; it does not consume a workspace shard's existing 90-minute allowance. No release readiness is inferred from source CI or archive checksums alone. Local heavy commands run serially in mwrap-tests.slice with CPUQuota=1600%, MemoryHigh=28 GiB, MemoryMax=32 GiB, TasksMax=512, taskset 0-15 and MCPP_JOBS=6 on this 32-logical-CPU/62-GiB host. Check current available resources and disk before each check; retain at least 6 GiB free during builds. No engine change, merge or tag is included. + +## Candidate scanner and host-tool consumer correction + +The b22a9a8 candidate scan stopped with `no candidate consumer: grpc:grpc-plugin`. Added a dedicated grpc-tools consumer for the indexed plugin and grpcgen host module; it resolves both exact 1.83.0.1 archives through separate unchanged namespace views, builds the host binary and verifies its path plus the rule's generation metadata. This is host-tool build/availability coverage, including planned native Windows checks, not a Windows runtime/codegen support claim. Actual service generation/RPC remains covered by the default gRPC templates on supported Linux/macOS targets. + +The scanner now finds normal and build dependencies inside target tables, and prefers dedicated tests/mwrap consumers over older platform-gated examples. Two regressions cover these boundaries, including build-dependency version replacement. All sixteen updater tests pass; an actual full candidate-matrix reproduction produces 23 build/run jobs and selects grpc-cpu, grpc-tools, imgui-headless, ffmpeg-cpu and llamacpp-cpu as intended. The full audit still preserves historical versions and reports 90 automatic descriptors plus one manual snapshot. + +Local strict actual index tests now pass all four new members: ffmpeg-cpu (real 16x16 frame), imgui-headless (positive draw vertices), grpc-cpu (status/credentials) and grpc-tools (built host plugin plus imported rule). A fresh complete-index ImGui archive/default-template installation also passes with positive draw data and no display. These results supplement the source/template CI; all new native matrix jobs remain required before release readiness. diff --git a/mcpp.toml b/mcpp.toml index cbbed95d..4b51e535 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -15,6 +15,7 @@ members = [ "tests/mwrap/ffmpeg-cpu", "tests/mwrap/imgui-headless", "tests/mwrap/grpc-cpu", + "tests/mwrap/grpc-tools", "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", diff --git a/tests/autoupdate/ci.py b/tests/autoupdate/ci.py index 2f1d472c..d6cbb6b5 100644 --- a/tests/autoupdate/ci.py +++ b/tests/autoupdate/ci.py @@ -114,17 +114,29 @@ def selection(base: str, output: Path): def direct_member(identity: str) -> str | None: namespace, name = identity.split(":", 1) candidates = [] + def dependency_tables(table): + for key, value in table.items(): + if not isinstance(value, dict): + continue + if key in {"dependencies", "build-dependencies"}: + yield value + else: + yield from dependency_tables(value) for category in ("examples", "mwrap"): for path in (ROOT / "tests" / category).glob("*/mcpp.toml"): - deps = tomllib.loads(path.read_text(encoding="utf-8")).get("dependencies", {}) - nested = deps - for part in namespace.split("."): - nested = nested.get(part, {}) if isinstance(nested, dict) else {} - if (f"{namespace}.{name}" in deps or name in deps.get(namespace, {}) or name in nested): - candidates.append(path.parent.name) + manifest = tomllib.loads(path.read_text(encoding="utf-8")) + for deps in dependency_tables(manifest): + nested = deps + for part in namespace.split("."): + nested = nested.get(part, {}) if isinstance(nested, dict) else {} + if (f"{namespace}.{name}" in deps or name in deps.get(namespace, {}) or name in nested): + candidates.append((category, path.parent.name)) + break if not candidates: return None - return min(candidates, key=lambda value: (len(value), value)) + # A wrapper's dedicated consumer covers its current declared platforms; + # old examples may intentionally be gated to just one OS or feature. + return min(candidates, key=lambda value: (value[0] != "mwrap", len(value[1]), value[1]))[1] def matrix(plan: Path, output: Path, base: str): @@ -185,7 +197,7 @@ def prepare(plan: Path, identity: str, output: Path): member = direct_member(identity) output.mkdir(parents=True, exist_ok=True) if member: - paths = [ROOT / "tests" / category / member for category in ("examples", "mwrap")] + paths = [ROOT / "tests" / category / member for category in ("mwrap", "examples")] source = next(path for path in paths if (path / "mcpp.toml").is_file()) shutil.copytree(source, output, dirs_exist_ok=True, ignore=shutil.ignore_patterns("target", ".mcpp", "mcpp.lock")) diff --git a/tests/autoupdate/test_ci.py b/tests/autoupdate/test_ci.py index a4ae4147..e4e3dfb9 100644 --- a/tests/autoupdate/test_ci.py +++ b/tests/autoupdate/test_ci.py @@ -75,6 +75,39 @@ def test_mwrap_candidate_uses_its_actual_member_and_qualified_dependency(self): self.assertEqual(result["dependencies"]["mcpplibs.mwrap.example"], "1.0.1") self.assertEqual((dest / "tests/probe.cpp").read_text(), 'int main() { return 0; }\n') + def test_candidate_discovers_target_and_build_dependencies(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + source = root / "tests/mwrap/tools" + source.mkdir(parents=True) + (source / "mcpp.toml").write_text( + '[package]\nname="tools"\nversion="0.1.0"\n' + '[target.\'cfg(unix)\'.dependencies.grpc]\ngrpc="1.83.0"\n' + '[build-dependencies]\n"mcpplibs.grpcgen"={version="1.83.0",host-module=true}\n') + with patch.object(ci, "ROOT", root): + self.assertEqual(ci.direct_member("grpc:grpc"), "tools") + self.assertEqual(ci.direct_member("mcpplibs:grpcgen"), "tools") + self.assertIsNone(ci.direct_member("grpc:grpc-plugin")) + plan = root / "plan.json" + plan.write_text(json.dumps({"packages": [ + {"id": "mcpplibs:grpcgen", "candidate": "1.83.0.1"}]})) + dest = root / "candidate" + ci.prepare(plan, "mcpplibs:grpcgen", dest) + result = tomllib.loads((dest / "mcpp.toml").read_text()) + self.assertEqual(result["build-dependencies"]["mcpplibs.grpcgen"]["version"], "1.83.0.1") + + def test_dedicated_mwrap_consumer_precedes_shorter_legacy_example(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + for category, name in (("examples", "old"), ("mwrap", "headless")): + source = root / "tests" / category / name + source.mkdir(parents=True) + (source / "mcpp.toml").write_text( + '[package]\nname="consumer"\nversion="0.1.0"\n' + '[dependencies]\n"ocornut.imgui"="1.92.8.1"\n') + with patch.object(ci, "ROOT", root): + self.assertEqual(ci.direct_member("ocornut:imgui"), "headless") + def test_added_descriptor_and_removed_historical_descriptor(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) diff --git a/tests/mwrap/grpc-tools/build.mcpp b/tests/mwrap/grpc-tools/build.mcpp new file mode 100644 index 00000000..09c071a9 --- /dev/null +++ b/tests/mwrap/grpc-tools/build.mcpp @@ -0,0 +1,19 @@ +import std; +import mcpp; +import grpcgen; + +int main() { + const auto plugin = grpcgen::cpp(); + if (plugin.name != "grpc" || plugin.binary.empty() || + !std::filesystem::is_regular_file(plugin.binary) || + plugin.suffixes != std::vector{".grpc.pb.cc", ".grpc.pb.h"}) return 1; + const std::filesystem::path out(mcpp::out_dir()); + std::filesystem::create_directories(out); + std::ofstream header(out / "plugin_info.hpp"); + header << "#pragma once\n#include \n" + << "inline constexpr std::string_view plugin_binary = " + << std::quoted(plugin.binary) << ";\n"; + if (!header) return 2; + mcpp::include_dir(out.string().c_str()); + return 0; +} diff --git a/tests/mwrap/grpc-tools/mcpp.toml b/tests/mwrap/grpc-tools/mcpp.toml new file mode 100644 index 00000000..95f3bb71 --- /dev/null +++ b/tests/mwrap/grpc-tools/mcpp.toml @@ -0,0 +1,14 @@ +[package] +name = "grpc-tools" +version = "1.83.0.1" +description = "Resolve the indexed gRPC plugin and host rule, and verify the built host binary" + +[indices] +grpc = { path = "../.indices/grpc" } +mcpplibs = { path = "../.indices/mcpplibs" } + +[dependencies] +"grpc.grpc-plugin" = { version = "1.83.0.1", tools = ["grpc_cpp_plugin"] } + +[build-dependencies] +"mcpplibs.grpcgen" = { version = "1.83.0.1", host-module = true } diff --git a/tests/mwrap/grpc-tools/tests/host_binary.cpp b/tests/mwrap/grpc-tools/tests/host_binary.cpp new file mode 100644 index 00000000..b7d6f114 --- /dev/null +++ b/tests/mwrap/grpc-tools/tests/host_binary.cpp @@ -0,0 +1,10 @@ +#include "plugin_info.hpp" +import std; + +int main() { + const std::filesystem::path binary(plugin_binary); + if (!std::filesystem::is_regular_file(binary)) return 1; + if (std::filesystem::file_size(binary) == 0) return 2; + std::println("Indexed gRPC host plugin built: {}", binary.string()); + return 0; +} diff --git a/tests/prepare_mwrap_indices.py b/tests/prepare_mwrap_indices.py index a65979b4..65572146 100644 --- a/tests/prepare_mwrap_indices.py +++ b/tests/prepare_mwrap_indices.py @@ -15,7 +15,7 @@ def main(): root = Path(__file__).resolve().parents[1] - namespaces = {name: [] for name in ("compat", "mcpplibs.mwrap")} + namespaces = {name: [] for name in ("compat", "mcpplibs.mwrap", "grpc", "mcpplibs")} for source in sorted((root / "pkgs").glob("*/*.lua")): match = re.search(r'^\s*namespace\s*=\s*[\'"]([^\'"]+)[\'"]', source.read_text(encoding="utf-8"), re.M) if match and match[1] in namespaces: From 815c647b1647657e73df294b12c9012473dc681e Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 12:52:56 +0900 Subject: [PATCH 15/47] feat: index OpenCV and Godot wrappers with complete candidate index fixtures --- .../docs/2026-10-24-add-mwrap-and-ort-plan.md | 24 +++++++++ .../skills/add-mcpp-index-package/SKILL.md | 3 ++ .github/workflows/validate.yml | 15 ++++++ .github/workflows/xpkgindex-update.yml | 6 ++- docs/mwrap.md | 5 ++ docs/zh/mwrap.md | 3 ++ mcpp.toml | 2 + pkgs/g/godotengine.godot-cpp-m.lua | 22 ++++++++ pkgs/g/grpc-plugin.lua | 12 ++--- pkgs/g/grpc.lua | 8 +-- pkgs/g/grpcgen.lua | 12 ++--- pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 32 +++++++++++ tests/autoupdate/ci.py | 14 +++-- tests/autoupdate/test_ci.py | 31 +++++++++++ tests/mwrap/check_installed_template.py | 54 +++++++++++++------ tests/mwrap/godot-math/mcpp.toml | 10 ++++ tests/mwrap/godot-math/tests/math.cpp | 11 ++++ tests/mwrap/grpc-cpu/tests/behavior.cpp | 1 + tests/mwrap/grpc-tools/mcpp.toml | 4 +- tests/mwrap/opencv-cpu/mcpp.toml | 10 ++++ tests/mwrap/opencv-cpu/tests/pipeline.cpp | 28 ++++++++++ tests/prepare_builtin_index.py | 32 +++++++++++ 22 files changed, 300 insertions(+), 39 deletions(-) create mode 100644 pkgs/mwrap/mcpplibs.mwrap.opencv.lua create mode 100644 tests/mwrap/godot-math/mcpp.toml create mode 100644 tests/mwrap/godot-math/tests/math.cpp create mode 100644 tests/mwrap/opencv-cpu/mcpp.toml create mode 100644 tests/mwrap/opencv-cpu/tests/pipeline.cpp create mode 100644 tests/prepare_builtin_index.py diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index 541ab0c9..6610c7a9 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -44,3 +44,27 @@ The b22a9a8 candidate scan stopped with `no candidate consumer: grpc:grpc-plugin The scanner now finds normal and build dependencies inside target tables, and prefers dedicated tests/mwrap consumers over older platform-gated examples. Two regressions cover these boundaries, including build-dependency version replacement. All sixteen updater tests pass; an actual full candidate-matrix reproduction produces 23 build/run jobs and selects grpc-cpu, grpc-tools, imgui-headless, ffmpeg-cpu and llamacpp-cpu as intended. The full audit still preserves historical versions and reports 90 automatic descriptors plus one manual snapshot. Local strict actual index tests now pass all four new members: ffmpeg-cpu (real 16x16 frame), imgui-headless (positive draw vertices), grpc-cpu (status/credentials) and grpc-tools (built host plugin plus imported rule). A fresh complete-index ImGui archive/default-template installation also passes with positive draw data and no display. These results supplement the source/template CI; all new native matrix jobs remain required before release readiness. + +## Complete-index fixture, seven-wrapper and OpenCV archive checkpoint + +The ba9a72e native candidate jobs exposed two real test-fixture problems: preparing only the namespace under test hid coupled unpublished plugin/rule versions, and registering full candidate views through multiple project aliases caused ambiguous candidates in fresh CI. The new prepare_builtin_index.py installs the complete unchanged pkgs/index.toml layout into one isolated test home's built-in index. Updater candidate preparation uses it for all namespaces; grpc-tools uses an empty member [indices] table to override the legacy workspace redirect. Publication layout remains unchanged, with no staging/path conversion or engine change. + +A fresh standalone strict plugin/rule consumer passed in 201.08 seconds and its lock proves both exact 1.83.0.1 identities. A separate fresh actual workspace grpc-tools invocation passed its host-binary behavior in 184.46 seconds; workspace lock verification proves both identities too. The existing workspace-root [indices] deprecation remains a documented baseline, so the actual workspace command follows CI's non-strict mode; standalone candidate consumers stay strict. The first workspace diagnostic harness looked for a member lock instead of the root lock after the successful test; postprocessing was corrected and the root lock was independently verified. The grpc-cpu consumer now includes the standard string header explicitly after GCC CI exposed missing string comparison declarations. All seventeen updater regressions pass. + +The organization audit includes seven -m repositories: Godot was omitted from the initial six-repository inventory. Godot 10.0.0-rc1.1 is now indexed with a standalone math behavior consumer and an actual installed-template CI check. Its source head 40f72d5 has Linux/macOS/Windows CI green, including the explicit one-symbol Windows extension export check; actual loading by a Godot process remains separate scope. All seven root READMEs are 42–52 lines per language, with details under docs/. + +Added the new canonical mcpplibs.mwrap.opencv@5.0.0.1 descriptor under pkgs/mwrap and its tests/mwrap/opencv-cpu consumer. The first immutable 52f4c8f archive passed a real strict installed image/scalar consumer in 67.22 seconds: exact grayscale pixels, PNG/JPEG roundtrips, saturation/rounding and generic min/max/makePtr. The actual default image template also installed and built strictly in a fresh home. Its release packaging audit then correctly failed because the old source manifest deployed no OpenCV license tree. Source checkpoint 5da7fc8 now explicitly deploys all fourteen retained wrapper/upstream license/copyright files with original paths. The installed-template helper checks each byte and executes the relocated application with a clean HOME/runtime environment, verifies its 64x64 PNG and, on Linux, confirms loader dependencies stay inside the bundle. The fixed archive/deployment rerun is in progress and is a native CI gate; no release readiness is claimed yet. + +The gRPC native source workflow completed its advanced program but failed a stale unscoped generated-source assertion. New source 0d11b22 checks common/types.pb.cc beside the real mock output, finds the actual generation graph by its edge rather than filesystem order, and removes the expired pre-cache-fix local-cache workaround. A local LLVM advanced generation/RPC rerun passed in 3m40s and all generated outputs/edge metadata were checked; latest native source CI is running. + +Each candidate below was downloaded twice with matching SHA256. Existing published archive versions are unchanged. The full audit reports 91 automatic declarations and two reviewed immutable snapshots; the five current new/updated archive descriptors pass resolver grammar and name/namespace/mirror/version checks. No merge, tag or release has been performed. + +| Repository | Exact source | SHA256 | +|---|---|---| +| opencv-m | `5da7fc8abedc700ce1ed91a1f57067ad552c74fc` | `5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c` | +| onnxruntime-m | `576c780bfcbd792c7f4194942c90324f183a48aa` | `3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1` | +| llama.cpp-m | `5028a1aa4f741db4dbd86d6ebd1928ef21027147` | `9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de` | +| ffmpeg-m | `1e8bce6ee12c50e43058245df42515ffbabfc78f` | `595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2` | +| grpc-m | `0d11b22399875f2847f04609fd4fccb50fda5410` | `8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a` | +| imgui-m | `ffebf83be99ba0eec2677cc197dea3316a72b501` | `9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f` | +| godot-cpp-m | `40f72d5533a9bc29b17e62ae8a6c84b3dc593071` | `79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33` | diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 1d512247..4a337224 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -72,6 +72,9 @@ description: Use when adding a new third-party library/package to the mcpp-index 再将两条 namespace 路由指向 `tests/mwrap/.indices/` 中字节不变的测试视图。 `tests/run_members.sh` 自动准备这些视图;它们不提交、不发布,也不改变 pkgs/mwrap 的正式布局。 正常发布布局另由 `tests/mwrap/check_installed_template.py` 在独立 MCPP_HOME 中使用单一完整索引验收。 + 运行库/插件/host-module 多 namespace 耦合时,优先用 `tests/prepare_builtin_index.py --home <独立测试 home>` + 安装唯一完整内置索引,成员以空 `[indices]` 覆盖旧 workspace 路由。自动更新候选 CI 同样采用此方式, + 避免项目别名缓存相互污染;这是测试准备,不是发布 staging 或目录转换。 - 非全平台包按 `[target.'cfg(...)'.dependencies]` 门控依赖,测试源码在被门控掉的平台上 编译为 no-op `main`(`#ifdef __linux__ … #else int main(){return 0;} #endif` 模式)。 - 如需测试 feature,依赖采用长式声明 `name = { version = "…", features = ["…"] }`。 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 951ebc79..f34694f7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1550,6 +1550,16 @@ jobs: run: | "$MCPP" index update + - name: Complete candidate index for the cross-namespace host-tool consumer + if: contains(format(' {0} ', env.MEMBERS), ' grpc-tools ') + shell: bash + run: python3 tests/prepare_builtin_index.py --home "$MCPP_HOME" + + - name: Installed OpenCV archive, image template and relocated deployment + if: contains(format(' {0} ', env.MEMBERS), ' opencv-cpu ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.opencv@5.0.0.1 --deploy + - name: Installed mwrap archive, project template and relocated deployment if: contains(format(' {0} ', env.MEMBERS), ' onnxruntime-cpu ') && matrix.toolchain == 'default' shell: bash @@ -1570,6 +1580,11 @@ jobs: shell: bash run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ocornut.imgui@1.92.8.1 + - name: Installed Godot wrapper archive and actual standalone math template + if: contains(format(' {0} ', env.MEMBERS), ' godot-math ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package godotengine.godot-cpp-m@10.0.0-rc1.1 + - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash run: | diff --git a/.github/workflows/xpkgindex-update.yml b/.github/workflows/xpkgindex-update.yml index 33bd380b..2aff6a0c 100644 --- a/.github/workflows/xpkgindex-update.yml +++ b/.github/workflows/xpkgindex-update.yml @@ -156,9 +156,11 @@ jobs: if [[ "$RUNNER_OS" == Windows ]]; then echo "PYTHONPATH=$(cygpath -m "$PWD/.updater/src")" >> "$GITHUB_ENV" echo "CONSUMER=$(cygpath -m "$RUNNER_TEMP/candidate-consumer")" >> "$GITHUB_ENV" + echo "CANDIDATE_MCPP_HOME=$(cygpath -m "$HOME/.mcpp")" >> "$GITHUB_ENV" else echo "PYTHONPATH=$PWD/.updater/src" >> "$GITHUB_ENV" echo "CONSUMER=$RUNNER_TEMP/candidate-consumer" >> "$GITHUB_ENV" + echo "CANDIDATE_MCPP_HOME=$HOME/.mcpp" >> "$GITHUB_ENV" fi - name: Append the candidate and prepare its existing consumer test shell: bash @@ -167,7 +169,7 @@ jobs: PACKAGE: ${{ matrix.id }} run: | python -m xpkgindex_update apply --plan .candidate-plan/build-plan.json --package "$PACKAGE" - python tests/autoupdate/ci.py prepare --plan .candidate-plan/build-plan.json --package "$PACKAGE" --output "$CONSUMER" + python tests/autoupdate/ci.py prepare --plan .candidate-plan/build-plan.json --package "$PACKAGE" --output "$CONSUMER" --home "$CANDIDATE_MCPP_HOME" git diff -- pkgs - uses: actions/cache/restore@v4 with: @@ -195,7 +197,7 @@ jobs: root="$RUNNER_TEMP/$root" mkdir -p "$HOME/.mcpp/registry" cp -a "$root/registry/." "$HOME/.mcpp/registry/" - echo "MCPP_HOME=$HOME/.mcpp" >> "$GITHUB_ENV" + echo "MCPP_HOME=$CANDIDATE_MCPP_HOME" >> "$GITHUB_ENV" if [[ "$RUNNER_OS" == Windows ]]; then echo "MCPP=$(cygpath -m "$root/bin/mcpp.exe")" >> "$GITHUB_ENV" else diff --git a/docs/mwrap.md b/docs/mwrap.md index 5ccc3725..3d618711 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -185,6 +185,9 @@ When a runtime SDK ships LICENSE and third-party notices, declare their deployme alongside the runtime files. Verify those bytes in a relocated consumer bundle; automatic license discovery may copy LICENSE while omitting additional notices. Use `runtime.deploy` for explicit relative destinations without changing the engine. +Vendored static implementations need this too: shared-library discovery does not +find their notices. Preserve retained license/copyright files under distinct source +paths so unrelated LICENSE basenames cannot overwrite one another. Each repository's PR retains checkpoint commits. Record commands and actual results, inspect the final dependency/ABI/API graph, and wait for every relevant @@ -195,3 +198,5 @@ CI check before reporting merge/release readiness. The pinned client routes each requested namespace independently. Registering the same full checkout twice makes xlings report duplicate project candidates. Local wrapper/SDK tests therefore call tests/prepare_mwrap_indices.py and route each namespace to a test-only view under tests/mwrap/.indices. Every descriptor is copied unchanged and its source SHA256 is recorded; no aliases share a descriptor. These views are ignored build outputs, not a publication format. Normal installed consumers are tested independently by tests/mwrap/check_installed_template.py: it copies the complete pkgs/index.toml publication layout into one isolated built-in index, downloads the real checksummed source archive, runs mcpp new and builds/runs the generated manifest without a path substitution. The Git and published pkgs/mwrap directory layout remains identical. + +Coupled runtime/plugin/build-module consumers may require several candidate namespaces at once. Use `python3 tests/prepare_builtin_index.py --home ` to install the complete unchanged candidate layout as the test home's single built-in index; the member uses an empty `[indices]` table to override legacy workspace redirects. Updater candidate CI uses this mode too. Do not register the same full checkout through multiple project aliases. This is test-home preparation only: no publication staging, path conversion or mcpp engine change is required. diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index 18d9956a..7023e2f8 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -128,6 +128,7 @@ Linux 本地执行,CI 重跑发布门槛;Windows/macOS 原生 CI。区分编 覆盖冷索引消费和动态加载库的运行时分发。SDK 附带 LICENSE 与第三方通知时,通过 `runtime.deploy` 显式声明它们的相对部署位置,并在搬迁后的消费方分发包中校验字节; 自动许可证收集可能只复制 LICENSE 而遗漏其他通知,无需为此修改引擎。 +vendored 静态实现同样需要显式部署,不能依赖共享库扫描发现通知。保留许可/版权文件的来源路径,避免不同组件的同名 LICENSE 相互覆盖。 每仓库一个 PR,保留 checkpoint commits; 逐项核查最终 API/ABI/依赖图,并等待相关 CI 全通过后报告合入与发布就绪。 @@ -140,3 +141,5 @@ Linux 本地执行,CI 重跑发布门槛;Windows/macOS 原生 CI。区分编 正常安装由 tests/mwrap/check_installed_template.py 独立验证:把完整 pkgs/index.toml 发布布局放进独立 MCPP_HOME 的单一内置索引, 下载真实且带校验的源码归档,执行 mcpp new,再原样构建/运行生成清单,不替换为 path 依赖。 Git 与发布的 pkgs/mwrap 目录始终一致。 + +运行库、插件、构建模块耦合的测试可能同时依赖多个候选 namespace。使用 `python3 tests/prepare_builtin_index.py --home <独立测试目录>`,将完整且字节不变的候选布局放入该测试 home 的唯一内置索引;成员用空 `[indices]` 覆盖旧 workspace 路由。自动更新候选 CI 同样使用此模式。不要将同一个完整 checkout 注册为多个项目别名。这只是测试 home 准备,不需要发布 staging、路径转换或修改 mcpp 引擎。 diff --git a/mcpp.toml b/mcpp.toml index 4b51e535..372efaeb 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -10,12 +10,14 @@ mcpp = ">=2026.10.21.1" [workspace] members = [ + "tests/mwrap/opencv-cpu", "tests/mwrap/onnxruntime-cpu", "tests/mwrap/llamacpp-cpu", "tests/mwrap/ffmpeg-cpu", "tests/mwrap/imgui-headless", "tests/mwrap/grpc-cpu", "tests/mwrap/grpc-tools", + "tests/mwrap/godot-math", "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", diff --git a/pkgs/g/godotengine.godot-cpp-m.lua b/pkgs/g/godotengine.godot-cpp-m.lua index 3336fe4b..4eb023dd 100644 --- a/pkgs/g/godotengine.godot-cpp-m.lua +++ b/pkgs/g/godotengine.godot-cpp-m.lua @@ -72,8 +72,20 @@ package = { repo = "https://github.com/mcpplibs/godot-cpp-m", type = "package", + extensions = { + autoupdate = { + tag = "v${version}", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/${tag}.tar.gz", + }, + }, + xpm = { linux = { + -- Immutable candidate: runnable template; SDK stays 10.0.0-rc1. + ["10.0.0-rc1.1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/40f72d5533a9bc29b17e62ae8a6c84b3dc593071.tar.gz", + sha256 = "79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33", + }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", @@ -90,6 +102,11 @@ package = { }, }, macosx = { + -- Immutable candidate: runnable template; SDK stays 10.0.0-rc1. + ["10.0.0-rc1.1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/40f72d5533a9bc29b17e62ae8a6c84b3dc593071.tar.gz", + sha256 = "79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33", + }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", @@ -106,6 +123,11 @@ package = { }, }, windows = { + -- Immutable candidate: runnable template; SDK stays 10.0.0-rc1. + ["10.0.0-rc1.1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/40f72d5533a9bc29b17e62ae8a6c84b3dc593071.tar.gz", + sha256 = "79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33", + }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index 4e40633e..400f20cf 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -38,8 +38,8 @@ package = { linux = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpc.lua b/pkgs/g/grpc.lua index 165a1404..df26db48 100644 --- a/pkgs/g/grpc.lua +++ b/pkgs/g/grpc.lua @@ -66,8 +66,8 @@ package = { linux = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { @@ -80,8 +80,8 @@ package = { macosx = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index b8be840b..04a77ef9 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -38,8 +38,8 @@ package = { linux = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Immutable candidate; published upstream versions remain unchanged. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/839b61e94fff14892a1dfb2c211a4a8e66342239.tar.gz", - sha256 = "b16dffb45c6f4b09de49a5229f2ec7db98bcfb5609447271d85db8387aeabdd4", + url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", + sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", }, ["1.83.0"] = { url = { diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua new file mode 100644 index 00000000..69932ae0 --- /dev/null +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -0,0 +1,32 @@ +-- Immutable candidate source archive; retained OpenCV sources have one owner. +-- No release tag is created by this descriptor. Updates require a verified source +-- revision and archive checksum, not a URL-only automatic version substitution. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "opencv", + description = "OpenCV 5.0.0 C++ APIs through feature-selected modules", + licenses = { "Apache-2.0" }, + repo = "https://github.com/mcpplibs/opencv-m", + type = "package", + xpm = { + linux = { + ["5.0.0.1"] = { + url = "https://github.com/mcpplibs/opencv-m/archive/5da7fc8abedc700ce1ed91a1f57067ad552c74fc.tar.gz", + sha256 = "5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c", + }, + }, + macosx = { + ["5.0.0.1"] = { + url = "https://github.com/mcpplibs/opencv-m/archive/5da7fc8abedc700ce1ed91a1f57067ad552c74fc.tar.gz", + sha256 = "5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c", + }, + }, + windows = { + ["5.0.0.1"] = { + url = "https://github.com/mcpplibs/opencv-m/archive/5da7fc8abedc700ce1ed91a1f57067ad552c74fc.tar.gz", + sha256 = "5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c", + }, + }, + }, +} diff --git a/tests/autoupdate/ci.py b/tests/autoupdate/ci.py index d6cbb6b5..6209a448 100644 --- a/tests/autoupdate/ci.py +++ b/tests/autoupdate/ci.py @@ -190,7 +190,7 @@ def matrix(plan: Path, output: Path, base: str): print(f"Candidate matrix: {len(jobs)} real build/run jobs.") -def prepare(plan: Path, identity: str, output: Path): +def prepare(plan: Path, identity: str, output: Path, home: Path | None = None): record = next(r for r in json.loads(plan.read_text(encoding="utf-8"))["packages"] if r["id"] == identity) namespace, name = identity.split(":", 1) version = record["candidate"] @@ -233,7 +233,14 @@ def prepare(plan: Path, identity: str, output: Path): defines += ''.join(f'#define MCR_EXPECT_{key} {int(value)}\n' for key, value in zip(("MAJOR", "MINOR", "PATCH"), parts)) api.write_text(defines + api.read_text(encoding="utf-8"), encoding="utf-8") - text += f'\n[indices]\n"{namespace}" = {{ path = {json.dumps(str(ROOT).replace(chr(92), "/"))} }}\n' + if home is None: + text += f'\n[indices]\n"{namespace}" = {{ path = {json.dumps(str(ROOT).replace(chr(92), "/"))} }}\n' + else: + # Coupled tool/runtime packages cross namespaces. One complete built-in + # index resolves all of them without project-alias cache collisions. + sys.path.insert(0, str(Path(__file__).resolve().parents[1])) + from prepare_builtin_index import prepare as prepare_index + prepare_index(ROOT, home) (output / "mcpp.toml").write_text(text) print(f"Prepared {identity}@{version} in {output}") @@ -270,6 +277,7 @@ def main(): parser.add_argument("--package") parser.add_argument("--output", type=Path) parser.add_argument("--consumer", type=Path) + parser.add_argument("--home", type=Path) args = parser.parse_args() if args.command == "audit": audit(args.base, args.output) @@ -278,7 +286,7 @@ def main(): elif args.command == "matrix": matrix(args.plan, args.output, args.base) elif args.command == "prepare": - prepare(args.plan, args.package, args.output) + prepare(args.plan, args.package, args.output, args.home) elif args.command == "diagnostics": diagnostics(args.consumer, args.output) else: diff --git a/tests/autoupdate/test_ci.py b/tests/autoupdate/test_ci.py index e4e3dfb9..c0bd83c8 100644 --- a/tests/autoupdate/test_ci.py +++ b/tests/autoupdate/test_ci.py @@ -108,6 +108,37 @@ def test_dedicated_mwrap_consumer_precedes_shorter_legacy_example(self): with patch.object(ci, "ROOT", root): self.assertEqual(ci.direct_member("ocornut:imgui"), "headless") + def test_coupled_consumer_uses_one_complete_builtin_index(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + source = root / "tests/mwrap/tools" + source.mkdir(parents=True) + (source / "mcpp.toml").write_text( + '[package]\nname="tools"\nversion="0.1.0"\n' + '[indices]\ngrpc={path="../../.."}\n' + '[dependencies]\n"grpc.grpc-plugin"="1.83.0.1"\n' + '[build-dependencies]\n"mcpplibs.grpcgen"={version="1.83.0.1",host-module=true}\n') + (root / "index.toml").write_text('[index]\nname="mcpplibs"\n') + package = root / "pkgs/mwrap/example.lua" + package.parent.mkdir(parents=True) + package.write_bytes(b'-- unchanged descriptor bytes\n') + home = root / "home" + stale = home / "indices/mcpplibs/pkgs/old.lua" + stale.parent.mkdir(parents=True) + stale.write_text('-- stale') + plan = root / "plan.json" + plan.write_text(json.dumps({"packages": [ + {"id": "mcpplibs:grpcgen", "candidate": "1.83.0.1"}]})) + with patch.object(ci, "ROOT", root): + dest = root / "consumer" + ci.prepare(plan, "mcpplibs:grpcgen", dest, home) + manifest = tomllib.loads((dest / "mcpp.toml").read_text()) + self.assertNotIn("indices", manifest) + self.assertIn("grpc.grpc-plugin", manifest["dependencies"]) + self.assertIn("mcpplibs.grpcgen", manifest["build-dependencies"]) + self.assertEqual((home / "indices/mcpplibs/pkgs/mwrap/example.lua").read_bytes(), package.read_bytes()) + self.assertFalse(stale.exists()) + def test_added_descriptor_and_removed_historical_descriptor(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index cc072a19..34406581 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -17,7 +17,7 @@ def main(): parser.add_argument("--mcpp", default="mcpp") parser.add_argument("--toolchain", default="llvm@23.1.3") parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") - parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify SDK notices") + parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify declared notices") parser.add_argument("--run-arg", action="append", default=[]) parser.add_argument("--legacy-exact-key", action="store_true", help="allow only mcpp's nonnumeric exact-version diagnostic; fail other build warnings") @@ -80,20 +80,37 @@ def main(): bundle = project / "target/dist/deployment-audit" relocated = temporary / "relocated/bundle" shutil.copytree(bundle, relocated, symlinks=True) - notices = list(relocated.rglob("licenses/onnxruntime/ThirdPartyNotices.txt")) - assert len(notices) == 1 and notices[0].stat().st_size, notices - installed = [] - for entry in json.loads((project / "compile_commands.json").read_text(encoding="utf-8")): - arguments = entry["arguments"] - for number, argument in enumerate(arguments): - directory = (arguments[number + 1] if argument in ("-I", "/I") else - argument[2:] if argument.startswith(("-I", "/I")) else "") - include = Path(directory) - if directory and (include / "onnxruntime_c_api.h").is_file(): - installed.append(include.parent / "ThirdPartyNotices.txt") - expected = hashlib.sha256(notices[0].read_bytes()).hexdigest() - assert any(p.is_file() and hashlib.sha256(p.read_bytes()).hexdigest() == expected - for p in installed), installed + if identity == "mcpplibs.mwrap.onnxruntime": + notices = list(relocated.rglob("licenses/onnxruntime/ThirdPartyNotices.txt")) + assert len(notices) == 1 and notices[0].stat().st_size, notices + installed = [] + for entry in json.loads((project / "compile_commands.json").read_text(encoding="utf-8")): + arguments = entry["arguments"] + for number, argument in enumerate(arguments): + directory = (arguments[number + 1] if argument in ("-I", "/I") else + argument[2:] if argument.startswith(("-I", "/I")) else "") + include = Path(directory) + if directory and (include / "onnxruntime_c_api.h").is_file(): + installed.append(include.parent / "ThirdPartyNotices.txt") + expected = hashlib.sha256(notices[0].read_bytes()).hexdigest() + assert any(p.is_file() and hashlib.sha256(p.read_bytes()).hexdigest() == expected + for p in installed), installed + elif identity == "mcpplibs.mwrap.opencv": + commands = json.loads((project / "compile_commands.json").read_text(encoding="utf-8")) + sources = [Path(item["file"]).parent.parent for item in commands + if Path(item["file"]).name == "core.cppm"] + source = next(path for path in sources if (path / "upstream/opencv/LICENSE").is_file()) + notices = [source / "LICENSE", *[path for path in (source / "upstream/opencv").rglob("*") + if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] + roots = list(relocated.rglob("licenses/opencv")) + assert len(roots) == 1, f"Missing OpenCV runtime license tree: {roots}" + for notice in notices: + copied = roots[0] / notice.relative_to(source) + assert copied.is_file(), f"Missing retained OpenCV notice: {copied}" + assert copied.read_bytes() == notice.read_bytes(), copied + print(f"Verified {len(notices)} byte-identical wrapper/upstream license files", flush=True) + else: + raise ValueError(f"No deployment acceptance contract for {identity}") runtime_env = {key: value for key, value in os.environ.items() if key not in {"MCPP_HOME", "XLINGS_HOME", "LD_LIBRARY_PATH", "LD_PRELOAD", "DYLD_LIBRARY_PATH", "DYLD_FALLBACK_LIBRARY_PATH"}} @@ -123,7 +140,12 @@ def main(): resolved = line.split("=>", 1)[1].strip().split(" ", 1)[0] if resolved.startswith("/"): assert Path(resolved).resolve().is_relative_to(relocated.resolve()), line - print("Verified relocated inference bundle and byte-identical SDK notices", flush=True) + if identity == "mcpplibs.mwrap.opencv": + encoded = (empty_home / "out.png").read_bytes() + assert encoded[:8] == b"\x89PNG\r\n\x1a\n", "Relocated template did not create a PNG" + assert int.from_bytes(encoded[16:20], "big") == 64 + assert int.from_bytes(encoded[20:24], "big") == 64 + print("Verified relocated application bundle and byte-identical notices", flush=True) if __name__ == "__main__": diff --git a/tests/mwrap/godot-math/mcpp.toml b/tests/mwrap/godot-math/mcpp.toml new file mode 100644 index 00000000..c18dd1df --- /dev/null +++ b/tests/mwrap/godot-math/mcpp.toml @@ -0,0 +1,10 @@ +[package] +name = "godot-math" +version = "10.0.0-rc1.1" +description = "Run the immutable godot-cpp module wrapper without an engine" + +[indices] +godotengine = { path = "../../.." } + +[dependencies] +"godotengine.godot-cpp-m" = "10.0.0-rc1.1" diff --git a/tests/mwrap/godot-math/tests/math.cpp b/tests/mwrap/godot-math/tests/math.cpp new file mode 100644 index 00000000..b4956f07 --- /dev/null +++ b/tests/mwrap/godot-math/tests/math.cpp @@ -0,0 +1,11 @@ +import std; +import godot_cpp; + +int main() { + const godot::Vector2 vector(3, 4); + const godot::Vector3 cross = godot::Vector3(1, 0, 0).cross(godot::Vector3(0, 1, 0)); + if (std::abs(vector.length() - 5.0) > 1e-5 || cross != godot::Vector3(0, 0, 1)) return 1; + if (godot::Color(1, 0, 0, 1).to_rgba32() != 0xff0000ffu) return 2; + std::println("godot-cpp: vector length {}, cross product ({}, {}, {})", vector.length(), cross.x, cross.y, cross.z); + return 0; +} diff --git a/tests/mwrap/grpc-cpu/tests/behavior.cpp b/tests/mwrap/grpc-cpu/tests/behavior.cpp index b8b93ef3..875684d9 100644 --- a/tests/mwrap/grpc-cpu/tests/behavior.cpp +++ b/tests/mwrap/grpc-cpu/tests/behavior.cpp @@ -1,4 +1,5 @@ #if defined(MCPP_TEST_GRPC) +#include import grpc; int main() { if (!grpc::Status::OK.ok()) return 1; diff --git a/tests/mwrap/grpc-tools/mcpp.toml b/tests/mwrap/grpc-tools/mcpp.toml index 95f3bb71..3bd1830b 100644 --- a/tests/mwrap/grpc-tools/mcpp.toml +++ b/tests/mwrap/grpc-tools/mcpp.toml @@ -4,8 +4,8 @@ version = "1.83.0.1" description = "Resolve the indexed gRPC plugin and host rule, and verify the built host binary" [indices] -grpc = { path = "../.indices/grpc" } -mcpplibs = { path = "../.indices/mcpplibs" } +# CI and isolated validation install the whole checkout into the test home's +# built-in index. Keep this empty to override the legacy workspace redirect. [dependencies] "grpc.grpc-plugin" = { version = "1.83.0.1", tools = ["grpc_cpp_plugin"] } diff --git a/tests/mwrap/opencv-cpu/mcpp.toml b/tests/mwrap/opencv-cpu/mcpp.toml new file mode 100644 index 00000000..baee39e2 --- /dev/null +++ b/tests/mwrap/opencv-cpu/mcpp.toml @@ -0,0 +1,10 @@ +[package] +name = "opencv-cpu" +version = "5.0.0.1" +description = "Install the OpenCV mwrap archive and run a generated image pipeline" + +[indices] +"mcpplibs.mwrap" = { path = "../.indices/mcpplibs.mwrap" } + +[dependencies] +"mcpplibs.mwrap.opencv" = { version = "5.0.0.1", features = ["imgproc", "imgcodecs-png", "imgcodecs-jpeg"] } diff --git a/tests/mwrap/opencv-cpu/tests/pipeline.cpp b/tests/mwrap/opencv-cpu/tests/pipeline.cpp new file mode 100644 index 00000000..e0d91a5a --- /dev/null +++ b/tests/mwrap/opencv-cpu/tests/pipeline.cpp @@ -0,0 +1,28 @@ +import std; +import mcpplibs.mwrap.opencv; + +int main() { + namespace types = mcpplibs::mwrap::opencv::macros; + cv::Mat color(8, 12, types::CV_8UC3, cv::Scalar(20, 80, 160)), gray; + cv::cvtColor(color, gray, cv::COLOR_BGR2GRAY); + if (gray.rows != 8 || gray.cols != 12 || gray.type() != types::CV_8UC1) return 1; + if (cv::norm(gray, cv::Mat(8, 12, types::CV_8UC1, cv::Scalar(97)), cv::NORM_INF) != 0) return 2; + std::vector bytes; + if (!cv::imencode(".png", gray, bytes) || bytes.empty()) return 3; + const auto decoded = cv::imdecode(bytes, cv::IMREAD_UNCHANGED); + if (decoded.empty() || decoded.size() != gray.size() || + cv::norm(decoded, gray, cv::NORM_INF) != 0) return 4; + if (cv::saturate_cast(-1) != 0 || + cv::saturate_cast(static_cast(256)) != 255 || + cv::saturate_cast(1.8) != 2) return 5; + const int first = 7, second = 7; + if (&cv::min(first, second) != &first || &cv::max(first, second) != &first) return 6; + if (!cv::imencode(".jpg", gray, bytes)) return 8; + const auto jpeg = cv::imdecode(bytes, cv::IMREAD_UNCHANGED); + if (jpeg.empty() || jpeg.size() != gray.size() || + cv::norm(jpeg, gray, cv::NORM_INF) > 2) return 9; + const auto value = cv::makePtr(19); + if (*value != 19) return 7; + std::println("OpenCV {} archive: exact gray pixels, PNG/JPEG roundtrips and scalar contracts passed", + cv::getVersionString()); +} diff --git a/tests/prepare_builtin_index.py b/tests/prepare_builtin_index.py new file mode 100644 index 00000000..f8082e0b --- /dev/null +++ b/tests/prepare_builtin_index.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +"""Put the unchanged checkout layout in a test home's single built-in index.""" +import argparse +from pathlib import Path +import shutil +import tempfile + + +def prepare(source: Path, home: Path): + assert (source / "index.toml").is_file() and (source / "pkgs").is_dir(), source + parent = home / "indices" + parent.mkdir(parents=True, exist_ok=True) + target = parent / "mcpplibs" + with tempfile.TemporaryDirectory(prefix=".candidate-index-", dir=parent) as directory: + staged = Path(directory) / "index" + staged.mkdir() + shutil.copytree(source / "pkgs", staged / "pkgs") + shutil.copyfile(source / "index.toml", staged / "index.toml") + if target.is_symlink(): + target.unlink() + elif target.exists(): + shutil.rmtree(target) + staged.rename(target) + print("Test home uses the complete unchanged candidate index:", target) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--home", required=True, type=Path) + parser.add_argument("--source", default=Path(__file__).resolve().parents[1], type=Path) + args = parser.parse_args() + prepare(args.source.resolve(), args.home.resolve()) From 9f41559c77dc0fa4051980eecc7c5b1f6f4f3dd2 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 13:30:11 +0900 Subject: [PATCH 16/47] ci: apply candidate index after published registry refresh --- .agents/docs/2026-10-24-add-mwrap-and-ort-plan.md | 8 ++++++++ .github/workflows/xpkgindex-update.yml | 3 +++ 2 files changed, 11 insertions(+) diff --git a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md index 6610c7a9..b8732251 100644 --- a/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md +++ b/.agents/docs/2026-10-24-add-mwrap-and-ort-plan.md @@ -68,3 +68,11 @@ Each candidate below was downloaded twice with matching SHA256. Existing publish | grpc-m | `0d11b22399875f2847f04609fd4fccb50fda5410` | `8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a` | | imgui-m | `ffebf83be99ba0eec2677cc197dea3316a72b501` | `9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f` | | godot-cpp-m | `40f72d5533a9bc29b17e62ae8a6c84b3dc593071` | `79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33` | + +## Refresh ordering and final archive evidence + +On 815c647, updater candidate jobs for FFmpeg/llama failed because the workflow prepared the candidate and then ran mcpp index update, replacing it with the published snapshot. This is a fixture ordering bug, not missing package support. An actual pinned-client reproduction installed the candidate first, refreshed, and then correctly failed to resolve 8.1.2.1 against the published 8.1.2 entry. Preparing the complete candidate after refresh restored real archive/template lookup. The workflow now reapplies the fixture after registry setup/index refresh; no engine or low-level registry configuration changes are needed. All seventeen updater regressions still pass. + +The final OpenCV 5da7fc8 archive passed strict GCC 16.1.0 image/scalar consumption in a new home (152.96 seconds). Its actual fresh default template built strictly, packed in release/self-contained mode and ran after relocation with clean HOME/runtime paths. All fourteen wrapper/upstream notices matched their installed source bytes; the relocated application generated a valid 64x64 PNG and the Linux loader resolved every file-backed dependency within the bundle. The previous 52f4c8f package was independently shown to lack that license tree, so the new deployment gate detects the real packaging regression. + +The final Godot 40f72d5 archive/default math template also passed strict fresh-home LLVM build and execution (3m29s build); it printed vector length five and cross product (0,0,1). Source native CI was already green on all three targets. Current OpenCV/gRPC/index native heads remain under validation. No merge, tag or release is included. diff --git a/.github/workflows/xpkgindex-update.yml b/.github/workflows/xpkgindex-update.yml index 2aff6a0c..3208f620 100644 --- a/.github/workflows/xpkgindex-update.yml +++ b/.github/workflows/xpkgindex-update.yml @@ -213,6 +213,9 @@ jobs: PACKAGE: ${{ matrix.id }} run: | "$MCPP" index update + # Refresh replaces the candidate with the published snapshot. + # Apply the candidate last, to both descriptor reader and installer. + python tests/prepare_builtin_index.py --home "$MCPP_HOME" if [[ "$TOOLCHAIN" != default ]]; then "$MCPP" toolchain install "$TOOLCHAIN" "$MCPP" toolchain default "$TOOLCHAIN" From fdac79a73e68c919a2269e42dcc78dab206cb2fa Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 14:34:08 +0900 Subject: [PATCH 17/47] Pin OpenCV persistence and runtime checkpoint; document adapter contracts --- .agents/skills/add-mcpp-index-package/SKILL.md | 4 ++++ docs/mwrap.md | 4 ++++ docs/zh/mwrap.md | 4 ++++ pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 ++++++------ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 4a337224..5e0361f2 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -90,6 +90,10 @@ description: Use when adding a new third-party library/package to the mcpp-index (日志中 `selected members: `),`lint`(含 `mcpp xpkg parse`)与 `mirror-cn-reachable` 覆盖新增描述符与 CN url。合并由维护者执行。 +加载 C++ SDK 的 Linux 消费者应验证运行时与 typed catch 契约,即使接口是 C API。 +已验证的 SDK 场景在模板中声明 `cxx_runtime = "toolchain-coupled"`,不能只用成功推理掩盖异常 ABI 冲突。 +模块适配生成器只写入实际变化的文件;复核公共头、manifest 和 facade 的时间戳幂等与增量构建。 + ## 自动更新与 PR 范围 - 对公共 GitHub release/数字 tag、稳定下载模板、无需改变构建配方的包,主动添加 diff --git a/docs/mwrap.md b/docs/mwrap.md index 3d618711..500df583 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -200,3 +200,7 @@ The pinned client routes each requested namespace independently. Registering the Normal installed consumers are tested independently by tests/mwrap/check_installed_template.py: it copies the complete pkgs/index.toml publication layout into one isolated built-in index, downloads the real checksummed source archive, runs mcpp new and builds/runs the generated manifest without a path substitution. The Git and published pkgs/mwrap directory layout remains identical. Coupled runtime/plugin/build-module consumers may require several candidate namespaces at once. Use `python3 tests/prepare_builtin_index.py --home ` to install the complete unchanged candidate layout as the test home's single built-in index; the member uses an empty `[indices]` table to override legacy workspace redirects. Updater candidate CI uses this mode too. Do not register the same full checkout through multiple project aliases. This is test-home preparation only: no publication staging, path conversion or mcpp engine change is required. + +For Linux consumers loading a C++ SDK through a C API, verify the C++ runtime contract as well as successful calls. The OpenCV/ORT integration exposed uncaught typed exceptions when a static runtime was embedded alongside the shared SDK runtime; `cxx_runtime = "toolchain-coupled"` fixed the same test. Templates must encode the verified contract and exercise a typed error path. + +Generated files are build inputs. Preserve their timestamps when content is unchanged, including manifests, module facades and configuration headers; touching an unchanged common header can rebuild the entire vendored implementation. Verify both byte idempotence and incremental behavior. diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index 7023e2f8..fdfc1758 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -143,3 +143,7 @@ vendored 静态实现同样需要显式部署,不能依赖共享库扫描发 Git 与发布的 pkgs/mwrap 目录始终一致。 运行库、插件、构建模块耦合的测试可能同时依赖多个候选 namespace。使用 `python3 tests/prepare_builtin_index.py --home <独立测试目录>`,将完整且字节不变的候选布局放入该测试 home 的唯一内置索引;成员用空 `[indices]` 覆盖旧 workspace 路由。自动更新候选 CI 同样使用此模式。不要将同一个完整 checkout 注册为多个项目别名。这只是测试 home 准备,不需要发布 staging、路径转换或修改 mcpp 引擎。 + +Linux 消费方即使通过 C API 加载 C++ SDK,也要验证 C++ 运行时契约及异常路径。OpenCV/ORT 组合实测中,静态运行时与共享 SDK 运行时混用会使 typed catch 终止;选择 `cxx_runtime = "toolchain-coupled"` 后同一测试通过。模板必须声明已验证的契约,并执行一次类型化错误路径。 + +生成清单、模块入口和配置头是构建输入;内容不变时保留时间戳,避免触碰公共配置头导致整份 vendored 实现重编。除了字节幂等,还应验证增量构建行为。 diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index 69932ae0..ec8e0294 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5da7fc8abedc700ce1ed91a1f57067ad552c74fc.tar.gz", - sha256 = "5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c", + url = "https://github.com/mcpplibs/opencv-m/archive/7e4fe399d3ee4d56133817288fa28ffc38207470.tar.gz", + sha256 = "1248a3fabfc7116941656c476389e86c7654b229570bc1d00ff4943b6eb1afbf", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5da7fc8abedc700ce1ed91a1f57067ad552c74fc.tar.gz", - sha256 = "5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c", + url = "https://github.com/mcpplibs/opencv-m/archive/7e4fe399d3ee4d56133817288fa28ffc38207470.tar.gz", + sha256 = "1248a3fabfc7116941656c476389e86c7654b229570bc1d00ff4943b6eb1afbf", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5da7fc8abedc700ce1ed91a1f57067ad552c74fc.tar.gz", - sha256 = "5b26b4150610a25f69947e570bb6eed5d832b276d79d5e04af5fdc5842f5279c", + url = "https://github.com/mcpplibs/opencv-m/archive/7e4fe399d3ee4d56133817288fa28ffc38207470.tar.gz", + sha256 = "1248a3fabfc7116941656c476389e86c7654b229570bc1d00ff4943b6eb1afbf", }, }, }, From 0887bc2d79a0fe739a6eec88799a896e975f946b Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 14:49:32 +0900 Subject: [PATCH 18/47] Pin verified OpenCV HAL and tracking source archive --- pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index ec8e0294..6a8420a1 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/7e4fe399d3ee4d56133817288fa28ffc38207470.tar.gz", - sha256 = "1248a3fabfc7116941656c476389e86c7654b229570bc1d00ff4943b6eb1afbf", + url = "https://github.com/mcpplibs/opencv-m/archive/8d1ee87583f4a39334476cbaf8e90cfa6a0318fa.tar.gz", + sha256 = "55f43a1f357854486790f5d8d426a68fbc87c37c2de3d7755d3be3eef3ef2373", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/7e4fe399d3ee4d56133817288fa28ffc38207470.tar.gz", - sha256 = "1248a3fabfc7116941656c476389e86c7654b229570bc1d00ff4943b6eb1afbf", + url = "https://github.com/mcpplibs/opencv-m/archive/8d1ee87583f4a39334476cbaf8e90cfa6a0318fa.tar.gz", + sha256 = "55f43a1f357854486790f5d8d426a68fbc87c37c2de3d7755d3be3eef3ef2373", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/7e4fe399d3ee4d56133817288fa28ffc38207470.tar.gz", - sha256 = "1248a3fabfc7116941656c476389e86c7654b229570bc1d00ff4943b6eb1afbf", + url = "https://github.com/mcpplibs/opencv-m/archive/8d1ee87583f4a39334476cbaf8e90cfa6a0318fa.tar.gz", + sha256 = "55f43a1f357854486790f5d8d426a68fbc87c37c2de3d7755d3be3eef3ef2373", }, }, }, From 7e5a54ccee615e2f8b1a32b34dd9cd7d5c2c55cb Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 15:00:16 +0900 Subject: [PATCH 19/47] Add optional WebP mux and demux for OpenCV codecs --- .../docs/2026-10-24-opencv-webp-provider.md | 27 ++++++ pkgs/c/compat.libwebp.lua | 15 +++- tests/examples/libwebp/mcpp.toml | 2 +- tests/examples/libwebp/tests/containers.cpp | 82 +++++++++++++++++++ 4 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 .agents/docs/2026-10-24-opencv-webp-provider.md create mode 100644 tests/examples/libwebp/tests/containers.cpp diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md new file mode 100644 index 00000000..30310c17 --- /dev/null +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -0,0 +1,27 @@ +# OpenCV WebP provider checkpoint + +OpenCV 5.0.0 grfmt_webp.cpp uses encoding/decoding, animation, EXIF/XMP/ICC +containers and therefore requires both upstream WebP mux and demux implementations. +The existing compat.libwebp 1.5.0 source recipe retains ownership of this C library; +no second vendored implementation or module wrapper is introduced. + +- `demux` adds src/demux/*.c; `mux` adds src/mux/*.c. Each is independent and additive. +- Default encode/decode/sharpyuv source selection, architecture gates and flags are unchanged. +- All three historical platform version/URL/hash blocks remain byte-identical. +- COPYING, PATENTS and AUTHORS are explicitly deployed under licenses/libwebp. +- The existing workspace consumer now requests both features. Its additional + standalone test encodes two lossless animation frames, muxes an EXIF chunk, + demuxes the metadata and checks decoded pixels and timestamps. Checks survive NDEBUG. + +Linux verification uses mcpp 2026.10.24.1 and LLVM23.1.3. Strict fresh projects +passed both the original roundtrip and container test (1.28 seconds), then a +separate unchanged-default dependency passed the original test (1.72 seconds). +Actual compile_commands.json includes mux/demux only for the enabled variant. +Logs: /tmp/mwrap-webp-provider-variants-final.log. All work uses the shared +sixteen-core/32 GiB test slice with three build jobs and disk/memory guards. + +The direct workspace-root strict command rejects its pre-existing deprecated +index inheritance; isolated projects use the byte-identical compat test view, +without editing the client or suppressing diagnostics. Normal workspace/native +CI remains required on this exact index head. OpenCV imgcodecs-webp integration, +its source matrix and actual archive/deployment consumer are separate gates. diff --git a/pkgs/c/compat.libwebp.lua b/pkgs/c/compat.libwebp.lua index 44cfc258..9b0163f3 100644 --- a/pkgs/c/compat.libwebp.lua +++ b/pkgs/c/compat.libwebp.lua @@ -10,9 +10,9 @@ -- CMake builds it as a separate target only to reuse it elsewhere, and there is -- nothing else here to reuse it. -- --- WHAT IS NOT. `src/demux` and `src/mux` (animation and metadata containers: --- WebPDemux* / WebPMux*) are separate upstream libraries with their own public --- headers; they belong in a feature, and nothing asks for them yet. +-- OPTIONAL. `demux` and `mux` add upstream animation/metadata containers to +-- the same implementation owner. OpenCV's WebP codec requires both; ordinary +-- encode/decode consumers retain the original default source set. -- `examples/`, `extras/`, `imageio/` and `swig/` are tools and bindings. -- -- SIMD, and the one thing this package has to decide. Every @@ -143,6 +143,15 @@ package = { "*/sharpyuv/*.c", }, targets = { ["webp"] = { kind = "lib" } }, + features = { + ["demux"] = { sources = { "*/src/demux/*.c" } }, + ["mux"] = { sources = { "*/src/mux/*.c" } }, + }, + runtime = { deploy = { + { from = "libwebp-1.5.0/COPYING", to = "licenses/libwebp" }, + { from = "libwebp-1.5.0/PATENTS", to = "licenses/libwebp" }, + { from = "libwebp-1.5.0/AUTHORS", to = "licenses/libwebp" }, + } }, deps = { }, -- libm for the dsp math, pthread for utils/thread_utils.c's worker pool. diff --git a/tests/examples/libwebp/mcpp.toml b/tests/examples/libwebp/mcpp.toml index d87fa1c4..12811199 100644 --- a/tests/examples/libwebp/mcpp.toml +++ b/tests/examples/libwebp/mcpp.toml @@ -5,4 +5,4 @@ name = "libwebp-tests" version = "0.1.0" [dependencies.compat] -libwebp = "1.5.0" +libwebp = { version = "1.5.0", features = ["demux", "mux"] } diff --git a/tests/examples/libwebp/tests/containers.cpp b/tests/examples/libwebp/tests/containers.cpp new file mode 100644 index 00000000..1388f1be --- /dev/null +++ b/tests/examples/libwebp/tests/containers.cpp @@ -0,0 +1,82 @@ +// Exercise the optional upstream mux/demux implementations with an actual +// two-frame lossless stream and an EXIF container chunk. Checks survive NDEBUG. +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace { +void require(bool condition, const char* message) { + if (!condition) throw std::runtime_error(message); +} +struct Data { + WebPData value{}; + ~Data() { WebPDataClear(&value); } +}; +} + +int main() { + constexpr int width = 8, height = 8; + const std::array, 2> colors{{{20, 80, 160, 255}, {180, 40, 70, 255}}}; + WebPAnimEncoderOptions options; + require(WebPAnimEncoderOptionsInit(&options), "animation encoder options ABI"); + std::unique_ptr encoder( + WebPAnimEncoderNew(width, height, &options), WebPAnimEncoderDelete); + require(bool(encoder), "animation encoder construction"); + WebPConfig config; + require(WebPConfigInit(&config) && WebPConfigLosslessPreset(&config, 6), "lossless configuration"); + for (int frame = 0; frame < 2; ++frame) { + std::vector rgba(width * height * 4); + for (int pixel = 0; pixel < width * height; ++pixel) + std::memcpy(rgba.data() + pixel * 4, colors[frame].data(), 4); + WebPPicture picture; + require(WebPPictureInit(&picture), "picture ABI"); + picture.use_argb = 1; + picture.width = width; + picture.height = height; + require(WebPPictureImportRGBA(&picture, rgba.data(), width * 4), "picture import"); + const bool added = WebPAnimEncoderAdd(encoder.get(), &picture, frame * 80, &config); + WebPPictureFree(&picture); + require(added, "animation frame encoding"); + } + require(WebPAnimEncoderAdd(encoder.get(), nullptr, 200, nullptr), "animation final timestamp"); + Data animated; + require(WebPAnimEncoderAssemble(encoder.get(), &animated.value), "animation assembly"); + std::unique_ptr mux(WebPMuxCreate(&animated.value, 1), WebPMuxDelete); + require(bool(mux), "mux construction"); + constexpr char metadata[] = "mwrap-webp"; + const WebPData chunk{reinterpret_cast(metadata), sizeof(metadata) - 1}; + require(WebPMuxSetChunk(mux.get(), "EXIF", &chunk, 1) == WEBP_MUX_OK, "metadata mux"); + Data encoded; + require(WebPMuxAssemble(mux.get(), &encoded.value) == WEBP_MUX_OK, "metadata assembly"); + + std::unique_ptr demux(WebPDemux(&encoded.value), WebPDemuxDelete); + require(bool(demux) && WebPDemuxGetI(demux.get(), WEBP_FF_FRAME_COUNT) == 2, "two-frame demux"); + WebPChunkIterator iterator; + require(WebPDemuxGetChunk(demux.get(), "EXIF", 1, &iterator), "metadata demux"); + const bool same_chunk = iterator.chunk.size == chunk.size && + std::memcmp(iterator.chunk.bytes, chunk.bytes, chunk.size) == 0; + WebPDemuxReleaseChunkIterator(&iterator); + require(same_chunk, "metadata payload changed"); + + WebPAnimDecoderOptions decode_options; + require(WebPAnimDecoderOptionsInit(&decode_options), "animation decoder options ABI"); + decode_options.color_mode = MODE_RGBA; + std::unique_ptr decoder( + WebPAnimDecoderNew(&encoded.value, &decode_options), WebPAnimDecoderDelete); + require(bool(decoder), "animation decoder construction"); + for (int frame = 0; frame < 2; ++frame) { + uint8_t* rgba = nullptr; + int timestamp = -1; + require(WebPAnimDecoderGetNext(decoder.get(), &rgba, ×tamp), "animation decode"); + require(timestamp == (frame == 0 ? 80 : 200), "frame timing changed"); + for (int pixel = 0; pixel < width * height; ++pixel) + require(std::memcmp(rgba + pixel * 4, colors[frame].data(), 4) == 0, "lossless pixels changed"); + } + require(!WebPAnimDecoderHasMoreFrames(decoder.get()), "unexpected extra frame"); +} From 39e7972d1b0f06ab959dbe9e58918554a8b64e6d Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 15:26:29 +0900 Subject: [PATCH 20/47] Verify OpenCV WebP archive consumers and relocated deployment --- .../docs/2026-10-24-opencv-webp-provider.md | 22 +++++ .github/workflows/validate.yml | 5 + mcpp.toml | 1 + pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 +-- tests/mwrap/check_webp_deployment.py | 97 +++++++++++++++++++ tests/mwrap/opencv-webp/mcpp.toml | 11 +++ tests/mwrap/opencv-webp/tests/pipeline.cpp | 42 ++++++++ 7 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 tests/mwrap/check_webp_deployment.py create mode 100644 tests/mwrap/opencv-webp/mcpp.toml create mode 100644 tests/mwrap/opencv-webp/tests/pipeline.cpp diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index 30310c17..b13e8ade 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -25,3 +25,25 @@ index inheritance; isolated projects use the byte-identical compat test view, without editing the client or suppressing diagnostics. Normal workspace/native CI remains required on this exact index head. OpenCV imgcodecs-webp integration, its source matrix and actual archive/deployment consumer are separate gates. + +## Archive and deployment acceptance + +OpenCV source 16baa03ef4353188c816a6ff5962a5da53998814 was downloaded twice +with SHA256 556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1. +The new tests/mwrap/opencv-webp member consumes that actual source archive. +An isolated home with the complete unchanged publication index strictly built +and ran the consumer, then packed a release application and ran the relocated +bundle with an empty home and cleared library/runtime overrides. Lossless alpha +and transparent RGB, two-frame timing/loop count, XMP bytes and WEBP build +information checks passed. ELF dependencies resolve within the bundle. All +fourteen OpenCV/wrapper notices plus three libwebp notices match their original +source bytes. Log: /tmp/mwrap-webp-archive-deployment.log. + +The deployment helper is also registered for native default-toolchain workspace +CI when opencv-webp is selected; ordinary member tests cover other compiler legs. +All seventeen pinned-updater regressions pass, and the full audit still covers +91 automatic declarations/two reviewed snapshots with historical versions intact. +The initial local unittest invocation lacked the workflow's pinned-updater +PYTHONPATH; the successful rerun uses /tmp/mwrap-updater-6c0bee/src. +Native CI results are required on the final source/index commits; these local +checks do not certify Windows/macOS/musl behavior by inference. diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f34694f7..211b3567 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1555,6 +1555,11 @@ jobs: shell: bash run: python3 tests/prepare_builtin_index.py --home "$MCPP_HOME" + - name: Installed OpenCV WebP archive and relocated consumer + if: contains(format(' {0} ', env.MEMBERS), ' opencv-webp ') && matrix.toolchain == 'default' + shell: bash + run: python3 tests/mwrap/check_webp_deployment.py --mcpp "$MCPP" + - name: Installed OpenCV archive, image template and relocated deployment if: contains(format(' {0} ', env.MEMBERS), ' opencv-cpu ') && matrix.toolchain == 'default' shell: bash diff --git a/mcpp.toml b/mcpp.toml index 372efaeb..8adef764 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -11,6 +11,7 @@ mcpp = ">=2026.10.21.1" [workspace] members = [ "tests/mwrap/opencv-cpu", + "tests/mwrap/opencv-webp", "tests/mwrap/onnxruntime-cpu", "tests/mwrap/llamacpp-cpu", "tests/mwrap/ffmpeg-cpu", diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index 6a8420a1..d297f5ba 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/8d1ee87583f4a39334476cbaf8e90cfa6a0318fa.tar.gz", - sha256 = "55f43a1f357854486790f5d8d426a68fbc87c37c2de3d7755d3be3eef3ef2373", + url = "https://github.com/mcpplibs/opencv-m/archive/16baa03ef4353188c816a6ff5962a5da53998814.tar.gz", + sha256 = "556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/8d1ee87583f4a39334476cbaf8e90cfa6a0318fa.tar.gz", - sha256 = "55f43a1f357854486790f5d8d426a68fbc87c37c2de3d7755d3be3eef3ef2373", + url = "https://github.com/mcpplibs/opencv-m/archive/16baa03ef4353188c816a6ff5962a5da53998814.tar.gz", + sha256 = "556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/8d1ee87583f4a39334476cbaf8e90cfa6a0318fa.tar.gz", - sha256 = "55f43a1f357854486790f5d8d426a68fbc87c37c2de3d7755d3be3eef3ef2373", + url = "https://github.com/mcpplibs/opencv-m/archive/16baa03ef4353188c816a6ff5962a5da53998814.tar.gz", + sha256 = "556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1", }, }, }, diff --git a/tests/mwrap/check_webp_deployment.py b/tests/mwrap/check_webp_deployment.py new file mode 100644 index 00000000..66026154 --- /dev/null +++ b/tests/mwrap/check_webp_deployment.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Install the actual OpenCV/WebP archives and verify a relocated consumer.""" +import argparse +import json +import os +from pathlib import Path +import re +import shutil +import subprocess +import sys +import tempfile + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--mcpp", default="mcpp") + parser.add_argument("--toolchain", default="llvm@23.1.3") + args = parser.parse_args() + root = Path(__file__).resolve().parents[2] + with tempfile.TemporaryDirectory(prefix="mwrap-webp-deployment-") as directory: + temporary = Path(directory) + home = temporary / "home" + index = home / "indices/mcpplibs" + index.mkdir(parents=True) + shutil.copytree(root / "pkgs", index / "pkgs") + shutil.copyfile(root / "index.toml", index / "index.toml") + project = temporary / "consumer" + shutil.copytree(root / "tests/mwrap/opencv-webp", project) + manifest = project / "mcpp.toml" + # The fresh home has the complete unchanged publication index. Keep + # dependency identities/features intact; remove test-view routing only. + text = re.sub(r"(?ms)^\[indices\]\n.*?(?=^\[|\Z)", "[indices]\n\n", manifest.read_text()) + manifest.write_text(text) + (project / "src").mkdir() + shutil.copyfile(project / "tests/pipeline.cpp", project / "src/main.cpp") + env = dict(os.environ, MCPP_HOME=str(home)) + commands = [ + [args.mcpp, "self", "config", "--mirror", "GLOBAL"], + [args.mcpp, "build", "--toolchain", args.toolchain, "--strict"], + [args.mcpp, "run", "--toolchain", args.toolchain], + [args.mcpp, "pack", "--toolchain", args.toolchain, "--mode", "self-contained", + "--format", "dir", "--output", "webp-deployment"], + ] + for command in commands: + print("+", " ".join(command), flush=True) + subprocess.run(command, cwd=project, env=env, check=True) + bundle = project / "target/dist/webp-deployment" + relocated = temporary / "relocated" + shutil.copytree(bundle, relocated, symlinks=True) + entries = json.loads((project / "compile_commands.json").read_text()) + sdk = next(parent for entry in entries for parent in Path(entry["file"]).parents + if parent.name == "libwebp-1.5.0") + notices = list(relocated.rglob("licenses/libwebp")) + assert len(notices) == 1, f"Missing/ambiguous WebP notices: {notices}" + for name in ("COPYING", "PATENTS", "AUTHORS"): + assert (notices[0] / name).read_bytes() == (sdk / name).read_bytes(), name + source = next(Path(entry["file"]).parent.parent for entry in entries + if Path(entry["file"]).name == "core.cppm") + originals = [source / "LICENSE", *[path for path in (source / "upstream/opencv").rglob("*") + if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] + notices = list(relocated.rglob("licenses/opencv")) + assert len(notices) == 1, f"Missing/ambiguous OpenCV notices: {notices}" + for original in originals: + assert (notices[0] / original.relative_to(source)).read_bytes() == original.read_bytes(), original + runtime = {key: value for key, value in os.environ.items() + if key not in {"MCPP_HOME", "XLINGS_HOME", "LD_LIBRARY_PATH", "LD_PRELOAD", + "DYLD_LIBRARY_PATH", "DYLD_FALLBACK_LIBRARY_PATH"}} + empty_home = temporary / "empty-home" + empty_home.mkdir() + runtime.update(HOME=str(empty_home), USERPROFILE=str(empty_home)) + if sys.platform.startswith("linux"): + runtime["PATH"] = "/usr/bin:/bin" + launcher = relocated / "run.sh" + else: + filename = "opencv-webp" + (".exe" if os.name == "nt" else "") + launcher = relocated / "bin" / filename + if not launcher.exists(): + launcher = relocated / filename + if os.name == "nt": + system_root = os.environ.get("SystemRoot", r"C:\Windows") + runtime["PATH"] = os.pathsep.join([system_root, str(Path(system_root) / "System32")]) + subprocess.run([str(launcher)], cwd=empty_home, env=runtime, check=True) + if sys.platform.startswith("linux"): + listing = subprocess.run([str(relocated / "lib/ld-linux-x86-64.so.2"), + "--library-path", str(relocated / "lib"), "--list", + str(relocated / "bin/opencv-webp")], + cwd=empty_home, env=runtime, text=True, capture_output=True, check=True) + for line in listing.stdout.splitlines(): + if "=>" in line: + resolved = line.split("=>", 1)[1].strip().split(" ", 1)[0] + if resolved.startswith("/"): + assert Path(resolved).resolve().is_relative_to(relocated.resolve()), line + print(f"Verified relocated WebP consumer and {len(originals) + 3} byte-identical notices", flush=True) + + +if __name__ == "__main__": + main() diff --git a/tests/mwrap/opencv-webp/mcpp.toml b/tests/mwrap/opencv-webp/mcpp.toml new file mode 100644 index 00000000..299f29e3 --- /dev/null +++ b/tests/mwrap/opencv-webp/mcpp.toml @@ -0,0 +1,11 @@ +[package] +name = "opencv-webp" +version = "5.0.0.1" +description = "Consume the OpenCV archive with optional WebP image, animation and metadata support" + +[indices] +"mcpplibs.mwrap" = { path = "../.indices/mcpplibs.mwrap" } +"compat" = { path = "../.indices/compat" } + +[dependencies] +"mcpplibs.mwrap.opencv" = { version = "5.0.0.1", features = ["imgcodecs-webp"] } diff --git a/tests/mwrap/opencv-webp/tests/pipeline.cpp b/tests/mwrap/opencv-webp/tests/pipeline.cpp new file mode 100644 index 00000000..2085b978 --- /dev/null +++ b/tests/mwrap/opencv-webp/tests/pipeline.cpp @@ -0,0 +1,42 @@ +import std; +import mcpplibs.mwrap.opencv; + +int main() { + namespace types = mcpplibs::mwrap::opencv::macros; + if (cv::getBuildInformation().find("WEBP: YES") == std::string::npos) return 8; + cv::Mat image(8, 8, types::CV_8UC4, cv::Scalar(20, 80, 160, 180)); + image.at(0, 0) = cv::Vec4b(7, 19, 23, 0); + std::vector bytes; + if (!cv::imencode(".webp", image, bytes, + {cv::IMWRITE_WEBP_LOSSLESS_MODE, cv::IMWRITE_WEBP_LOSSLESS_PRESERVE_COLOR})) return 1; + auto decoded = cv::imdecode(bytes, cv::IMREAD_UNCHANGED); + if (decoded.empty() || decoded.type() != image.type() || decoded.size() != image.size() || + cv::norm(decoded, image, cv::NORM_INF) != 0) return 2; + + cv::Animation animation(2); + animation.frames = {cv::Mat(8, 8, types::CV_8UC4, cv::Scalar(20, 80, 160, 180)), + cv::Mat(8, 8, types::CV_8UC4, cv::Scalar(100, 40, 70, 200))}; + animation.durations = {80, 120}; + if (!cv::imencodeanimation(".webp", animation, bytes, {cv::IMWRITE_WEBP_QUALITY, 101})) return 3; + cv::Animation restored; + if (!cv::imdecodeanimation(bytes, restored) || restored.loop_count != 2 || + restored.durations != animation.durations || restored.frames.size() != 2) return 4; + for (int frame = 0; frame < 2; ++frame) + if (restored.frames[frame].type() != animation.frames[frame].type() || + restored.frames[frame].size() != animation.frames[frame].size() || + cv::norm(restored.frames[frame], animation.frames[frame], cv::NORM_INF) != 0) return 5; + + const std::string xmp = "archive"; + cv::Mat chunk(1, static_cast(xmp.size()), types::CV_8U, const_cast(xmp.data())); + const std::vector kinds{cv::IMAGE_METADATA_XMP}; + const std::vector metadata{chunk}; + if (!cv::imencodeWithMetadata(".webp", animation.frames[0], kinds, metadata, bytes, + {cv::IMWRITE_WEBP_LOSSLESS_MODE, cv::IMWRITE_WEBP_LOSSLESS_ON})) return 6; + std::vector decoded_kinds; + std::vector decoded_metadata; + decoded = cv::imdecodeWithMetadata(bytes, decoded_kinds, decoded_metadata, cv::IMREAD_UNCHANGED); + if (decoded.empty() || decoded_kinds != kinds || decoded_metadata.size() != 1 || + decoded_metadata[0].total() != xmp.size() || + std::memcmp(decoded_metadata[0].data, xmp.data(), xmp.size()) != 0) return 7; + std::println("OpenCV WebP archive: lossless alpha, animation and XMP metadata passed"); +} From 234dade33e4aabd7399b3eafb545151dc5e9f9af Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 15:30:20 +0900 Subject: [PATCH 21/47] Clarify WebP baseline policy with current scoped flag support --- pkgs/c/compat.libwebp.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/c/compat.libwebp.lua b/pkgs/c/compat.libwebp.lua index 9b0163f3..4e9b9f1e 100644 --- a/pkgs/c/compat.libwebp.lua +++ b/pkgs/c/compat.libwebp.lua @@ -35,8 +35,9 @@ -- but would be inlined into function 'VP8L32bToPlanar_SSE41' that is -- compiled without support for 'ssse3' -- --- Upstream's CMake answers this with a PER-FILE `-msse4.1`, which mcpp has no --- field for. Adding it package-wide instead would let clang emit SSE4.1 in the +-- Upstream's CMake answers this with a per-file `-msse4.1`. Current mcpp +-- supports scoped flags; this recipe retains its original baseline profile. +-- Adding that flag package-wide would let clang emit SSE4.1 in the -- BASELINE translation units too, past libwebp's own runtime CPU dispatch — an -- artifact that SIGILLs on a pre-2008 CPU rather than falling back. So this -- package takes the other half of upstream's mechanism: `HAVE_CONFIG_H` plus a From 2e547350aeb13e86792972f42dcc4ddd3c81cadb Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 17:07:39 +0900 Subject: [PATCH 22/47] Verify embedded OpenCV notices in installed archives and relocated consumers --- .../docs/2026-10-24-opencv-webp-provider.md | 19 +++++++++++++++++++ pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 ++++++------ tests/mwrap/check_installed_template.py | 3 ++- tests/mwrap/check_webp_deployment.py | 3 ++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index b13e8ade..49cf93b7 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -47,3 +47,22 @@ The initial local unittest invocation lacked the workflow's pinned-updater PYTHONPATH; the successful rerun uses /tmp/mwrap-updater-6c0bee/src. Native CI results are required on the final source/index commits; these local checks do not certify Windows/macOS/musl behavior by inference. + +## Embedded notice supplement and updated archive + +Candidate 019eaadb4c2212246cf20e29447bb1ef960333ba was independently downloaded +twice with SHA256 e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661. +It adds the SDK inline-helper/value-operator checkpoint and a deterministic +embedded source notice supplement. The original fourteen named OpenCV notices +remain; the additional supplement preserves source comment bytes and locations. +Both installed-template and WebP deployment helpers require that supplement. + +The fresh-home archive test strictly built and ran the consumer (2m55s), packed +a release bundle (1m34s), and ran it after relocation with an empty HOME and +cleared runtime overrides. Image/animation/XMP checks and the bundled ELF loader +closure passed. All fifteen OpenCV plus three WebP notices match the installed +source bytes. Log: /tmp/mwrap-notices-archive-deployment.log. This local test used +the shared resource slice, three build jobs and the whole-host pressure guard. +Descriptor parsing, naming, version parity and duplicate-version checks pass. +Native CI still needs the new exact source and index heads; the previous OpenCV +16baa03 matrix completed all five jobs successfully. diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index d297f5ba..cf6efc2f 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/16baa03ef4353188c816a6ff5962a5da53998814.tar.gz", - sha256 = "556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1", + url = "https://github.com/mcpplibs/opencv-m/archive/019eaadb4c2212246cf20e29447bb1ef960333ba.tar.gz", + sha256 = "e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/16baa03ef4353188c816a6ff5962a5da53998814.tar.gz", - sha256 = "556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1", + url = "https://github.com/mcpplibs/opencv-m/archive/019eaadb4c2212246cf20e29447bb1ef960333ba.tar.gz", + sha256 = "e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/16baa03ef4353188c816a6ff5962a5da53998814.tar.gz", - sha256 = "556df2142b56cac8f635597bcec9bf32a45957cc0203cff0feb5cf9e256b09c1", + url = "https://github.com/mcpplibs/opencv-m/archive/019eaadb4c2212246cf20e29447bb1ef960333ba.tar.gz", + sha256 = "e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661", }, }, }, diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 34406581..0d14be0c 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -100,7 +100,8 @@ def main(): sources = [Path(item["file"]).parent.parent for item in commands if Path(item["file"]).name == "core.cppm"] source = next(path for path in sources if (path / "upstream/opencv/LICENSE").is_file()) - notices = [source / "LICENSE", *[path for path in (source / "upstream/opencv").rglob("*") + notices = [source / "LICENSE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", + *[path for path in (source / "upstream/opencv").rglob("*") if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] roots = list(relocated.rglob("licenses/opencv")) assert len(roots) == 1, f"Missing OpenCV runtime license tree: {roots}" diff --git a/tests/mwrap/check_webp_deployment.py b/tests/mwrap/check_webp_deployment.py index 66026154..f8132874 100644 --- a/tests/mwrap/check_webp_deployment.py +++ b/tests/mwrap/check_webp_deployment.py @@ -56,7 +56,8 @@ def main(): assert (notices[0] / name).read_bytes() == (sdk / name).read_bytes(), name source = next(Path(entry["file"]).parent.parent for entry in entries if Path(entry["file"]).name == "core.cppm") - originals = [source / "LICENSE", *[path for path in (source / "upstream/opencv").rglob("*") + originals = [source / "LICENSE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", + *[path for path in (source / "upstream/opencv").rglob("*") if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] notices = list(relocated.rglob("licenses/opencv")) assert len(notices) == 1, f"Missing/ambiguous OpenCV notices: {notices}" From 6ff350aae9eb3cf4c23e764fac43c6c54bbb59f0 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 19:46:54 +0900 Subject: [PATCH 23/47] Prepare isolated namespace views before mwrap workspace validation --- .../docs/2026-10-24-opencv-webp-provider.md | 19 ++++++++ .github/workflows/validate.yml | 6 +++ tests/prepare_mwrap_indices.py | 8 ++++ tests/test_prepare_mwrap_indices.py | 48 +++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 tests/test_prepare_mwrap_indices.py diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index 49cf93b7..affc619c 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -66,3 +66,22 @@ the shared resource slice, three build jobs and the whole-host pressure guard. Descriptor parsing, naming, version parity and duplicate-version checks pass. Native CI still needs the new exact source and index heads; the previous OpenCV 16baa03 matrix completed all five jobs successfully. + +## Namespace-isolated validation views + +Validation run 40076826208 failed on Linux default, Linux LLVM and macOS shards: +both compat and mcpplibs.mwrap project aliases exposed complete indices, so +xlings rejected duplicate ORT/OpenCV candidates. The existing view preparer was +not registered in the workspace workflow. Validation now prepares namespace-only +views before consumers and replaces each owned scratch view in full, including +stale categories left by earlier complete-index copies. Publication paths and +descriptor bytes are unchanged; no client engine changes are required. + +The regression fixture seeds a cross-namespace descriptor in an old category, +rebuilds twice and verifies unique candidates plus exact source bytes/provenance. +It passes and runs before preparation in CI. A separate actual consumer with a +fresh MCPP_HOME installed the immutable ORT wrapper, CPU SDK and LLVM23.1.3, +then passed inference and public_surface under strict mode (2 tests, 103.25s). +Log: /tmp/mwrap-disjoint-view-consumer.log. The test used the shared eight-core, +32 GiB resource slice, two build jobs and whole-host 80% pressure guard. Native +workspace CI on the new index commit remains required. diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 211b3567..db5bde6c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1550,6 +1550,12 @@ jobs: run: | "$MCPP" index update + - name: Namespace-isolated mwrap test indices + shell: bash + run: | + python3 tests/test_prepare_mwrap_indices.py + python3 tests/prepare_mwrap_indices.py + - name: Complete candidate index for the cross-namespace host-tool consumer if: contains(format(' {0} ', env.MEMBERS), ' grpc-tools ') shell: bash diff --git a/tests/prepare_mwrap_indices.py b/tests/prepare_mwrap_indices.py index 65572146..f749db72 100644 --- a/tests/prepare_mwrap_indices.py +++ b/tests/prepare_mwrap_indices.py @@ -22,6 +22,14 @@ def main(): namespaces[match[1]].append(source) for namespace, sources in namespaces.items(): view = root / "tests/mwrap/.indices" / namespace + # These are generated scratch views. Clear older complete-index copies + # too; cleaning only pkgs/view leaves stale categories and ambiguous + # namespace candidates in another project alias. + assert view.parent.resolve().is_relative_to(root / "tests/mwrap"), view + if view.is_symlink(): + view.unlink() + elif view.exists(): + shutil.rmtree(view) payload = view / "pkgs/view" payload.mkdir(parents=True, exist_ok=True) expected = {source.name for source in sources} diff --git a/tests/test_prepare_mwrap_indices.py b/tests/test_prepare_mwrap_indices.py new file mode 100644 index 00000000..06dfb9bb --- /dev/null +++ b/tests/test_prepare_mwrap_indices.py @@ -0,0 +1,48 @@ +"""Regression for ambiguous candidates left by complete test-index copies.""" +from pathlib import Path +import json +import shutil +import subprocess +import sys +import tempfile +import unittest + + +class NamespaceViews(unittest.TestCase): + def test_rebuild_removes_cross_namespace_candidates(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + (root / "tests").mkdir() + script = root / "tests/prepare_mwrap_indices.py" + shutil.copyfile(Path(__file__).with_name(script.name), script) + (root / "index.toml").write_text('name = "fixture"\n') + originals = {} + namespaces = ("compat", "mcpplibs.mwrap", "grpc", "mcpplibs") + for namespace in namespaces: + source = root / "pkgs/mwrap" / (namespace + ".sample.lua") + source.parent.mkdir(parents=True, exist_ok=True) + data = ('namespace = "' + namespace + '"\nname = "sample"\n').encode() + source.write_bytes(data) + originals[source.relative_to(root).as_posix()] = data + views = root / "tests/mwrap/.indices" + for attempt in range(2): + # Old clients could populate a missing view with a full index. + stale = views / "compat/pkgs/old-category/mcpplibs.mwrap.sample.lua" + stale.parent.mkdir(parents=True, exist_ok=True) + stale.write_bytes(originals["pkgs/mwrap/mcpplibs.mwrap.sample.lua"]) + subprocess.run([sys.executable, str(script)], check=True, capture_output=True) + self.assertFalse(stale.exists()) + candidates = [] + for namespace in namespaces: + view = views / namespace + descriptors = list(view.glob("pkgs/*/*.lua")) + self.assertEqual(len(descriptors), 1) + key = "pkgs/mwrap/" + namespace + ".sample.lua" + self.assertEqual(descriptors[0].read_bytes(), originals[key]) + self.assertEqual(set(json.loads((view / "source-manifest.json").read_text())), {key}) + candidates.append(descriptors[0].read_bytes()) + self.assertEqual(len(set(candidates)), 4) + + +if __name__ == "__main__": + unittest.main() From ee52fdb7da3ade45fc6572565a77cc563c51e3e0 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 20:21:37 +0900 Subject: [PATCH 24/47] Use one complete candidate index across mixed mwrap workspaces --- .../docs/2026-10-24-opencv-webp-provider.md | 26 +++++++++++++++++++ .github/workflows/validate.yml | 6 ++--- tests/mwrap/ffmpeg-cpu/mcpp.toml | 3 ++- tests/mwrap/godot-math/mcpp.toml | 3 ++- tests/mwrap/grpc-cpu/mcpp.toml | 3 ++- tests/mwrap/grpc-tools/mcpp.toml | 4 +-- tests/mwrap/imgui-headless/mcpp.toml | 3 ++- tests/mwrap/llamacpp-cpu/mcpp.toml | 3 ++- tests/mwrap/onnxruntime-cpu/mcpp.toml | 4 +-- tests/mwrap/onnxruntime-sdk/mcpp.toml | 3 ++- tests/mwrap/opencv-cpu/mcpp.toml | 3 ++- tests/mwrap/opencv-webp/mcpp.toml | 4 +-- tests/run_members.sh | 10 ++++++- tests/test_prepare_mwrap_indices.py | 12 +++++++++ 14 files changed, 69 insertions(+), 18 deletions(-) diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index affc619c..e177eddd 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -85,3 +85,29 @@ then passed inference and public_surface under strict mode (2 tests, 103.25s). Log: /tmp/mwrap-disjoint-view-consumer.log. The test used the shared eight-core, 32 GiB resource slice, two build jobs and whole-host 80% pressure guard. Native workspace CI on the new index commit remains required. + +## Mixed workspace resolution correction + +Run 40087278903 / Linux LLVM shard 0/6 still failed ORT/OpenCV ambiguity after +view preparation. The log confirms both preparations ran successfully before +libwebp and llama.cpp consumers; the later mwrap consumers nevertheless saw +cross-namespace candidates. The standalone fresh-home result above did not +cover this mixed workspace ordering. + +A private-home fixture now reproduces the actual sequence: configure a legacy +compat.zlib 1.3.2 consumer against the complete project index, then resolve ORT +with the two namespace views. That second resolution fails with duplicate +candidates. Keeping the same warmed home/workspace and changing only the ORT +member to an explicit empty [indices] table succeeds: strict inference and +public_surface both run (19.97s). The fixture installs the complete unchanged +candidate layout into its built-in index; it does not edit the client engine +or a user-global registry. Log: /tmp/mwrap-mixed-workspace-index.log. + +All ten mwrap workspace members now use that explicit empty table. CI installs +the complete candidate built-in index after its published refresh, and the local +member runner does the same for mwrap selections. An unset local MCPP_HOME +selects target/mwrap-test-home, with bootstrap before copying the candidate; +normal user's default home is not replaced. Static regression guards require +mwrap members to retain their explicit override. Namespace-view tooling remains +available to isolated single-project consumers, with its scope documented. +New exact-head native workspace validation remains required. diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index db5bde6c..cb0bc305 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1550,14 +1550,12 @@ jobs: run: | "$MCPP" index update - - name: Namespace-isolated mwrap test indices + - name: Namespace view preparation regression shell: bash run: | python3 tests/test_prepare_mwrap_indices.py - python3 tests/prepare_mwrap_indices.py - - name: Complete candidate index for the cross-namespace host-tool consumer - if: contains(format(' {0} ', env.MEMBERS), ' grpc-tools ') + - name: Complete candidate built-in index for workspace consumers shell: bash run: python3 tests/prepare_builtin_index.py --home "$MCPP_HOME" diff --git a/tests/mwrap/ffmpeg-cpu/mcpp.toml b/tests/mwrap/ffmpeg-cpu/mcpp.toml index a001508d..21c02cfe 100644 --- a/tests/mwrap/ffmpeg-cpu/mcpp.toml +++ b/tests/mwrap/ffmpeg-cpu/mcpp.toml @@ -4,7 +4,8 @@ version = "8.1.2.1" description = "Consume the immutable FFmpeg wrapper revision and decode a real raw frame" [indices] -ffmpeg = { path = "../../.." } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies] "ffmpeg.ffmpeg" = "8.1.2.1" diff --git a/tests/mwrap/godot-math/mcpp.toml b/tests/mwrap/godot-math/mcpp.toml index c18dd1df..4da22d5c 100644 --- a/tests/mwrap/godot-math/mcpp.toml +++ b/tests/mwrap/godot-math/mcpp.toml @@ -4,7 +4,8 @@ version = "10.0.0-rc1.1" description = "Run the immutable godot-cpp module wrapper without an engine" [indices] -godotengine = { path = "../../.." } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies] "godotengine.godot-cpp-m" = "10.0.0-rc1.1" diff --git a/tests/mwrap/grpc-cpu/mcpp.toml b/tests/mwrap/grpc-cpu/mcpp.toml index 885f3ac6..49c19051 100644 --- a/tests/mwrap/grpc-cpu/mcpp.toml +++ b/tests/mwrap/grpc-cpu/mcpp.toml @@ -4,7 +4,8 @@ version = "1.83.0.1" description = "Consume the immutable gRPC wrapper revision and check module status semantics" [indices] -grpc = { path = "../../.." } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [target.'cfg(unix)'.dependencies] "grpc.grpc" = "1.83.0.1" diff --git a/tests/mwrap/grpc-tools/mcpp.toml b/tests/mwrap/grpc-tools/mcpp.toml index 3bd1830b..bab6b806 100644 --- a/tests/mwrap/grpc-tools/mcpp.toml +++ b/tests/mwrap/grpc-tools/mcpp.toml @@ -4,8 +4,8 @@ version = "1.83.0.1" description = "Resolve the indexed gRPC plugin and host rule, and verify the built host binary" [indices] -# CI and isolated validation install the whole checkout into the test home's -# built-in index. Keep this empty to override the legacy workspace redirect. +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies] "grpc.grpc-plugin" = { version = "1.83.0.1", tools = ["grpc_cpp_plugin"] } diff --git a/tests/mwrap/imgui-headless/mcpp.toml b/tests/mwrap/imgui-headless/mcpp.toml index 6b5311cb..9d594667 100644 --- a/tests/mwrap/imgui-headless/mcpp.toml +++ b/tests/mwrap/imgui-headless/mcpp.toml @@ -4,7 +4,8 @@ version = "1.92.8.1" description = "Consume the immutable ImGui wrapper and render actual headless draw data" [indices] -ocornut = { path = "../../.." } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies] "ocornut.imgui" = "1.92.8.1" diff --git a/tests/mwrap/llamacpp-cpu/mcpp.toml b/tests/mwrap/llamacpp-cpu/mcpp.toml index 320539b2..cee7c31f 100644 --- a/tests/mwrap/llamacpp-cpu/mcpp.toml +++ b/tests/mwrap/llamacpp-cpu/mcpp.toml @@ -4,7 +4,8 @@ version = "b10069.3" description = "Install the immutable llama.cpp-m archive and exercise the CPU API" [indices] -ggml-org = { path = "../../.." } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies.ggml-org] llamacpp = "b10069.3" diff --git a/tests/mwrap/onnxruntime-cpu/mcpp.toml b/tests/mwrap/onnxruntime-cpu/mcpp.toml index 383d4e14..925081f2 100644 --- a/tests/mwrap/onnxruntime-cpu/mcpp.toml +++ b/tests/mwrap/onnxruntime-cpu/mcpp.toml @@ -4,8 +4,8 @@ version = "1.25.1" description = "Install the immutable mwrap archive and execute CPU inference" [indices] -"mcpplibs.mwrap" = { path = "../.indices/mcpplibs.mwrap" } -compat = { path = "../.indices/compat" } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies."mcpplibs.mwrap"] onnxruntime = "1.25.1" diff --git a/tests/mwrap/onnxruntime-sdk/mcpp.toml b/tests/mwrap/onnxruntime-sdk/mcpp.toml index be25297a..6b0cdc67 100644 --- a/tests/mwrap/onnxruntime-sdk/mcpp.toml +++ b/tests/mwrap/onnxruntime-sdk/mcpp.toml @@ -4,7 +4,8 @@ version = "1.25.1" description = "Exercise the official ONNX Runtime SDK through the local index" [indices] -compat = { path = "../../.." } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies.compat] onnxruntime = "1.25.1" diff --git a/tests/mwrap/opencv-cpu/mcpp.toml b/tests/mwrap/opencv-cpu/mcpp.toml index baee39e2..225cdae2 100644 --- a/tests/mwrap/opencv-cpu/mcpp.toml +++ b/tests/mwrap/opencv-cpu/mcpp.toml @@ -4,7 +4,8 @@ version = "5.0.0.1" description = "Install the OpenCV mwrap archive and run a generated image pipeline" [indices] -"mcpplibs.mwrap" = { path = "../.indices/mcpplibs.mwrap" } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies] "mcpplibs.mwrap.opencv" = { version = "5.0.0.1", features = ["imgproc", "imgcodecs-png", "imgcodecs-jpeg"] } diff --git a/tests/mwrap/opencv-webp/mcpp.toml b/tests/mwrap/opencv-webp/mcpp.toml index 299f29e3..9c67369e 100644 --- a/tests/mwrap/opencv-webp/mcpp.toml +++ b/tests/mwrap/opencv-webp/mcpp.toml @@ -4,8 +4,8 @@ version = "5.0.0.1" description = "Consume the OpenCV archive with optional WebP image, animation and metadata support" [indices] -"mcpplibs.mwrap" = { path = "../.indices/mcpplibs.mwrap" } -"compat" = { path = "../.indices/compat" } +# Use the complete candidate built-in index prepared by tests/run_members.sh. +# An explicit empty table overrides the legacy workspace redirect. [dependencies] "mcpplibs.mwrap.opencv" = { version = "5.0.0.1", features = ["imgcodecs-webp"] } diff --git a/tests/run_members.sh b/tests/run_members.sh index 961cd9bb..ba261d37 100755 --- a/tests/run_members.sh +++ b/tests/run_members.sh @@ -20,6 +20,7 @@ # Env: # MCPP path to the mcpp binary (default: `mcpp` on PATH) # MCPP_TIMINGS where to append `\t\t` rows +# MCPP_HOME test home; mwrap defaults to target/mwrap-test-home # # Exit status is non-zero if any member failed. The timing table is printed # regardless — a slow run is worth measuring even when it breaks. @@ -114,7 +115,14 @@ fi [ -n "$cache" ] && export MCPP_BUILD_CACHE="$cache" for m in "${members[@]}"; do if [ -d "tests/mwrap/$m" ]; then - python3 tests/prepare_mwrap_indices.py || exit $? + # Mixing a full compat project alias with later namespace-only aliases + # reuses xlings candidates across workspace members. A single complete + # built-in candidate index avoids that order-dependent ambiguity. + export MCPP_HOME="${MCPP_HOME:-$PWD/target/mwrap-test-home}" + if [ ! -d "$MCPP_HOME/registry" ]; then + "$MCPP" index update || exit $? + fi + python3 tests/prepare_builtin_index.py --home "$MCPP_HOME" || exit $? break fi done diff --git a/tests/test_prepare_mwrap_indices.py b/tests/test_prepare_mwrap_indices.py index 06dfb9bb..8f4f0eb5 100644 --- a/tests/test_prepare_mwrap_indices.py +++ b/tests/test_prepare_mwrap_indices.py @@ -5,10 +5,22 @@ import subprocess import sys import tempfile +import tomllib import unittest class NamespaceViews(unittest.TestCase): + def test_workspace_members_override_project_aliases(self): + root = Path(__file__).resolve().parents[1] + workspace = tomllib.loads((root / "mcpp.toml").read_text())["workspace"]["members"] + members = [root / member / "mcpp.toml" for member in workspace if member.startswith("tests/mwrap/")] + self.assertTrue(members) + for manifest in members: + with self.subTest(member=manifest.parent.name): + parsed = tomllib.loads(manifest.read_text()) + self.assertIn("indices", parsed) + self.assertEqual(parsed["indices"], {}) + def test_rebuild_removes_cross_namespace_candidates(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) From 086194645ba9c2b49c18f77efb38e0af90abefef Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 20:50:20 +0900 Subject: [PATCH 25/47] Document mixed-workspace index contracts in the mwrap spec and skill --- .agents/docs/2026-10-24-opencv-webp-provider.md | 11 +++++++++++ .agents/skills/add-mcpp-index-package/SKILL.md | 13 +++++++------ docs/mwrap.md | 4 +++- docs/zh/mwrap.md | 10 +++++++--- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index e177eddd..93b232d1 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -111,3 +111,14 @@ normal user's default home is not replaced. Static regression guards require mwrap members to retain their explicit override. Namespace-view tooling remains available to isolated single-project consumers, with its scope documented. New exact-head native workspace validation remains required. + +The first mixed fixture used [workspace.indices]. A second private-home fixture +now uses the same legacy root [indices] form as repository CI: the two-view +consumer again fails with ambiguous candidates, while its empty-table form +passes inference/public_surface (17.42s). This run keeps CI's non-strict entry +because the existing root form emits a deprecation warning; no diagnostic is +suppressed. Log: /tmp/mwrap-legacy-workspace-index.log. The strict modern-root +result above and this exact legacy-root result verify distinct configurations. +The bilingual specification and authoring skill now direct mwrap workspace +members to the single built-in candidate and reserve namespace views for +isolated projects. Skill validation and both index-view/member guards pass. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 5e0361f2..a6b79d49 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -68,9 +68,9 @@ description: Use when adding a new third-party library/package to the mcpp-index - 包含 `mcpp.toml` 与 `tests/*.cpp`,后者须包含**可失败的有效断言**(`return ok ? 0 : 1`)。 - 普通成员用一条 `[indices] = { path = "../../.." }` 将所消费命名空间重定向到 checkout。 不把同一个完整索引路径注册成多个 namespace:当前 xlings 会将同一实体报为歧义。 - mwrap wrapper + compat SDK 的组合测试先运行 `python3 tests/prepare_mwrap_indices.py`, - 再将两条 namespace 路由指向 `tests/mwrap/.indices/` 中字节不变的测试视图。 - `tests/run_members.sh` 自动准备这些视图;它们不提交、不发布,也不改变 pkgs/mwrap 的正式布局。 + mwrap workspace 成员保留显式空 `[indices]` 表,由 `tests/run_members.sh` 将完整且字节不变的 + checkout 索引放入测试 home 的唯一内置索引。未设置 MCPP_HOME 时使用 target/mwrap-test-home。 + namespace 视图仅供隔离的单项目消费者;不能以独立项目通过证明混合 workspace 顺序可用。 正常发布布局另由 `tests/mwrap/check_installed_template.py` 在独立 MCPP_HOME 中使用单一完整索引验收。 运行库/插件/host-module 多 namespace 耦合时,优先用 `tests/prepare_builtin_index.py --home <独立测试 home>` 安装唯一完整内置索引,成员以空 `[indices]` 覆盖旧 workspace 路由。自动更新候选 CI 同样采用此方式, @@ -159,15 +159,16 @@ MV=$(grep -oP 'MCPP_VERSION:\s*"\K[0-9.]+' .github/workflows/validate.yml) curl -L -fsS -o mcpp.tgz "https://github.com/mcpp-community/mcpp/releases/download/v$MV/mcpp-$MV-linux-x86_64.tar.gz" tar -xzf mcpp.tgz root="$PWD/mcpp-$MV-linux-x86_64" -mkdir -p ~/.mcpp/registry && cp -a "$root/registry/." ~/.mcpp/registry/ +export MCPP_HOME="$PWD/target/package-validation-home" +mkdir -p "$MCPP_HOME/registry" && cp -a "$root/registry/." "$MCPP_HOME/registry/" export MCPP="$root/bin/mcpp" export MCPP_VENDORED_XLINGS="$root/registry/bin/xlings" export MCPP_INDEX_MIRROR=GLOBAL # CI 使用 GLOBAL;CN 由 mirror-cn-reachable 单独校验 -rm -rf "tests/examples//target" "tests/examples//.mcpp" # 冷验证:自干净状态走完整管线 -"$MCPP" test -p +bash tests/run_members.sh ``` - 输出末尾应为 `test result ok`(测试二进制退出码非 0 即失败)。 +- 冷验证使用独立 worktree 和新测试 home;保留已有日志,不删除归属不明的构建目录。 - 如需查看头文件或源码,解包结果位于 `tests/examples//.mcpp/.xlings/data/xpkgs/-x-///`。 ## 常见错误与规避 diff --git a/docs/mwrap.md b/docs/mwrap.md index 500df583..bff6304b 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -195,7 +195,9 @@ CI check before reporting merge/release readiness. ## Candidate index tests across namespaces -The pinned client routes each requested namespace independently. Registering the same full checkout twice makes xlings report duplicate project candidates. Local wrapper/SDK tests therefore call tests/prepare_mwrap_indices.py and route each namespace to a test-only view under tests/mwrap/.indices. Every descriptor is copied unchanged and its source SHA256 is recorded; no aliases share a descriptor. These views are ignored build outputs, not a publication format. +The pinned client can report duplicate candidates when a workspace mixes full project indices and namespace views. Mwrap workspace members retain an explicit empty `[indices]` table. `tests/run_members.sh` prepares one complete unchanged built-in candidate index before their tests; an unset MCPP_HOME uses the task-owned target/mwrap-test-home. CI prepares that candidate after refreshing the published registry. Keep the legacy workspace redirect semantics; `[workspace.indices]` merges entries and is not a mechanical spelling replacement. + +Namespace views created by tests/prepare_mwrap_indices.py remain available for isolated single-project consumers. Their descriptors preserve source bytes and SHA256 provenance. A standalone success does not certify a mixed workspace sequence. Views are ignored outputs, not a publication format. Normal installed consumers are tested independently by tests/mwrap/check_installed_template.py: it copies the complete pkgs/index.toml publication layout into one isolated built-in index, downloads the real checksummed source archive, runs mcpp new and builds/runs the generated manifest without a path substitution. The Git and published pkgs/mwrap directory layout remains identical. diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index fdfc1758..fbbdb729 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -134,9 +134,13 @@ vendored 静态实现同样需要显式部署,不能依赖共享库扫描发 ## 候选索引的跨 namespace 测试 -固定客户端按请求 namespace 分别路由;同一个完整 checkout 注册两次会让 xlings 报项目候选歧义。 -本地 wrapper/SDK 组合测试先执行 tests/prepare_mwrap_indices.py,再分别指向 tests/mwrap/.indices 中的测试视图。 -各描述符字节不变并记录源 SHA256,视图之间不重复登记实体。它们是不提交、不发布的构建输出,不是新的发布格式。 +固定客户端在同一 workspace 混用完整项目索引与 namespace 视图时可能报告候选歧义。 +mwrap 成员保留显式空 `[indices]` 表,`tests/run_members.sh` 先将完整且字节不变的候选索引放进测试 home 的唯一内置索引。 +未设置 MCPP_HOME 时使用任务自有的 target/mwrap-test-home;CI 在刷新已发布索引后准备候选。 +保留旧 workspace 重定向的语义;`[workspace.indices]` 会合并条目,不能仅视为同义语法替换。 + +tests/prepare_mwrap_indices.py 的 namespace 视图仅供隔离的单项目消费者,描述符保留字节及源 SHA256。 +不能以独立项目通过证明混合 workspace 顺序可用。视图是不提交、不发布的输出,不是新的发布格式。 正常安装由 tests/mwrap/check_installed_template.py 独立验证:把完整 pkgs/index.toml 发布布局放进独立 MCPP_HOME 的单一内置索引, 下载真实且带校验的源码归档,执行 mcpp new,再原样构建/运行生成清单,不替换为 path 依赖。 From 0d7f3d1a02afec56dbc1f9610d0f7d4b8542e7a8 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sat, 24 Oct 2026 22:49:05 +0900 Subject: [PATCH 26/47] Pin OpenCV qualified API checkpoint and exercise indexed FP state --- .../docs/2026-10-24-opencv-webp-provider.md | 30 +++++++++++++++++++ pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 ++++---- tests/mwrap/opencv-cpu/tests/pipeline.cpp | 13 ++++++++ 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index 93b232d1..2aec0c84 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -122,3 +122,33 @@ result above and this exact legacy-root result verify distinct configurations. The bilingual specification and authoring skill now direct mwrap workspace members to the single built-in candidate and reserve namespace views for isolated projects. Skill validation and both index-view/member guards pass. + +## OpenCV qualified-API archive checkpoint + +The unpublished 5.0.0.1 candidate now pins OpenCV source commit +becda22229cb5ed43d7ce098291cf7a4e5f7d15b on all three descriptor platforms. +Two independent downloads agree on SHA256 +67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce. +The archive was compared with the source checkout, including all 2305 retained +upstream files and the new module/generator/Windows fixture changes. Historical +package identities, released archives and descriptors remain unchanged. + +The indexed CPU consumer additionally checks the original cv::details FP state +API signatures, layout and RAII state restoration. This exercises qualified names +added in this source checkpoint rather than accepting only older image APIs. +The new descriptor passes the pinned resolver grammar, platform-version parity, +package-name/reserved-namespace checks, and both index-routing regressions. + +A new independent-home archive acceptance has resolved this exact SHA and +rendered the unmodified default template. Strict build, run, relocated deployment +and notices/runtime-closure checks are still running at this checkpoint; rendering +alone is not deployment acceptance. Log: +/tmp/mwrap-becda22-template-deployment.log. + +The six companion -m PRs retain green checks on their current heads (4 ORT, +8 llama.cpp, 2 FFmpeg, 6 gRPC, 4 ImGui, 3 Godot). OpenCV run 40098688445 on +becda22 is still running its five native jobs. Index 0861946 validation has +18 successful jobs and one running Linux workspace shard; its updater, site and +OpenKAL checks pass. This pin change requires its own exact-head index CI. +No source/index merge, release or tag is performed. Remaining OpenCV API/header +classification and native CI gates still prevent a full-support readiness claim. diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index cf6efc2f..bfa8d02f 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/019eaadb4c2212246cf20e29447bb1ef960333ba.tar.gz", - sha256 = "e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661", + url = "https://github.com/mcpplibs/opencv-m/archive/becda22229cb5ed43d7ce098291cf7a4e5f7d15b.tar.gz", + sha256 = "67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/019eaadb4c2212246cf20e29447bb1ef960333ba.tar.gz", - sha256 = "e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661", + url = "https://github.com/mcpplibs/opencv-m/archive/becda22229cb5ed43d7ce098291cf7a4e5f7d15b.tar.gz", + sha256 = "67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/019eaadb4c2212246cf20e29447bb1ef960333ba.tar.gz", - sha256 = "e265add2c6ed3aa9e6dba677a8731e8a385e5f8419093336a18fbdab54be5661", + url = "https://github.com/mcpplibs/opencv-m/archive/becda22229cb5ed43d7ce098291cf7a4e5f7d15b.tar.gz", + sha256 = "67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce", }, }, }, diff --git a/tests/mwrap/opencv-cpu/tests/pipeline.cpp b/tests/mwrap/opencv-cpu/tests/pipeline.cpp index e0d91a5a..39dfa8bb 100644 --- a/tests/mwrap/opencv-cpu/tests/pipeline.cpp +++ b/tests/mwrap/opencv-cpu/tests/pipeline.cpp @@ -23,6 +23,19 @@ int main() { cv::norm(jpeg, gray, cv::NORM_INF) > 2) return 9; const auto value = cv::makePtr(19); if (*value != 19) return 7; + // Exercise the qualified SDK names restored in the indexed candidate. + using FpState = cv::details::FPDenormalsModeState; + static_assert(sizeof(FpState) == 64); + static_assert(std::is_same_v); + static_assert(std::is_same_v); + FpState before{}, after{}; + cv::details::saveFPDenormalsState(before); + { + cv::details::FPDenormalsIgnoreHintScope scope(true); + } + cv::details::saveFPDenormalsState(after); + for (int i = 0; i < 16; ++i) + if (before.reserved[i] != after.reserved[i]) return 10; std::println("OpenCV {} archive: exact gray pixels, PNG/JPEG roundtrips and scalar contracts passed", cv::getVersionString()); } From 6a991d830874c14c07637f738fa1dc91047e4476 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 00:52:08 +0900 Subject: [PATCH 27/47] Pin final OpenCV conversion archive and verify indexed template APIs --- .../docs/2026-10-24-opencv-webp-provider.md | 31 +++++++++++++++++++ pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 +++---- tests/mwrap/check_installed_template.py | 12 +++++++ tests/mwrap/check_webp_deployment.py | 7 +++-- tests/mwrap/opencv-cpu/tests/pipeline.cpp | 7 +++++ 5 files changed, 61 insertions(+), 8 deletions(-) diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index 2aec0c84..3d3fafee 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -152,3 +152,34 @@ becda22 is still running its five native jobs. Index 0861946 validation has OpenKAL checks pass. This pin change requires its own exact-head index CI. No source/index merge, release or tag is performed. Remaining OpenCV API/header classification and native CI gates still prevent a full-support readiness claim. + +## Final Mat conversion candidate archive + +The candidate now pins c052ccf15de43689c23b70952bb3c0a63779f71f on Linux, +macOS and Windows, SHA256 +e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674. +Two independently downloaded archives are identical (14319338 bytes each). +All 3716 tracked archive files match the source checkout byte-for-byte, +including all 2305 retained SDK files. Source implementation checkpoint 93f2ce0 +repairs original Mat operand conversions; c052ccf adds capability documentation. +The package remains an unpublished 5.0.0.1 candidate; historical descriptors +and published resources are unchanged. + +The indexed CPU test now exercises typed-Mat addition, an exact original MatExpr +assignment function pointer and affine-expression values, alongside image, +scalar and FP contracts. Older cached candidates cannot satisfy these checks. +Actual archive acceptance renders/builds/runs the unmodified default template, +then copies this real consumer into a test in the same isolated home, reusing +the same verified installation without changing its manifest or application. +The consumer passes (2.46s). Release packing (4m41s), relocated isolated execution, +ELF closure and all fifteen byte-identical OpenCV/wrapper notices pass. +Log: /tmp/mwrap-c052ccf-template-api-deployment.log. + +WebP acceptance additionally selects the archive root by its retained SDK +LICENSE instead of relying on the first core.cppm CDB entry: public and detail +producers share that basename. The final fresh-home WebP deployment/18-notice +check is running at /tmp/mwrap-c052ccf-webp-deployment.log; its result is not yet +claimed. Pinned resolver parse, platform version parity, package/reserved-name +checks, two routing regressions and seventeen updater tests pass. Final exact-head +index/native CI and the requirement-by-requirement release review remain open. +No merge, tag, release or mcpp engine change has been performed. diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index bfa8d02f..c7f5eb65 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/becda22229cb5ed43d7ce098291cf7a4e5f7d15b.tar.gz", - sha256 = "67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce", + url = "https://github.com/mcpplibs/opencv-m/archive/c052ccf15de43689c23b70952bb3c0a63779f71f.tar.gz", + sha256 = "e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/becda22229cb5ed43d7ce098291cf7a4e5f7d15b.tar.gz", - sha256 = "67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce", + url = "https://github.com/mcpplibs/opencv-m/archive/c052ccf15de43689c23b70952bb3c0a63779f71f.tar.gz", + sha256 = "e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/becda22229cb5ed43d7ce098291cf7a4e5f7d15b.tar.gz", - sha256 = "67fdaec136e4acb4b0aa9d6a37c1c7952fa278180d82d6eab77dcac4211404ce", + url = "https://github.com/mcpplibs/opencv-m/archive/c052ccf15de43689c23b70952bb3c0a63779f71f.tar.gz", + sha256 = "e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674", }, }, }, diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 0d14be0c..88b6b9be 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -71,6 +71,18 @@ def main(): else: subprocess.run(command, cwd=project, env=env, check=True) print("Verified real indexed archive installation and unmodified template consumer", flush=True) + if identity == "mcpplibs.mwrap.opencv": + # Keep the rendered application/manifest unchanged. Reuse this + # fresh installation for the actual indexed API consumer as a test. + tests = project / "tests" + tests.mkdir(exist_ok=True) + consumer = tests / "mwrap_indexed_api.cpp" + assert not consumer.exists(), consumer + shutil.copyfile(root / "tests/mwrap/opencv-cpu/tests/pipeline.cpp", consumer) + command = [args.mcpp, "test", "mwrap_indexed_api", "--toolchain", args.toolchain, "--strict"] + print("+", " ".join(command), flush=True) + subprocess.run(command, cwd=project, env=env, check=True) + print("Verified indexed OpenCV API consumer after the unmodified template run", flush=True) if args.deploy: mode = "self-contained" if sys.platform.startswith("linux") else "vendored" command = [args.mcpp, "pack", "--toolchain", args.toolchain, "--mode", mode, diff --git a/tests/mwrap/check_webp_deployment.py b/tests/mwrap/check_webp_deployment.py index f8132874..6ed15b68 100644 --- a/tests/mwrap/check_webp_deployment.py +++ b/tests/mwrap/check_webp_deployment.py @@ -54,8 +54,11 @@ def main(): assert len(notices) == 1, f"Missing/ambiguous WebP notices: {notices}" for name in ("COPYING", "PATENTS", "AUTHORS"): assert (notices[0] / name).read_bytes() == (sdk / name).read_bytes(), name - source = next(Path(entry["file"]).parent.parent for entry in entries - if Path(entry["file"]).name == "core.cppm") + # Public and detail producers share the basename core.cppm. Identify + # the actual archive root rather than depending on CDB entry order. + sources = (Path(entry["file"]).parent.parent for entry in entries + if Path(entry["file"]).name == "core.cppm") + source = next(path for path in sources if (path / "upstream/opencv/LICENSE").is_file()) originals = [source / "LICENSE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", *[path for path in (source / "upstream/opencv").rglob("*") if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] diff --git a/tests/mwrap/opencv-cpu/tests/pipeline.cpp b/tests/mwrap/opencv-cpu/tests/pipeline.cpp index 39dfa8bb..97fe7d85 100644 --- a/tests/mwrap/opencv-cpu/tests/pipeline.cpp +++ b/tests/mwrap/opencv-cpu/tests/pipeline.cpp @@ -36,6 +36,13 @@ int main() { cv::details::saveFPDenormalsState(after); for (int i = 0; i < 16; ++i) if (before.reserved[i] != after.reserved[i]) return 10; + cv::Mat_ left(2, 2, 3.f), right(2, 2, 4.f); + const cv::Mat sum = left + right; + if (sum.at(0, 0) != 7.f) return 11; + cv::Mat_& (*assign_expression)(cv::Mat_&, const cv::MatExpr&) = &cv::operator+=; + if (&assign_expression(left, right + right) != &left || left(0, 0) != 11.f) return 12; + const cv::Mat affine = left * 2 - right; + if (affine.at(0, 0) != 18.f) return 13; std::println("OpenCV {} archive: exact gray pixels, PNG/JPEG roundtrips and scalar contracts passed", cv::getVersionString()); } From 9fce3e7470fc650a91d996fca42b920391afa8b5 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 01:24:06 +0900 Subject: [PATCH 28/47] Align OpenCV native-review archive and record ecosystem release gates --- .../docs/2026-10-24-opencv-webp-provider.md | 28 +++++++ .../docs/2026-10-25-mwrap-release-audit.md | 78 +++++++++++++++++++ pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 +-- 3 files changed, 112 insertions(+), 6 deletions(-) create mode 100644 .agents/docs/2026-10-25-mwrap-release-audit.md diff --git a/.agents/docs/2026-10-24-opencv-webp-provider.md b/.agents/docs/2026-10-24-opencv-webp-provider.md index 3d3fafee..ed165d7b 100644 --- a/.agents/docs/2026-10-24-opencv-webp-provider.md +++ b/.agents/docs/2026-10-24-opencv-webp-provider.md @@ -183,3 +183,31 @@ claimed. Pinned resolver parse, platform version parity, package/reserved-name checks, two routing regressions and seventeen updater tests pass. Final exact-head index/native CI and the requirement-by-requirement release review remain open. No merge, tag, release or mcpp engine change has been performed. + +## Native-profile review correction and final source alignment + +The c052ccf WebP archive now passes alpha/animation/XMP, release packing, +relocated execution and eighteen exact notices. The source CI nevertheless +correctly rejects 23 unreviewed native SSE implementation helpers that do not +exist in the software-mode inventory. Source checkpoint +71d0967124222f23999d57e4d514df6a4ed60834 adds exact source/feature/header-qualified +review records and retains the strict unknown/stale checks. Local native SDK +parity (1311/976 bytes), native 121-name review and preserved software 101-name +review all pass. Log: /tmp/mwrap-native-entity-review.log. + +The index now pins that corrected source, SHA256 +d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24. +Both downloads agree (14319996 bytes); all 3716 files match the checkout and +all 2305 retained SDK files remain unchanged. Archive-to-archive comparison +shows exactly four changes: the source readiness ledger, CI artifact paths, +entity-review records and their validator. Every implementation file, template, +build recipe and selected license is byte-identical to the c052ccf archive that +passed normal/WebP deployment. The comparison is recorded at +/tmp/mwrap-release-candidates/opencv-reviewed-archive-equivalence.json. + +A fresh-home template/API/build/release/deployment acceptance for the corrected +archive is running at /tmp/mwrap-71d0967-template-api-deployment.log. This result +is not yet claimed; unchanged implementation evidence is distinguished from +new audit-script/CI acceptance. Exact corrected-source and index HEAD CI remain +required. The requirement ledger is .agents/docs/2026-10-25-mwrap-release-audit.md. +No merge, tag, release or mcpp engine modification has been performed. diff --git a/.agents/docs/2026-10-25-mwrap-release-audit.md b/.agents/docs/2026-10-25-mwrap-release-audit.md new file mode 100644 index 00000000..ea81234f --- /dev/null +++ b/.agents/docs/2026-10-25-mwrap-release-audit.md @@ -0,0 +1,78 @@ +# mwrap 实施与发布验收清单 + +本清单按原实施方案逐项验收,不以仓库存在、一次编译或单个绿色任务代替完成证明。 +当前状态:候选审查中。所有 PR 保持未合入;未创建 tag/release。mcpp 引擎源码只读。 +原方案:[OpenCV 实施基线](https://github.com/mcpplibs/opencv-m/blob/c052ccf15de43689c23b70952bb3c0a63779f71f/.agents/docs/2026-10-24-opencv-5-full-and-onnxruntime-plan.md)。 + +## 可供 review 的核心约定 + +- 新封装使用 `-m` 仓库、`mcpplibs.mwrap.` 包/模块;普通 API 保留上游 `cv::`、`Ort::` 等名字和类型。 +- 宏映射单列 `.macros`,C++ 命名空间使用 `mcpplibs::mwrap::::macros`;预处理控制宏保留文本头。 +- 版本跟随上游,最多增加一个数字封装修订尾号;不发布 `.0`,不改写历史版本资源。 +- `pkgs/mwrap` 平铺,`tests/mwrap` 独立;Git 与发布布局一致,不做 staging 路径转换,不修改客户端引擎。 +- OpenCV core 必需、`default=[]`;`all-modules` 选择十六个主模块,窗口、codec、视频和 SDK 后端显式选择。 +- 七个 -m 库都有可运行默认模板;README 每种语言不超过约 100 行。现有旧包身份逐包迁移,不绑定一次性改名。 +- 测试共用四核 CPU quota、单个编译任务和内存限制,并监测整机 80% 阈值。只清理任务生成且无进程引用的可执行文件。 + +## 原方案要求与验收证据 + +| 要求 | 必需证据 / 当前结果 | 尚未关闭的门槛 | +|---|---|---| +| P0:规范与设计 | 索引 `docs/mwrap.md`、`docs/zh/mwrap.md` 是规范;设计历史留在各仓库 `.agents/docs` | 由用户最终 review,不宣称已合入 | +| P1:组织 fork、独立 ORT、最新工具 | OpenCV 保留 Sunrisepeak fork 历史;ORT 独立仓库;七库固定 mcpp 2026.10.24.1,2026-10-25 再核对仍为 latest stable | 不改 mcpp 引擎,不移动旧 tag | +| 每仓库一个 PR / checkpoint | OpenCV #1、ORT #1、llama.cpp #5、FFmpeg #8、gRPC #8、ImGui #13、Godot #1;索引 #564 | 最终报告需绑定各 PR 当前 HEAD 和全部检查 | +| P2:来源/适配/生成分层 | 固定官方 OpenCV 5.0.0;2305 个保留 SDK 文件逐字节验证;配置由 target/feature/module 图生成 | 不以生成文件存在代替运行验证 | +| 十六主模块 | Linux GCC16、LLVM22/23 完整 38 程序;十六 direct imports 和聚合查找 | 当前 HEAD 五腿原生 CI | +| 公共 API / 模板 / 转换 | 64 个 Mat 参数转发保留原始转换规则;114 赋值组合、原始逗号初始化;七组 SDK/module oracle | 名称查找不证明每个重载/后端;已知编译器混用限制继续公开 | +| 宏与头文件混用 | 独立宏模块、原始宏桥、接口 ISA guard、混用消费者 | 不把完整原始 core.hpp 的 GCC 声明合并限制隐藏成支持 | +| API 拒绝项审查 | 每项有准确名字、SDK 文件 SHA256、原因和源码锚点;未知/过期项必须失败 | 原生 SSE 与软件模式分别验收,不能只用一方替代 | +| P3:GUI | GTK3/Xvfb、Win32、Cocoa 创建/显示/事件/销毁具有原生证据;窗口模板明确选择后端 | 新源码当前 HEAD 必须重新通过原生 CI | +| P3:ORT CPU | 官方 1.25.1 SDK、独立 Ort::Session 与 OpenCV ENGINE_ORT;实际 CPUExecutionProvider profile 排除回退 | 当前源码 HEAD、部署及 DLL/SO/dylib 闭包证据 | +| P4:codec / 视频 | PNG/JPEG/BMP/PPM/PFM、WebP alpha/动画/XMP;FFmpeg 文件往返、原生视频文件/注册与错误路径 | 真实摄像头为 requires-device,不以文件测试冒充 | +| 默认与关闭依赖边界 | core-only、图像、all-modules、native GUI/video、ORT、WebP 及配置拒绝分别测试 | 不穷举无意义组合;每项声明能力仍需对应证据 | +| P5:contrib / 加速 | 方案 §3 允许硬件/专有 SDK 阶段交付;覆盖矩阵列出 planned/unavailable,未注册空 feature | 不声称 contrib、GPU、其他 ISA、额外 codec/后端已实现 | +| P6:索引发现与旧包 | Flat 分类、发布枚举、搜索/选择、workspace/shards、updater、旧资源保留;混合 namespace 回归 | 最终索引 HEAD 所有 CI | +| P6:真实归档消费 | `c052ccf` 归档两次下载相同;全部 3716 文件匹配工作树;新 home 模板/API/build/run/pack/relocate 通过 | 若后续只修改审查元数据,也必须核对最终归档和实际索引 pin | +| SDK/第三方通知 | 普通 OpenCV 部署 15 份、WebP 部署 18 份选中通知逐字节匹配,Linux loader 依赖均在搬迁包内 | 不将安装目录运行当作搬迁部署验收 | +| 七库快捷模板 | 默认模板无外部输入资产即可运行;SDK/设备限制明确 | 不将 Godot math 当作引擎加载、llama CPU 初始化当作模型质量验证 | +| P7:规范与技能 | 索引中英规范、包索引 skill 已同步;独立 mcpp 文档 PR #836 不合入、不阻塞库项目 | 最终核对规范示例、版本与实际客户端语义一致 | +| README / 临时文件 | 七库 README 42–52 行;临时安装 home 自动清理;任务可执行文件在成功后删除 | 保留用户原始未跟踪文件、源代码、对象/BMI 和审查日志 | + +## 当前不可省略的最终检查 + +1. 已在 `71d0967` 修复并本地通过原生 SSE 审计模式的 23 个实现辅助名字;原生 121 / 软件 101 项审查均通过,未知/过期项仍失败。当前提交 CI 仍待通过。 +2. OpenCV 当前源码 HEAD 所有原生任务通过;不得用旧提交或步骤局部成功代替。 +3. 最终源归档、索引描述符 URL/SHA、仓库 HEAD 对齐;运行代码与已通过部署的归档一致性有明确证据。 +4. 索引最终 HEAD 的 validate、updater、site、OpenKAL 检查全部通过。 +5. 六个伴随仓库当前远端 HEAD、归档、模板、工具 pin、README 与 CI 再核对。 +6. 分别报告 passed、build-only、requires-device、unsupported;不使用“全部功能支持”掩盖矩阵中的阶段项。 +7. 汇总核心点、每仓库 PR、实际版本、验证范围与剩余边界,供用户决定合入/发布。该决定尚未执行。 + +## 已通过的候选归档证据 + +`c052ccf15de43689c23b70952bb3c0a63779f71f`:SHA256 +`e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674`。 +默认模板原样 build/run 后,在同一独立 home 添加实际索引 API 测试,typed-Mat/FP/PNG/JPEG 等通过; +release pack、隔离搬迁运行、15 份通知与 ELF 闭包通过。WebP 的透明 RGB/alpha、动画、XMP、release +pack、搬迁运行和 18 份通知也通过。日志分别为 +`/tmp/mwrap-c052ccf-template-api-deployment.log`、`/tmp/mwrap-c052ccf-webp-deployment.log`。 +这些证明该归档的实现,不自动证明后续修改的审计脚本或新提交 CI。 + +## 伴随仓库当前 HEAD 复核(2026-10-25) + +以下远端 PR HEAD 与本地 HEAD 相同;当前检查全部 success,均未合入且保持 draft。 +源码归档仍固定这些提交,未将旧绿灯替代新代码。 + +| 仓库 / PR | HEAD | 当前绿色检查 | README 行数 | 模板数 | +|---|---|---:|---|---:| +| [onnxruntime-m #1](https://github.com/mcpplibs/onnxruntime-m/pull/1) | `576c780` | 4 | README.md: 50 | 1 | +| [llama.cpp-m #5](https://github.com/mcpplibs/llama.cpp-m/pull/5) | `5028a1a` | 8 | README.md: 48 | 1 | +| [ffmpeg-m #8](https://github.com/mcpplibs/ffmpeg-m/pull/8) | `1e8bce6` | 2 | README.md: 45 | 1 | +| [grpc-m #8](https://github.com/mcpplibs/grpc-m/pull/8) | `0d11b22` | 6 | README.md: 52, README.zh.md: 52 | 1 | +| [imgui-m #13](https://github.com/mcpplibs/imgui-m/pull/13) | `ffebf83` | 4 | README.md: 46 | 3 | +| [godot-cpp-m #1](https://github.com/mcpplibs/godot-cpp-m/pull/1) | `40f72d5` | 3 | README.md: 42 | 1 | + +六库均固定 mcpp 2026.10.24.1。gRPC Windows 运行时、真实 Godot 引擎加载和模型质量不从这些检查数量推断;支持范围以各仓库文档及实际已执行用例为准。 + +最终源码审查修复为 `71d0967124222f23999d57e4d514df6a4ed60834`,归档 SHA256 `d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24`。 +与已通过部署的 c052ccf 相比仅四个审计/CI/记录文件变化;实现、模板、构建配方和许可证逐字节一致。新归档的实际安装验收正在执行,未提前标为通过。 diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index c7f5eb65..f61b936f 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/c052ccf15de43689c23b70952bb3c0a63779f71f.tar.gz", - sha256 = "e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674", + url = "https://github.com/mcpplibs/opencv-m/archive/71d0967124222f23999d57e4d514df6a4ed60834.tar.gz", + sha256 = "d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/c052ccf15de43689c23b70952bb3c0a63779f71f.tar.gz", - sha256 = "e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674", + url = "https://github.com/mcpplibs/opencv-m/archive/71d0967124222f23999d57e4d514df6a4ed60834.tar.gz", + sha256 = "d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/c052ccf15de43689c23b70952bb3c0a63779f71f.tar.gz", - sha256 = "e7016133547422085b293800d102becfa6c5fc8bd3d0fa9f3a36b88ccf227674", + url = "https://github.com/mcpplibs/opencv-m/archive/71d0967124222f23999d57e4d514df6a4ed60834.tar.gz", + sha256 = "d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24", }, }, }, From a9f567ec0837b014fb095e605a9762251e56550d Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 03:41:59 +0900 Subject: [PATCH 29/47] fix(ci): budget installed wrappers and honor each shard count --- .../docs/2026-10-25-mwrap-release-audit.md | 41 +++++++++++++++ .github/workflows/validate.yml | 50 ++++--------------- pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 12 ++--- tests/member-timings.tsv | 29 ++++++----- tests/plan_matrix_shards.py | 48 ++++++++++++++++++ tests/test_plan_matrix_shards.py | 49 ++++++++++++++++++ 6 files changed, 169 insertions(+), 60 deletions(-) create mode 100644 tests/plan_matrix_shards.py create mode 100644 tests/test_plan_matrix_shards.py diff --git a/.agents/docs/2026-10-25-mwrap-release-audit.md b/.agents/docs/2026-10-25-mwrap-release-audit.md index ea81234f..8aea3d84 100644 --- a/.agents/docs/2026-10-25-mwrap-release-audit.md +++ b/.agents/docs/2026-10-25-mwrap-release-audit.md @@ -76,3 +76,44 @@ pack、搬迁运行和 18 份通知也通过。日志分别为 最终源码审查修复为 `71d0967124222f23999d57e4d514df6a4ed60834`,归档 SHA256 `d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24`。 与已通过部署的 c052ccf 相比仅四个审计/CI/记录文件变化;实现、模板、构建配方和许可证逐字节一致。新归档的实际安装验收正在执行,未提前标为通过。 + + +## GCC root-import and CI shard corrections (2026-10-25) + +The 71d0967 source failed GCC's staged OpenCV/ORT configuration with missing +bare detail.core/detail.matx BMI paths. Source checkpoint 52fa4a1 directly +imports both producers before public core; 5056249 adds the explicit bilingual +legacy module/macro migration table. The same warmed staged project fails +again with the original root and passes actual ORT CPU/profile inference after +restoring exact formal bytes. Logs: /tmp/mwrap-gcc-root-import-negative.log and +/tmp/mwrap-gcc-root-import-ab.log. All 38 programs pass LLVM23/GCC16/LLVM22 +(128.68/238.24/790.55s), with unchanged seven SDK oracles and strict review gates. + +Final source 5056249212be1470de7fa7c85ea9fc805f72349d is independently downloaded +twice, SHA256 9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d. +All 3716 files match the checkout; all 2305 retained SDK files are unchanged. +Against 71d0967 only the root aggregate, two usage documents and source ledger +differ. Templates, provider recipes, notices and implementation bodies remain +byte-identical, but changed interface inputs still require fresh archive and CI +acceptance. Actual final-archive template/API/release/relocation is in progress; +older passing bundles are not silently substituted. + +Index 9fce3e7's validate job 120923966425 reached its 90-minute cap while +compiling the legacy opencv-module-dnn member. Prior members passed; updater, +site and OpenKAL succeeded. The canceled shard combined 18 minutes of installed +checks with previously unpriced grpc-cpu/grpc-tools/godot-math consumers and +three legacy OpenCV consumers. Member and completed installed-step durations +from the actual Linux jobs now price those wrappers in member-timings.tsv. +For the same 26 selected members the old three-way assignment reprices to +4588/3410/6486s; the revised four-way split is 4087/3523/3402/3472s. Thus the +slowest estimated slice drops from 108.1 to 68.1 minutes without removing tests +or raising the 90-minute cap. + +The matrix also advertised six LLVM slices while the emitted plan contained +only the first/default Linux three-way split. Planning is now keyed by both +platform and count; each toolchain consumes its advertised split. Three regressions exercise real Lua splits and verify different Linux counts +each cover every selected member exactly once, full-workspace planning retains +both examples and mwrap, and missing/incomplete plans fail instead of reporting +empty success. +YAML parsing and whitespace checks pass. New source/index final CI remains a +required gate; neither the actual GCC failure nor timeout is counted passing. diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index cb0bc305..b5a5ec44 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1130,52 +1130,17 @@ jobs: echo "members=$MEMBERS" >> "$GITHUB_OUTPUT" cat /tmp/matrix.json - # The split is computed ONCE, here, and shipped to the runners as data. - # It used to run on each runner, which needed lua5.4 on all three - # platforms — windows has no apt or brew, and macOS's brew installs - # `lua`, not `lua5.4`, so every non-linux shard died with - # `lua5.4: command not found` after 16 seconds. Deciding once is also - # simply correct: one plan, not three runners each re-deriving it. + # Linux default and LLVM may advertise different shard counts. Plan + # every distinct platform/count pair, rather than reusing the first + # Linux split and leaving the extra LLVM entries empty. - name: Plan the shards id: plan_shards shell: bash run: | plan='${{ steps.fanout.outputs.members }}' [ "$plan" = "__ALL__" ] && plan="" - { - printf '{' - first=1 - # `.shards`, NOT the number of matrix entries. - # - # These stopped being the same number the moment linux grew a - # second toolchain leg: the platform emits 2 x 3 = 6 entries while - # the split is still 3 ways, and every entry carries shard 0..2. - # Planning 6 ways and consuming three of them dropped 36 of 65 - # members on the floor — silently, because a member that is never - # assigned is indistinguishable from one that passed. `ffmpeg`, - # `opencv-module*`, `catch2-v2` and `openssl` were among them, on - # the very run that added the leg meant to test them. - # - # `.shards` is the value emit() already wrote per entry and the - # same one the job reads for its own `matrix.shards`, so plan and - # consumer now read one number instead of two that agreed by - # accident. - for spec in linux:$(jq -r 'first(.include[]|select(.platform=="linux")).shards' /tmp/matrix.json) \ - macos:$(jq -r 'first(.include[]|select(.platform=="macos")).shards' /tmp/matrix.json) \ - windows:$(jq -r 'first(.include[]|select(.platform=="windows")).shards' /tmp/matrix.json); do - p=${spec%%:*}; n=${spec##*:} - [ "$first" = 1 ] || printf ',' - first=0 - printf '"%s":{' "$p" - for i in $(seq 0 $((n - 1))); do - [ "$i" = 0 ] || printf ',' - m=$(lua5.4 tests/plan_shards.lua "$p" "$i" "$n" $plan) - printf '"%s":"%s"' "$i" "$m" - done - printf '}' - done - printf '}' - } > /tmp/plan.json + python3 tests/test_plan_matrix_shards.py + python3 tests/plan_matrix_shards.py /tmp/matrix.json $plan > /tmp/plan.json echo "plan=$(cat /tmp/plan.json)" >> "$GITHUB_OUTPUT" jq . /tmp/plan.json @@ -1458,8 +1423,11 @@ jobs: # tests/plan_shards.lua). Arrives as data, so a runner needs no lua. - name: Take this shard's members shell: bash + env: + SHARD_PLAN: ${{ needs.select.outputs.plan }} run: | - mine='${{ fromJSON(needs.select.outputs.plan)[matrix.platform][format('{0}', matrix.shard)] }}' + mine=$(python3 tests/plan_matrix_shards.py --select \ + '${{ matrix.platform }}' '${{ matrix.shards }}' '${{ matrix.shard }}' <<< "$SHARD_PLAN") # ── A member its toolchain cannot build, and why that lives HERE ── # diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua index f61b936f..e81f9c44 100644 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua @@ -12,20 +12,20 @@ package = { xpm = { linux = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/71d0967124222f23999d57e4d514df6a4ed60834.tar.gz", - sha256 = "d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24", + url = "https://github.com/mcpplibs/opencv-m/archive/5056249212be1470de7fa7c85ea9fc805f72349d.tar.gz", + sha256 = "9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d", }, }, macosx = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/71d0967124222f23999d57e4d514df6a4ed60834.tar.gz", - sha256 = "d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24", + url = "https://github.com/mcpplibs/opencv-m/archive/5056249212be1470de7fa7c85ea9fc805f72349d.tar.gz", + sha256 = "9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d", }, }, windows = { ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/71d0967124222f23999d57e4d514df6a4ed60834.tar.gz", - sha256 = "d2c0b85536bf4cbb22c914cc055d63cb780cfb25492da3bdc53bd0a08022ed24", + url = "https://github.com/mcpplibs/opencv-m/archive/5056249212be1470de7fa7c85ea9fc805f72349d.tar.gz", + sha256 = "9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d", }, }, }, diff --git a/tests/member-timings.tsv b/tests/member-timings.tsv index b1937004..49937c01 100644 --- a/tests/member-timings.tsv +++ b/tests/member-timings.tsv @@ -1,16 +1,11 @@ -# \t\t — the HEAVY members only, top 10 per -# platform. Everything else is priced at plan_shards.lua's fixed default; -# on linux the 57 members not listed here average 86s and are 31% of the -# total, and listing them changes the slowest shard by 0 minutes. -# -# So: adding a test does NOT require touching this file. Refresh it when -# a member becomes heavy enough to enter the top 10, or when one of these -# numbers moves materially — download the member-timings artifact from a -# full run and keep the top 10 per platform. -# -# Sources: run 31260545520; libmysqlclient / mysql-connector-cpp measured -# from run 31266814148's linux default 0/3 step durations, whose shard was -# cancelled at the 90m cap before its timings artifact could upload. +# (tab-separated) +# Measured heavy members; untimed members keep the planner's fixed 90s default. +# Wrapper rows include installed archive/template/deployment checks executed +# in the owning workspace shard, so those costs count toward its 90m budget. +# Legacy sources: runs 31260545520 and 31266814148. +# Linux wrapper measurements: run 40111394389 (2026-10-25); job +# 120923966425 exhausted 90m after passing the earlier members. Per-member +# times and completed installed-check step durations are both included. linux grpc-codegen 3463 linux grpc-module 1771 linux protobuf-protoc 885 @@ -41,3 +36,11 @@ windows ffmpeg-module 526 windows protobuf-gzip 238 windows protobuf-protoc 152 windows protobuf-upb 151 +linux ffmpeg-cpu 208 +linux godot-math 758 +linux grpc-cpu 1416 +linux grpc-tools 480 +linux imgui-headless 168 +linux llamacpp-cpu 264 +linux opencv-cpu 737 +linux opencv-webp 855 diff --git a/tests/plan_matrix_shards.py b/tests/plan_matrix_shards.py new file mode 100644 index 00000000..8efcc130 --- /dev/null +++ b/tests/plan_matrix_shards.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +"""Compute each distinct platform/count split advertised by the CI matrix.""" +import json +from pathlib import Path +import subprocess +import sys + + +def plan_matrix(matrix, members): + root = Path(__file__).resolve().parents[1] + result = {} + for entry in matrix["include"]: + platform, count = entry["platform"], entry["shards"] + if not isinstance(count, int) or count < 1: + raise ValueError(f"Invalid shard count: {count}") + key = f"{platform}:{count}" + if key in result: + continue + result[key] = { + str(index): subprocess.check_output( + ["lua5.4", "tests/plan_shards.lua", platform, str(index), str(count), *members], + cwd=root, text=True, + ).strip() + for index in range(count) + } + return result + + +def select_shard(plans, platform, count, index): + key = f"{platform}:{count}" + split = plans.get(key) + if split is None or set(split) != {str(i) for i in range(count)}: + raise ValueError(f"Missing or incomplete shard plan for {key}") + if not 0 <= index < count: + raise ValueError(f"Shard {index} outside {key}") + return split[str(index)] + + +if __name__ == "__main__": + if sys.argv[1] == "--select": + platform, count, index = sys.argv[2:] + print(select_shard(json.load(sys.stdin), platform, int(count), int(index))) + else: + matrix = json.loads(Path(sys.argv[1]).read_text()) + members = sys.argv[2:] + if members == ["__ALL__"]: + members = [] + print(json.dumps(plan_matrix(matrix, members), sort_keys=True)) diff --git a/tests/test_plan_matrix_shards.py b/tests/test_plan_matrix_shards.py new file mode 100644 index 00000000..e8717e46 --- /dev/null +++ b/tests/test_plan_matrix_shards.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 +"""Exercise real Lua plans when toolchain legs advertise different counts.""" +from collections import Counter +import tomllib +from pathlib import Path +import unittest + +from plan_matrix_shards import plan_matrix, select_shard + + +class MatrixShardCoverage(unittest.TestCase): + def test_different_linux_counts_cover_each_selected_member_once(self): + members = ["opencv-module", "opencv-module-dnn", "opencv-cpu", + "onnxruntime-cpu", "opencv-webp", "grpc-cpu"] + matrix = {"include": [ + {"platform": "linux", "toolchain": "default", "shards": 2}, + {"platform": "linux", "toolchain": "llvm", "shards": 3}, + {"platform": "macos", "toolchain": "default", "shards": 1}, + ]} + plans = plan_matrix(matrix, members) + self.assertEqual(set(plans), {"linux:2", "linux:3", "macos:1"}) + for entry in matrix["include"]: + split = plans[f"{entry['platform']}:{entry['shards']}"] + self.assertEqual(set(split), {str(i) for i in range(entry["shards"])}) + assigned = [member for i in range(entry["shards"]) + for member in select_shard(plans, entry["platform"], entry["shards"], i).split()] + self.assertEqual(Counter(assigned), Counter(members)) + self.assertTrue(all(split.values())) + + def test_full_workspace_keeps_both_member_categories(self): + root = Path(__file__).resolve().parents[1] + manifest = tomllib.loads((root / "mcpp.toml").read_text()) + expected = [Path(member).name for member in manifest["workspace"]["members"]] + matrix = {"include": [{"platform": "linux", "shards": 5}]} + split = plan_matrix(matrix, [])["linux:5"] + assigned = [member for shard in split.values() for member in shard.split()] + self.assertEqual(Counter(assigned), Counter(expected)) + self.assertIn("opencv-cpu", assigned) + self.assertIn("opencv-module", assigned) + + def test_missing_or_partial_split_fails_instead_of_reporting_empty_success(self): + with self.assertRaises(ValueError): + select_shard({"linux:2": {"0": "opencv-cpu", "1": "grpc-cpu"}}, "linux", 3, 0) + with self.assertRaises(ValueError): + select_shard({"linux:3": {"0": "opencv-cpu", "1": "grpc-cpu"}}, "linux", 3, 0) + + +if __name__ == "__main__": + unittest.main() From 48640fc7183d428999111f01a6c3c642179ad38d Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 05:21:40 +0900 Subject: [PATCH 30/47] fix(ci): include Windows installed-consumer build costs --- .../docs/2026-10-25-mwrap-release-audit.md | 26 +++++++++++++++++++ tests/member-timings.tsv | 7 +++++ 2 files changed, 33 insertions(+) diff --git a/.agents/docs/2026-10-25-mwrap-release-audit.md b/.agents/docs/2026-10-25-mwrap-release-audit.md index 8aea3d84..055a4ee0 100644 --- a/.agents/docs/2026-10-25-mwrap-release-audit.md +++ b/.agents/docs/2026-10-25-mwrap-release-audit.md @@ -117,3 +117,29 @@ both examples and mwrap, and missing/incomplete plans fail instead of reporting empty success. YAML parsing and whitespace checks pass. New source/index final CI remains a required gate; neither the actual GCC failure nor timeout is counted passing. + + +## Windows installed-consumer budget (2026-10-25) + +The a9f567e index run passed all four default Linux slices (25.4/38.7/50.2/60.0 +minutes), every LLVM slice, macOS and the other Windows slice, but Windows job +120955178624 reached its unchanged 90-minute cap in legacy opencv-module. +Its completed installed/archive and workspace checks passed; cancellation is +not accepted as a pass. Completed final-archive checks include normal and WebP +relocation/notices. Log: /tmp/mwrap-a9f567e-windows-shard-cancelled.log. + +Windows' newly added consumers were still priced at the 90s default. Actual +member plus installed-template/deployment costs are ffmpeg-cpu 928s, +godot-math 1347s, llamacpp-cpu 288s, opencv-cpu 1101s and opencv-webp 1104s. +Other short consumers remain conservatively priced by the default. The same +26-member assignment reprices the old two slices at 6175/4222s; using these +measured rows the existing formula chooses three, at 3890/3251/3256s. Maximum +expected work drops from 102.9 to 64.8min, retaining every test and the 90min +cap. The three real-Lua/coverage/invalid-plan regressions and diff checks pass. +Evidence: /tmp/mwrap-index-windows-shard-measurements.json and +/tmp/mwrap-index-windows-shard-budget-comparison.json. + +Only timing rows and this record change. Source 5056249 and all package +resources stay identical, so its successful exact-archive Linux normal/WebP +acceptance and native source CI evidence remain applicable. The index requires +new final-head CI; the canceled run is not substituted for that requirement. diff --git a/tests/member-timings.tsv b/tests/member-timings.tsv index 49937c01..efe76ecb 100644 --- a/tests/member-timings.tsv +++ b/tests/member-timings.tsv @@ -6,6 +6,8 @@ # Linux wrapper measurements: run 40111394389 (2026-10-25); job # 120923966425 exhausted 90m after passing the earlier members. Per-member # times and completed installed-check step durations are both included. +# Windows wrapper measurements: run 40121911805; job 120955178624 +# exhausted 90m during legacy opencv-module, while completed checks passed. linux grpc-codegen 3463 linux grpc-module 1771 linux protobuf-protoc 885 @@ -44,3 +46,8 @@ linux imgui-headless 168 linux llamacpp-cpu 264 linux opencv-cpu 737 linux opencv-webp 855 +windows ffmpeg-cpu 928 +windows godot-math 1347 +windows llamacpp-cpu 288 +windows opencv-cpu 1101 +windows opencv-webp 1104 From 97dde78b42c1e4c3bf3b4d325ed0b7b2576dfa12 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 07:18:22 +0900 Subject: [PATCH 31/47] feat: unify seven mwrap identities and preserve legacy publications --- ...unified-identity-and-first-release-plan.md | 337 ++++++++++++++++++ .../2026-10-25-unified-mwrap-execution.md | 44 +++ .../skills/add-mcpp-index-package/SKILL.md | 16 +- .github/workflows/validate.yml | 12 +- docs/mwrap.md | 39 +- docs/package-types.md | 3 + docs/repository-and-schema.md | 2 +- docs/zh/mwrap.md | 25 +- docs/zh/package-types.md | 3 + docs/zh/repository-and-schema.md | 2 +- pkgs/f/ffmpeg.ffmpeg.lua | 21 -- pkgs/g/ggml-org.llamacpp.lua | 18 - pkgs/g/godotengine.godot-cpp-m.lua | 22 -- pkgs/g/grpc-plugin.lua | 18 +- pkgs/g/grpc.lua | 17 - pkgs/g/grpcgen.lua | 18 +- pkgs/mwrap/ffmpeg.lua | 30 ++ pkgs/mwrap/godot_cpp.lua | 30 ++ pkgs/mwrap/grpc.lua | 24 ++ pkgs/mwrap/imgui.lua | 30 ++ pkgs/mwrap/llamacpp.lua | 30 ++ pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua | 32 -- pkgs/mwrap/mcpplibs.mwrap.opencv.lua | 32 -- pkgs/mwrap/onnxruntime.lua | 30 ++ pkgs/mwrap/opencv.lua | 30 ++ pkgs/o/ocornut.imgui.lua | 22 -- tests/examples/llamacpp-metal/mcpp.toml | 2 +- tests/examples/llamacpp/mcpp.toml | 6 +- tests/mwrap/ffmpeg-cpu/mcpp.toml | 4 +- tests/mwrap/ffmpeg-cpu/tests/behavior.cpp | 2 +- tests/mwrap/godot-math/mcpp.toml | 4 +- tests/mwrap/godot-math/tests/math.cpp | 2 +- tests/mwrap/grpc-cpu/mcpp.toml | 4 +- tests/mwrap/grpc-cpu/tests/behavior.cpp | 2 +- tests/mwrap/imgui-headless/mcpp.toml | 4 +- tests/mwrap/imgui-headless/tests/behavior.cpp | 4 +- tests/mwrap/llamacpp-cpu/mcpp.toml | 6 +- tests/mwrap/llamacpp-cpu/tests/api.cpp | 6 +- tests/mwrap/opencv-cpu/mcpp.toml | 4 +- tests/mwrap/opencv-webp/mcpp.toml | 4 +- tests/test_mwrap_tag_selection.py | 26 ++ 41 files changed, 718 insertions(+), 249 deletions(-) create mode 100644 .agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md create mode 100644 .agents/docs/2026-10-25-unified-mwrap-execution.md create mode 100644 pkgs/mwrap/ffmpeg.lua create mode 100644 pkgs/mwrap/godot_cpp.lua create mode 100644 pkgs/mwrap/grpc.lua create mode 100644 pkgs/mwrap/imgui.lua create mode 100644 pkgs/mwrap/llamacpp.lua delete mode 100644 pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua delete mode 100644 pkgs/mwrap/mcpplibs.mwrap.opencv.lua create mode 100644 pkgs/mwrap/onnxruntime.lua create mode 100644 pkgs/mwrap/opencv.lua create mode 100644 tests/test_mwrap_tag_selection.py diff --git a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md new file mode 100644 index 00000000..9ac17cc3 --- /dev/null +++ b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md @@ -0,0 +1,337 @@ +# mwrap 七库统一身份、README 精简与首次发布方案 + +状态:2026-10-25 设计评审后已获用户实施授权;执行进度见 [实施记录](2026-10-25-unified-mwrap-execution.md)。 +下文的“本轮只写方案”等措辞记录设计阶段的边界,已被后续明确的实现、合入与发布授权替代。 + +## 1. 本轮决策与执行边界 + +用户最新确认:对外依赖、模板命令与 C++ 模块 import 显示完整 `mcpplibs` 前缀。 +索引文件名省略完整 namespace 前缀,统一为 `pkgs/mwrap/.lua`;文件内仍声明完整身份。 +README 在原有布局与栏目上精简,不再整页替换成同一套新结构;所有 `xxx-m` 仓库必须默认英文并提供中文 README。 +Godot 命名已由用户确认:`mcpplibs.mwrap.godot_cpp`,不再作为待定建议。 +七个封装库均新增 `mcpplibs.mwrap` 身份,旧身份、已发布版本、校验值与资源保留。 +新 mwrap 身份首次发版直接使用所封装的上游版本,不机械继承旧封装修订尾号。 + +本文通过 review 后再实施:更新相关 PR → 自我 review 与完整 CI → squash 合入库 → 验证合入提交 → 发布库 → 更新并合入索引。 +当前“先不要动代码”的要求优先于上述后续执行步骤;本轮不开始发布操作。 +mcpp 引擎源码继续只读;不因本次命名统一新增引擎功能,也不依赖独立文档 PR #836 合入。 + +## 2. 包身份、文件名与 import 分别处理 + +| 层次 | 统一约定 | FFmpeg 示例 | +|---|---|---| +| 仓库 | 沿用 `-m` | `mcpplibs/ffmpeg-m` | +| 包 namespace | `mcpplibs.mwrap` | `namespace = "mcpplibs.mwrap"` | +| 包 short name | 单个原子段,无点,无 `-m` 后缀 | `name = "ffmpeg"` | +| 描述符路径 | 分类内平铺,文件名省略 `mcpplibs.mwrap.` | `pkgs/mwrap/ffmpeg.lua` | +| manifest 依赖 | 显示完整身份,推荐 TOML dotted key | `mcpplibs.mwrap.ffmpeg = "8.1.2"` | +| 模板命令 | 与依赖使用相同完整身份 | `mcpp new media --template mcpplibs.mwrap.ffmpeg@8.1.2` | +| 根模块 | 完整 `mcpplibs.mwrap.` | `import mcpplibs.mwrap.ffmpeg;` | +| 子模块 | 沿用上游分组 | `import mcpplibs.mwrap.ffmpeg.avcodec;` | +| 普通 API | 保留上游名字、namespace 和类型身份 | `avcodec_find_decoder(...)` 等 | +| 宏映射 | `.macros`;映射 namespace 独立 | `mcpplibs::mwrap::ffmpeg::macros` | + +```toml +[dependencies] +mcpplibs.mwrap.ffmpeg = "8.1.2" +mcpplibs.mwrap.opencv = { version = "5.0.0", features = ["imgproc", "imgcodecs-png"] } +``` + +```lua +-- pkgs/mwrap/ffmpeg.lua(只表示目标身份,非完整安装配方) +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "ffmpeg", + -- xpm、mcpp、license 等沿用经过验证的配方并指向新发布资源。 +} +``` + +完整身份只有一个。不要另建 `namespace = "mwrap"` 的第二套包,不通过重复描述符模拟别名; +也不要写成 `namespace = "mcpplibs", name = "mwrap.ffmpeg"`。 +C++ 的 `import` 没有包选择器的省略规则,必须与实际 `export module` 完全一致。 + +### 2.1 分类内短文件名与字母子目录 + +最新补充采用 `pkgs/mwrap/ffmpeg.lua`:目录已经表达封装分类,文件名不再重复 `mwrap.` 或 `mcpplibs.`。 +`opencv.lua`、`onnxruntime.lua` 等同理。各分类目录的同名文件不代表相同身份,必须检查 descriptor 声明。 + +按字母分组会形成 `pkgs/mwrap/f/ffmpeg.lua`。当前固定客户端只扫描 pkgs 根和一级分类,不能保证发现第二级目录。 +因此本轮选择“平铺分类 + 裸 short name 文件名”;不增加字母子目录、不发布转换副本、不为此修改 mcpp。 +未来只有通用递归发现/发布协议实际支持并经过端到端验证后,才另行评估字母分组。 + +### 2.2 已核实的 mcpp 行为 + +核对已发布 `v2026.10.24.1` 的实现与文档,而非仅依赖本地较旧 main: + +- `normalize_package_selector`:没有 namespace 的裸名采用默认 `mcpplibs`;带点选择器的最后一段是 name,前面是精确 namespace。 + 因此 `mwrap.ffmpeg` 表示 `(mwrap, ffmpeg)`,并不等价于 `(mcpplibs.mwrap, ffmpeg)`。用户已确认不采用该简写。 +- `xpkg_lua_candidates` 的推荐快路径使用全名,但 fetcher 有 identity-first fallback:扫描 `pkgs` 根和一级子目录,按 descriptor 声明的身份匹配。 + 所以 `pkgs/mwrap/ffmpeg.lua` 可以承载完整身份;文件名不要求等于 FQN。 +- 目录只增加一层分类,不使用 `pkgs/mwrap/f/` 等二级嵌套;不做 staging 路径转换。 + +这证明客户端发现规则允许缩短文件名,不等于已证明索引的每个外围脚本均支持。 +实施时必须验证发布、lint、站点、变更影响分析、updater 和 provider 加载路径;修改索引适配即可,不改引擎。 + +证据: + +- [发布版 selector 实现](https://github.com/mcpp-community/mcpp/blob/v2026.10.24.1/modules/manifest/src/dependency_selector.cppm) +- [发布版 descriptor 发现实现](https://github.com/mcpp-community/mcpp/blob/v2026.10.24.1/src/pm/package_fetcher.cppm) +- [发布版依赖语法](https://github.com/mcpp-community/mcpp/blob/v2026.10.24.1/docs/05-dependencies.md) + +## 3. 七库新身份与版本映射 + +以下“当前版本”为现有未合入候选,不代表新 mwrap 已发布。上游版本依据当前源码 pin;本轮不顺带升级上游。 + +| 仓库 / 现有 PR | 当前候选身份与版本 | 新完整身份 | mwrap 首发版本 | 描述符文件名 | +|---|---|---|---|---| +| opencv-m #1 | `mcpplibs.mwrap.opencv@5.0.0.1` | `mcpplibs.mwrap.opencv` | `5.0.0` | `opencv.lua` | +| onnxruntime-m #1 | `mcpplibs.mwrap.onnxruntime@1.25.1` | `mcpplibs.mwrap.onnxruntime` | `1.25.1` | `onnxruntime.lua` | +| llama.cpp-m #5 | `ggml-org.llamacpp@b10069.3` | `mcpplibs.mwrap.llamacpp` | `b10069` | `llamacpp.lua` | +| ffmpeg-m #8 | `ffmpeg.ffmpeg@8.1.2.1` | `mcpplibs.mwrap.ffmpeg` | `8.1.2` | `ffmpeg.lua` | +| grpc-m #8 | `grpc.grpc@1.83.0.1` | `mcpplibs.mwrap.grpc` | `1.83.0` | `grpc.lua` | +| imgui-m #13 | `ocornut.imgui@1.92.8.1` | `mcpplibs.mwrap.imgui` | `1.92.8` | `imgui.lua` | +| godot-cpp-m #1 | `godotengine.godot-cpp-m@10.0.0-rc1.1` | `mcpplibs.mwrap.godot_cpp` | `10.0.0-rc1` | `godot_cpp.lua` | + +Godot short name 已确认为 `godot_cpp`:与原 module spelling 对应,适合直接作为 C++ 模块名的一段; +仓库仍为 `godot-cpp-m`,供应者仍为 `compat.godot-cpp`。该映射在正式规范中明确记录。 +`llamacpp` 保留既有辨识名称,避免把 `llama.cpp` 的点误表达为额外 namespace。 +`b10069` 使用精确 pin,不承诺 semver 范围;Godot 仍为 prerelease,不标为稳定引擎兼容认证。 + +首发后的封装修复才追加单个修订尾号,例如 `8.1.2.1`、`b10069.1`;上游升级后重新从对应原始版本开始。 +新身份首发去尾号不表示可以将已经发布的同身份版本降级、覆盖或重用。 +发布前再次查询新 FQN 是否已存在;若出现同身份同版本资源,先核对不可变性,不直接替换。 + +### 3.1 统一的不只是 dependencies 字符串 + +五个旧身份库需要同步修改 package metadata、`export module`、内部 module imports、examples、tests、模板、构建代码中的显式包/模块名。 +原有 `ffmpeg.*`、`llamacpp`、`grpc`、`imgui.*`、`godot_cpp` 模块迁到完整 mwrap 前缀。 +原 C/C++ API namespace 和实体保持不变,不将 `ImGui::`、`grpc::`、`godot::` 等改名。 +补齐各库的 `.macros` 映射入口,文本预处理桥仍可用于 token/control-flow 宏;不伪造宏导出。 + +供应者、编译规则和 host tools 按职责保持独立。`compat.ffmpeg`、`compat.godot-cpp`、`compat.onnxruntime` 等不是模块封装层,不迁入 mwrap。 +gRPC 的 protoc/plugin/代码生成规则仍为工具包,不为“统一七个 wrapper”而全部改成 mwrap。 +但其依赖、宿主/目标版本绑定和新源码发布地址必须一起核验,避免新 wrapper 依赖仅存在于未发布候选中的工具版本。 + +OpenCV→FFmpeg 的实现依赖仍使用对应 compat 供应者;OpenCV→ORT 继续遵守既定所有权与 ABI 边界。 +同一程序不得因为新旧 wrapper 混用而链接两份相同上游实现。迁移说明提示整体迁移;必要时配置阶段明确拒绝冲突,不承诺旧/新模块任意混合。 + +## 4. README:保留原结构再精简 + +所有 `xxx-m` 仓库(不限于本轮七库)必须满足: + +- `README.md` 为默认英文入口;中文统一使用 `README.zh.md`。 +- 两份 README 顶部提供双向语言链接:英文页链接 `简体中文`,中文页链接 `English`。 +- 两种语言都必须包含相同的核心能力、依赖/模板命令、版本、平台前提和限制;代码和命令保持一致。 +- 缺少中文版本的仓库必须补齐;已有中文为主的默认页,应按原布局提供英文默认页,并将中文内容整理到中文页。 +- 每种语言通常约 100 行以内;英文与中文不要求字数或行数机械相等,不能只翻译标题而省略关键限制。 + +“统一风格”约束语言、密度和可用性,不强制七库采用完全相同的标题或顺序。 +基线使用各 PR 当前 base 的 README(含对应翻译);保留项目标题、logo/少量有效 badge、语言入口、原一级/二级栏目及顺序。 +保留布局不要求保留中文栏目标题在英文页中:标题和正文按页面语言翻译,栏目语义、层级与顺序保持对应。 +修正失效链接、CI 仓库地址、license 标签等事实错误,不为保留外观继续展示错误信息。 +每种语言通常控制在约 100 行以内;完整矩阵、长示例、平台细节移到 docs,并在原栏目保留短摘要和链接。 +不通过压成超长行、删除必需前提或把所有内容塞入折叠块来满足行数。 + +| 仓库 | 已核查的原 README 结构 | 精简方式 | +|---|---|---| +| OpenCV | badge/CI → Characteristics → Getting started → Modules → Features → Examples → Build and toolchains → License | 保留栏目与模块/feature 摘要,快速开始使用新模板,完整矩阵链接 docs | +| FFmpeg | badge/CI → 核心特性 → 快速开始 → 模块一览 → 示例 → 工具链与运行时 → License | 原约 86 行,重点修订身份、版本与示例,避免不必要重排 | +| ImGui | badge/CI → 核心特性 → 快速开始 → 模块一览 → Features → 示例 → 工具链与运行时 → License | 原约 101 行,压缩重复说明,保留 headless/window/docking 区别 | +| llama.cpp | Add The Package → Minimal CPU Program → CPU/Metal/Vulkan Chat → Supported Boundary | 各后端栏目保留,长命令与 shader 原理转 docs,CPU 默认模板无模型资产也能运行 | +| gRPC | Quick Start → Two ways to use it → Code generation → More control → Platform support → Features → Build/test → License | 保留两种使用方式和代码生成栏目,构建内部说明转 docs,平台限制不删 | +| Godot | Install → Macros → hashfuncs shim → Example → Regenerating → Tests → License | 长 shim/扩展示例转 docs,原栏目保留摘要;独立 math 和引擎加载分清 | +| ORT | 原基线仅两行占位 | 没有成熟布局可恢复,沿用候选已建立的入门结构,与生态字体、代码块和链接风格对齐 | + +验收时并排查看 base 与新 README:栏目/顺序、badge 与语言入口、关键示例、约 100 行、实际命令均核对。 +中英文必须同步;根据当前 checkout,OpenCV 和 gRPC 已有 `README.zh.md`,ORT、llama.cpp、FFmpeg、ImGui、Godot 五库需要新增中文页。 +这里是补齐翻译,不是重新设计整页布局;ORT 的占位基线例外只影响栏目设计,不豁免英文默认和中文支持。 +中英 README 的双向链接、文档锚点、badge、许可证链接应分别验证;不能假设标题翻译后的锚点相同。 +索引规范 `docs/mwrap.md` / `docs/zh/mwrap.md` 与 authoring skill 改为“保留既有结构的精简原则”,去掉强制整页重排的要求。 + +## 5. 索引目录与历史资源策略 + +```text +pkgs/ + mwrap/ + opencv.lua + onnxruntime.lua + llamacpp.lua + ffmpeg.lua + grpc.lua + imgui.lua + godot_cpp.lua + f/ffmpeg.ffmpeg.lua # 已发布历史保留 + g/ggml-org.llamacpp.lua # 已发布历史保留 + g/grpc.lua # 已发布历史保留 + g/godotengine.godot-cpp-m.lua # 已发布历史保留 + o/ocornut.imgui.lua # 已发布历史保留 + o/opencv.opencv.lua # 已发布历史保留 +tests/ + mwrap/ # 七个新身份的消费者/归档/模板测试 + examples/ # 旧身份消费者继续覆盖历史资源 +``` + +当前未合入的两个 `pkgs/mwrap/mcpplibs.mwrap.*.lua` 重命名并更新为新首发版本;不保留同身份第二份 descriptor。 +另外五库新建 mwrap descriptor,不移动或重定向历史 descriptor。 +现有索引 PR 向旧描述符加入的“尚未发布候选”条目要从最终 diff 撤回;已发布条目逐字节保留,不能把两者混为一谈。 +若供应者确有本轮必需的功能修订,独立解释其变更与版本,不以 wrapper 迁移名义改写已有资源。 + +索引工具统一从 descriptor 的 `(namespace, name)` 读取身份,不从短文件名或分类目录推断包 namespace。 +审查并适配:发布枚举/内容 hash、镜像与 manifest、Lua lint、保留 namespace、跨包引用、站点/搜索、updater、changed-files→member 映射、shards 和缓存 key。 +特别检查现有 updater 的 tag 模板及 descriptor 按名定位,避免缩短文件名后漏更新或更新旧身份。 +保留 `min_mcpp` 作为兼容下限;不能仅因测试固定新版本就机械提高。 + +### 5.1 mcpp-index 文档、规范与 skill 同步清单(必交付) + +这不是只改描述符路径的任务。下面各文件须与实现处于同一索引 PR,不能留到发布后补文档。 +本轮仍只写方案;实际同步在方案 review 通过后执行。 + +| 文件 / 入口 | 必须更新的内容 | +|---|---| +| `docs/mwrap.md`、`docs/zh/mwrap.md` | 正式规范唯一来源;七库统一完整身份,`pkgs/mwrap/.lua`,无字母子目录,首次上游原版本、独立 mwrap tag、API/macros 与兼容边界 | +| 上述规范的 README 小节 | 明确 `README.md` 默认英文、`README.zh.md` 必须提供且双向链接;保留原布局/栏目再精简;约 100 行是每语言编辑目标,删除强制统一标题顺序的旧要求 | +| `docs/repository-and-schema.md`、`docs/zh/repository-and-schema.md` | 将 `<完整身份>.lua` 改为 `.lua`;说明文件名、分类目录与声明身份的区别;源码与发布布局一致 | +| `docs/package-types.md`、`docs/zh/package-types.md` | 核对 wrapper / compat / native / host-tool 分类说明及交叉链接,示例采用完整 FQN 与新目录规则 | +| `README.md`、`README.zh-CN.md` 及站点包列表入口 | 核对规范导航与示例;存在旧 mwrap 路径或旧 wrapper 身份时同步更新,避免全站重复维护规范正文 | +| `.agents/skills/add-mcpp-index-package/SKILL.md` | 写 descriptor 的步骤、目录特例、英文默认且中文必备/双向链接的 README 规则、首发/tag/updater 约束、示例与常见错误表全部同步;保留完整身份验收与不可变资源规则 | +| `.agents/docs/` 的现有实施/验收记录 | 保留历史事实;在本次实施的验收记录中链接本方案并标注旧决策已被替代,不将旧绿灯写成新版本结果 | +| descriptor/example 模板和脚本使用说明 | 若有固定 `.lua` 或从文件名拆 namespace 的约定,同步为读声明身份;实际代码适配由实现阶段完成 | + +实施 skill 修改前按 `skill-creator` 与目标 skill 的实际要求读取说明;不创建第二份重叠 skill,不修改 mcpp 仓库的引擎或技能文件。 +规范示例统一展示 `mcpplibs.mwrap.*`;不要让 README、skill 或模板再次推广 `mwrap.*` 依赖简写。 + +文档验收: + +- 中英规范、仓库 schema 说明与 skill 的命名/路径/版本/tag/README 规则逐项对照;README 的英文默认和中文必备不能写成可选。 +- 搜索旧路径约定、旧短身份和强制重排措辞;历史记录与旧包示例可以保留,但必须有明确上下文。 +- 所有新示例的 dependency、`mcpp new`、`import`、descriptor FQN 互相对应,链接指向真实文件。 +- 代码评审表同时检查实际实现与文档,不能仅因文字替换完成就判定 loader/updater 支持。 + +## 6. 版本与 tag:包版本对齐,上游同名旧 tag 不覆盖 + +2026-10-25 经 GitHub API 查询,各仓库已有: + +| 仓库 | 与目标上游版本相同的旧 tag | 已有该 tag 的 release | +|---|---|---| +| OpenCV | `v5.0.0` | 无,但 tag 已存在 | +| ORT | 无 `1.25.1` / `v1.25.1` | 无 | +| llama.cpp | `b10069` | 有 | +| FFmpeg | `v8.1.2` | 有 | +| gRPC | `v1.83.0` | 有,另有 `v1.83.0-2/-3/-4` | +| ImGui | `1.92.8` | 有 | +| Godot | `v10.0.0-rc1` | 有 | + +“新 mwrap 身份首次发版”不等于“Git 仓库没有历史版本”。已有 tag 的源码携带旧身份或旧接口,不能给新包复用这些归档。 +建议七库统一采用独立 tag 序列 `mwrap-${version}`:例如 `mwrap-8.1.2`、`mwrap-b10069`、`mwrap-10.0.0-rc1`。 +包 version 仍分别是 `8.1.2`、`b10069`、`10.0.0-rc1`;release title 使用 `mwrap.ffmpeg 8.1.2` 这类可辨认名称。 +tag 的 mwrap 前缀用于隔离同仓库历史,不是额外封装版本尾号。ORT 也采用同一规则,避免每库一套规则。 +未来修订 tag 为 `mwrap-8.1.2.1` 等,已发布 tag、release asset 与 SHA256 永久不变。 +updater 新 mwrap 配方只匹配新 tag 序列;旧配方不能把新 tag 当作旧 namespace 的后续版本自动提案。 +不能仅依赖 GitHub 的 latest release:同仓库混有旧序列与 mwrap 序列,必须显式筛选 tag、去除准确的 mwrap 前缀后再核对 manifest/package version。 +新增回归覆盖旧 tag 被新 updater 拒绝、新 tag 被旧 updater 忽略、`b10069` 精确版本及 Godot RC 的 prerelease 策略。 + +如果 review 决定 tag 也必须完全等于旧的上游同名 tag,则与“旧资源保留”冲突;不能用强推旧 tag 解决。 +本方案默认采用上述独立 tag 序列,不另建七个仓库。 + +## 7. 实施与 squash / release / 索引顺序 + +### A. 设计通过后更新现有 PR + +复用七库现有 PR 和 index #564,不另开重复实现 PR。保留 checkpoint commits 直到 review 完成。 +依次更新 manifest/模块身份与版本、内部 import、宏映射、模板、消费者、README 和规范/skill。 +索引 PR 可提前准备 candidate-only 归档描述符供 CI,但不先合入,也不把临时 namespace 视图当发布布局证明。 +检查每个供应者/host tool 的正式可用版本;必须新增的依赖先完成独立验证和发布。 + +### B. 自我 review 与所有最终 CI + +已有旧 HEAD 的全部绿灯只作为基线,新身份/模块/版本修改后必须重新完整通过。 +每个 PR HEAD 对齐实际归档 pin,检查完整必需 workflow,不将 skip、旧 run、局部步骤或超时计作通过。 +本地重型测试串行,合计四核 quota、32 GiB cap;整机 CPU 达到 80% 或可用内存低于 20% 则中止任务测试。 + +### C. squash 合入库并验证真正发布提交 + +取消 draft 前完成 review 清单,检查分支保护、mergeable 和最新基线差异;有冲突则解决并重跑相关最终检查。 +库 PR 使用 squash merge;checkpoint 保留在 PR 历史,最终 squash commit 提供清楚的问题、行为与验证说明。 +合入后记录真正 main SHA,等待该提交的必要 CI 成功。PR HEAD 的归档 hash 不能冒充 squash SHA 的归档 hash。 +按供应者/被依赖库先行,再处理消费者;新 wrapper 的供应者和 host tools 必须有可获取且校验过的正式资源。 +库 source CI 若依赖本轮尚未公开索引的新 wrapper,用独立完整候选索引固定精确归档验证;不要求为了消除循环而先合入公共索引。 +库 release 先行期间,README 明确“新身份需待索引发布后可直接安装”;此时不能宣布公共快捷模板已经可用。 + +### D. 库 release + +对已通过的 squash SHA 创建独立 mwrap tag;核查 tag 指向、manifest 首发版本、上游 pin、许可证与产物后发布。 +从实际 tag/release 下载正式归档,计算 SHA256、核对源码与打包闭包;GitHub/GitCode 镜像地址只有实际上传并验证后才写入。 +先建立可验证的发布物,再声称库已 release;不能只建空 release 或仍指向 PR commit。 +Godot RC release 标为 prerelease;llama 的非 semver tag 不因含字母就自动判为 prerelease。 +发布源归档/选中 notices,并按现有受支持平台规则提供所需运行资源,不把上游 SDK 大二进制直接提交 Git。 + +### E. 最后统一更新并发布索引 + +七库正式资源可获取后,将 index #564 的七个新 descriptor 切换为正式 mwrap tag/release URL 和真实 SHA256。 +使用完整候选索引在独立 home 验证;不从已安装源码、用户全局索引或旧包缓存误取同名产物。 +新版本依赖、模板默认值、workspace 测试、updater 版本和 docs 同步;旧版本条目不变。 +索引所有最终 workflow 通过后 squash 合入;再检查 main 发布流程和实际发布索引的七库发现、模板安装与运行。 +只有这一步通过,才宣布七库公共索引和默认模板整体可用;候选索引通过不能替代公共索引验收。 +若库先发布而索引仍待通过,可保留未被公共索引引用的 release,修复索引;不得重写已经发布的库资产。 + +## 8. 具体验收清单 + +| 范围 | 必须提供的证据 | +|---|---| +| 身份 | 七库 manifest、descriptor、lock、安装日志均命中唯一完整 mwrap FQN;无旧身份误命中 | +| 缩短文件名 | `.lua` 携带完整身份,path/Git/发布归档发现均通过;lint/updater/站点按声明身份处理 | +| 源码模块 | 根/子模块 import、内部依赖、API namespace 与原类型身份正确;五库不能只替换 manifest 名字 | +| README | 七库各有英文 `README.md` 和中文 `README.zh.md`,顶部互链;与原 base 布局并排检查,原栏目语义/顺序保留,每语言约 100 行,命令、版本、平台限制和链接一致 | +| 快捷模板 | 七库默认 `mcpp new --template <完整FQN>@<首发版本>` 原样生成、build/run;窗口/视频/ORT 等附加模板分别验证 | +| 共存边界 | 新旧描述符均可发现,旧资源 hash 不变;应用不误链接两份 SDK;实际新包消费不依赖旧模块别名 | +| gRPC 工具链 | protoc、plugin、rule、runtime 版本一致;host 与 target 区分;正式发布资源无悬空依赖 | +| OpenCV / ORT | 保留五平台范围、十六模块与 SDK/API oracle;原生窗口、CPU 实际 session profile、codec/视频与搬迁回归 | +| 归档部署 | 最终 squash/tag 源、hash、manifest、模板一致;fresh-home 安装、release pack、隔离搬迁、选中 notices 与 loader 闭包 | +| 发布与索引 | 每库 PR HEAD CI、合入 SHA CI、tag 指向及正式资源均核对;索引最终 HEAD 和 main 发布检查通过 | +| 文档/skill | 索引中英 mwrap 规范与 authoring skill 同步身份、短文件名、README 保留布局且英文默认/中文必备、首发/tag 规则;不改 mcpp 引擎 | + +相同版本新旧 identity 的缓存/安装隔离需专门验证,尤其 Godot 曾有同 short name/version 的历史 lookup 限制注释; +不能用改个版本尾号掩盖当前工具行为。本方案 Godot 新 short name 为 `godot_cpp`,其他同名跨 namespace 仍要测。 +上述验证按实际风险组合,不要求无意义的 feature 全排列;不降低已有功能测试覆盖。 + +支持范围沿用明确矩阵:ORT CPU、Godot 独立 math、llama CPU 初始化等;设备、GPU、contrib、非基线 ISA 与 API 未覆盖项继续如实列出。 +当前 OpenCV 20 个 partial/未实现 intrinsics/架构审查记录不因重命名或 release 而变为通过;不发布“所有 API/硬件全支持”的声明。 + +## 9. 需要 review 的核心决定 + +1. 已确认:显示完整 `mcpplibs.mwrap.*`;文件采用 `pkgs/mwrap/.lua`,省略两个 namespace 前缀,目录内平铺,不修改引擎解析。 +2. 七库全部建立新 mwrap 身份,旧 descriptor 与已发布历史原样保留;同身份 descriptor 不重复。 +3. 首发包版本使用上游原版本;Godot 新 short name 已确认 `godot_cpp`,llama 保持 `llamacpp`。 +4. 为避开已有上游同名 tag,统一新 `mwrap-${version}` tag;release 展示上游版本,绝不覆盖旧 tag。 +5. 所有 `xxx-m` 仓库必须默认英文 `README.md`,提供中文 `README.zh.md` 并顶部互链;保留原布局再精简,每语言通常约 100 行;ORT 占位基线不豁免双语要求。 +6. 索引中英规范、schema/包分类文档与现有 authoring skill 必须同步,详见 §5.1。 +7. 本轮只交付本文。review 通过后再更新代码;所有新检查通过后库逐个 squash/release,最后统一更新与合入索引。 + +## 10. 本轮核查记录 + +- 权威实施 checkout:`/home/speak/workspace/github/mcpp-community/mcpp-index-mwrap`,分支 `feat/mwrap-opencv-onnxruntime`,起点 `48640fc7183d428999111f01a6c3c642179ad38d`。 +- 七库 PR 当前 open/unmerged;README 原布局从各 PR base SHA 的 `README.md` 读取,并核对当前 manifest/module 声明。 +- tag/release 清单通过 GitHub REST 查询;明细留在 `/tmp/mwrap-unified-design-release-state.json`,发布实施前需再次查询。 +- mcpp 发布版三份源码已通过 contents API 读取;selector / compat / fetcher blob SHA 分别为 `758853758c78edba0a66f5418025bd1e6f2dcbac`、`dd8832e26c197251c39db45606d41da2a6383699`、`2a4007c4f04764489f82f2a2eda39b12ca5375b9`。 +- 本轮未运行编译、未更新全局索引、未修改产品文件、未提交或 push;原方案文档及用户原始文件保留。 + + +## 11. 综合自我 review(本次修订) + +本节是方案审查结果,不把尚未实施的修复或 CI 标为完成。 + +| 视角 | 发现与处理 | 实施时的验收证据 | +|---|---|---| +| 用户体验 / 国际化 | 旧稿“没有翻译不要求新增”与新要求冲突,已删除;七库及未来 xxx-m 均英文默认、中文必备。FFmpeg/ImGui 原中文栏目只保留布局语义,英文页必须译成英文 | 七库共十四份语言 README,顶部互链;实际命令、限制、版本一致 | +| 命名 / 工具兼容 | 显示完整 FQN,文件短名与声明身份分离;Godot 已确认。目录内平铺规避现有客户端二级目录发现限制 | 全索引解析短文件名、唯一 FQN、单独/聚合模块 import 与安装来源 | +| 历史兼容 / 缓存 | 新身份可以使用上游原版本,但不能覆盖旧 tag 或误取旧缓存;同时链接新旧实现有重复定义风险 | 已发布资源不变、fresh-home 精确解析、旧包消费者、混用冲突诊断 | +| 构建 / API | 只改依赖键不够,五库模块声明、内部 import、模板和宏桥需要整体迁移;上游 API namespace 保持原样 | 七库新 HEAD 的真实默认模板/API/SDK 对照与平台 CI;旧绿灯不替代 | +| 发布 / 依赖顺序 | squash 改变提交与归档身份;库先 release、索引后发布存在短暂不可公共安装窗口,已明确候选索引验收和对外可用的分界 | 合入 SHA CI、tag 指向、新归档 hash、候选索引及最终公共索引安装/搬迁 | +| 自动更新 / 维护 | 同仓库新旧 release 序列可能污染 latest 与 updater;已增加严格 tag 过滤和双向隔离回归要求 | 新旧 tag 互斥选择、非 semver/RC 测试、manifest 版本比对 | +| 文档 / 规范 / skill | 规范强制顺序与“保留原布局”冲突,需一起更新;不得只改 README 留下 skill 再次生成旧布局 | §5.1 文件同步对照,英/中文规范和 skill 示例一致,链接/代码块/模板验证 | +| 范围 / 资源 | 本轮只改设计稿;后续重命名不扩张成 GPU/contrib/API 完整性承诺;本地整机 80% 资源上限继续有效 | 设计阶段仅本文变化;实施阶段明确支持矩阵、资源限制和全部必需 CI | + +审查结论:本次需求已纳入方案,未发现必须修改 mcpp 引擎才能落地的命名或目录需求。 +独立 `mwrap-${version}` tag 仍是为保留旧发布提出的方案建议,待用户 review;Godot 命名和 README 双语规则已是确认要求。 +代码、双语 README、规范/skill 和 CI 的实际完成情况在实施后逐项验收,本轮不提前宣称完成。 diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md new file mode 100644 index 00000000..e40afaa3 --- /dev/null +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -0,0 +1,44 @@ +# Unified mwrap first-release execution ledger + +User authorized implementation, one PR per repository, complete CI/self-review, +squash merge, upstream-aligned releases, GitCode mirrors, final index merge and +real local consumption. The [approved plan](2026-10-25-mwrap-unified-identity-and-first-release-plan.md) +defines the migration; its earlier design-only wording records that prior phase. + +## Implementation checkpoint + +- Seven wrapper manifests use mcpplibs.mwrap; Godot uses godot_cpp. First package + versions equal their pinned upstream versions. Original SDK sources stay intact. +- Five legacy module families and consumers move to complete module names. + Common macro mappings live in each .macros namespace; preprocessing stays textual. +- Fourteen READMEs default to English plus Chinese, top links in both directions, + retaining original primary section order and platform/API limits, below 100 lines. +- Seven flat pkgs/mwrap/.lua descriptors carry the full declared identity. + Legacy wrapper descriptors and their old versions remain unchanged. The gRPC + host plugin/rule retain independent 1.83.0.1 packaging revisions, appended without + changing published version blocks; those are tools, not mwrap interfaces. +- Bilingual canonical specification, schema/type docs and existing authoring skill + are synchronized. Future release tags use the independent mwrap-${version} stream. +- Local strict FFmpeg, ImGui and Godot behavior/macro tests pass. Llama's complete + Python unit suite and real macro module consumer pass. Remaining native CI and + final local installed-release checks are still gates, not assumed successful. +- New native CI exposed a CP1252 README decode failure on Windows. All seven release + guards now read UTF-8 explicitly. A Clang failure from placing a new module import + after declarations was fixed at the producer/root and in the Godot generator. +- Aggregate host CPU briefly reached 96% during gRPC local testing; the guard stopped + the task and that run is not counted passing. Retry uses an 8-core aggregate quota, + four compile jobs, MemoryHigh 28GiB / MemoryMax 32GiB and the host 80% guard. + +## Evidence and open gates + +Candidate heads: /tmp/mwrap-unified-candidate-heads.json. +Double-download and tracked-source equivalence: /tmp/mwrap-unified-archive-equivalence.json. +CI observer: /tmp/mwrap-unified-source-ci.json (read exact current heads, not old successes). +Local logs: /tmp/mwrap-unified-{ffmpeg,imgui,godot}-local*.log; +/tmp/mwrap-unified-llama-unit-final.log; /tmp/mwrap-unified-llama-local.log; +/tmp/mwrap-unified-grpc-local-retry.log. + +No merge or release has occurred at this checkpoint. Formal archive URLs and +verified byte-identical CN mirrors replace commit snapshots only after release. +Full current-head source/index CI, final ecosystem review, merge/tag consistency, +GitCode asset fetch and installed published-index templates remain required. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index a6b79d49..44e7ffc2 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -57,7 +57,7 @@ description: Use when adding a new third-party library/package to the mcpp-index 以保证字节一致(sha 相同)。**在不具备 `mcpp-res` 写权限时**,不应构造镜像表,而应使用纯字符串形式 `url = ""`(lint 允许此形式,CN 用户将回退至上游源),镜像由维护者后续补充。详见 [docs/zh/cn-mirror.md](../../../docs/zh/cn-mirror.md)。 -4. **编写描述符**:传统包使用 `pkgs//.lua`,`mcpplibs.mwrap` 包使用 `pkgs/mwrap/<完整包身份>.lua`。 +4. **编写描述符**:传统包使用 `pkgs//.lua`,`mcpplibs.mwrap` 包使用 `pkgs/mwrap/.lua`。 - 目录 `` **取完整包名首字母**(`compat.eigen` 对应 `pkgs/c/`,`nlohmann.json` 对应 `pkgs/n/`), 而非短名。mwrap 是明确的分类例外,文件平铺于 pkgs/mwrap;当前客户端 fallback 按声明身份扫描一级分类目录,不要求目录名为单字母。不增加 pkgs/mwrap/o 等额外层级,也不转换发布路径。 - `xpm` 须覆盖三平台(linux/macosx/windows),每个版本包含 `url = { GLOBAL=…, CN=… }` 与 `sha256`。 @@ -111,13 +111,17 @@ description: Use when adding a new third-party library/package to the mcpp-index 用户明确要求整理文档或说明确有变化时才改入口文档。新增包通常也不改 `.xpkgindex.json`。 - 详细字段、例外和认证机制见 [自动更新文档](../../../docs/zh/automatic-updates.md)。 +新 wrapper 使用完整 `mcpplibs.mwrap.` 身份;描述符短名为 `pkgs/mwrap/.lua`,文件内声明完整 namespace。 +所有依赖、模板和 import 显示完整前缀,不推广 `mwrap.` 简写。Godot 使用 `godot_cpp`。 +新身份首发版本等于上游版本;独立 tag 使用 `mwrap-${version}`,后续封装修订才加单个数字尾号。 +不要移动旧 tag 或将新发布回填旧身份;updater 必须隔离两套 tag 序列。 + ## -m 仓库 README -新增或重构 `<库名>-m` 时,README 使用统一简洁风格,原则上每种语言不超过 100 行。 -顺序为一句定位、快捷模板、依赖与最小 import 用法、关键平台/能力边界、详细文档与许可证链接。 -架构、完整矩阵、后端细节、排错与验证历史进入 docs/;不向 README 追加 checkpoint、长表格或徽章墙。 -保留候选版本状态、必要 SDK/设备前提与关键限制,不靠超长行压缩,不为此增加用户审批。 -检查行数、示例身份/版本和文档链接;已有翻译保持结构对应。完整规则见 docs/zh/mwrap.md。 +新增或重构 `<库名>-m` 时,默认英文 README.md,必须提供 README.zh.md,顶部双向链接。 +保留原栏目层级、语义与顺序再精简,每语言通常不超过约 100 行;缺少翻译必须补齐。 +中英版本、依赖/import/模板命令、平台条件和支持边界保持一致,长示例和矩阵转入 docs 并链接。 +完整规则见 docs/zh/mwrap.md,不强制将所有库重排成同一套栏目。 ## 本地测试资源 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b5a5ec44..fd28ae02 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1216,7 +1216,7 @@ jobs: tar -xzf "$archive" echo "MCPP=$PWD/mcpp-${MCPP_VERSION}-${{ matrix.suffix }}/bin/mcpp" >> "$GITHUB_ENV" - name: Immutable archive, default scaffold, strict build and loopback RPC - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package grpc.grpc@1.83.0.1 --toolchain "${{ matrix.toolchain }}" + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.grpc@1.83.0 --toolchain "${{ matrix.toolchain }}" workspace: # The shard suffix appears only when the platform is actually split, and @@ -1535,7 +1535,7 @@ jobs: - name: Installed OpenCV archive, image template and relocated deployment if: contains(format(' {0} ', env.MEMBERS), ' opencv-cpu ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.opencv@5.0.0.1 --deploy + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.opencv@5.0.0 --deploy - name: Installed mwrap archive, project template and relocated deployment if: contains(format(' {0} ', env.MEMBERS), ' onnxruntime-cpu ') && matrix.toolchain == 'default' @@ -1545,22 +1545,22 @@ jobs: - name: Installed llama.cpp-m archive and actual CPU project template if: contains(format(' {0} ', env.MEMBERS), ' llamacpp-cpu ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ggml-org.llamacpp@b10069.3 --legacy-exact-key + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.llamacpp@b10069 --legacy-exact-key - name: Installed FFmpeg wrapper archive and actual default project template if: contains(format(' {0} ', env.MEMBERS), ' ffmpeg-cpu ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ffmpeg.ffmpeg@8.1.2.1 + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.ffmpeg@8.1.2 - name: Installed ImGui wrapper archive and actual headless default template if: contains(format(' {0} ', env.MEMBERS), ' imgui-headless ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package ocornut.imgui@1.92.8.1 + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.imgui@1.92.8 - name: Installed Godot wrapper archive and actual standalone math template if: contains(format(' {0} ', env.MEMBERS), ' godot-math ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package godotengine.godot-cpp-m@10.0.0-rc1.1 + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.godot_cpp@10.0.0-rc1 - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash diff --git a/docs/mwrap.md b/docs/mwrap.md index bff6304b..65ebe2bc 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -61,6 +61,12 @@ again at `5.0.1`. Revisions start at **1**: never publish both `5.0.0` and `5.0.0.0`, which compare equally. Do not use an unrelated wrapper `0.x` version or change the upstream patch number to describe a wrapper fix. +The first release of a new mwrap identity uses the upstream version without a +wrapper suffix. Existing legacy package identities keep their published bytes. +Use the independent repository tag series `mwrap-${version}` (for example, +`mwrap-8.1.2`); it does not alter the package version. Never move an existing tag. +Select this exact tag series in automatic updates rather than GitHub latest. + Record upstream identity separately in `[package.metadata.mwrap]` and source pins. A wrapper revision does not excuse undocumented breaking interface changes. Non-numeric/prerelease upstream schemes need an explicit mapping preserving @@ -110,21 +116,17 @@ they enter the graph. Record ABI, runtime, CPU baseline and SDK constraints. ## README style -Every `-m` repository uses a consistent, concise entry page, normally -**no more than 100 lines**. Existing translations follow the same structure and -length target and stay aligned. - -Use this order: project name and one-sentence purpose; quickstart template; -existing-project dependency and minimal import example; essential capability and -platform boundaries; links to detailed docs, examples and the license. Show full -package identities and directly runnable commands first. +Every `-m` repository has an English `README.md` and a Chinese +`README.zh.md`, linked to each other at the top. Both normally stay within +100 lines. Add the missing translation when modernizing a wrapper. -Move architecture, complete feature/API matrices, backend setup, troubleshooting, -validation evidence and history into `docs/`. Avoid badge walls, repeated -navigation, large tables, implementation essays and appended checkpoint logs. -Do not meet the target with excessively long lines or by removing prerequisites. -State unpublished-candidate status and important device/SDK requirements briefly. -The line target is an editorial guideline, not an additional user approval gate. +Preserve the existing section hierarchy, order, useful badges and language +navigation, then shorten the prose. Translate headings while preserving their +meaning. A shared style does not require replacing every library's layout. +Keep quickstart commands, dependency/import examples, versions, platform +conditions and support limits equivalent in both languages. Move long examples, +architecture and full matrices into docs and link them from the original section. +Do not meet the target with long lines or missing prerequisites. ## Every -m package ships a runnable template @@ -168,10 +170,17 @@ or dropping validation gates. ## Index and verification -Descriptors live directly in `pkgs/mwrap/.lua`; consumers live in +Descriptors live directly in `pkgs/mwrap/.lua`; consumers live in `tests/mwrap//`. Do not add an extra alphabetic directory level. The existing client scans immediate subdirectories of `pkgs` by declared identity, and publication copies `pkgs` unchanged: no staging path conversion is needed. +The category already identifies wrappers: use short filenames such as +`pkgs/mwrap/ffmpeg.lua`, while declaring `namespace = "mcpplibs.mwrap"` and +`name = "ffmpeg"`. Filenames do not define identity. Dependencies, template +selectors and module imports display the complete `mcpplibs.mwrap.ffmpeg`. +`mwrap.ffmpeg` is a different namespace, not a supported abbreviation. +Godot uses `mcpplibs.mwrap.godot_cpp`; the repository remains godot-cpp-m. + Register consumers as workspace members and cover them in selection/sharding, lint, mirrors, search and the site. Traditional providers remain under compat. diff --git a/docs/package-types.md b/docs/package-types.md index 12fe3031..f719daff 100644 --- a/docs/package-types.md +++ b/docs/package-types.md @@ -1,5 +1,8 @@ # Library shapes and descriptor templates +Module wrappers preserve upstream APIs under `mcpplibs.mwrap.`. Use `pkgs/mwrap/.lua`; see [the wrapper specification](mwrap.md). Every -m repository has English and Chinese READMEs. + + **English** | [简体中文](zh/package-types.md) Before writing a descriptor, work out which shape the library belongs to, then pick the matching template. Every path diff --git a/docs/repository-and-schema.md b/docs/repository-and-schema.md index cbf19352..654b89c3 100644 --- a/docs/repository-and-schema.md +++ b/docs/repository-and-schema.md @@ -2,7 +2,7 @@ **English** | [简体中文](zh/repository-and-schema.md) -Module wrapper descriptors use `pkgs/mwrap/.lua` and their consumers use `tests/mwrap//`; see [the mwrap specification](mwrap.md). The category is flat and published unchanged. The workspace test source uses the current pinned mcpp; `index.toml` separately states the descriptor compatibility floor. +Module wrapper descriptors use `pkgs/mwrap/.lua` and their consumers use `tests/mwrap//`; see [the mwrap specification](mwrap.md). The category is flat and published unchanged. The workspace test source uses the current pinned mcpp; `index.toml` separately states the descriptor compatibility floor. ## Repository layout diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index fbbdb729..fc95ce91 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -48,6 +48,10 @@ metadata 与上游锁文件仍明确记录来源。破坏性模块/API 变化必须附迁移说明。 非数字或预发布上游版本需要明确映射规则,保持原版本含义。 +新 mwrap 身份首发直接使用上游版本,不追加封装修订尾号;旧身份与历史发布保持原字节。 +仓库 tag 统一采用独立 `mwrap-${version}` 序列,例如 `mwrap-8.1.2`,包版本仍为 `8.1.2`。 +不移动旧 tag;updater 精确选择新序列,不依赖 GitHub latest。 + ## 导出与宏 优先 export using 上游实体,每个实体仅有一个导出归属,根模块聚合已启用的公共模块闭包。 @@ -74,16 +78,10 @@ capability 选择不会自动移除另一份实现对象文件,必须先防止 ## README 风格 -所有 `<库名>-m` 仓库使用统一、简洁的入口风格,README 原则上不超过 **100 行**。 -已有多语言 README 各自遵守同一结构和长度目标,内容保持对应。 - -推荐顺序:项目名与一句定位 → 快捷模板 → 已有项目接入与最小 import 示例 → -关键能力/平台边界 → 详细文档、示例与许可证入口。快速开始优先展示完整包身份和可直接执行的命令。 - -只保留影响首次使用的必要信息;架构、完整 feature/API 矩阵、后端配置、排错、验证记录 -及版本历史放入 `docs/`,从 README 链接。避免徽章墙、重复导航、大表格、长篇实现解释、 -checkpoint 日志及“后面继续追加”的更新记录,也不要用超长行或删掉必要前提来凑行数。 -未发布候选、设备/SDK 前提和重要使用限制仍须简短说明;约 100 行是编辑目标,不新增用户审批环节。 +所有 `<库名>-m` 仓库必须默认英文 `README.md`,提供中文 `README.zh.md`,顶部双向链接。 +每种语言通常不超过约 100 行;缺少中文的库必须补齐,版本、命令、平台前提和限制保持一致。 +保留原栏目语义、层级、顺序及少量有效徽章,再精简正文;英文页翻译栏目标题,不强制重排整页。 +长示例、架构和完整矩阵进入 docs,在原栏目保留摘要与链接;不靠超长行或删除前提压缩行数。 ## 每个 -m 包必须有可运行快捷模板 @@ -119,8 +117,13 @@ Linux 可使用任务专属 cgroup/systemd slice 设置 CPU/内存共享上限 ## 索引与验收 -描述符平铺于 pkgs/mwrap/<完整身份>.lua,消费者置于 tests/mwrap/<成员>/,不再增加字母子目录。 +描述符平铺于 pkgs/mwrap/.lua,消费者置于 tests/mwrap/<成员>/,不再增加字母子目录。 客户端按声明身份扫描 pkgs 的一级分类目录,发布原样复制,无需 staging 转换。 +分类已表达封装含义,文件采用短名,如 `pkgs/mwrap/ffmpeg.lua`,文件内仍声明 +`namespace = "mcpplibs.mwrap"`、`name = "ffmpeg"`。文件名不决定身份。 +依赖、模板与 import 显示完整 `mcpplibs.mwrap.ffmpeg`;`mwrap.ffmpeg` 是另一个身份,不是简写。 +Godot 采用 `mcpplibs.mwrap.godot_cpp`,仓库仍为 godot-cpp-m。 + 测试注册 workspace,并接入选择器、分片、lint、镜像、搜索与站点;传统供应者仍归 compat。 使用最新已测试稳定 mcpp,在清单、CI、模板与例子中精确固定。核查源码前更新 remote main。 diff --git a/docs/zh/package-types.md b/docs/zh/package-types.md index f4d00f4f..2d2cb291 100644 --- a/docs/zh/package-types.md +++ b/docs/zh/package-types.md @@ -1,5 +1,8 @@ # 库形态与描述符模板 +模块封装统一使用 `mcpplibs.mwrap.`,描述符位于 `pkgs/mwrap/.lua`;见 [mwrap 规范](mwrap.md)。每个 -m 仓库必须提供默认英文与中文 README。 + + [English](../package-types.md) | **简体中文** 编写描述符前,应先判定库所属的形态,再选用对应模板。`mcpp = {}` 内的所有路径均为**相对 verdir 的 GLOB**: diff --git a/docs/zh/repository-and-schema.md b/docs/zh/repository-and-schema.md index 05abaa3a..847cc35a 100644 --- a/docs/zh/repository-and-schema.md +++ b/docs/zh/repository-and-schema.md @@ -2,7 +2,7 @@ [English](../repository-and-schema.md) | **简体中文** -模块封装描述符使用 `pkgs/mwrap/<完整身份>.lua`,消费者使用 `tests/mwrap//`,见 [mwrap 规范](mwrap.md)。分类目录平铺并原样发布。workspace 测试源码使用当前固定的 mcpp;`index.toml` 单独声明描述符兼容下限。 +模块封装描述符使用 `pkgs/mwrap/.lua`,消费者使用 `tests/mwrap//`,见 [mwrap 规范](mwrap.md)。分类目录平铺并原样发布。workspace 测试源码使用当前固定的 mcpp;`index.toml` 单独声明描述符兼容下限。 ## 仓库布局 diff --git a/pkgs/f/ffmpeg.ffmpeg.lua b/pkgs/f/ffmpeg.ffmpeg.lua index a8ffb0d0..cb1f31aa 100644 --- a/pkgs/f/ffmpeg.ffmpeg.lua +++ b/pkgs/f/ffmpeg.ffmpeg.lua @@ -15,20 +15,9 @@ package = { licenses = {"MIT"}, repo = "https://github.com/mcpplibs/ffmpeg-m", type = "package", - extensions = { - autoupdate = { - tag = "v${version}", - url = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/${tag}.tar.gz", - }, - }, xpm = { linux = { - -- Immutable candidate: wrapper/template revision; upstream SDK stays 8.1.2. - ["8.1.2.1"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/1e8bce6ee12c50e43058245df42515ffbabfc78f.tar.gz", - sha256 = "595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2", - }, ["8.1.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", @@ -38,11 +27,6 @@ package = { }, }, macosx = { - -- Immutable candidate: wrapper/template revision; upstream SDK stays 8.1.2. - ["8.1.2.1"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/1e8bce6ee12c50e43058245df42515ffbabfc78f.tar.gz", - sha256 = "595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2", - }, ["8.1.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", @@ -52,11 +36,6 @@ package = { }, }, windows = { - -- Immutable candidate: wrapper/template revision; upstream SDK stays 8.1.2. - ["8.1.2.1"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/1e8bce6ee12c50e43058245df42515ffbabfc78f.tar.gz", - sha256 = "595b5bcca166583dd082ae911f7e9ed279a3e8899e9564f0901e084737c89ab2", - }, ["8.1.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", diff --git a/pkgs/g/ggml-org.llamacpp.lua b/pkgs/g/ggml-org.llamacpp.lua index 7b3c3775..a7c82f7a 100644 --- a/pkgs/g/ggml-org.llamacpp.lua +++ b/pkgs/g/ggml-org.llamacpp.lua @@ -67,12 +67,6 @@ package = { -- consumer wanting a feature must be able to name the revision that -- has it, and one that cannot use the newer engine must still find a -- revision it can build. - -- Candidate b10069.3 adds runnable templates; immutable source - -- bytes are verified before the release tag exists. - ["b10069.3"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/5028a1aa4f741db4dbd86d6ebd1928ef21027147.tar.gz", - sha256 = "9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de", - }, ["b10069.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", @@ -93,12 +87,6 @@ package = { }, }, macosx = { - -- Candidate b10069.3 adds runnable templates; immutable source - -- bytes are verified before the release tag exists. - ["b10069.3"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/5028a1aa4f741db4dbd86d6ebd1928ef21027147.tar.gz", - sha256 = "9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de", - }, ["b10069.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", @@ -119,12 +107,6 @@ package = { }, }, windows = { - -- Candidate b10069.3 adds runnable templates; immutable source - -- bytes are verified before the release tag exists. - ["b10069.3"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/5028a1aa4f741db4dbd86d6ebd1928ef21027147.tar.gz", - sha256 = "9b21c35c17e801ceee1165960eefbf7280ad50e14aaf3ea5603fbf2c4ab911de", - }, ["b10069.2"] = { url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", diff --git a/pkgs/g/godotengine.godot-cpp-m.lua b/pkgs/g/godotengine.godot-cpp-m.lua index 4eb023dd..3336fe4b 100644 --- a/pkgs/g/godotengine.godot-cpp-m.lua +++ b/pkgs/g/godotengine.godot-cpp-m.lua @@ -72,20 +72,8 @@ package = { repo = "https://github.com/mcpplibs/godot-cpp-m", type = "package", - extensions = { - autoupdate = { - tag = "v${version}", - url = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/${tag}.tar.gz", - }, - }, - xpm = { linux = { - -- Immutable candidate: runnable template; SDK stays 10.0.0-rc1. - ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/40f72d5533a9bc29b17e62ae8a6c84b3dc593071.tar.gz", - sha256 = "79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33", - }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", @@ -102,11 +90,6 @@ package = { }, }, macosx = { - -- Immutable candidate: runnable template; SDK stays 10.0.0-rc1. - ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/40f72d5533a9bc29b17e62ae8a6c84b3dc593071.tar.gz", - sha256 = "79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33", - }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", @@ -123,11 +106,6 @@ package = { }, }, windows = { - -- Immutable candidate: runnable template; SDK stays 10.0.0-rc1. - ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/40f72d5533a9bc29b17e62ae8a6c84b3dc593071.tar.gz", - sha256 = "79f15b4f70b0ef07e8b751c928f9e3fd7a6b32703f09b177ad02cdfd676a7f33", - }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index 400f20cf..74cffc45 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -36,10 +36,10 @@ package = { xpm = { linux = { - -- Immutable candidate; published upstream versions remain unchanged. + -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", }, ["1.83.0"] = { url = { @@ -50,10 +50,10 @@ package = { }, }, macosx = { - -- Immutable candidate; published upstream versions remain unchanged. + -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", }, ["1.83.0"] = { url = { @@ -64,10 +64,10 @@ package = { }, }, windows = { - -- Immutable candidate; published upstream versions remain unchanged. + -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpc.lua b/pkgs/g/grpc.lua index df26db48..c33d7b9c 100644 --- a/pkgs/g/grpc.lua +++ b/pkgs/g/grpc.lua @@ -55,20 +55,8 @@ package = { repo = "https://github.com/mcpplibs/grpc-m", type = "package", - extensions = { - autoupdate = { - tag = "v${version}", - url = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/${tag}.tar.gz", - }, - }, - xpm = { linux = { - -- Immutable candidate; published upstream versions remain unchanged. - ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", - }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", @@ -78,11 +66,6 @@ package = { }, }, macosx = { - -- Immutable candidate; published upstream versions remain unchanged. - ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", - }, ["1.83.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-4.tar.gz", diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index 04a77ef9..7400313c 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -36,10 +36,10 @@ package = { xpm = { linux = { - -- Immutable candidate; published upstream versions remain unchanged. + -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", }, ["1.83.0"] = { url = { @@ -50,10 +50,10 @@ package = { }, }, macosx = { - -- Immutable candidate; published upstream versions remain unchanged. + -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", }, ["1.83.0"] = { url = { @@ -64,10 +64,10 @@ package = { }, }, windows = { - -- Immutable candidate; published upstream versions remain unchanged. + -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/0d11b22399875f2847f04609fd4fccb50fda5410.tar.gz", - sha256 = "8a4ff91f60ac6c58e3bdb9d18f67617865f948343afff9e94b855cf82612251a", + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", }, ["1.83.0"] = { url = { diff --git a/pkgs/mwrap/ffmpeg.lua b/pkgs/mwrap/ffmpeg.lua new file mode 100644 index 00000000..1d6d4ac5 --- /dev/null +++ b/pkgs/mwrap/ffmpeg.lua @@ -0,0 +1,30 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "ffmpeg", + description = "ffmpeg-m upstream-preserving C++23 module wrapper", + licenses = { "MIT" }, + repo = "https://github.com/mcpplibs/ffmpeg-m", + type = "package", + xpm = { + linux = { + ["8.1.2"] = { + url = "https://github.com/mcpplibs/ffmpeg-m/archive/776160a829d062a8889271062409d7961a1703f1.tar.gz", + sha256 = "b0e182f1f11e644ede2e1717a57508ddb0b41fe910da2b0ac00b2b5c2c913193", + }, + }, + macosx = { + ["8.1.2"] = { + url = "https://github.com/mcpplibs/ffmpeg-m/archive/776160a829d062a8889271062409d7961a1703f1.tar.gz", + sha256 = "b0e182f1f11e644ede2e1717a57508ddb0b41fe910da2b0ac00b2b5c2c913193", + }, + }, + windows = { + ["8.1.2"] = { + url = "https://github.com/mcpplibs/ffmpeg-m/archive/776160a829d062a8889271062409d7961a1703f1.tar.gz", + sha256 = "b0e182f1f11e644ede2e1717a57508ddb0b41fe910da2b0ac00b2b5c2c913193", + }, + }, + }, +} diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua new file mode 100644 index 00000000..5803127f --- /dev/null +++ b/pkgs/mwrap/godot_cpp.lua @@ -0,0 +1,30 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "godot_cpp", + description = "godot-cpp-m upstream-preserving C++23 module wrapper", + licenses = { "MIT" }, + repo = "https://github.com/mcpplibs/godot-cpp-m", + type = "package", + xpm = { + linux = { + ["10.0.0-rc1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/4f6f0628b4df94f940ef7e0bdcde3f5df104b03a.tar.gz", + sha256 = "0ae5293a74eba9455652d5db1f0b8f3a0029ff0882b83fa01148af163903b25b", + }, + }, + macosx = { + ["10.0.0-rc1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/4f6f0628b4df94f940ef7e0bdcde3f5df104b03a.tar.gz", + sha256 = "0ae5293a74eba9455652d5db1f0b8f3a0029ff0882b83fa01148af163903b25b", + }, + }, + windows = { + ["10.0.0-rc1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/4f6f0628b4df94f940ef7e0bdcde3f5df104b03a.tar.gz", + sha256 = "0ae5293a74eba9455652d5db1f0b8f3a0029ff0882b83fa01148af163903b25b", + }, + }, + }, +} diff --git a/pkgs/mwrap/grpc.lua b/pkgs/mwrap/grpc.lua new file mode 100644 index 00000000..98381e88 --- /dev/null +++ b/pkgs/mwrap/grpc.lua @@ -0,0 +1,24 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "grpc", + description = "grpc-m upstream-preserving C++23 module wrapper", + licenses = { "Apache-2.0" }, + repo = "https://github.com/mcpplibs/grpc-m", + type = "package", + xpm = { + linux = { + ["1.83.0"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + }, + }, + macosx = { + ["1.83.0"] = { + url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", + sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + }, + }, + }, +} diff --git a/pkgs/mwrap/imgui.lua b/pkgs/mwrap/imgui.lua new file mode 100644 index 00000000..4fff7095 --- /dev/null +++ b/pkgs/mwrap/imgui.lua @@ -0,0 +1,30 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "imgui", + description = "imgui-m upstream-preserving C++23 module wrapper", + licenses = { "MIT" }, + repo = "https://github.com/mcpplibs/imgui-m", + type = "package", + xpm = { + linux = { + ["1.92.8"] = { + url = "https://github.com/mcpplibs/imgui-m/archive/61b491e16779202d8569ff2ea01c05d1c7e7975f.tar.gz", + sha256 = "fe0c83397e1787a2a2ff7b41547c9f487325329a67f62e20529ff9482a56b6ff", + }, + }, + macosx = { + ["1.92.8"] = { + url = "https://github.com/mcpplibs/imgui-m/archive/61b491e16779202d8569ff2ea01c05d1c7e7975f.tar.gz", + sha256 = "fe0c83397e1787a2a2ff7b41547c9f487325329a67f62e20529ff9482a56b6ff", + }, + }, + windows = { + ["1.92.8"] = { + url = "https://github.com/mcpplibs/imgui-m/archive/61b491e16779202d8569ff2ea01c05d1c7e7975f.tar.gz", + sha256 = "fe0c83397e1787a2a2ff7b41547c9f487325329a67f62e20529ff9482a56b6ff", + }, + }, + }, +} diff --git a/pkgs/mwrap/llamacpp.lua b/pkgs/mwrap/llamacpp.lua new file mode 100644 index 00000000..9926dc6c --- /dev/null +++ b/pkgs/mwrap/llamacpp.lua @@ -0,0 +1,30 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "llamacpp", + description = "llama.cpp-m upstream-preserving C++23 module wrapper", + licenses = { "MIT" }, + repo = "https://github.com/mcpplibs/llama.cpp-m", + type = "package", + xpm = { + linux = { + ["b10069"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/40815555a0189959802069529d9994317555c765.tar.gz", + sha256 = "32db3e899ba09cb20db839b39038c73f82393b7bc2ea5383bf4dd19c5c50a6ef", + }, + }, + macosx = { + ["b10069"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/40815555a0189959802069529d9994317555c765.tar.gz", + sha256 = "32db3e899ba09cb20db839b39038c73f82393b7bc2ea5383bf4dd19c5c50a6ef", + }, + }, + windows = { + ["b10069"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/40815555a0189959802069529d9994317555c765.tar.gz", + sha256 = "32db3e899ba09cb20db839b39038c73f82393b7bc2ea5383bf4dd19c5c50a6ef", + }, + }, + }, +} diff --git a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua b/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua deleted file mode 100644 index b4b5c88b..00000000 --- a/pkgs/mwrap/mcpplibs.mwrap.onnxruntime.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Immutable candidate source archive; the CPU SDK is owned by compat.onnxruntime. --- No release tag is created by this descriptor. Updates require a verified source --- revision and archive checksum, not a URL-only automatic version substitution. -package = { - spec = "1", - namespace = "mcpplibs.mwrap", - name = "onnxruntime", - description = "ONNX Runtime 1.25.1 CPU C/C++ APIs through upstream-preserving modules", - licenses = { "MIT" }, - repo = "https://github.com/mcpplibs/onnxruntime-m", - type = "package", - xpm = { - linux = { - ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/576c780bfcbd792c7f4194942c90324f183a48aa.tar.gz", - sha256 = "3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1", - }, - }, - macosx = { - ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/576c780bfcbd792c7f4194942c90324f183a48aa.tar.gz", - sha256 = "3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1", - }, - }, - windows = { - ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/576c780bfcbd792c7f4194942c90324f183a48aa.tar.gz", - sha256 = "3654811f65b98ade75b5e46fe59a0c4479d815aa7fa9aceff9f9cc3fffd8ddc1", - }, - }, - }, -} diff --git a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua b/pkgs/mwrap/mcpplibs.mwrap.opencv.lua deleted file mode 100644 index e81f9c44..00000000 --- a/pkgs/mwrap/mcpplibs.mwrap.opencv.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Immutable candidate source archive; retained OpenCV sources have one owner. --- No release tag is created by this descriptor. Updates require a verified source --- revision and archive checksum, not a URL-only automatic version substitution. -package = { - spec = "1", - namespace = "mcpplibs.mwrap", - name = "opencv", - description = "OpenCV 5.0.0 C++ APIs through feature-selected modules", - licenses = { "Apache-2.0" }, - repo = "https://github.com/mcpplibs/opencv-m", - type = "package", - xpm = { - linux = { - ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5056249212be1470de7fa7c85ea9fc805f72349d.tar.gz", - sha256 = "9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d", - }, - }, - macosx = { - ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5056249212be1470de7fa7c85ea9fc805f72349d.tar.gz", - sha256 = "9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d", - }, - }, - windows = { - ["5.0.0.1"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5056249212be1470de7fa7c85ea9fc805f72349d.tar.gz", - sha256 = "9bb69f39be2bd135e83fe1d9afc6b3e00adeaa70a65be315bb29cc5a92e0e40d", - }, - }, - }, -} diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua new file mode 100644 index 00000000..cbea3492 --- /dev/null +++ b/pkgs/mwrap/onnxruntime.lua @@ -0,0 +1,30 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "onnxruntime", + description = "onnxruntime-m upstream-preserving C++23 module wrapper", + licenses = { "MIT" }, + repo = "https://github.com/mcpplibs/onnxruntime-m", + type = "package", + xpm = { + linux = { + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/a20def5e72c167a604045218c0f688e04f36611b.tar.gz", + sha256 = "940854eda99acc97c18cb806d5dacc1e5d22d41f1a97e223b24ac7158259869e", + }, + }, + macosx = { + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/a20def5e72c167a604045218c0f688e04f36611b.tar.gz", + sha256 = "940854eda99acc97c18cb806d5dacc1e5d22d41f1a97e223b24ac7158259869e", + }, + }, + windows = { + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/a20def5e72c167a604045218c0f688e04f36611b.tar.gz", + sha256 = "940854eda99acc97c18cb806d5dacc1e5d22d41f1a97e223b24ac7158259869e", + }, + }, + }, +} diff --git a/pkgs/mwrap/opencv.lua b/pkgs/mwrap/opencv.lua new file mode 100644 index 00000000..9ac0a649 --- /dev/null +++ b/pkgs/mwrap/opencv.lua @@ -0,0 +1,30 @@ +-- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +package = { + spec = "1", + namespace = "mcpplibs.mwrap", + name = "opencv", + description = "opencv-m upstream-preserving C++23 module wrapper", + licenses = { "Apache-2.0" }, + repo = "https://github.com/mcpplibs/opencv-m", + type = "package", + xpm = { + linux = { + ["5.0.0"] = { + url = "https://github.com/mcpplibs/opencv-m/archive/5fd742c2d3d7ffa6b6ce3e375c01d0aae8f4ee5d.tar.gz", + sha256 = "188dfd39b59109e62e2bdd7f8b1832198e734d62ad06632123bd24662382d341", + }, + }, + macosx = { + ["5.0.0"] = { + url = "https://github.com/mcpplibs/opencv-m/archive/5fd742c2d3d7ffa6b6ce3e375c01d0aae8f4ee5d.tar.gz", + sha256 = "188dfd39b59109e62e2bdd7f8b1832198e734d62ad06632123bd24662382d341", + }, + }, + windows = { + ["5.0.0"] = { + url = "https://github.com/mcpplibs/opencv-m/archive/5fd742c2d3d7ffa6b6ce3e375c01d0aae8f4ee5d.tar.gz", + sha256 = "188dfd39b59109e62e2bdd7f8b1832198e734d62ad06632123bd24662382d341", + }, + }, + }, +} diff --git a/pkgs/o/ocornut.imgui.lua b/pkgs/o/ocornut.imgui.lua index feb05437..2156bfe0 100644 --- a/pkgs/o/ocornut.imgui.lua +++ b/pkgs/o/ocornut.imgui.lua @@ -19,20 +19,8 @@ package = { repo = "https://github.com/mcpplibs/imgui-m", type = "package", - extensions = { - autoupdate = { - tag = "${version}", - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/${tag}.tar.gz", - }, - }, - xpm = { linux = { - -- Immutable candidate; published upstream versions remain unchanged. - ["1.92.8.1"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/ffebf83be99ba0eec2677cc197dea3316a72b501.tar.gz", - sha256 = "9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f", - }, ["1.92.8"] = { url = { GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", @@ -42,11 +30,6 @@ package = { }, }, macosx = { - -- Immutable candidate; published upstream versions remain unchanged. - ["1.92.8.1"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/ffebf83be99ba0eec2677cc197dea3316a72b501.tar.gz", - sha256 = "9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f", - }, ["1.92.8"] = { url = { GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", @@ -56,11 +39,6 @@ package = { }, }, windows = { - -- Immutable candidate; published upstream versions remain unchanged. - ["1.92.8.1"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/ffebf83be99ba0eec2677cc197dea3316a72b501.tar.gz", - sha256 = "9aab8af876c6c9eaed887b0d84bf3bb733db1d28613cbd5083845d83f675a92f", - }, ["1.92.8"] = { url = { GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", diff --git a/tests/examples/llamacpp-metal/mcpp.toml b/tests/examples/llamacpp-metal/mcpp.toml index e85c2f90..4a34299d 100644 --- a/tests/examples/llamacpp-metal/mcpp.toml +++ b/tests/examples/llamacpp-metal/mcpp.toml @@ -7,4 +7,4 @@ name = "llamacpp-metal-tests" version = "0.1.0" [target.'cfg(macos)'.dependencies.ggml-org] -llamacpp = { version = "b10069.3", features = ["backend-metal"] } +llamacpp = { version = "b10069.2", features = ["backend-metal"] } diff --git a/tests/examples/llamacpp/mcpp.toml b/tests/examples/llamacpp/mcpp.toml index 12e0758d..b5e9e0cb 100644 --- a/tests/examples/llamacpp/mcpp.toml +++ b/tests/examples/llamacpp/mcpp.toml @@ -7,10 +7,10 @@ name = "llamacpp-tests" version = "0.1.0" [target.'cfg(linux)'.dependencies.ggml-org] -llamacpp = "b10069.3" +llamacpp = "b10069.2" [target.'cfg(macos)'.dependencies.ggml-org] -llamacpp = "b10069.3" +llamacpp = "b10069.2" [target.'cfg(windows)'.dependencies.ggml-org] -llamacpp = "b10069.3" +llamacpp = "b10069.2" diff --git a/tests/mwrap/ffmpeg-cpu/mcpp.toml b/tests/mwrap/ffmpeg-cpu/mcpp.toml index 21c02cfe..c6589c8f 100644 --- a/tests/mwrap/ffmpeg-cpu/mcpp.toml +++ b/tests/mwrap/ffmpeg-cpu/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "ffmpeg-cpu" -version = "8.1.2.1" +version = "8.1.2" description = "Consume the immutable FFmpeg wrapper revision and decode a real raw frame" [indices] @@ -8,4 +8,4 @@ description = "Consume the immutable FFmpeg wrapper revision and decode a real r # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"ffmpeg.ffmpeg" = "8.1.2.1" +"mcpplibs.mwrap.ffmpeg" = "8.1.2" diff --git a/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp b/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp index fbaf8adf..388700b8 100644 --- a/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp +++ b/tests/mwrap/ffmpeg-cpu/tests/behavior.cpp @@ -1,5 +1,5 @@ import std; -import ffmpeg.av; +import mcpplibs.mwrap.ffmpeg.av; int main() { if (std::string_view(av_version_info()) != "8.1.2") return 1; diff --git a/tests/mwrap/godot-math/mcpp.toml b/tests/mwrap/godot-math/mcpp.toml index 4da22d5c..4a899c80 100644 --- a/tests/mwrap/godot-math/mcpp.toml +++ b/tests/mwrap/godot-math/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "godot-math" -version = "10.0.0-rc1.1" +version = "10.0.0-rc1" description = "Run the immutable godot-cpp module wrapper without an engine" [indices] @@ -8,4 +8,4 @@ description = "Run the immutable godot-cpp module wrapper without an engine" # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"godotengine.godot-cpp-m" = "10.0.0-rc1.1" +"mcpplibs.mwrap.godot_cpp" = "10.0.0-rc1" diff --git a/tests/mwrap/godot-math/tests/math.cpp b/tests/mwrap/godot-math/tests/math.cpp index b4956f07..477475f3 100644 --- a/tests/mwrap/godot-math/tests/math.cpp +++ b/tests/mwrap/godot-math/tests/math.cpp @@ -1,5 +1,5 @@ import std; -import godot_cpp; +import mcpplibs.mwrap.godot_cpp; int main() { const godot::Vector2 vector(3, 4); diff --git a/tests/mwrap/grpc-cpu/mcpp.toml b/tests/mwrap/grpc-cpu/mcpp.toml index 49c19051..f2374c0f 100644 --- a/tests/mwrap/grpc-cpu/mcpp.toml +++ b/tests/mwrap/grpc-cpu/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "grpc-cpu" -version = "1.83.0.1" +version = "1.83.0" description = "Consume the immutable gRPC wrapper revision and check module status semantics" [indices] @@ -8,7 +8,7 @@ description = "Consume the immutable gRPC wrapper revision and check module stat # An explicit empty table overrides the legacy workspace redirect. [target.'cfg(unix)'.dependencies] -"grpc.grpc" = "1.83.0.1" +"mcpplibs.mwrap.grpc" = "1.83.0" [target.'cfg(unix)'.build] defines = ["MCPP_TEST_GRPC"] diff --git a/tests/mwrap/grpc-cpu/tests/behavior.cpp b/tests/mwrap/grpc-cpu/tests/behavior.cpp index 875684d9..a3aa4204 100644 --- a/tests/mwrap/grpc-cpu/tests/behavior.cpp +++ b/tests/mwrap/grpc-cpu/tests/behavior.cpp @@ -1,6 +1,6 @@ #if defined(MCPP_TEST_GRPC) #include -import grpc; +import mcpplibs.mwrap.grpc; int main() { if (!grpc::Status::OK.ok()) return 1; const grpc::Status error(grpc::StatusCode::INVALID_ARGUMENT, "indexed module"); diff --git a/tests/mwrap/imgui-headless/mcpp.toml b/tests/mwrap/imgui-headless/mcpp.toml index 9d594667..9834e2f0 100644 --- a/tests/mwrap/imgui-headless/mcpp.toml +++ b/tests/mwrap/imgui-headless/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "imgui-headless" -version = "1.92.8.1" +version = "1.92.8" description = "Consume the immutable ImGui wrapper and render actual headless draw data" [indices] @@ -8,4 +8,4 @@ description = "Consume the immutable ImGui wrapper and render actual headless dr # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"ocornut.imgui" = "1.92.8.1" +"mcpplibs.mwrap.imgui" = "1.92.8" diff --git a/tests/mwrap/imgui-headless/tests/behavior.cpp b/tests/mwrap/imgui-headless/tests/behavior.cpp index 937ece7a..62fa490d 100644 --- a/tests/mwrap/imgui-headless/tests/behavior.cpp +++ b/tests/mwrap/imgui-headless/tests/behavior.cpp @@ -1,5 +1,5 @@ import std; -import imgui.core; +import mcpplibs.mwrap.imgui.core; int main() { struct Context { @@ -17,7 +17,7 @@ int main() { for (int frame = 0; frame < 3; ++frame) { ImGui::NewFrame(); ImGui::Begin("Indexed ImGui"); - ImGui::TextUnformatted("Hello from import imgui.core"); + ImGui::TextUnformatted("Hello from import mcpplibs.mwrap.imgui.core"); ImGui::End(); ImGui::Render(); } diff --git a/tests/mwrap/llamacpp-cpu/mcpp.toml b/tests/mwrap/llamacpp-cpu/mcpp.toml index cee7c31f..d2f2e10b 100644 --- a/tests/mwrap/llamacpp-cpu/mcpp.toml +++ b/tests/mwrap/llamacpp-cpu/mcpp.toml @@ -1,11 +1,11 @@ [package] name = "llamacpp-cpu" -version = "b10069.3" +version = "b10069" description = "Install the immutable llama.cpp-m archive and exercise the CPU API" [indices] # Use the complete candidate built-in index prepared by tests/run_members.sh. # An explicit empty table overrides the legacy workspace redirect. -[dependencies.ggml-org] -llamacpp = "b10069.3" +[dependencies.mcpplibs.mwrap] +llamacpp = "b10069" diff --git a/tests/mwrap/llamacpp-cpu/tests/api.cpp b/tests/mwrap/llamacpp-cpu/tests/api.cpp index 074b1f5a..c28f5ea2 100644 --- a/tests/mwrap/llamacpp-cpu/tests/api.cpp +++ b/tests/mwrap/llamacpp-cpu/tests/api.cpp @@ -1,9 +1,9 @@ import std; -import llamacpp; +import mcpplibs.mwrap.llamacpp; int main() { - static_assert(LLAMA_DEFAULT_SEED == 0xFFFFFFFFu); - static_assert(LLAMA_TOKEN_NULL == llama_token{-1}); + static_assert(mcpplibs::mwrap::llamacpp::macros::LLAMA_DEFAULT_SEED == 0xFFFFFFFFu); + static_assert(mcpplibs::mwrap::llamacpp::macros::LLAMA_TOKEN_NULL == llama_token{-1}); llama_backend_init(); diff --git a/tests/mwrap/opencv-cpu/mcpp.toml b/tests/mwrap/opencv-cpu/mcpp.toml index 225cdae2..2652136e 100644 --- a/tests/mwrap/opencv-cpu/mcpp.toml +++ b/tests/mwrap/opencv-cpu/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "opencv-cpu" -version = "5.0.0.1" +version = "5.0.0" description = "Install the OpenCV mwrap archive and run a generated image pipeline" [indices] @@ -8,4 +8,4 @@ description = "Install the OpenCV mwrap archive and run a generated image pipeli # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"mcpplibs.mwrap.opencv" = { version = "5.0.0.1", features = ["imgproc", "imgcodecs-png", "imgcodecs-jpeg"] } +"mcpplibs.mwrap.opencv" = { version = "5.0.0", features = ["imgproc", "imgcodecs-png", "imgcodecs-jpeg"] } diff --git a/tests/mwrap/opencv-webp/mcpp.toml b/tests/mwrap/opencv-webp/mcpp.toml index 9c67369e..cdfd2d10 100644 --- a/tests/mwrap/opencv-webp/mcpp.toml +++ b/tests/mwrap/opencv-webp/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "opencv-webp" -version = "5.0.0.1" +version = "5.0.0" description = "Consume the OpenCV archive with optional WebP image, animation and metadata support" [indices] @@ -8,4 +8,4 @@ description = "Consume the OpenCV archive with optional WebP image, animation an # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"mcpplibs.mwrap.opencv" = { version = "5.0.0.1", features = ["imgcodecs-webp"] } +"mcpplibs.mwrap.opencv" = { version = "5.0.0", features = ["imgcodecs-webp"] } diff --git a/tests/test_mwrap_tag_selection.py b/tests/test_mwrap_tag_selection.py new file mode 100644 index 00000000..82e36579 --- /dev/null +++ b/tests/test_mwrap_tag_selection.py @@ -0,0 +1,26 @@ +"""Keep legacy and mwrap release streams separate in the real pinned updater.""" +import unittest +from xpkgindex_update.manifest import tag_version + + +class WrapperTagSelection(unittest.TestCase): + def test_mwrap_series_preserves_numeric_and_build_versions(self): + for version in ('5.0.0', '8.1.2', 'b10069', 'b10069.1'): + with self.subTest(version=version): + self.assertEqual(tag_version('mwrap-${version}', 'mwrap-' + version), version) + + def test_legacy_releases_never_become_mwrap_candidates(self): + for tag in ('v8.1.2', '8.1.2', 'b10069', 'v1.83.0-4'): + self.assertIsNone(tag_version('mwrap-${version}', tag)) + + def test_mwrap_tags_never_become_legacy_candidates(self): + for template in ('v${version}', '${version}'): + for tag in ('mwrap-8.1.2', 'mwrap-b10069'): + self.assertIsNone(tag_version(template, tag)) + + def test_rc_requires_manual_provider_compatibility_review(self): + self.assertIsNone(tag_version('mwrap-${version}', 'mwrap-10.0.0-rc1')) + + +if __name__ == '__main__': + unittest.main() From 5a39dc743ab51d12b2c7eea4928b5a640c1cc11e Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 07:19:08 +0900 Subject: [PATCH 32/47] test: enforce separate mwrap and legacy tag streams in CI --- .github/workflows/xpkgindex-update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/xpkgindex-update.yml b/.github/workflows/xpkgindex-update.yml index 3208f620..1eb31460 100644 --- a/.github/workflows/xpkgindex-update.yml +++ b/.github/workflows/xpkgindex-update.yml @@ -56,6 +56,7 @@ jobs: BASE: ${{ github.event.pull_request.base.sha || 'origin/main' }} run: | python -m unittest discover -s tests/autoupdate -p 'test_*.py' + python -m unittest discover -s tests -p 'test_mwrap_tag_selection.py' python tests/autoupdate/ci.py audit --base "$BASE" --output coverage.json python tests/autoupdate/ci.py selection --base "$BASE" --output selected-package.txt echo "package=$(cat selected-package.txt)" >> "$GITHUB_OUTPUT" From 4215f18d360b6d7978310bc0e8ca2d71a051968c Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 07:45:13 +0900 Subject: [PATCH 33/47] docs: establish shared mwrap README layout and align final candidate archives --- ...unified-identity-and-first-release-plan.md | 72 +++++++++++--- .../2026-10-25-unified-mwrap-execution.md | 32 ++++++ .../skills/add-mcpp-index-package/SKILL.md | 10 +- docs/mwrap-readme.md | 99 +++++++++++++++++++ docs/mwrap.md | 20 ++-- docs/zh/mwrap-readme.md | 78 +++++++++++++++ docs/zh/mwrap.md | 10 +- pkgs/g/grpc-plugin.lua | 12 +-- pkgs/g/grpcgen.lua | 12 +-- pkgs/mwrap/ffmpeg.lua | 12 +-- pkgs/mwrap/godot_cpp.lua | 12 +-- pkgs/mwrap/grpc.lua | 8 +- pkgs/mwrap/imgui.lua | 12 +-- pkgs/mwrap/llamacpp.lua | 12 +-- pkgs/mwrap/onnxruntime.lua | 12 +-- pkgs/mwrap/opencv.lua | 12 +-- 16 files changed, 342 insertions(+), 83 deletions(-) create mode 100644 docs/mwrap-readme.md create mode 100644 docs/zh/mwrap-readme.md diff --git a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md index 9ac17cc3..f04da494 100644 --- a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md +++ b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md @@ -7,7 +7,7 @@ 用户最新确认:对外依赖、模板命令与 C++ 模块 import 显示完整 `mcpplibs` 前缀。 索引文件名省略完整 namespace 前缀,统一为 `pkgs/mwrap/.lua`;文件内仍声明完整身份。 -README 在原有布局与栏目上精简,不再整页替换成同一套新结构;所有 `xxx-m` 仓库必须默认英文并提供中文 README。 +README 在有用原布局与栏目上精简,简短定位保留单句,详细概览移到 badges 后、快速开始前,不再整页替换成同一套新结构;所有 `xxx-m` 仓库必须默认英文并提供中文 README。 Godot 命名已由用户确认:`mcpplibs.mwrap.godot_cpp`,不再作为待定建议。 七个封装库均新增 `mcpplibs.mwrap` 身份,旧身份、已发布版本、校验值与资源保留。 新 mwrap 身份首次发版直接使用所封装的上游版本,不机械继承旧封装修订尾号。 @@ -116,7 +116,7 @@ gRPC 的 protoc/plugin/代码生成规则仍为工具包,不为“统一七个 OpenCV→FFmpeg 的实现依赖仍使用对应 compat 供应者;OpenCV→ORT 继续遵守既定所有权与 ABI 边界。 同一程序不得因为新旧 wrapper 混用而链接两份相同上游实现。迁移说明提示整体迁移;必要时配置阶段明确拒绝冲突,不承诺旧/新模块任意混合。 -## 4. README:保留原结构再精简 +## 4. mwrap / xxx-m README 布局规范 所有 `xxx-m` 仓库(不限于本轮七库)必须满足: @@ -124,26 +124,35 @@ OpenCV→FFmpeg 的实现依赖仍使用对应 compat 供应者;OpenCV→ORT - 两份 README 顶部提供双向语言链接:英文页链接 `简体中文`,中文页链接 `English`。 - 两种语言都必须包含相同的核心能力、依赖/模板命令、版本、平台前提和限制;代码和命令保持一致。 - 缺少中文版本的仓库必须补齐;已有中文为主的默认页,应按原布局提供英文默认页,并将中文内容整理到中文页。 -- 每种语言通常约 100 行以内;英文与中文不要求字数或行数机械相等,不能只翻译标题而省略关键限制。 +- 每种语言通常约 100–150 行以内;英文与中文不要求字数或行数机械相等,不能只翻译标题而省略关键限制。 + +正式维护入口为 mcpp-index 的 `docs/mwrap-readme.md` 与 `docs/zh/mwrap-readme.md`; +mwrap 总规范与 authoring skill 引用这份布局规范,不各自复制整套规则。 +语言切换、`[Upstream](上游地址)`、Releases、mcpp、Index 合并成一行导航。 +页首只有一句话介绍;较详细的介绍置于 badges 下方、Modules 前方,不增加 Characteristics 标题。 +不添加固定的 `Use mcpp 2026.10.24.1. The new mwrap identity becomes installable after index publication.` 描述; +精确工具 pin 在 `.xlings.json`、CI 和详细构建说明维护,必要执行条件在对应栏目简述。 +存在实际 mcpp `[features]` / `[feature-deps.*]` 控制项时可用“精确名称 + 用途”短表格, +不是将普通产品能力当成 mcpp features;没有这些控制项就不强造 Features 栏目。 “统一风格”约束语言、密度和可用性,不强制七库采用完全相同的标题或顺序。 -基线使用各 PR 当前 base 的 README(含对应翻译);保留项目标题、logo/少量有效 badge、语言入口、原一级/二级栏目及顺序。 +基线使用各 PR 当前 base 的 README(含对应翻译);保留项目标题、logo/少量有效 badge、语言入口及有用原栏目顺序;省略 Characteristics / 核心特性标题,详细概览放在 badges 后、快速开始前。 保留布局不要求保留中文栏目标题在英文页中:标题和正文按页面语言翻译,栏目语义、层级与顺序保持对应。 修正失效链接、CI 仓库地址、license 标签等事实错误,不为保留外观继续展示错误信息。 -每种语言通常控制在约 100 行以内;完整矩阵、长示例、平台细节移到 docs,并在原栏目保留短摘要和链接。 +每种语言通常控制在约 100–150 行以内;完整矩阵、长示例、平台细节移到 docs,并在原栏目保留短摘要和链接。 不通过压成超长行、删除必需前提或把所有内容塞入折叠块来满足行数。 | 仓库 | 已核查的原 README 结构 | 精简方式 | |---|---|---| -| OpenCV | badge/CI → Characteristics → Getting started → Modules → Features → Examples → Build and toolchains → License | 保留栏目与模块/feature 摘要,快速开始使用新模板,完整矩阵链接 docs | -| FFmpeg | badge/CI → 核心特性 → 快速开始 → 模块一览 → 示例 → 工具链与运行时 → License | 原约 86 行,重点修订身份、版本与示例,避免不必要重排 | -| ImGui | badge/CI → 核心特性 → 快速开始 → 模块一览 → Features → 示例 → 工具链与运行时 → License | 原约 101 行,压缩重复说明,保留 headless/window/docking 区别 | +| OpenCV | 单句简介/单行导航/badges/详细介绍 → Getting started → Modules → Features → Examples → Build and toolchains → License | 保留栏目与模块/feature 摘要,快速开始使用新模板,完整矩阵链接 docs | +| FFmpeg | 单句简介/单行导航/badges/详细介绍 → 快速开始 → 模块一览 → 示例 → 工具链与运行时 → License | 原约 86 行,重点修订身份、版本与示例,避免不必要重排 | +| ImGui | 单句简介/单行导航/badges/详细介绍 → 快速开始 → 模块一览 → Features → 示例 → 工具链与运行时 → License | 原约 101 行,压缩重复说明,保留 headless/window/docking 区别 | | llama.cpp | Add The Package → Minimal CPU Program → CPU/Metal/Vulkan Chat → Supported Boundary | 各后端栏目保留,长命令与 shader 原理转 docs,CPU 默认模板无模型资产也能运行 | | gRPC | Quick Start → Two ways to use it → Code generation → More control → Platform support → Features → Build/test → License | 保留两种使用方式和代码生成栏目,构建内部说明转 docs,平台限制不删 | | Godot | Install → Macros → hashfuncs shim → Example → Regenerating → Tests → License | 长 shim/扩展示例转 docs,原栏目保留摘要;独立 math 和引擎加载分清 | | ORT | 原基线仅两行占位 | 没有成熟布局可恢复,沿用候选已建立的入门结构,与生态字体、代码块和链接风格对齐 | -验收时并排查看 base 与新 README:栏目/顺序、badge 与语言入口、关键示例、约 100 行、实际命令均核对。 +验收时并排查看 base 与新 README:栏目/顺序、badge 与语言入口、关键示例、约 100–150 行、实际命令均核对。 中英文必须同步;根据当前 checkout,OpenCV 和 gRPC 已有 `README.zh.md`,ORT、llama.cpp、FFmpeg、ImGui、Godot 五库需要新增中文页。 这里是补齐翻译,不是重新设计整页布局;ORT 的占位基线例外只影响栏目设计,不豁免英文默认和中文支持。 中英 README 的双向链接、文档锚点、badge、许可证链接应分别验证;不能假设标题翻译后的锚点相同。 @@ -190,7 +199,8 @@ tests/ | 文件 / 入口 | 必须更新的内容 | |---|---| | `docs/mwrap.md`、`docs/zh/mwrap.md` | 正式规范唯一来源;七库统一完整身份,`pkgs/mwrap/.lua`,无字母子目录,首次上游原版本、独立 mwrap tag、API/macros 与兼容边界 | -| 上述规范的 README 小节 | 明确 `README.md` 默认英文、`README.zh.md` 必须提供且双向链接;保留原布局/栏目再精简;约 100 行是每语言编辑目标,删除强制统一标题顺序的旧要求 | +| `docs/mwrap-readme.md`、`docs/zh/mwrap-readme.md` | mwrap / xxx-m 布局规范,明确英文默认/中文必备、语言/上游/项目链接单行导航、单句简介与 badges 后详细介绍、合并重复概览、去除固定提示、实际 mcpp feature 表格及约 100–150 行 | +| 上述规范的 README 小节 | 明确 `README.md` 默认英文、`README.zh.md` 必须提供且双向链接;保留原布局/栏目再精简;约 100–150 行是每语言编辑目标,删除强制统一标题顺序的旧要求 | | `docs/repository-and-schema.md`、`docs/zh/repository-and-schema.md` | 将 `<完整身份>.lua` 改为 `.lua`;说明文件名、分类目录与声明身份的区别;源码与发布布局一致 | | `docs/package-types.md`、`docs/zh/package-types.md` | 核对 wrapper / compat / native / host-tool 分类说明及交叉链接,示例采用完整 FQN 与新目录规则 | | `README.md`、`README.zh-CN.md` 及站点包列表入口 | 核对规范导航与示例;存在旧 mwrap 路径或旧 wrapper 身份时同步更新,避免全站重复维护规范正文 | @@ -282,7 +292,7 @@ Godot RC release 标为 prerelease;llama 的非 semver tag 不因含字母就 | 身份 | 七库 manifest、descriptor、lock、安装日志均命中唯一完整 mwrap FQN;无旧身份误命中 | | 缩短文件名 | `.lua` 携带完整身份,path/Git/发布归档发现均通过;lint/updater/站点按声明身份处理 | | 源码模块 | 根/子模块 import、内部依赖、API namespace 与原类型身份正确;五库不能只替换 manifest 名字 | -| README | 七库各有英文 `README.md` 和中文 `README.zh.md`,顶部互链;与原 base 布局并排检查,原栏目语义/顺序保留,每语言约 100 行,命令、版本、平台限制和链接一致 | +| README | 七库各有英文 `README.md` 和中文 `README.zh.md`,顶部互链;与原 base 布局并排检查,原栏目语义/顺序保留,每语言约 100–150 行,命令、版本、平台限制和链接一致 | | 快捷模板 | 七库默认 `mcpp new --template <完整FQN>@<首发版本>` 原样生成、build/run;窗口/视频/ORT 等附加模板分别验证 | | 共存边界 | 新旧描述符均可发现,旧资源 hash 不变;应用不误链接两份 SDK;实际新包消费不依赖旧模块别名 | | gRPC 工具链 | protoc、plugin、rule、runtime 版本一致;host 与 target 区分;正式发布资源无悬空依赖 | @@ -304,7 +314,7 @@ Godot RC release 标为 prerelease;llama 的非 semver tag 不因含字母就 2. 七库全部建立新 mwrap 身份,旧 descriptor 与已发布历史原样保留;同身份 descriptor 不重复。 3. 首发包版本使用上游原版本;Godot 新 short name 已确认 `godot_cpp`,llama 保持 `llamacpp`。 4. 为避开已有上游同名 tag,统一新 `mwrap-${version}` tag;release 展示上游版本,绝不覆盖旧 tag。 -5. 所有 `xxx-m` 仓库必须默认英文 `README.md`,提供中文 `README.zh.md` 并顶部互链;保留原布局再精简,每语言通常约 100 行;ORT 占位基线不豁免双语要求。 +5. 所有 `xxx-m` 仓库必须默认英文 `README.md`,提供中文 `README.zh.md` 并顶部互链;保留原布局再精简,每语言通常约 100–150 行;ORT 占位基线不豁免双语要求。 6. 索引中英规范、schema/包分类文档与现有 authoring skill 必须同步,详见 §5.1。 7. 本轮只交付本文。review 通过后再更新代码;所有新检查通过后库逐个 squash/release,最后统一更新与合入索引。 @@ -335,3 +345,41 @@ Godot RC release 标为 prerelease;llama 的非 semver tag 不因含字母就 审查结论:本次需求已纳入方案,未发现必须修改 mcpp 引擎才能落地的命名或目录需求。 独立 `mwrap-${version}` tag 仍是为保留旧发布提出的方案建议,待用户 review;Godot 命名和 README 双语规则已是确认要求。 代码、双语 README、规范/skill 和 CI 的实际完成情况在实施后逐项验收,本轮不提前宣称完成。 + + +## 12. README 布局补充确认 + +- 这组规则作为 mwrap / xxx-m README 布局规范,适用于所有对应封装仓库。 +- Characteristics 是介绍栏目,其标题省略,详细内容放在 badges 后、快速开始前;不与 mcpp features 机制混淆。 +- Features 表格仅说明清单中实际可选的 mcpp feature 名称、作用与必要平台条件。 +- 英文默认、中文必备,语言切换/上游/Releases/mcpp/Index 单行导航,保留少量有效徽章与有用原栏目。 +- 删除固定工具版本/等待索引发布提示;必要版本约束移至构建/使用说明,不删除真实 SDK/设备前提。 +- 每语言通常约 100–150 行以内,允许更短,不为达到最低行数添加内容。 +- 正式中英布局规范、mwrap 总规范、authoring skill 与各库双语页需同步;本次实施据此执行。 + + +### 12.1 最新确认的固定页首顺序 + +标题 → 一句话介绍 → 单行导航(English / 简体中文 / Upstream / Releases / mcpp / Index) +→ badges → 可选详细介绍(无 Characteristics 标题)→ Modules → More Modules API 引用链接 +→ Getting started 或原有对应快速开始栏目。 +详细版介绍不挤进页首单句,也不放在 badges 上方。正文其余有用原栏目继续保留。 +本条替代本节早期“语言下面另起一行上游地址”及“全部介绍合并在页首”的布局建议; +中英规范、skill 与七库 README 按同一最终顺序同步。 + + +### 12.2 Modules 与上游导航最终补充 + +上游入口固定 `[Upstream](真实上游仓库URL)`,不使用 `Upstream: owner/repo`。 +Modules 位于 Getting started 前,核心模块按以下形式逐行列出,不用笼统的聚合说明替代: + +```text +- `import mcpplibs.mwrap.opencv;`: 已启用模块聚合 +- `import mcpplibs.mwrap.opencv.core;`: Mat、类型与基础运算 +- `import mcpplibs.mwrap.opencv.imgproc;`: 图像处理 + +> More Modules API -> [模块与 API](docs/usage.md) +``` + +只列实际存在的公共模块,使用完整前缀;有 feature 条件时明确说明。 +中英规范、skill 和七库双语页采用相同顺序;单模块库可列根模块及宏映射入口。 diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index e40afaa3..52e513f0 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -42,3 +42,35 @@ No merge or release has occurred at this checkpoint. Formal archive URLs and verified byte-identical CN mirrors replace commit snapshots only after release. Full current-head source/index CI, final ecosystem review, merge/tag consistency, GitCode asset fetch and installed published-index templates remain required. + + +## README layout refinement and local installation evidence + +The user refined the common opening: title, one-sentence introduction, one line +combining languages/upstream/Releases/mcpp/Index, badges, optional detailed +introduction, then the original quickstart section. Characteristics is omitted; +actual mcpp manifest feature switches may use a concise table. The repetitive +fixed tool-version/index-publication paragraph is removed. Pages may be shorter +than the relaxed 100–150-line target. Canonical English/Chinese layout documents +are docs/mwrap-readme.md and docs/zh/mwrap-readme.md; the main spec and skill link +them. All fourteen pages follow this order and the release guard allows 150 lines. + +Subsequent actual local results: OpenCV all-modules/software SIMD 38 programs +pass; gRPC two programs pass after the resource-safe retry; llama 117 unit tests +pass; ORT cold SDK installation, export audit and actual generated Identity model +inference pass. The complete unchanged candidate index with pkgs/mwrap/ffmpeg.lua +also creates the unmodified FFmpeg project from its real checksummed archive and +runs generated-media encode/decode (three frames). This is actual short-filename +index discovery, not only a descriptor parser result. Seven independent GitCode +mirror repositories are initialized; release assets are not uploaded yet. + +README-only commits require new exact-head CI and archive pins. Earlier green +heads remain historical evidence; no merge or release is inferred from them. + + +Final opening refinement: the upstream link label is exactly Upstream. Modules +precedes Getting started/Quick start/Install, lists verified complete import +statements with descriptions, and ends with a More Modules API blockquote link. +All fourteen READMEs have been checked against actual module declarations and +local link destinations; usage documents no longer label modules with legacy +names. These documentation changes retain the tested implementation bodies. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 44e7ffc2..5113e1de 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -118,10 +118,10 @@ description: Use when adding a new third-party library/package to the mcpp-index ## -m 仓库 README -新增或重构 `<库名>-m` 时,默认英文 README.md,必须提供 README.zh.md,顶部双向链接。 -保留原栏目层级、语义与顺序再精简,每语言通常不超过约 100 行;缺少翻译必须补齐。 -中英版本、依赖/import/模板命令、平台条件和支持边界保持一致,长示例和矩阵转入 docs 并链接。 -完整规则见 docs/zh/mwrap.md,不强制将所有库重排成同一套栏目。 +使用 [mwrap / xxx-m README 布局规范](../../../docs/zh/mwrap-readme.md):默认英文 README.md, +必须有中文 README.zh.md,顶部语言/上游/Releases/mcpp/Index 单行导航;一句简介后放 badges,较长介绍位于 badges 下、Modules 前,不增加 Characteristics 标题。保留其他有用原布局。表格只说明实际 mcpp manifest feature 开关,没有开关不强造 Features。 +省略重复的固定工具版本/索引发布提示段;每语言通常约 100–150 行以内,更短也可以。 +检查双语命令、版本、平台限制与链接一致,长示例和完整矩阵链接 docs,不隐藏必要前提。 ## 本地测试资源 @@ -189,3 +189,5 @@ bash tests/run_members.sh | 构建插件把模块命名为 `mcpp.rules.*`、`mcpp.plugins.*` 等保留名,或把命名空间取作 `rules`、`tools` 等 | 模块命名为 `mcpp.<自身命名空间>.*`;保留第二段属于 mcpp 项目(docs/zh/package-types.md §I),成员构建出现引擎的保留名警告即失败 | 完成前应遵循 `verification-before-completion`:在声明“通过/完成”之前,须给出真实命令输出作为证据。 + +README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting started 前,以完整 import 逐项列出核心模块,下方加 `> More Modules API` 文档链接。 diff --git a/docs/mwrap-readme.md b/docs/mwrap-readme.md new file mode 100644 index 00000000..5eb3739a --- /dev/null +++ b/docs/mwrap-readme.md @@ -0,0 +1,99 @@ +# mwrap / xxx-m README layout + +[简体中文](zh/mwrap-readme.md) + +This is the README layout convention for module wrappers maintained as +`-m` repositories. The [mwrap specification](mwrap.md) defines package +identity, versions and implementation ownership. + +## Language and opening + +- `README.md` is English; `README.zh.md` is required simplified Chinese. +- Put language links, the upstream repository, Releases, mcpp and Index on **one + navigation line**. Use the uniform label `[Upstream](https://github.com/owner/repo)`, not `Upstream: owner/repo`. +- After the project name, write **one sentence** introducing the wrapper. + Put any longer capability/architecture introduction **below the badges and + before Modules and Getting started**, without a Characteristics heading. +- Preserve useful existing badges/navigation. Link to the wrapper's own CI and + release pages and the correct licenses; avoid badges implying unsupported scope. + +The opening order is fixed; the detailed paragraph is optional: + +```text +# Project name +> One-sentence introduction. +English · 简体中文 · [Upstream](upstream-url) · Releases · mcpp · Index +[badges] +Optional detailed introduction, without a Characteristics heading. +## Modules +- `import mcpplibs.mwrap.library;`: Core API +- `import mcpplibs.mwrap.library.macros;`: Macro mappings +> More Modules API -> [Usage and API](docs/usage.md) +## Getting started +``` + +The quickstart heading can retain the project's original equivalent title +(Quick start, Install or Add The Package). Navigation is intentionally one line; +this does not justify compressing ordinary prose into very long lines. + +## Content and order + +Preserve each project's useful original section hierarchy and order after the +opening. Shared style does not require a wholesale rewrite into identical headings. +Translate headings while retaining their meaning. Use this sequence as a starting +point for a new README, adapting to the library: + +1. Title, one-sentence introduction, one navigation line, then badges. + Optional detailed introduction follows the badges, then Modules precedes quickstart. +2. Modules: list the root and a few useful public modules, one complete + bullet per module: a complete import in a code span, a colon and its purpose. + Follow with a blockquote link `> More Modules API -> [Usage and API](docs/usage.md)`. + Use the actual declared names and state any required feature. +3. Quick start using the actual default `mcpp new` template; dependency and import + examples for existing projects when useful. Actual mcpp feature switches may + have their own concise table afterwards. +4. Examples, important platform/runtime conditions, detailed documentation links + and license information in their existing sections. + +Do not add a repeated `Use mcpp . The new mwrap identity becomes +installable after index publication.` paragraph. Keep the exact tested tool pin in +`.xlings.json`, CI and detailed usage/build documentation. Mention a tool/SDK/device +requirement in the relevant section only when the reader needs it for the command. +Candidate status belongs in release/PR documentation; an unavailable example must +still be identified where it would otherwise mislead users. + +## mcpp features and examples + +These are actual mcpp manifest `[features]` / `[feature-deps.*]` switches, +not a general list of library capabilities. Prefer a short table of exact feature +names and their effects. State defaults and +module/backend boundaries in one sentence. For example: + +| Feature | Purpose | +|---|---| +| `all-modules` | Main module interfaces; external backends remain explicit | +| `highgui-native` | The documented GTK3 / Win32 / Cocoa mapping | +| `dnn-onnxruntime` | ORT CPU integration on supported targets | + +Do not invent a Features section for a library without optional features. Keep +long dependency graphs, complete matrices, provider setup and troubleshooting in +docs and link to them. Do not advertise planned features as implemented. + +Dependency selectors, template commands and imports use full +`mcpplibs.mwrap.` names. Ordinary APIs retain upstream names. Version examples +must match the actual package release. Every default template must work without +user-supplied model/media assets; document desktop/device requirements for optional +templates. A small example must exercise a real library contract. + +## Length and translation review + +Aim for a concise page, roughly within **100–150 lines per language**. Shorter +pages are welcome; do not pad them to reach 100 lines. Do not hide prerequisites, +compress paragraphs into very long lines or use large folded blocks to meet the +target. A release guard may flag pages above 150 lines for editing. + +English and Chinese must agree on versions, commands, features, platform limits +and relevant links. They need not have identical line counts. Check translated +heading anchors separately and keep reciprocal language links valid. Existing +Chinese-only entry pages become English defaults with the corresponding Chinese +content retained in `README.zh.md`, preserving their useful original layout. diff --git a/docs/mwrap.md b/docs/mwrap.md index 65ebe2bc..1d0f6415 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -116,17 +116,13 @@ they enter the graph. Record ABI, runtime, CPU baseline and SDK constraints. ## README style -Every `-m` repository has an English `README.md` and a Chinese -`README.zh.md`, linked to each other at the top. Both normally stay within -100 lines. Add the missing translation when modernizing a wrapper. - -Preserve the existing section hierarchy, order, useful badges and language -navigation, then shorten the prose. Translate headings while preserving their -meaning. A shared style does not require replacing every library's layout. -Keep quickstart commands, dependency/import examples, versions, platform -conditions and support limits equivalent in both languages. Move long examples, -architecture and full matrices into docs and link them from the original section. -Do not meet the target with long lines or missing prerequisites. +Follow the [mwrap / xxx-m README layout](mwrap-readme.md): English README.md, +required Chinese README.zh.md, one navigation line for languages/upstream/releases/mcpp/index, and +roughly 100–150 lines per language (shorter is welcome). Preserve useful existing +sections; keep one introductory sentence and place longer detail below badges, followed by Modules and quickstart. +Show actual mcpp manifest feature switches in a small table when applicable. +Omit the fixed tool-version/index-publication boilerplate; keep necessary +command-specific prerequisites in their relevant section. ## Every -m package ships a runnable template @@ -215,3 +211,5 @@ Coupled runtime/plugin/build-module consumers may require several candidate name For Linux consumers loading a C++ SDK through a C API, verify the C++ runtime contract as well as successful calls. The OpenCV/ORT integration exposed uncaught typed exceptions when a static runtime was embedded alongside the shared SDK runtime; `cxx_runtime = "toolchain-coupled"` fixed the same test. Templates must encode the verified contract and exercise a typed error path. Generated files are build inputs. Preserve their timestamps when content is unchanged, including manifests, module facades and configuration headers; touching an unchanged common header can rebuild the entire vendored implementation. Verify both byte idempotence and incremental behavior. + +README navigation uses `[Upstream](upstream-url)`. Modules precedes Getting started with complete import bullets and a `> More Modules API` documentation link. diff --git a/docs/zh/mwrap-readme.md b/docs/zh/mwrap-readme.md new file mode 100644 index 00000000..84bc310e --- /dev/null +++ b/docs/zh/mwrap-readme.md @@ -0,0 +1,78 @@ +# mwrap / xxx-m README 布局规范 + +[English](../mwrap-readme.md) + +本规范适用于以 `-m` 仓库维护的模块封装。 +包身份、版本与实现归属遵循 [mwrap 规范](mwrap.md)。 + +## 语言与页首 + +- `README.md` 默认英文,必须提供简体中文 `README.zh.md`。 +- 将语言切换、具体上游仓库、Releases、mcpp、Index **合并到同一行导航**;上游入口统一写为 `[Upstream](https://github.com/owner/repo)`,不显示 `Upstream: owner/repo`。 +- 项目名后只保留**一句话介绍**。较详细的能力/架构介绍放在 **badges 下方、Modules 与 Getting started 前方**, + 不再增加 Characteristics / 核心特性标题。 +- 保留原有且有用的少量徽章和导航;CI/release 链接指向封装仓库,许可证必须准确, + 不以徽章暗示尚未支持的功能。 + +页首顺序固定如下,详细介绍可省略: + +```text +# 项目名 +> 一句话介绍。 +English · 简体中文 · [Upstream](upstream-url) · Releases · mcpp · Index +[badges] +可选的详细介绍,不增加 Characteristics 标题。 +## Modules +- `import mcpplibs.mwrap.library;`: 核心 API +- `import mcpplibs.mwrap.library.macros;`: 宏映射 +> More Modules API -> [模块与 API](docs/usage.md) +## Getting started +``` + +快速开始标题保留各项目对应的原名称,例如 Quick start、Install、Add The Package。 +导航按要求写在一行;普通正文不应因此压成超长行。 + +## 内容与顺序 + +页首之后保留各项目有用的原栏目层级与顺序,统一风格不等于整页替换成同一组标题。 +翻译标题时保持语义对应。新 README 可以以下顺序起步,按库的实际用途调整: + +1. 标题、一句话介绍、单行导航、badges;可选详细介绍位于 badges 之后,接着先 Modules 再快速开始。 +2. Modules 放在 Getting started 前,根模块和少量核心模块逐行列出: + 每项用完整 import 代码、冒号与用途说明;模块必须真实声明,必要时注明 feature 条件。 + 下方统一使用引用链接 `> More Modules API -> [模块与 API](docs/usage.md)`。 +3. 使用实际默认 `mcpp new` 模板快速开始;必要时补已有项目的依赖与 import 示例。 + mcpp feature 开关可在后续栏目用简洁表格说明。 +4. 在原栏目保留示例、重要平台/运行前提、详细文档和许可证入口。 + +不添加重复的 `Use mcpp <版本>. The new mwrap identity becomes installable after index publication.` +统一提示段。精确工具版本放在 `.xlings.json`、CI 与详细使用/构建说明中; +只有执行命令确实需要时,才在对应栏目简述必要的工具、SDK、桌面或设备前提。 +候选状态放在 release/PR 文档中;具体示例尚不可用时,仍要在会误导用户的位置明确说明。 + +## mcpp feature 与示例 + +这里专指 mcpp 清单的 `[features]` / `[feature-deps.*]` 开关,不是一般功能介绍。 +优先使用“精确 feature 名称 + 用途”的简洁表格,默认值和模块/后端边界用一句话说明: + +| Feature | 用途 | +|---|---| +| `all-modules` | 主模块接口集合,外部后端仍显式选择 | +| `highgui-native` | 已记录的 GTK3 / Win32 / Cocoa 映射 | +| `dnn-onnxruntime` | 支持目标上的 ORT CPU 集成 | + +没有可选 feature 的库不强造 Features 栏目。完整矩阵、依赖图、供应者设置与排错移到 docs, +从对应栏目链接;未实现的 feature 不出现在已支持表格中。 + +依赖、模板命令与 import 显示完整 `mcpplibs.mwrap.`,普通 API 保留上游名字。 +示例版本必须与实际发布一致。默认模板无需用户额外提供模型或媒体资产即可运行; +可选模板的桌面、SDK 和设备条件要清楚,最小例子也应使用真实库能力。 + +## 长度与双语核对 + +每种语言通常控制在约 **100–150 行以内**,更短也可以,不为凑 100 行填充内容。 +不删除前提、不压成超长行、不用大段折叠隐藏内容;发布检查可以对超过 150 行的页面提示修订。 + +中英文版本、命令、feature、平台限制和相关链接保持一致,无需行数机械相等。 +单独验证翻译后的标题锚点与双向链接。 +原本中文为主的默认页改为英文默认,同时在 `README.zh.md` 保留对应中文内容及有用布局。 diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index fc95ce91..3530489d 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -78,10 +78,10 @@ capability 选择不会自动移除另一份实现对象文件,必须先防止 ## README 风格 -所有 `<库名>-m` 仓库必须默认英文 `README.md`,提供中文 `README.zh.md`,顶部双向链接。 -每种语言通常不超过约 100 行;缺少中文的库必须补齐,版本、命令、平台前提和限制保持一致。 -保留原栏目语义、层级、顺序及少量有效徽章,再精简正文;英文页翻译栏目标题,不强制重排整页。 -长示例、架构和完整矩阵进入 docs,在原栏目保留摘要与链接;不靠超长行或删除前提压缩行数。 +遵循 [mwrap / xxx-m README 布局规范](mwrap-readme.md):默认英文 README.md,必须提供中文 +README.zh.md,语言/上游/Releases/mcpp/Index 合为单行导航;每语言通常约 100–150 行以内,更短也可以。 +保留有用原栏目,页首只留一句介绍,较长说明放在 badges 下、Modules 前,不增加 Characteristics 标题;实际存在的 mcpp 清单 feature 开关 +可用简洁表格说明。省略固定工具版本/索引发布提示段,必要的命令前提在相关栏目说明。 ## 每个 -m 包必须有可运行快捷模板 @@ -154,3 +154,5 @@ Git 与发布的 pkgs/mwrap 目录始终一致。 Linux 消费方即使通过 C API 加载 C++ SDK,也要验证 C++ 运行时契约及异常路径。OpenCV/ORT 组合实测中,静态运行时与共享 SDK 运行时混用会使 typed catch 终止;选择 `cxx_runtime = "toolchain-coupled"` 后同一测试通过。模板必须声明已验证的契约,并执行一次类型化错误路径。 生成清单、模块入口和配置头是构建输入;内容不变时保留时间戳,避免触碰公共配置头导致整份 vendored 实现重编。除了字节幂等,还应验证增量构建行为。 + +README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting started 前,以完整 import 逐项列出核心模块,下方加 `> More Modules API` 文档链接。 diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index 74cffc45..e24c9cf8 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -38,8 +38,8 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index 7400313c..3ef7d7b0 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -38,8 +38,8 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, ["1.83.0"] = { url = { diff --git a/pkgs/mwrap/ffmpeg.lua b/pkgs/mwrap/ffmpeg.lua index 1d6d4ac5..c9ebddf9 100644 --- a/pkgs/mwrap/ffmpeg.lua +++ b/pkgs/mwrap/ffmpeg.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/776160a829d062a8889271062409d7961a1703f1.tar.gz", - sha256 = "b0e182f1f11e644ede2e1717a57508ddb0b41fe910da2b0ac00b2b5c2c913193", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/572091c02606f66e47318176d25e7d821baaaae6.tar.gz", + sha256 = "4167c0501ca9b9cf3bcbc2cd78485fc007bceca07f5aa4bf41097c56d14d148a", }, }, macosx = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/776160a829d062a8889271062409d7961a1703f1.tar.gz", - sha256 = "b0e182f1f11e644ede2e1717a57508ddb0b41fe910da2b0ac00b2b5c2c913193", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/572091c02606f66e47318176d25e7d821baaaae6.tar.gz", + sha256 = "4167c0501ca9b9cf3bcbc2cd78485fc007bceca07f5aa4bf41097c56d14d148a", }, }, windows = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/776160a829d062a8889271062409d7961a1703f1.tar.gz", - sha256 = "b0e182f1f11e644ede2e1717a57508ddb0b41fe910da2b0ac00b2b5c2c913193", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/572091c02606f66e47318176d25e7d821baaaae6.tar.gz", + sha256 = "4167c0501ca9b9cf3bcbc2cd78485fc007bceca07f5aa4bf41097c56d14d148a", }, }, }, diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua index 5803127f..832e27f4 100644 --- a/pkgs/mwrap/godot_cpp.lua +++ b/pkgs/mwrap/godot_cpp.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["10.0.0-rc1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/4f6f0628b4df94f940ef7e0bdcde3f5df104b03a.tar.gz", - sha256 = "0ae5293a74eba9455652d5db1f0b8f3a0029ff0882b83fa01148af163903b25b", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/daf32149f3ca87a6f8e8f1568913491fac7b353a.tar.gz", + sha256 = "824eff5f63f059525f0d55a750a54c2b544026677f2dffd418c9989e711850a9", }, }, macosx = { ["10.0.0-rc1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/4f6f0628b4df94f940ef7e0bdcde3f5df104b03a.tar.gz", - sha256 = "0ae5293a74eba9455652d5db1f0b8f3a0029ff0882b83fa01148af163903b25b", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/daf32149f3ca87a6f8e8f1568913491fac7b353a.tar.gz", + sha256 = "824eff5f63f059525f0d55a750a54c2b544026677f2dffd418c9989e711850a9", }, }, windows = { ["10.0.0-rc1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/4f6f0628b4df94f940ef7e0bdcde3f5df104b03a.tar.gz", - sha256 = "0ae5293a74eba9455652d5db1f0b8f3a0029ff0882b83fa01148af163903b25b", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/daf32149f3ca87a6f8e8f1568913491fac7b353a.tar.gz", + sha256 = "824eff5f63f059525f0d55a750a54c2b544026677f2dffd418c9989e711850a9", }, }, }, diff --git a/pkgs/mwrap/grpc.lua b/pkgs/mwrap/grpc.lua index 98381e88..f7e09a37 100644 --- a/pkgs/mwrap/grpc.lua +++ b/pkgs/mwrap/grpc.lua @@ -10,14 +10,14 @@ package = { xpm = { linux = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, }, macosx = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/f3035f79989e9d3a8c3810ac74a2fe97fe266b1e.tar.gz", - sha256 = "475df00140ef669453f19e71e519b7a9b6c2e012e11a22cacc4d0c54862f5e8b", + url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", + sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", }, }, }, diff --git a/pkgs/mwrap/imgui.lua b/pkgs/mwrap/imgui.lua index 4fff7095..60688d46 100644 --- a/pkgs/mwrap/imgui.lua +++ b/pkgs/mwrap/imgui.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/61b491e16779202d8569ff2ea01c05d1c7e7975f.tar.gz", - sha256 = "fe0c83397e1787a2a2ff7b41547c9f487325329a67f62e20529ff9482a56b6ff", + url = "https://github.com/mcpplibs/imgui-m/archive/a0ff50b0ac81afd15072af4b016df5566380b6a6.tar.gz", + sha256 = "515f5e586d113bb8e05da2565a0fbfe20f468737cba12b3ee321aab556112067", }, }, macosx = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/61b491e16779202d8569ff2ea01c05d1c7e7975f.tar.gz", - sha256 = "fe0c83397e1787a2a2ff7b41547c9f487325329a67f62e20529ff9482a56b6ff", + url = "https://github.com/mcpplibs/imgui-m/archive/a0ff50b0ac81afd15072af4b016df5566380b6a6.tar.gz", + sha256 = "515f5e586d113bb8e05da2565a0fbfe20f468737cba12b3ee321aab556112067", }, }, windows = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/61b491e16779202d8569ff2ea01c05d1c7e7975f.tar.gz", - sha256 = "fe0c83397e1787a2a2ff7b41547c9f487325329a67f62e20529ff9482a56b6ff", + url = "https://github.com/mcpplibs/imgui-m/archive/a0ff50b0ac81afd15072af4b016df5566380b6a6.tar.gz", + sha256 = "515f5e586d113bb8e05da2565a0fbfe20f468737cba12b3ee321aab556112067", }, }, }, diff --git a/pkgs/mwrap/llamacpp.lua b/pkgs/mwrap/llamacpp.lua index 9926dc6c..3ad6e65c 100644 --- a/pkgs/mwrap/llamacpp.lua +++ b/pkgs/mwrap/llamacpp.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/40815555a0189959802069529d9994317555c765.tar.gz", - sha256 = "32db3e899ba09cb20db839b39038c73f82393b7bc2ea5383bf4dd19c5c50a6ef", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/0d55de134c5c16bc31b5fb1e91c5946236b8b829.tar.gz", + sha256 = "7c91fbb6f260906ef4bb730cef7cfe1329842d9cd39dbbeeb29b1b9ac8adbff1", }, }, macosx = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/40815555a0189959802069529d9994317555c765.tar.gz", - sha256 = "32db3e899ba09cb20db839b39038c73f82393b7bc2ea5383bf4dd19c5c50a6ef", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/0d55de134c5c16bc31b5fb1e91c5946236b8b829.tar.gz", + sha256 = "7c91fbb6f260906ef4bb730cef7cfe1329842d9cd39dbbeeb29b1b9ac8adbff1", }, }, windows = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/40815555a0189959802069529d9994317555c765.tar.gz", - sha256 = "32db3e899ba09cb20db839b39038c73f82393b7bc2ea5383bf4dd19c5c50a6ef", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/0d55de134c5c16bc31b5fb1e91c5946236b8b829.tar.gz", + sha256 = "7c91fbb6f260906ef4bb730cef7cfe1329842d9cd39dbbeeb29b1b9ac8adbff1", }, }, }, diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua index cbea3492..f257a224 100644 --- a/pkgs/mwrap/onnxruntime.lua +++ b/pkgs/mwrap/onnxruntime.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/a20def5e72c167a604045218c0f688e04f36611b.tar.gz", - sha256 = "940854eda99acc97c18cb806d5dacc1e5d22d41f1a97e223b24ac7158259869e", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/45073fc979c8091f9d94988ea973e634fa5728ff.tar.gz", + sha256 = "29abd207e2072a460bc992a02f8433efcde0245486d92f6a9dca23008cc079d7", }, }, macosx = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/a20def5e72c167a604045218c0f688e04f36611b.tar.gz", - sha256 = "940854eda99acc97c18cb806d5dacc1e5d22d41f1a97e223b24ac7158259869e", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/45073fc979c8091f9d94988ea973e634fa5728ff.tar.gz", + sha256 = "29abd207e2072a460bc992a02f8433efcde0245486d92f6a9dca23008cc079d7", }, }, windows = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/a20def5e72c167a604045218c0f688e04f36611b.tar.gz", - sha256 = "940854eda99acc97c18cb806d5dacc1e5d22d41f1a97e223b24ac7158259869e", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/45073fc979c8091f9d94988ea973e634fa5728ff.tar.gz", + sha256 = "29abd207e2072a460bc992a02f8433efcde0245486d92f6a9dca23008cc079d7", }, }, }, diff --git a/pkgs/mwrap/opencv.lua b/pkgs/mwrap/opencv.lua index 9ac0a649..0eb3a7e5 100644 --- a/pkgs/mwrap/opencv.lua +++ b/pkgs/mwrap/opencv.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5fd742c2d3d7ffa6b6ce3e375c01d0aae8f4ee5d.tar.gz", - sha256 = "188dfd39b59109e62e2bdd7f8b1832198e734d62ad06632123bd24662382d341", + url = "https://github.com/mcpplibs/opencv-m/archive/52d6e0490645653310bbb6980dce35d3b395e3bf.tar.gz", + sha256 = "6f7abaefed05b1971e17eebde938e784957efae1f68506a0afffaf6312a27dcb", }, }, macosx = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5fd742c2d3d7ffa6b6ce3e375c01d0aae8f4ee5d.tar.gz", - sha256 = "188dfd39b59109e62e2bdd7f8b1832198e734d62ad06632123bd24662382d341", + url = "https://github.com/mcpplibs/opencv-m/archive/52d6e0490645653310bbb6980dce35d3b395e3bf.tar.gz", + sha256 = "6f7abaefed05b1971e17eebde938e784957efae1f68506a0afffaf6312a27dcb", }, }, windows = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/5fd742c2d3d7ffa6b6ce3e375c01d0aae8f4ee5d.tar.gz", - sha256 = "188dfd39b59109e62e2bdd7f8b1832198e734d62ad06632123bd24662382d341", + url = "https://github.com/mcpplibs/opencv-m/archive/52d6e0490645653310bbb6980dce35d3b395e3bf.tar.gz", + sha256 = "6f7abaefed05b1971e17eebde938e784957efae1f68506a0afffaf6312a27dcb", }, }, }, From 56f7cfdad0d7f2af2f7e81f0d664938f48e1b60d Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 07:54:09 +0900 Subject: [PATCH 34/47] feat: mirror official ORT CPU SDK archives on GitCode --- .agents/docs/2026-10-25-unified-mwrap-execution.md | 12 ++++++++++++ pkgs/c/compat.onnxruntime.lua | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 52e513f0..5ff4707c 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -74,3 +74,15 @@ statements with descriptions, and ends with a More Modules API blockquote link. All fourteen READMEs have been checked against actual module declarations and local link destinations; usage documents no longer label modules with legacy names. These documentation changes retain the tested implementation bodies. + + +## Official SDK CN mirror closure + +The official ONNX Runtime 1.25.1 CPU SDK is mirrored at +https://gitcode.com/mcpp-res/onnxruntime-cpu-sdk/releases/tag/1.25.1 . +Linux x64, macOS arm64 and Windows x64 archives were downloaded twice from the +official release, matched their existing descriptor SHA256 values and retained +LICENSE/ThirdPartyNotices.txt. Each uploaded CN resource was then fetched publicly +and matched the same SHA256. The new SDK descriptor adds only the verified URL +mirror table; SDK bytes, versions, ABI guards and runtime deployment stay intact. +Evidence: /tmp/mwrap-ort-sdk-cn-records.json and /tmp/mwrap-mirror-ort-sdk.log. diff --git a/pkgs/c/compat.onnxruntime.lua b/pkgs/c/compat.onnxruntime.lua index a6f4cd67..6e440230 100644 --- a/pkgs/c/compat.onnxruntime.lua +++ b/pkgs/c/compat.onnxruntime.lua @@ -3,7 +3,10 @@ local version = "1.25.1" local function archive(name, sha256) return { - url = "https://github.com/microsoft/onnxruntime/releases/download/v" .. version .. "/" .. name, + url = { + GLOBAL = "https://github.com/microsoft/onnxruntime/releases/download/v" .. version .. "/" .. name, + CN = "https://gitcode.com/mcpp-res/onnxruntime-cpu-sdk/releases/download/" .. version .. "/" .. name, + }, sha256 = sha256, } end From 5c09376afaa1f687eca7a68b85918b5e1ebfca24 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 08:38:52 +0900 Subject: [PATCH 35/47] Apply Apache-2.0 mwrap licensing policy and pin corrected wrappers --- ...unified-identity-and-first-release-plan.md | 23 +++++++-- .../2026-10-25-unified-mwrap-execution.md | 51 ++++++++++++++++++- .../skills/add-mcpp-index-package/SKILL.md | 7 +++ .github/workflows/validate.yml | 2 +- docs/mwrap-licensing.md | 31 +++++++++++ docs/mwrap-readme.md | 6 +++ docs/mwrap.md | 6 +++ docs/zh/mwrap-licensing.md | 21 ++++++++ docs/zh/mwrap-readme.md | 5 ++ docs/zh/mwrap.md | 5 ++ pkgs/g/grpc-plugin.lua | 12 ++--- pkgs/g/grpcgen.lua | 12 ++--- pkgs/mwrap/ffmpeg.lua | 14 ++--- pkgs/mwrap/godot_cpp.lua | 20 ++++---- pkgs/mwrap/grpc.lua | 8 +-- pkgs/mwrap/imgui.lua | 14 ++--- pkgs/mwrap/llamacpp.lua | 14 ++--- pkgs/mwrap/onnxruntime.lua | 20 ++++---- pkgs/mwrap/opencv.lua | 12 ++--- tests/mwrap/check_installed_template.py | 2 +- tests/mwrap/godot-math/mcpp.toml | 2 +- tests/mwrap/onnxruntime-cpu/mcpp.toml | 2 +- 22 files changed, 215 insertions(+), 74 deletions(-) create mode 100644 docs/mwrap-licensing.md create mode 100644 docs/zh/mwrap-licensing.md diff --git a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md index f04da494..b41a03ca 100644 --- a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md +++ b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md @@ -12,8 +12,8 @@ Godot 命名已由用户确认:`mcpplibs.mwrap.godot_cpp`,不再作为待定 七个封装库均新增 `mcpplibs.mwrap` 身份,旧身份、已发布版本、校验值与资源保留。 新 mwrap 身份首次发版直接使用所封装的上游版本,不机械继承旧封装修订尾号。 -本文通过 review 后再实施:更新相关 PR → 自我 review 与完整 CI → squash 合入库 → 验证合入提交 → 发布库 → 更新并合入索引。 -当前“先不要动代码”的要求优先于上述后续执行步骤;本轮不开始发布操作。 +执行顺序:更新相关 PR → 自我 review 与完整 CI → squash 合入库 → 验证合入提交 → 发布库 → 更新并合入索引。 +用户已经授权实施、合入与发布;原设计阶段的暂停要求已结束,实际进度见实施记录。 mcpp 引擎源码继续只读;不因本次命名统一新增引擎功能,也不依赖独立文档 PR #836 合入。 ## 2. 包身份、文件名与 import 分别处理 @@ -135,7 +135,7 @@ mwrap 总规范与 authoring skill 引用这份布局规范,不各自复制整 存在实际 mcpp `[features]` / `[feature-deps.*]` 控制项时可用“精确名称 + 用途”短表格, 不是将普通产品能力当成 mcpp features;没有这些控制项就不强造 Features 栏目。 -“统一风格”约束语言、密度和可用性,不强制七库采用完全相同的标题或顺序。 +统一开头顺序为简介、导航、badges、可选详细介绍、Modules、快速开始;其余栏目保留各库有用的原结构。 基线使用各 PR 当前 base 的 README(含对应翻译);保留项目标题、logo/少量有效 badge、语言入口及有用原栏目顺序;省略 Characteristics / 核心特性标题,详细概览放在 badges 后、快速开始前。 保留布局不要求保留中文栏目标题在英文页中:标题和正文按页面语言翻译,栏目语义、层级与顺序保持对应。 修正失效链接、CI 仓库地址、license 标签等事实错误,不为保留外观继续展示错误信息。 @@ -144,7 +144,7 @@ mwrap 总规范与 authoring skill 引用这份布局规范,不各自复制整 | 仓库 | 已核查的原 README 结构 | 精简方式 | |---|---|---| -| OpenCV | 单句简介/单行导航/badges/详细介绍 → Getting started → Modules → Features → Examples → Build and toolchains → License | 保留栏目与模块/feature 摘要,快速开始使用新模板,完整矩阵链接 docs | +| OpenCV | 单句简介/单行导航/badges/详细介绍 → Modules → Getting started → Features → Examples → Build and toolchains → License | Modules 提前;保留模块/feature 摘要,快速开始使用新模板,完整矩阵链接 docs | | FFmpeg | 单句简介/单行导航/badges/详细介绍 → 快速开始 → 模块一览 → 示例 → 工具链与运行时 → License | 原约 86 行,重点修订身份、版本与示例,避免不必要重排 | | ImGui | 单句简介/单行导航/badges/详细介绍 → 快速开始 → 模块一览 → Features → 示例 → 工具链与运行时 → License | 原约 101 行,压缩重复说明,保留 headless/window/docking 区别 | | llama.cpp | Add The Package → Minimal CPU Program → CPU/Metal/Vulkan Chat → Supported Boundary | 各后端栏目保留,长命令与 shader 原理转 docs,CPU 默认模板无模型资产也能运行 | @@ -200,7 +200,7 @@ tests/ |---|---| | `docs/mwrap.md`、`docs/zh/mwrap.md` | 正式规范唯一来源;七库统一完整身份,`pkgs/mwrap/.lua`,无字母子目录,首次上游原版本、独立 mwrap tag、API/macros 与兼容边界 | | `docs/mwrap-readme.md`、`docs/zh/mwrap-readme.md` | mwrap / xxx-m 布局规范,明确英文默认/中文必备、语言/上游/项目链接单行导航、单句简介与 badges 后详细介绍、合并重复概览、去除固定提示、实际 mcpp feature 表格及约 100–150 行 | -| 上述规范的 README 小节 | 明确 `README.md` 默认英文、`README.zh.md` 必须提供且双向链接;保留原布局/栏目再精简;约 100–150 行是每语言编辑目标,删除强制统一标题顺序的旧要求 | +| 上述规范的 README 小节 | 明确 `README.md` 默认英文、`README.zh.md` 必须提供且双向链接;按统一开头顺序调整 Modules,其余有用原栏目保留;约 100–150 行是每语言编辑目标 | | `docs/repository-and-schema.md`、`docs/zh/repository-and-schema.md` | 将 `<完整身份>.lua` 改为 `.lua`;说明文件名、分类目录与声明身份的区别;源码与发布布局一致 | | `docs/package-types.md`、`docs/zh/package-types.md` | 核对 wrapper / compat / native / host-tool 分类说明及交叉链接,示例采用完整 FQN 与新目录规则 | | `README.md`、`README.zh-CN.md` 及站点包列表入口 | 核对规范导航与示例;存在旧 mwrap 路径或旧 wrapper 身份时同步更新,避免全站重复维护规范正文 | @@ -383,3 +383,16 @@ Modules 位于 Getting started 前,核心模块按以下形式逐行列出, 只列实际存在的公共模块,使用完整前缀;有 feature 条件时明确说明。 中英规范、skill 和七库双语页采用相同顺序;单模块库可列根模块及宏映射入口。 + +### 12.3 通用许可规范补充 + +用户确认此规则适用于全部 mwrap / xxx-m:封装层默认 Apache-2.0,归属标识 +`mcpp-community`;上游 README 与 LICENSE/COPYING、适用通知原样保留在 `upstream//`。 +顶层 LICENSE/NOTICE、README、manifest 和新索引描述符同步;上游仍按原许可证分发。 +正式规范:[许可规范](../../docs/zh/mwrap-licensing.md)。已发布版本不能改写,追加单个封装修订尾号。 + +许可修正后的当前发布目标:OpenCV 5.0.0、ORT 1.25.1.1、llama.cpp b10069、 +FFmpeg 8.1.2、gRPC 1.83.0、ImGui 1.92.8、Godot 10.0.0-rc1.1。 +ORT 已发布的 1.25.1 和 Godot 已创建的 10.0.0-rc1 tag 保留,故两者追加单个尾号; +这不修改上游版本,也不覆盖旧资源。五个已经合入的身份 PR 另建一次许可修正 PR, +其余两个继续原 PR,均重新执行当前提交的检查。 diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 5ff4707c..8c719bfb 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -38,7 +38,7 @@ Local logs: /tmp/mwrap-unified-{ffmpeg,imgui,godot}-local*.log; /tmp/mwrap-unified-llama-unit-final.log; /tmp/mwrap-unified-llama-local.log; /tmp/mwrap-unified-grpc-local-retry.log. -No merge or release has occurred at this checkpoint. Formal archive URLs and +At the initial implementation checkpoint no merge or release had occurred. Formal archive URLs and verified byte-identical CN mirrors replace commit snapshots only after release. Full current-head source/index CI, final ecosystem review, merge/tag consistency, GitCode asset fetch and installed published-index templates remain required. @@ -48,7 +48,7 @@ GitCode asset fetch and installed published-index templates remain required. The user refined the common opening: title, one-sentence introduction, one line combining languages/upstream/Releases/mcpp/Index, badges, optional detailed -introduction, then the original quickstart section. Characteristics is omitted; +introduction, then Modules and the original quickstart section. Characteristics is omitted; actual mcpp manifest feature switches may use a concise table. The repetitive fixed tool-version/index-publication paragraph is removed. Pages may be shorter than the relaxed 100–150-line target. Canonical English/Chinese layout documents @@ -86,3 +86,50 @@ LICENSE/ThirdPartyNotices.txt. Each uploaded CN resource was then fetched public and matched the same SHA256. The new SDK descriptor adds only the verified URL mirror table; SDK bytes, versions, ABI guards and runtime deployment stay intact. Evidence: /tmp/mwrap-ort-sdk-cn-records.json and /tmp/mwrap-mirror-ort-sdk.log. + + +## Verified merge and publication checkpoint + +ORT, llama.cpp, Godot, ImGui and FFmpeg have now passed their exact PR-head CI +and self-review and been squash merged. Their reviewed PR and squash trees are +compared before tagging; squash-commit workflows remain separate release gates. +OpenCV and gRPC still have active native CI at their frozen final PR heads. + +ORT 1.25.1 is formally published as mwrap-1.25.1. The GitHub source asset was +downloaded twice, matched its published checksum, and matched every tracked +squash-commit file. Its public GitCode mirror was fetched and matched the same +SHA256, 75e35e39d45ae16462afce5c1a6bbacdd8e7bd8a23d4837f0308a4cdd989ceb0. +Formal resource replacement is batched after the seven library releases; the +current candidate index is not claimed to be published. + +Same-version cache tests alternate old/new/old/new identities in a fresh private +home, building and running each consumer and checking lockfile namespace/version. +FFmpeg, OpenCV and ImGui pass all four alternations. The immutable legacy llama +b10069 archive fails LLVM23 compilation because its upstream header lacks getenv +and atoi declarations. This is recorded as a legacy build failure, not a passed +cache test; no historical archive or mcpp engine source is patched. + +Machine evidence: /tmp/mwrap-unified-merged-libraries.json, +/tmp/mwrap-unified-tagged-libraries.json, /tmp/mwrap-unified-published-libraries.json, +/tmp/mwrap-same-version-cache-results.json, +/tmp/mwrap-more-cache-isolation-results.json. + +## User licensing correction + +The user added a common policy for all mwrap / xxx-m wrappers: Apache-2.0 wrapper +license, mcpp-community attribution, original upstream README/license documents +retained under upstream/. Automatic further tagging/publication has been stopped +while seven repositories and the normative docs/skill are brought into alignment. +ORT 1.25.1 has already been published; Godot 10.0.0-rc1 was tagged but its queued +release workflow was cancelled. Those existing tags/assets will not be rewritten. +Corrected versions use one wrapper revision suffix where a tag already exists. + +The seven license corrections are pushed. ORT #2, llama.cpp #6, FFmpeg #9, +ImGui #14 and Godot #2 are follow-up PRs because their original identity PRs +were already merged before the new policy instruction. OpenCV #1 and gRPC #8 +continue on their existing PRs. ORT now targets 1.25.1.1 and Godot 10.0.0-rc1.1, +without changing either upstream SDK version. All seven release guards verify +Apache-2.0, mcpp-community authors/NOTICE, pinned upstream document hashes and +explicit notice deployment. Negative local cases reject wrong wrapper license, +missing attribution, changed upstream bytes and missing NOTICE deployment. +Native CI and final archive/installed-consumer verification are still pending. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 5113e1de..846baecd 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -191,3 +191,10 @@ bash tests/run_members.sh 完成前应遵循 `verification-before-completion`:在声明“通过/完成”之前,须给出真实命令输出作为证据。 README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting started 前,以完整 import 逐项列出核心模块,下方加 `> More Modules API` 文档链接。 + +### mwrap / xxx-m 许可 + +遵守 [mwrap 许可规范](../../../docs/zh/mwrap-licensing.md):封装默认 Apache-2.0, +归属标签 mcpp-community;顶层 LICENSE/NOTICE、README badge、manifest 和新 wrapper 描述符保持一致。 +上游 README/许可证保留在 upstream//,保留原字节和版权;不改写 compat provider 的原许可证。 +发布和部署必须携带适用通知;已发布更正追加修订尾号,不覆盖旧 tag、资源或 hash。 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index fd28ae02..9f76a9bc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1560,7 +1560,7 @@ jobs: - name: Installed Godot wrapper archive and actual standalone math template if: contains(format(' {0} ', env.MEMBERS), ' godot-math ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.godot_cpp@10.0.0-rc1 + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.godot_cpp@10.0.0-rc1.1 - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash diff --git a/docs/mwrap-licensing.md b/docs/mwrap-licensing.md new file mode 100644 index 00000000..e024f070 --- /dev/null +++ b/docs/mwrap-licensing.md @@ -0,0 +1,31 @@ +# Licensing for mwrap / xxx-m repositories + +This policy applies to wrappers for existing C/C++ header libraries, including +thin `compat.*` consumers and repositories with vendored upstream sources. + +- The wrapper defaults to **Apache-2.0**. Root `LICENSE` contains the standard + Apache License 2.0 text; root `NOTICE` identifies `mcpp-community` contributors + and states the scope of wrapper contributions. +- Use `mcpp-community` as the wrapper author/attribution label. This does not + change repository organization, package namespace or import identity: + `mcpplibs.mwrap.` remains the public module/package identity. +- Keep the original upstream README, LICENSE/COPYING and applicable NOTICE or + third-party notices in `upstream//`, preserving their bytes and authors. + Record their pinned source and checksums. Provider-based wrappers keep these + documents even when the implementation is supplied separately by `compat.*`. +- Root README describes the wrapper; it links the upstream project and retained + upstream documents. Its license link/badge describes Apache-2.0 for the wrapper, + with an explicit note that upstream components retain their own licenses. +- `mcpp.toml` and the new wrapper descriptor declare Apache-2.0. Do not change a + `compat.*` provider's license to match its wrapper. FFmpeg remains under the + selected LGPL/GPL configuration; MIT upstream components remain MIT. +- Preserve inherited wrapper copyright/license notices when adopting the new + wrapper policy; identify retained legacy material separately from upstream. +- Source releases include root LICENSE/NOTICE and upstream documents. Binary + bundles retain all required upstream/dependency notices, in distinct paths; + moving documents to upstream must not make deployment drop them. +- Existing tags, releases, URLs and hashes remain immutable. Corrections after + publication use the next single wrapper revision suffix and fresh validation. + +Root Apache-2.0 does not replace upstream licensing or claim upstream copyright. +See the [Apache license application instructions](https://www.apache.org/licenses/LICENSE-2.0#apply). diff --git a/docs/mwrap-readme.md b/docs/mwrap-readme.md index 5eb3739a..fcb2d473 100644 --- a/docs/mwrap-readme.md +++ b/docs/mwrap-readme.md @@ -97,3 +97,9 @@ and relevant links. They need not have identical line counts. Check translated heading anchors separately and keep reciprocal language links valid. Existing Chinese-only entry pages become English defaults with the corresponding Chinese content retained in `README.zh.md`, preserving their useful original layout. + +## License section + +Link root Apache-2.0 for the wrapper and retain the mcpp-community attribution +in NOTICE. Link original upstream README/licenses under upstream/ and state +that upstream components retain their own licenses. Follow the [licensing policy](mwrap-licensing.md). diff --git a/docs/mwrap.md b/docs/mwrap.md index 1d0f6415..10e2bc8c 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -213,3 +213,9 @@ For Linux consumers loading a C++ SDK through a C API, verify the C++ runtime co Generated files are build inputs. Preserve their timestamps when content is unchanged, including manifests, module facades and configuration headers; touching an unchanged common header can rebuild the entire vendored implementation. Verify both byte idempotence and incremental behavior. README navigation uses `[Upstream](upstream-url)`. Modules precedes Getting started with complete import bullets and a `> More Modules API` documentation link. + +## Wrapper licensing + +All mwrap / xxx-m repositories follow the [licensing policy](mwrap-licensing.md): +Apache-2.0 for wrapper contributions, mcpp-community attribution, original +upstream README/licenses retained under upstream/, and immutable release corrections. diff --git a/docs/zh/mwrap-licensing.md b/docs/zh/mwrap-licensing.md new file mode 100644 index 00000000..cd4cefe9 --- /dev/null +++ b/docs/zh/mwrap-licensing.md @@ -0,0 +1,21 @@ +# mwrap / xxx-m 仓库许可规范 + +本规范适用于传统 C/C++ 头文件库的模块封装,包括仅依赖 `compat.*` 的薄封装和 vendor 上游源码的仓库。 + +- **封装层默认 Apache-2.0**。顶层 `LICENSE` 放标准 Apache License 2.0 全文, + 顶层 `NOTICE` 标明 `mcpp-community` contributors 以及封装贡献的适用范围。 +- 封装作者/归属标签统一 `mcpp-community`。这不改变仓库组织、包 namespace 或模块身份: + 对外仍是 `mcpplibs.mwrap.`。 +- 上游原始 README、LICENSE/COPYING 及适用的 NOTICE、第三方通知放在 `upstream//`, + 保留原始字节、作者与版权声明,记录固定来源和校验值。使用 `compat.*` 供应源码也保留这些上游文档。 +- 顶层 README 介绍封装,链接上游项目和保留文档;许可证链接/badge 表示封装 Apache-2.0, + 同时明确上游组件维持各自许可证。 +- `mcpp.toml` 和新封装索引描述符声明 Apache-2.0;不将 `compat.*` 的上游许可证统一改掉。 + FFmpeg 仍受所选 LGPL/GPL 配置约束;MIT 上游继续 MIT。 +- 改用封装规范时保留继承的封装版权/许可通知,历史封装材料与上游材料分别标识。 +- 源码发布包含顶层 LICENSE/NOTICE 和上游文档;二进制部署继续携带全部必需通知并保留独立路径, + 不因文件移动到 upstream 而漏掉通知。 +- 已有 tag、release、URL 和 hash 不覆盖;发布后的更正追加单个封装修订尾号并重新验证。 + +顶层 Apache-2.0 不替代上游许可,也不将上游版权归给封装作者。 +参考 [Apache 官方应用说明](https://www.apache.org/licenses/LICENSE-2.0#apply)。 diff --git a/docs/zh/mwrap-readme.md b/docs/zh/mwrap-readme.md index 84bc310e..b591ea7a 100644 --- a/docs/zh/mwrap-readme.md +++ b/docs/zh/mwrap-readme.md @@ -76,3 +76,8 @@ English · 简体中文 · [Upstream](upstream-url) · Releases · mcpp · Index 中英文版本、命令、feature、平台限制和相关链接保持一致,无需行数机械相等。 单独验证翻译后的标题锚点与双向链接。 原本中文为主的默认页改为英文默认,同时在 `README.zh.md` 保留对应中文内容及有用布局。 + +## 许可栏目 + +封装链接顶层 Apache-2.0,NOTICE 标明 mcpp-community;链接 upstream/ 内保留的 +上游 README/许可证,并说明上游组件维持原有许可。遵守[许可规范](mwrap-licensing.md)。 diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index 3530489d..baf0f68d 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -156,3 +156,8 @@ Linux 消费方即使通过 C API 加载 C++ SDK,也要验证 C++ 运行时契 生成清单、模块入口和配置头是构建输入;内容不变时保留时间戳,避免触碰公共配置头导致整份 vendored 实现重编。除了字节幂等,还应验证增量构建行为。 README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting started 前,以完整 import 逐项列出核心模块,下方加 `> More Modules API` 文档链接。 + +## 封装许可 + +所有 mwrap / xxx-m 仓库遵守[许可规范](mwrap-licensing.md):封装层默认 Apache-2.0, +归属标识 mcpp-community,上游 README/许可证原样保留在 upstream/,已发布更正采用修订版。 diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index e24c9cf8..942a9d8b 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -38,8 +38,8 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index 3ef7d7b0..b707a26d 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -38,8 +38,8 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, ["1.83.0"] = { url = { diff --git a/pkgs/mwrap/ffmpeg.lua b/pkgs/mwrap/ffmpeg.lua index c9ebddf9..cbb8f8a9 100644 --- a/pkgs/mwrap/ffmpeg.lua +++ b/pkgs/mwrap/ffmpeg.lua @@ -4,26 +4,26 @@ package = { namespace = "mcpplibs.mwrap", name = "ffmpeg", description = "ffmpeg-m upstream-preserving C++23 module wrapper", - licenses = { "MIT" }, + licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/ffmpeg-m", type = "package", xpm = { linux = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/572091c02606f66e47318176d25e7d821baaaae6.tar.gz", - sha256 = "4167c0501ca9b9cf3bcbc2cd78485fc007bceca07f5aa4bf41097c56d14d148a", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/86b39c591d2fc0904ecb3a21d8ffb3e93c460542.tar.gz", + sha256 = "72eaf1d94fba986477f25456dcddeeb1ef2863e4ba915af55ef8321ca30c40b7", }, }, macosx = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/572091c02606f66e47318176d25e7d821baaaae6.tar.gz", - sha256 = "4167c0501ca9b9cf3bcbc2cd78485fc007bceca07f5aa4bf41097c56d14d148a", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/86b39c591d2fc0904ecb3a21d8ffb3e93c460542.tar.gz", + sha256 = "72eaf1d94fba986477f25456dcddeeb1ef2863e4ba915af55ef8321ca30c40b7", }, }, windows = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/572091c02606f66e47318176d25e7d821baaaae6.tar.gz", - sha256 = "4167c0501ca9b9cf3bcbc2cd78485fc007bceca07f5aa4bf41097c56d14d148a", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/86b39c591d2fc0904ecb3a21d8ffb3e93c460542.tar.gz", + sha256 = "72eaf1d94fba986477f25456dcddeeb1ef2863e4ba915af55ef8321ca30c40b7", }, }, }, diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua index 832e27f4..071d81bf 100644 --- a/pkgs/mwrap/godot_cpp.lua +++ b/pkgs/mwrap/godot_cpp.lua @@ -4,26 +4,26 @@ package = { namespace = "mcpplibs.mwrap", name = "godot_cpp", description = "godot-cpp-m upstream-preserving C++23 module wrapper", - licenses = { "MIT" }, + licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/godot-cpp-m", type = "package", xpm = { linux = { - ["10.0.0-rc1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/daf32149f3ca87a6f8e8f1568913491fac7b353a.tar.gz", - sha256 = "824eff5f63f059525f0d55a750a54c2b544026677f2dffd418c9989e711850a9", + ["10.0.0-rc1.1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/815cd7a3838ec3d0c49cb38f17e3d9ae6367eeec.tar.gz", + sha256 = "a47b4525c5cde4b779b035e8ec24f51cab662df8419ed303dc2d2e877d348ff7", }, }, macosx = { - ["10.0.0-rc1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/daf32149f3ca87a6f8e8f1568913491fac7b353a.tar.gz", - sha256 = "824eff5f63f059525f0d55a750a54c2b544026677f2dffd418c9989e711850a9", + ["10.0.0-rc1.1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/815cd7a3838ec3d0c49cb38f17e3d9ae6367eeec.tar.gz", + sha256 = "a47b4525c5cde4b779b035e8ec24f51cab662df8419ed303dc2d2e877d348ff7", }, }, windows = { - ["10.0.0-rc1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/daf32149f3ca87a6f8e8f1568913491fac7b353a.tar.gz", - sha256 = "824eff5f63f059525f0d55a750a54c2b544026677f2dffd418c9989e711850a9", + ["10.0.0-rc1.1"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/815cd7a3838ec3d0c49cb38f17e3d9ae6367eeec.tar.gz", + sha256 = "a47b4525c5cde4b779b035e8ec24f51cab662df8419ed303dc2d2e877d348ff7", }, }, }, diff --git a/pkgs/mwrap/grpc.lua b/pkgs/mwrap/grpc.lua index f7e09a37..a9973a9d 100644 --- a/pkgs/mwrap/grpc.lua +++ b/pkgs/mwrap/grpc.lua @@ -10,14 +10,14 @@ package = { xpm = { linux = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, }, macosx = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/72281792e3ed20f7a1b832efa98be7176bb80170.tar.gz", - sha256 = "9842a747bdf81d7625ff6c2cc611d92a2be46f786374d79dc84a569985ed631d", + url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", + sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", }, }, }, diff --git a/pkgs/mwrap/imgui.lua b/pkgs/mwrap/imgui.lua index 60688d46..fa20855d 100644 --- a/pkgs/mwrap/imgui.lua +++ b/pkgs/mwrap/imgui.lua @@ -4,26 +4,26 @@ package = { namespace = "mcpplibs.mwrap", name = "imgui", description = "imgui-m upstream-preserving C++23 module wrapper", - licenses = { "MIT" }, + licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/imgui-m", type = "package", xpm = { linux = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/a0ff50b0ac81afd15072af4b016df5566380b6a6.tar.gz", - sha256 = "515f5e586d113bb8e05da2565a0fbfe20f468737cba12b3ee321aab556112067", + url = "https://github.com/mcpplibs/imgui-m/archive/c753c95404f4e7c4b2bd80e5a8a349771bae0c01.tar.gz", + sha256 = "ed8755746e86601162834bae93148e2536089f11fa238ae6dde4250ba8a73db2", }, }, macosx = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/a0ff50b0ac81afd15072af4b016df5566380b6a6.tar.gz", - sha256 = "515f5e586d113bb8e05da2565a0fbfe20f468737cba12b3ee321aab556112067", + url = "https://github.com/mcpplibs/imgui-m/archive/c753c95404f4e7c4b2bd80e5a8a349771bae0c01.tar.gz", + sha256 = "ed8755746e86601162834bae93148e2536089f11fa238ae6dde4250ba8a73db2", }, }, windows = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/a0ff50b0ac81afd15072af4b016df5566380b6a6.tar.gz", - sha256 = "515f5e586d113bb8e05da2565a0fbfe20f468737cba12b3ee321aab556112067", + url = "https://github.com/mcpplibs/imgui-m/archive/c753c95404f4e7c4b2bd80e5a8a349771bae0c01.tar.gz", + sha256 = "ed8755746e86601162834bae93148e2536089f11fa238ae6dde4250ba8a73db2", }, }, }, diff --git a/pkgs/mwrap/llamacpp.lua b/pkgs/mwrap/llamacpp.lua index 3ad6e65c..7c76764e 100644 --- a/pkgs/mwrap/llamacpp.lua +++ b/pkgs/mwrap/llamacpp.lua @@ -4,26 +4,26 @@ package = { namespace = "mcpplibs.mwrap", name = "llamacpp", description = "llama.cpp-m upstream-preserving C++23 module wrapper", - licenses = { "MIT" }, + licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/llama.cpp-m", type = "package", xpm = { linux = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/0d55de134c5c16bc31b5fb1e91c5946236b8b829.tar.gz", - sha256 = "7c91fbb6f260906ef4bb730cef7cfe1329842d9cd39dbbeeb29b1b9ac8adbff1", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/3a8ea85219463e1c02c6d1484d75e1edf27d574c.tar.gz", + sha256 = "1f1acaff030ffd1dc25b276dc5af0d38499ee4eea0107df5ae3600188eb4bf52", }, }, macosx = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/0d55de134c5c16bc31b5fb1e91c5946236b8b829.tar.gz", - sha256 = "7c91fbb6f260906ef4bb730cef7cfe1329842d9cd39dbbeeb29b1b9ac8adbff1", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/3a8ea85219463e1c02c6d1484d75e1edf27d574c.tar.gz", + sha256 = "1f1acaff030ffd1dc25b276dc5af0d38499ee4eea0107df5ae3600188eb4bf52", }, }, windows = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/0d55de134c5c16bc31b5fb1e91c5946236b8b829.tar.gz", - sha256 = "7c91fbb6f260906ef4bb730cef7cfe1329842d9cd39dbbeeb29b1b9ac8adbff1", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/3a8ea85219463e1c02c6d1484d75e1edf27d574c.tar.gz", + sha256 = "1f1acaff030ffd1dc25b276dc5af0d38499ee4eea0107df5ae3600188eb4bf52", }, }, }, diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua index f257a224..57fc5c10 100644 --- a/pkgs/mwrap/onnxruntime.lua +++ b/pkgs/mwrap/onnxruntime.lua @@ -4,26 +4,26 @@ package = { namespace = "mcpplibs.mwrap", name = "onnxruntime", description = "onnxruntime-m upstream-preserving C++23 module wrapper", - licenses = { "MIT" }, + licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/onnxruntime-m", type = "package", xpm = { linux = { - ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/45073fc979c8091f9d94988ea973e634fa5728ff.tar.gz", - sha256 = "29abd207e2072a460bc992a02f8433efcde0245486d92f6a9dca23008cc079d7", + ["1.25.1.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/c4516819f18ffc8f27e45c5516a661d03d9024a9.tar.gz", + sha256 = "a253358479741fe4aea12da7b783b70926b21b7e32dd4ab305a8237072ed5b02", }, }, macosx = { - ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/45073fc979c8091f9d94988ea973e634fa5728ff.tar.gz", - sha256 = "29abd207e2072a460bc992a02f8433efcde0245486d92f6a9dca23008cc079d7", + ["1.25.1.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/c4516819f18ffc8f27e45c5516a661d03d9024a9.tar.gz", + sha256 = "a253358479741fe4aea12da7b783b70926b21b7e32dd4ab305a8237072ed5b02", }, }, windows = { - ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/45073fc979c8091f9d94988ea973e634fa5728ff.tar.gz", - sha256 = "29abd207e2072a460bc992a02f8433efcde0245486d92f6a9dca23008cc079d7", + ["1.25.1.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/c4516819f18ffc8f27e45c5516a661d03d9024a9.tar.gz", + sha256 = "a253358479741fe4aea12da7b783b70926b21b7e32dd4ab305a8237072ed5b02", }, }, }, diff --git a/pkgs/mwrap/opencv.lua b/pkgs/mwrap/opencv.lua index 0eb3a7e5..9f9b974f 100644 --- a/pkgs/mwrap/opencv.lua +++ b/pkgs/mwrap/opencv.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/52d6e0490645653310bbb6980dce35d3b395e3bf.tar.gz", - sha256 = "6f7abaefed05b1971e17eebde938e784957efae1f68506a0afffaf6312a27dcb", + url = "https://github.com/mcpplibs/opencv-m/archive/671bb173f4163acad705e7760792a4ec80629e83.tar.gz", + sha256 = "bed373e7dca627ff584e544467c3bf4f2a9a48f36dea2c7471e2aec505f08fa7", }, }, macosx = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/52d6e0490645653310bbb6980dce35d3b395e3bf.tar.gz", - sha256 = "6f7abaefed05b1971e17eebde938e784957efae1f68506a0afffaf6312a27dcb", + url = "https://github.com/mcpplibs/opencv-m/archive/671bb173f4163acad705e7760792a4ec80629e83.tar.gz", + sha256 = "bed373e7dca627ff584e544467c3bf4f2a9a48f36dea2c7471e2aec505f08fa7", }, }, windows = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/52d6e0490645653310bbb6980dce35d3b395e3bf.tar.gz", - sha256 = "6f7abaefed05b1971e17eebde938e784957efae1f68506a0afffaf6312a27dcb", + url = "https://github.com/mcpplibs/opencv-m/archive/671bb173f4163acad705e7760792a4ec80629e83.tar.gz", + sha256 = "bed373e7dca627ff584e544467c3bf4f2a9a48f36dea2c7471e2aec505f08fa7", }, }, }, diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 88b6b9be..79ad3f6d 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -16,7 +16,7 @@ def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--mcpp", default="mcpp") parser.add_argument("--toolchain", default="llvm@23.1.3") - parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") + parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1.1") parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify declared notices") parser.add_argument("--run-arg", action="append", default=[]) parser.add_argument("--legacy-exact-key", action="store_true", diff --git a/tests/mwrap/godot-math/mcpp.toml b/tests/mwrap/godot-math/mcpp.toml index 4a899c80..c91292f5 100644 --- a/tests/mwrap/godot-math/mcpp.toml +++ b/tests/mwrap/godot-math/mcpp.toml @@ -8,4 +8,4 @@ description = "Run the immutable godot-cpp module wrapper without an engine" # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"mcpplibs.mwrap.godot_cpp" = "10.0.0-rc1" +"mcpplibs.mwrap.godot_cpp" = "10.0.0-rc1.1" diff --git a/tests/mwrap/onnxruntime-cpu/mcpp.toml b/tests/mwrap/onnxruntime-cpu/mcpp.toml index 925081f2..51d79f41 100644 --- a/tests/mwrap/onnxruntime-cpu/mcpp.toml +++ b/tests/mwrap/onnxruntime-cpu/mcpp.toml @@ -8,7 +8,7 @@ description = "Install the immutable mwrap archive and execute CPU inference" # An explicit empty table overrides the legacy workspace redirect. [dependencies."mcpplibs.mwrap"] -onnxruntime = "1.25.1" +onnxruntime = "1.25.1.1" [target.x86_64-linux-gnu] cxx_runtime = "toolchain-coupled" From 69a2a3a8aab6d9f1aa2f5af3d3b18b74067096ae Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 08:43:01 +0900 Subject: [PATCH 36/47] Pin upstream-byte-preserving wrapper archives for native CI --- .agents/docs/2026-10-25-unified-mwrap-execution.md | 8 ++++++++ docs/mwrap-licensing.md | 3 +++ docs/zh/mwrap-licensing.md | 3 +++ pkgs/g/grpc-plugin.lua | 12 ++++++------ pkgs/g/grpcgen.lua | 12 ++++++------ pkgs/mwrap/ffmpeg.lua | 12 ++++++------ pkgs/mwrap/godot_cpp.lua | 12 ++++++------ pkgs/mwrap/grpc.lua | 8 ++++---- pkgs/mwrap/imgui.lua | 12 ++++++------ pkgs/mwrap/llamacpp.lua | 12 ++++++------ pkgs/mwrap/onnxruntime.lua | 12 ++++++------ pkgs/mwrap/opencv.lua | 12 ++++++------ 12 files changed, 66 insertions(+), 52 deletions(-) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 8c719bfb..6695e080 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -133,3 +133,11 @@ Apache-2.0, mcpp-community authors/NOTICE, pinned upstream document hashes and explicit notice deployment. Negative local cases reject wrong wrapper license, missing attribution, changed upstream bytes and missing NOTICE deployment. Native CI and final archive/installed-consumer verification are still pending. + +Windows Godot CI exposed Git autoCRLF rewriting the pinned upstream README. +The guard correctly rejected its changed bytes. All seven repositories now +set upstream/** -text -whitespace: original bytes and original whitespace are +preserved, rather than normalizing or weakening the document hash check. +A local checkout-index test with core.autocrlf=true passes the release guard +for all seven repositories. Exact-head native CI is restarted for the corrected +commits; the earlier failed run is retained as failure evidence. diff --git a/docs/mwrap-licensing.md b/docs/mwrap-licensing.md index e024f070..5d93773f 100644 --- a/docs/mwrap-licensing.md +++ b/docs/mwrap-licensing.md @@ -29,3 +29,6 @@ thin `compat.*` consumers and repositories with vendored upstream sources. Root Apache-2.0 does not replace upstream licensing or claim upstream copyright. See the [Apache license application instructions](https://www.apache.org/licenses/LICENSE-2.0#apply). + +For byte-pinned upstream documents, disable Git newline conversion with +`upstream/** -text` in `.gitattributes`; verify checkout hashes on Windows too. diff --git a/docs/zh/mwrap-licensing.md b/docs/zh/mwrap-licensing.md index cd4cefe9..023c5fa7 100644 --- a/docs/zh/mwrap-licensing.md +++ b/docs/zh/mwrap-licensing.md @@ -19,3 +19,6 @@ 顶层 Apache-2.0 不替代上游许可,也不将上游版权归给封装作者。 参考 [Apache 官方应用说明](https://www.apache.org/licenses/LICENSE-2.0#apply)。 + +上游文档固定字节校验时,用 `.gitattributes` 的 `upstream/** -text` 禁用 Git 换行转换, +同时验证 Windows checkout 的文档 hash。 diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index 942a9d8b..d3b885ff 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -38,8 +38,8 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index b707a26d..79bfb645 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -38,8 +38,8 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, ["1.83.0"] = { url = { @@ -52,8 +52,8 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, ["1.83.0"] = { url = { @@ -66,8 +66,8 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, ["1.83.0"] = { url = { diff --git a/pkgs/mwrap/ffmpeg.lua b/pkgs/mwrap/ffmpeg.lua index cbb8f8a9..d264a158 100644 --- a/pkgs/mwrap/ffmpeg.lua +++ b/pkgs/mwrap/ffmpeg.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/86b39c591d2fc0904ecb3a21d8ffb3e93c460542.tar.gz", - sha256 = "72eaf1d94fba986477f25456dcddeeb1ef2863e4ba915af55ef8321ca30c40b7", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/0ec0231fa4276b109134136234ffc67169bca6ec.tar.gz", + sha256 = "25951bb282c1feaa0408b23c4d2b242f846dad0ee35978b18bcfd954a6fa9c23", }, }, macosx = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/86b39c591d2fc0904ecb3a21d8ffb3e93c460542.tar.gz", - sha256 = "72eaf1d94fba986477f25456dcddeeb1ef2863e4ba915af55ef8321ca30c40b7", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/0ec0231fa4276b109134136234ffc67169bca6ec.tar.gz", + sha256 = "25951bb282c1feaa0408b23c4d2b242f846dad0ee35978b18bcfd954a6fa9c23", }, }, windows = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/86b39c591d2fc0904ecb3a21d8ffb3e93c460542.tar.gz", - sha256 = "72eaf1d94fba986477f25456dcddeeb1ef2863e4ba915af55ef8321ca30c40b7", + url = "https://github.com/mcpplibs/ffmpeg-m/archive/0ec0231fa4276b109134136234ffc67169bca6ec.tar.gz", + sha256 = "25951bb282c1feaa0408b23c4d2b242f846dad0ee35978b18bcfd954a6fa9c23", }, }, }, diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua index 071d81bf..21929594 100644 --- a/pkgs/mwrap/godot_cpp.lua +++ b/pkgs/mwrap/godot_cpp.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/815cd7a3838ec3d0c49cb38f17e3d9ae6367eeec.tar.gz", - sha256 = "a47b4525c5cde4b779b035e8ec24f51cab662df8419ed303dc2d2e877d348ff7", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/87dd2d6208e818fdd3f951b512299cf4ea6b2169.tar.gz", + sha256 = "23bc6517ddaf51945000f2a29e378b259941c98f8a0878edec7fe793f36ced0e", }, }, macosx = { ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/815cd7a3838ec3d0c49cb38f17e3d9ae6367eeec.tar.gz", - sha256 = "a47b4525c5cde4b779b035e8ec24f51cab662df8419ed303dc2d2e877d348ff7", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/87dd2d6208e818fdd3f951b512299cf4ea6b2169.tar.gz", + sha256 = "23bc6517ddaf51945000f2a29e378b259941c98f8a0878edec7fe793f36ced0e", }, }, windows = { ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/815cd7a3838ec3d0c49cb38f17e3d9ae6367eeec.tar.gz", - sha256 = "a47b4525c5cde4b779b035e8ec24f51cab662df8419ed303dc2d2e877d348ff7", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/87dd2d6208e818fdd3f951b512299cf4ea6b2169.tar.gz", + sha256 = "23bc6517ddaf51945000f2a29e378b259941c98f8a0878edec7fe793f36ced0e", }, }, }, diff --git a/pkgs/mwrap/grpc.lua b/pkgs/mwrap/grpc.lua index a9973a9d..33c1c428 100644 --- a/pkgs/mwrap/grpc.lua +++ b/pkgs/mwrap/grpc.lua @@ -10,14 +10,14 @@ package = { xpm = { linux = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, }, macosx = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/ab7971acb2ab065352856fd04420c6deb45fad5a.tar.gz", - sha256 = "46269ec706f87fada3b435d68921296b63df136cae16c5ca79623238ecf6480f", + url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", + sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", }, }, }, diff --git a/pkgs/mwrap/imgui.lua b/pkgs/mwrap/imgui.lua index fa20855d..59a67f4e 100644 --- a/pkgs/mwrap/imgui.lua +++ b/pkgs/mwrap/imgui.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/c753c95404f4e7c4b2bd80e5a8a349771bae0c01.tar.gz", - sha256 = "ed8755746e86601162834bae93148e2536089f11fa238ae6dde4250ba8a73db2", + url = "https://github.com/mcpplibs/imgui-m/archive/eeaa5164ecd801f316c8097ae8e43b03ae457550.tar.gz", + sha256 = "ccc22557b3d9e9ecae56a17d1ec3d7ef362ae7fcb429a2ec3a91f16f75e7d1a4", }, }, macosx = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/c753c95404f4e7c4b2bd80e5a8a349771bae0c01.tar.gz", - sha256 = "ed8755746e86601162834bae93148e2536089f11fa238ae6dde4250ba8a73db2", + url = "https://github.com/mcpplibs/imgui-m/archive/eeaa5164ecd801f316c8097ae8e43b03ae457550.tar.gz", + sha256 = "ccc22557b3d9e9ecae56a17d1ec3d7ef362ae7fcb429a2ec3a91f16f75e7d1a4", }, }, windows = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/c753c95404f4e7c4b2bd80e5a8a349771bae0c01.tar.gz", - sha256 = "ed8755746e86601162834bae93148e2536089f11fa238ae6dde4250ba8a73db2", + url = "https://github.com/mcpplibs/imgui-m/archive/eeaa5164ecd801f316c8097ae8e43b03ae457550.tar.gz", + sha256 = "ccc22557b3d9e9ecae56a17d1ec3d7ef362ae7fcb429a2ec3a91f16f75e7d1a4", }, }, }, diff --git a/pkgs/mwrap/llamacpp.lua b/pkgs/mwrap/llamacpp.lua index 7c76764e..58b8332c 100644 --- a/pkgs/mwrap/llamacpp.lua +++ b/pkgs/mwrap/llamacpp.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/3a8ea85219463e1c02c6d1484d75e1edf27d574c.tar.gz", - sha256 = "1f1acaff030ffd1dc25b276dc5af0d38499ee4eea0107df5ae3600188eb4bf52", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/70f3735b450b16a079c4eb0123184cfe5fd88185.tar.gz", + sha256 = "1aa091ee6b84029d2b28a76737a0771182441d9afc665295b6780d1ae99dc499", }, }, macosx = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/3a8ea85219463e1c02c6d1484d75e1edf27d574c.tar.gz", - sha256 = "1f1acaff030ffd1dc25b276dc5af0d38499ee4eea0107df5ae3600188eb4bf52", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/70f3735b450b16a079c4eb0123184cfe5fd88185.tar.gz", + sha256 = "1aa091ee6b84029d2b28a76737a0771182441d9afc665295b6780d1ae99dc499", }, }, windows = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/3a8ea85219463e1c02c6d1484d75e1edf27d574c.tar.gz", - sha256 = "1f1acaff030ffd1dc25b276dc5af0d38499ee4eea0107df5ae3600188eb4bf52", + url = "https://github.com/mcpplibs/llama.cpp-m/archive/70f3735b450b16a079c4eb0123184cfe5fd88185.tar.gz", + sha256 = "1aa091ee6b84029d2b28a76737a0771182441d9afc665295b6780d1ae99dc499", }, }, }, diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua index 57fc5c10..a468f0b6 100644 --- a/pkgs/mwrap/onnxruntime.lua +++ b/pkgs/mwrap/onnxruntime.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["1.25.1.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/c4516819f18ffc8f27e45c5516a661d03d9024a9.tar.gz", - sha256 = "a253358479741fe4aea12da7b783b70926b21b7e32dd4ab305a8237072ed5b02", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/8ae5e786b707f445299c13b3b8ecdfcf33938ff3.tar.gz", + sha256 = "fdeb077ebb08c8d7ddc2bff8784b2529071b8128f7f1c6b12ae8a6de6a8f2a3a", }, }, macosx = { ["1.25.1.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/c4516819f18ffc8f27e45c5516a661d03d9024a9.tar.gz", - sha256 = "a253358479741fe4aea12da7b783b70926b21b7e32dd4ab305a8237072ed5b02", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/8ae5e786b707f445299c13b3b8ecdfcf33938ff3.tar.gz", + sha256 = "fdeb077ebb08c8d7ddc2bff8784b2529071b8128f7f1c6b12ae8a6de6a8f2a3a", }, }, windows = { ["1.25.1.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/c4516819f18ffc8f27e45c5516a661d03d9024a9.tar.gz", - sha256 = "a253358479741fe4aea12da7b783b70926b21b7e32dd4ab305a8237072ed5b02", + url = "https://github.com/mcpplibs/onnxruntime-m/archive/8ae5e786b707f445299c13b3b8ecdfcf33938ff3.tar.gz", + sha256 = "fdeb077ebb08c8d7ddc2bff8784b2529071b8128f7f1c6b12ae8a6de6a8f2a3a", }, }, }, diff --git a/pkgs/mwrap/opencv.lua b/pkgs/mwrap/opencv.lua index 9f9b974f..9fb07cbc 100644 --- a/pkgs/mwrap/opencv.lua +++ b/pkgs/mwrap/opencv.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/671bb173f4163acad705e7760792a4ec80629e83.tar.gz", - sha256 = "bed373e7dca627ff584e544467c3bf4f2a9a48f36dea2c7471e2aec505f08fa7", + url = "https://github.com/mcpplibs/opencv-m/archive/726f016e6616546108bea831387cda50ebac1667.tar.gz", + sha256 = "2cb4d5820d20f3ddf8233d95303a032d3b440231f78f9ce0856d1805dfc6993b", }, }, macosx = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/671bb173f4163acad705e7760792a4ec80629e83.tar.gz", - sha256 = "bed373e7dca627ff584e544467c3bf4f2a9a48f36dea2c7471e2aec505f08fa7", + url = "https://github.com/mcpplibs/opencv-m/archive/726f016e6616546108bea831387cda50ebac1667.tar.gz", + sha256 = "2cb4d5820d20f3ddf8233d95303a032d3b440231f78f9ce0856d1805dfc6993b", }, }, windows = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/671bb173f4163acad705e7760792a4ec80629e83.tar.gz", - sha256 = "bed373e7dca627ff584e544467c3bf4f2a9a48f36dea2c7471e2aec505f08fa7", + url = "https://github.com/mcpplibs/opencv-m/archive/726f016e6616546108bea831387cda50ebac1667.tar.gz", + sha256 = "2cb4d5820d20f3ddf8233d95303a032d3b440231f78f9ce0856d1805dfc6993b", }, }, }, From a78d6c0644d4893ab165e860de19d5540ae8294b Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 08:52:03 +0900 Subject: [PATCH 37/47] Resolve mwrap consumers in candidate platform selection --- .../2026-10-25-unified-mwrap-execution.md | 17 ++++++++++++ tests/autoupdate/ci.py | 27 +++++++++++++++---- tests/autoupdate/test_ci.py | 27 +++++++++++++++++++ 3 files changed, 66 insertions(+), 5 deletions(-) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 6695e080..72d17a82 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -141,3 +141,20 @@ preserved, rather than normalizing or weakening the document hash check. A local checkout-index test with core.autocrlf=true passes the release guard for all seven repositories. Exact-head native CI is restarted for the corrected commits; the earlier failed run is retained as failure evidence. + +All five old/new same-upstream-version cache pairs now pass four alternating +builds/runs with namespace/version lock checks: FFmpeg, OpenCV, ImGui, llama.cpp +(GCC16) and gRPC. The gRPC cold-home retry provisions regular managed tool +payloads instead of borrowing symlinks for tools whose installers record state. +Evidence: /tmp/mwrap-grpc-cache-isolation-cold-tools.log and +/tmp/mwrap-more-cache-isolation-results.json. + +Index CI at 69a2a3a exposed an integration failure with newly advanced main +0292416: member_platforms still read only tests/examples, although direct_member +selected tests/mwrap/grpc-tools. Main was merged without dropping its new +OpenKAL entries or platform rules. Platform selection and preparation now share +a manifest lookup over both consumer directories; fully qualified runtime and +host-tool dependencies are recognized. Nineteen updater regression tests pass; +the actual corrected plan retains all eight gRPC host-tool build/run jobs, +including Linux default/LLVM, Windows and macOS, rather than silently skipping +them. Earlier failed CI is not counted as a pass. diff --git a/tests/autoupdate/ci.py b/tests/autoupdate/ci.py index 9f17703e..1db52c33 100644 --- a/tests/autoupdate/ci.py +++ b/tests/autoupdate/ci.py @@ -139,6 +139,22 @@ def dependency_tables(table): return min(candidates, key=lambda value: (value[0] != "mwrap", len(value[1]), value[1]))[1] +def member_manifest(member: str) -> Path: + for category in ("mwrap", "examples"): + path = ROOT / "tests" / category / member / "mcpp.toml" + if path.is_file(): + return path + raise FileNotFoundError(f"consumer manifest not found: {member}") + + +def names_dependency(deps: dict, namespace: str, name: str) -> bool: + nested = deps + for part in namespace.split("."): + nested = nested.get(part, {}) if isinstance(nested, dict) else {} + return (f"{namespace}.{name}" in deps + or name in deps.get(namespace, {}) or name in nested) + + # The runner platforms, by the spelling a member's `cfg(os = ...)` uses. _CFG_PLATFORMS = {"linux": "linux", "macos": "macosx", "windows": "windows"} @@ -157,12 +173,14 @@ def member_platforms(member: str, identity: str) -> set[str]: repository on that target. """ namespace, name = identity.split(":", 1) - manifest = tomllib.loads((ROOT / "tests/examples" / member / "mcpp.toml").read_text(encoding="utf-8")) + manifest = tomllib.loads(member_manifest(member).read_text(encoding="utf-8")) platforms: set[str] = set() - if name in manifest.get("dependencies", {}).get(namespace, {}): + if any(names_dependency(manifest.get(key, {}), namespace, name) + for key in ("dependencies", "build-dependencies")): platforms |= set(_CFG_PLATFORMS.values()) for condition, table in manifest.get("target", {}).items(): - if name not in table.get("dependencies", {}).get(namespace, {}): + if not any(names_dependency(table.get(key, {}), namespace, name) + for key in ("dependencies", "build-dependencies")): continue spelled = re.fullmatch(r'cfg\(\s*(?:os\s*=\s*"(\w+)"|(windows))\s*\)', condition.strip()) if spelled: @@ -235,8 +253,7 @@ def prepare(plan: Path, identity: str, output: Path, home: Path | None = None): member = direct_member(identity) output.mkdir(parents=True, exist_ok=True) if member: - paths = [ROOT / "tests" / category / member for category in ("mwrap", "examples")] - source = next(path for path in paths if (path / "mcpp.toml").is_file()) + source = member_manifest(member).parent shutil.copytree(source, output, dirs_exist_ok=True, ignore=shutil.ignore_patterns("target", ".mcpp", "mcpp.lock")) text = (output / "mcpp.toml").read_text(encoding="utf-8") diff --git a/tests/autoupdate/test_ci.py b/tests/autoupdate/test_ci.py index a4b9b90c..bb3cdcac 100644 --- a/tests/autoupdate/test_ci.py +++ b/tests/autoupdate/test_ci.py @@ -225,6 +225,33 @@ def member(self, root, text): member.mkdir(parents=True) (member / "mcpp.toml").write_text(text, encoding="utf-8") + def test_mwrap_host_tools_keep_all_native_candidate_jobs(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + member = root / "tests/mwrap/grpc-tools" + member.mkdir(parents=True) + (member / "mcpp.toml").write_text( + '[package]\nname="grpc-tools"\nversion="1.83.0.1"\n' + '[dependencies]\n"grpc.grpc-plugin"={version="1.83.0.1",tools=["grpc_cpp_plugin"]}\n' + '[build-dependencies]\n"mcpplibs.grpcgen"={version="1.83.0.1",host-module=true}\n') + plan = root / "plan.json" + plan.write_text(json.dumps({"packages": [ + {"id": identity, "candidate": "1.83.0.1", "status": "existing-candidate", + "assets": [{"platform": platform} for platform in ("linux", "macosx", "windows")]} + for identity in ("grpc:grpc-plugin", "mcpplibs:grpcgen")]})) + output = root / "matrix.json" + with patch.object(ci, "ROOT", root): + for identity in ("grpc:grpc-plugin", "mcpplibs:grpcgen"): + self.assertEqual(ci.member_platforms("grpc-tools", identity), + {"linux", "macosx", "windows"}) + ci.matrix(plan, output, None) + jobs = json.loads(output.read_text())["include"] + self.assertEqual(len(jobs), 8) + self.assertEqual({job["member"] for job in jobs}, {"grpc-tools"}) + for identity in ("grpc:grpc-plugin", "mcpplibs:grpcgen"): + self.assertEqual(sorted(job["platform"] for job in jobs if job["id"] == identity), + ["linux", "linux", "macosx", "windows"]) + def test_conditions_select_runners(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) From cc36729507bf6066f7f3e765a949529870ae65ff Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 09:24:19 +0900 Subject: [PATCH 38/47] Align first releases with upstream and add godot-cpp 10.0.0 stable --- ...unified-identity-and-first-release-plan.md | 18 +++++++ .../2026-10-25-unified-mwrap-execution.md | 49 +++++++++++++++++++ .../skills/add-mcpp-index-package/SKILL.md | 4 ++ .github/workflows/validate.yml | 2 +- docs/mwrap-licensing.md | 6 +++ docs/mwrap.md | 6 +++ docs/zh/mwrap-licensing.md | 4 ++ docs/zh/mwrap.md | 4 ++ mcpp.toml | 1 + pkgs/c/compat.godot-cpp.lua | 24 +++++++++ pkgs/mwrap/godot_cpp.lua | 18 +++---- pkgs/mwrap/onnxruntime.lua | 18 +++---- pkgs/mwrap/opencv.lua | 12 ++--- tests/member-timings.tsv | 4 ++ tests/mwrap/check_installed_template.py | 20 +++++++- tests/mwrap/godot-math/mcpp.toml | 4 +- tests/mwrap/godot-sdk/mcpp.toml | 6 +++ tests/mwrap/godot-sdk/tests/math.cpp | 5 ++ tests/mwrap/onnxruntime-cpu/mcpp.toml | 2 +- 19 files changed, 177 insertions(+), 30 deletions(-) create mode 100644 tests/mwrap/godot-sdk/mcpp.toml create mode 100644 tests/mwrap/godot-sdk/tests/math.cpp diff --git a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md index b41a03ca..03d726b0 100644 --- a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md +++ b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md @@ -396,3 +396,21 @@ FFmpeg 8.1.2、gRPC 1.83.0、ImGui 1.92.8、Godot 10.0.0-rc1.1。 ORT 已发布的 1.25.1 和 Godot 已创建的 10.0.0-rc1 tag 保留,故两者追加单个尾号; 这不修改上游版本,也不覆盖旧资源。五个已经合入的身份 PR 另建一次许可修正 PR, 其余两个继续原 PR,均重新执行当前提交的检查。 + +### 12.4 用户最终确认:首发覆盖,不加尾号 + +用户明确指令:“不用追加小版本 覆盖就可以了 和 上游对齐 版本”。 +本轮七库全部使用上游原始版本,ORT 1.25.1、Godot 10.0.0-rc1;取消此前 +1.25.1.1 / 10.0.0-rc1.1 发布目标。已存在的本轮错误首发 tag/release/镜像 +在更正提交通过 CI、自我复核后按该授权覆盖,更新所有 URL/hash 并重新真实安装验证。 +此前关于本轮必须保留错误首发并加尾号的实施决定已被本条替代;不动无关历史旧身份。 + +### 12.5 Godot 稳定版更新 + +用户指定采用 godot-cpp 正式稳定 tag `10.0.0-stable`,包/封装版本统一 `10.0.0`, +替代本轮 RC 首发目标。固定上游 commit `507ed9d840c01a3c5b2a39af8bb4000bfac30bf5`。 +该 tag 提供多套引擎 API;本轮采用上游默认 Godot 4.7 API、64-bit/single precision, +明确区分绑定库版本与引擎版本,不将 standalone math/扩展构建当成引擎加载认证。 +供应包只增加上游 binding_generator.py 的 gen/ 输出,原始上游文件保持字节一致; +两次生成 hash 一致,GLOBAL/CN 公共下载已核对。稳定版已将两个 hash 函数移到 +上游实现文件,删除本封装过时的 hashfuncs shim,重新生成完整模块并做原生验证。 diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 72d17a82..aa6c2ae3 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -158,3 +158,52 @@ host-tool dependencies are recognized. Nineteen updater regression tests pass; the actual corrected plan retains all eight gRPC host-tool build/run jobs, including Linux default/LLVM, Windows and macOS, rather than silently skipping them. Earlier failed CI is not counted as a pass. + +## Final user version instruction + +The user explicitly authorized overwriting problematic initial releases instead +of adding wrapper suffixes: all seven target versions equal upstream exactly. +ORT returns to 1.25.1 and Godot returns to 10.0.0-rc1. Earlier suffix decisions +above are historical and superseded. Publication automation is stopped until +corrected-commit gates and controlled replacement preflight are ready. Existing +first-release metadata/assets are recorded before replacement for traceability. + +License deployment review also identified that the ORT SDK provider and wrapper +both targeted licenses/onnxruntime/LICENSE with different licenses. Wrapper +Apache-2.0 and NOTICE are moved into licenses/onnxruntime/wrapper; SDK MIT LICENSE +and ThirdPartyNotices retain their own destination. The release guard and actual +relocation acceptance verify these separate ownership paths. + +## Godot stable upgrade requested by user + +Switch the wrapper/provider target to 10.0.0 from upstream 10.0.0-stable, commit +507ed9d840c01a3c5b2a39af8bb4000bfac30bf5. Follow its declared default Godot 4.7 +API (64-bit, single precision). Two independent upstream-only repacks match +SHA256 66aaafb642e7a390482dc381818640b1d0e583da2ef0cc9709214bcd13b68264. +Both public GLOBAL and CN SDK downloads match those bytes. Preserve the older +compat versions, add 10.0.0 and a real header consumer, regenerate the wrapper +from stable headers, and remove the obsolete linkage shim now fixed upstream. +Legacy shim regeneration remains byte-identical; current stable compilation +and new native CI remain required, not inferred from the old RC checks. + +Stable Godot local acceptance now passes: GCC16 and LLVM23 each run all three +module/math/macro programs; a standalone original-header consumer passes; the +summator shared GDExtension builds against the matching Godot 4.7 API. Source +tests additionally instantiate the exported attributed template types via +sizeof, and call the upstream out-of-line float/double hashes. The generated +module reproduces exactly from the stable provider. Evidence: +/tmp/mwrap-godot-stable-local-verified.log, +/tmp/mwrap-godot-stable-local-results.json, /tmp/mwrap-godot-stable-sdk.json. + +Initial private-home failures involved incomplete borrowed compiler sysroots, +not SDK build failures; complete managed Linux headers resolved them. The real +GCC compile then exposed new diagnostic/attribute macros being mistaken for +namespace declarations; parser regression and actual exported-type consumers +now pass. Source/archive pins use the corrected committed heads, and source +native CI is not substituted by old RC results. + +ORT first-release overwrite acceptance has an actual previous 1.25.1 installed +in /tmp/mwrap-ort-overwrite-cache-check/home, with the original MIT root license +and old source digest. After the authorized replacement, the same home will +refresh and consume the corrected same-version source, checking its new license +and actual inference. No wrapper version suffix is introduced. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 846baecd..4287a906 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -198,3 +198,7 @@ README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting st 归属标签 mcpp-community;顶层 LICENSE/NOTICE、README badge、manifest 和新 wrapper 描述符保持一致。 上游 README/许可证保留在 upstream//,保留原字节和版权;不改写 compat provider 的原许可证。 发布和部署必须携带适用通知;已发布更正追加修订尾号,不覆盖旧 tag、资源或 hash。 + +首次发布收敛时,已有用户明确授权覆盖问题候选的,按上游原始版本替换候选发布, +同步 tag、资产、镜像与 hash 并重验,不能再次以默认不可变策略要求加尾号或重复请求授权。 +这不隐含对其他已发布历史资源的覆盖权限。 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 9f76a9bc..adfb68db 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1560,7 +1560,7 @@ jobs: - name: Installed Godot wrapper archive and actual standalone math template if: contains(format(' {0} ', env.MEMBERS), ' godot-math ') && matrix.toolchain == 'default' shell: bash - run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.godot_cpp@10.0.0-rc1.1 + run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.godot_cpp@10.0.0 - name: Report temporarily untestable consumers of the unavailable MySQL source shell: bash diff --git a/docs/mwrap-licensing.md b/docs/mwrap-licensing.md index 5d93773f..4ac124e1 100644 --- a/docs/mwrap-licensing.md +++ b/docs/mwrap-licensing.md @@ -32,3 +32,9 @@ See the [Apache license application instructions](https://www.apache.org/license For byte-pinned upstream documents, disable Git newline conversion with `upstream/** -text` in `.gitattributes`; verify checkout hashes on Windows too. + +For this initial mwrap publication, the user explicitly authorized replacing +the problematic first-release tags/assets instead of adding wrapper revisions. +All seven package versions therefore equal upstream versions. Replacement is +performed only after the corrected commit passes its gates; all download +regions, checksums and installed-consumer checks must be synchronized. diff --git a/docs/mwrap.md b/docs/mwrap.md index 10e2bc8c..ae0d16dd 100644 --- a/docs/mwrap.md +++ b/docs/mwrap.md @@ -219,3 +219,9 @@ README navigation uses `[Upstream](upstream-url)`. Modules precedes Getting star All mwrap / xxx-m repositories follow the [licensing policy](mwrap-licensing.md): Apache-2.0 for wrapper contributions, mcpp-community attribution, original upstream README/licenses retained under upstream/, and immutable release corrections. + +Initial-publication exception: when the user explicitly authorizes replacing a +problematic first release before index publication, retain the exact upstream +version and synchronize the replacement tag, source assets, mirrors and hashes. +This execution has that authorization for its first mwrap releases; no revision +suffix is added. Re-run current-commit CI and actual installed consumption. diff --git a/docs/zh/mwrap-licensing.md b/docs/zh/mwrap-licensing.md index 023c5fa7..7d751638 100644 --- a/docs/zh/mwrap-licensing.md +++ b/docs/zh/mwrap-licensing.md @@ -22,3 +22,7 @@ 上游文档固定字节校验时,用 `.gitattributes` 的 `upstream/** -text` 禁用 Git 换行转换, 同时验证 Windows checkout 的文档 hash。 + +本轮首次发布中,用户已明确授权覆盖有问题的首发 tag/资产,不追加修订尾号, +七库版本均直接等于上游版本。更正提交通过门槛后再替换,同步全部下载区域、 +校验值和真实安装验收;不沿用旧版本已验证的结论。 diff --git a/docs/zh/mwrap.md b/docs/zh/mwrap.md index baf0f68d..19c75a1a 100644 --- a/docs/zh/mwrap.md +++ b/docs/zh/mwrap.md @@ -161,3 +161,7 @@ README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting st 所有 mwrap / xxx-m 仓库遵守[许可规范](mwrap-licensing.md):封装层默认 Apache-2.0, 归属标识 mcpp-community,上游 README/许可证原样保留在 upstream/,已发布更正采用修订版。 + +首次发布收敛例外:用户已明确授权覆盖尚未进入正式索引的问题首发时,保持上游原始版本, +同步替换 tag、源码资产、镜像和 hash,重新通过当前提交 CI 与真实安装验收。 +本轮七库已获此授权,不追加封装修订尾号。 diff --git a/mcpp.toml b/mcpp.toml index b9012c58..47b5fa63 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -19,6 +19,7 @@ members = [ "tests/mwrap/grpc-cpu", "tests/mwrap/grpc-tools", "tests/mwrap/godot-math", + "tests/mwrap/godot-sdk", "tests/mwrap/onnxruntime-sdk", "tests/examples/abseil", "tests/examples/archive", diff --git a/pkgs/c/compat.godot-cpp.lua b/pkgs/c/compat.godot-cpp.lua index c9d75535..5af246b9 100644 --- a/pkgs/c/compat.godot-cpp.lua +++ b/pkgs/c/compat.godot-cpp.lua @@ -72,6 +72,14 @@ package = { -- gdextension_interface.h ABI). xpm = { linux = { + -- Upstream 10.0.0-stable; default Godot 4.7 API, 64-bit/single precision. + ["10.0.0"] = { + url = { + GLOBAL = "https://github.com/xlings-res/godot-cpp/releases/download/10.0.0/godot-cpp-10.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/10.0.0/godot-cpp-10.0.0.tar.gz", + }, + sha256 = "66aaafb642e7a390482dc381818640b1d0e583da2ef0cc9709214bcd13b68264", + }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/xlings-res/godot-cpp/releases/download/10.0.0-rc1/godot-cpp-10.0.0-rc1.tar.gz", @@ -88,6 +96,14 @@ package = { }, }, macosx = { + -- Upstream 10.0.0-stable; default Godot 4.7 API, 64-bit/single precision. + ["10.0.0"] = { + url = { + GLOBAL = "https://github.com/xlings-res/godot-cpp/releases/download/10.0.0/godot-cpp-10.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/10.0.0/godot-cpp-10.0.0.tar.gz", + }, + sha256 = "66aaafb642e7a390482dc381818640b1d0e583da2ef0cc9709214bcd13b68264", + }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/xlings-res/godot-cpp/releases/download/10.0.0-rc1/godot-cpp-10.0.0-rc1.tar.gz", @@ -104,6 +120,14 @@ package = { }, }, windows = { + -- Upstream 10.0.0-stable; default Godot 4.7 API, 64-bit/single precision. + ["10.0.0"] = { + url = { + GLOBAL = "https://github.com/xlings-res/godot-cpp/releases/download/10.0.0/godot-cpp-10.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/10.0.0/godot-cpp-10.0.0.tar.gz", + }, + sha256 = "66aaafb642e7a390482dc381818640b1d0e583da2ef0cc9709214bcd13b68264", + }, ["10.0.0-rc1"] = { url = { GLOBAL = "https://github.com/xlings-res/godot-cpp/releases/download/10.0.0-rc1/godot-cpp-10.0.0-rc1.tar.gz", diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua index 21929594..d24df23a 100644 --- a/pkgs/mwrap/godot_cpp.lua +++ b/pkgs/mwrap/godot_cpp.lua @@ -9,21 +9,21 @@ package = { type = "package", xpm = { linux = { - ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/87dd2d6208e818fdd3f951b512299cf4ea6b2169.tar.gz", - sha256 = "23bc6517ddaf51945000f2a29e378b259941c98f8a0878edec7fe793f36ced0e", + ["10.0.0"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/abda8c93a766023ffdcf2f29b2200898de798657.tar.gz", + sha256 = "00a9a6540960f57d06f7ff26a8d62ea627cd8519235cf8c738cfea8616ba4915", }, }, macosx = { - ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/87dd2d6208e818fdd3f951b512299cf4ea6b2169.tar.gz", - sha256 = "23bc6517ddaf51945000f2a29e378b259941c98f8a0878edec7fe793f36ced0e", + ["10.0.0"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/abda8c93a766023ffdcf2f29b2200898de798657.tar.gz", + sha256 = "00a9a6540960f57d06f7ff26a8d62ea627cd8519235cf8c738cfea8616ba4915", }, }, windows = { - ["10.0.0-rc1.1"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/87dd2d6208e818fdd3f951b512299cf4ea6b2169.tar.gz", - sha256 = "23bc6517ddaf51945000f2a29e378b259941c98f8a0878edec7fe793f36ced0e", + ["10.0.0"] = { + url = "https://github.com/mcpplibs/godot-cpp-m/archive/abda8c93a766023ffdcf2f29b2200898de798657.tar.gz", + sha256 = "00a9a6540960f57d06f7ff26a8d62ea627cd8519235cf8c738cfea8616ba4915", }, }, }, diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua index a468f0b6..c308453c 100644 --- a/pkgs/mwrap/onnxruntime.lua +++ b/pkgs/mwrap/onnxruntime.lua @@ -9,21 +9,21 @@ package = { type = "package", xpm = { linux = { - ["1.25.1.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/8ae5e786b707f445299c13b3b8ecdfcf33938ff3.tar.gz", - sha256 = "fdeb077ebb08c8d7ddc2bff8784b2529071b8128f7f1c6b12ae8a6de6a8f2a3a", + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", }, }, macosx = { - ["1.25.1.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/8ae5e786b707f445299c13b3b8ecdfcf33938ff3.tar.gz", - sha256 = "fdeb077ebb08c8d7ddc2bff8784b2529071b8128f7f1c6b12ae8a6de6a8f2a3a", + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", }, }, windows = { - ["1.25.1.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/8ae5e786b707f445299c13b3b8ecdfcf33938ff3.tar.gz", - sha256 = "fdeb077ebb08c8d7ddc2bff8784b2529071b8128f7f1c6b12ae8a6de6a8f2a3a", + ["1.25.1"] = { + url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", }, }, }, diff --git a/pkgs/mwrap/opencv.lua b/pkgs/mwrap/opencv.lua index 9fb07cbc..7e59c3e8 100644 --- a/pkgs/mwrap/opencv.lua +++ b/pkgs/mwrap/opencv.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/726f016e6616546108bea831387cda50ebac1667.tar.gz", - sha256 = "2cb4d5820d20f3ddf8233d95303a032d3b440231f78f9ce0856d1805dfc6993b", + url = "https://github.com/mcpplibs/opencv-m/archive/867b319cbd3b7417f1472bdf0788d9901e0e4f5c.tar.gz", + sha256 = "8b2c048703b91bcb8b98ffd6adf11508aa47add2a190774186d5cb5e28811d16", }, }, macosx = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/726f016e6616546108bea831387cda50ebac1667.tar.gz", - sha256 = "2cb4d5820d20f3ddf8233d95303a032d3b440231f78f9ce0856d1805dfc6993b", + url = "https://github.com/mcpplibs/opencv-m/archive/867b319cbd3b7417f1472bdf0788d9901e0e4f5c.tar.gz", + sha256 = "8b2c048703b91bcb8b98ffd6adf11508aa47add2a190774186d5cb5e28811d16", }, }, windows = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/726f016e6616546108bea831387cda50ebac1667.tar.gz", - sha256 = "2cb4d5820d20f3ddf8233d95303a032d3b440231f78f9ce0856d1805dfc6993b", + url = "https://github.com/mcpplibs/opencv-m/archive/867b319cbd3b7417f1472bdf0788d9901e0e4f5c.tar.gz", + sha256 = "8b2c048703b91bcb8b98ffd6adf11508aa47add2a190774186d5cb5e28811d16", }, }, }, diff --git a/tests/member-timings.tsv b/tests/member-timings.tsv index efe76ecb..86a48611 100644 --- a/tests/member-timings.tsv +++ b/tests/member-timings.tsv @@ -51,3 +51,7 @@ windows godot-math 1347 windows llamacpp-cpu 288 windows opencv-cpu 1101 windows opencv-webp 1104 + +linux godot-sdk 300 +macos godot-sdk 300 +windows godot-sdk 700 diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 79ad3f6d..9947753d 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -16,7 +16,7 @@ def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--mcpp", default="mcpp") parser.add_argument("--toolchain", default="llvm@23.1.3") - parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1.1") + parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify declared notices") parser.add_argument("--run-arg", action="append", default=[]) parser.add_argument("--legacy-exact-key", action="store_true", @@ -107,12 +107,28 @@ def main(): expected = hashlib.sha256(notices[0].read_bytes()).hexdigest() assert any(p.is_file() and hashlib.sha256(p.read_bytes()).hexdigest() == expected for p in installed), installed + sdk_license = notices[0].with_name("LICENSE") + assert sdk_license.is_file() and b"MIT License" in sdk_license.read_bytes(), sdk_license + assert any(p.with_name("LICENSE").is_file() and + p.with_name("LICENSE").read_bytes() == sdk_license.read_bytes() + for p in installed), "SDK MIT license changed or was overwritten" + commands = json.loads((project / "compile_commands.json").read_text(encoding="utf-8")) + wrapper = next(Path(item["file"]).parent.parent for item in commands + if Path(item["file"]).name == "onnxruntime.cppm") + declared = tomllib.loads((wrapper / "mcpp.toml").read_text(encoding="utf-8"))["runtime"]["deploy"] + for entry in declared: + source = wrapper / entry["from"] + destination = notices[0].parent / Path(entry["to"]).relative_to("licenses/onnxruntime") / source.name + assert destination.is_file() and destination.read_bytes() == source.read_bytes(), destination + assert b"Apache License" in (notices[0].parent / "wrapper/LICENSE").read_bytes() + assert b"mcpp-community" in (notices[0].parent / "wrapper/NOTICE").read_bytes() + print("Verified separate SDK MIT and wrapper Apache-2.0 licenses, NOTICE and retained upstream bytes", flush=True) elif identity == "mcpplibs.mwrap.opencv": commands = json.loads((project / "compile_commands.json").read_text(encoding="utf-8")) sources = [Path(item["file"]).parent.parent for item in commands if Path(item["file"]).name == "core.cppm"] source = next(path for path in sources if (path / "upstream/opencv/LICENSE").is_file()) - notices = [source / "LICENSE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", + notices = [source / "LICENSE", source / "NOTICE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", *[path for path in (source / "upstream/opencv").rglob("*") if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] roots = list(relocated.rglob("licenses/opencv")) diff --git a/tests/mwrap/godot-math/mcpp.toml b/tests/mwrap/godot-math/mcpp.toml index c91292f5..0b232536 100644 --- a/tests/mwrap/godot-math/mcpp.toml +++ b/tests/mwrap/godot-math/mcpp.toml @@ -1,6 +1,6 @@ [package] name = "godot-math" -version = "10.0.0-rc1" +version = "10.0.0" description = "Run the immutable godot-cpp module wrapper without an engine" [indices] @@ -8,4 +8,4 @@ description = "Run the immutable godot-cpp module wrapper without an engine" # An explicit empty table overrides the legacy workspace redirect. [dependencies] -"mcpplibs.mwrap.godot_cpp" = "10.0.0-rc1.1" +"mcpplibs.mwrap.godot_cpp" = "10.0.0" diff --git a/tests/mwrap/godot-sdk/mcpp.toml b/tests/mwrap/godot-sdk/mcpp.toml new file mode 100644 index 00000000..adc9cda7 --- /dev/null +++ b/tests/mwrap/godot-sdk/mcpp.toml @@ -0,0 +1,6 @@ +[package] +name="godot-sdk" +version="10.0.0" +[indices] +[dependencies.compat] +godot-cpp="10.0.0" diff --git a/tests/mwrap/godot-sdk/tests/math.cpp b/tests/mwrap/godot-sdk/tests/math.cpp new file mode 100644 index 00000000..7b524980 --- /dev/null +++ b/tests/mwrap/godot-sdk/tests/math.cpp @@ -0,0 +1,5 @@ +#include +#include +#include +static_assert(GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR == 7); +int main() { return godot::Vector2(3, 4).length() != 5 || godot::hash_murmur3_one_float(0.0f) != godot::hash_murmur3_one_float(-0.0f); } diff --git a/tests/mwrap/onnxruntime-cpu/mcpp.toml b/tests/mwrap/onnxruntime-cpu/mcpp.toml index 51d79f41..925081f2 100644 --- a/tests/mwrap/onnxruntime-cpu/mcpp.toml +++ b/tests/mwrap/onnxruntime-cpu/mcpp.toml @@ -8,7 +8,7 @@ description = "Install the immutable mwrap archive and execute CPU inference" # An explicit empty table overrides the legacy workspace redirect. [dependencies."mcpplibs.mwrap"] -onnxruntime = "1.25.1.1" +onnxruntime = "1.25.1" [target.x86_64-linux-gnu] cxx_runtime = "toolchain-coupled" From 83cf05b2b4b401ca07b353d49b1a26b0fd8b3324 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 09:58:43 +0900 Subject: [PATCH 39/47] Refresh overwritten ORT payloads without changing upstream versions --- ...unified-identity-and-first-release-plan.md | 15 +++++++-- .../2026-10-25-unified-mwrap-execution.md | 32 +++++++++++++++++++ pkgs/mwrap/godot_cpp.lua | 12 +++---- pkgs/mwrap/onnxruntime.lua | 6 ++++ 4 files changed, 56 insertions(+), 9 deletions(-) diff --git a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md index 03d726b0..64fb81b5 100644 --- a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md +++ b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md @@ -81,7 +81,7 @@ C++ 的 `import` 没有包选择器的省略规则,必须与实际 `export mod ## 3. 七库新身份与版本映射 -以下“当前版本”为现有未合入候选,不代表新 mwrap 已发布。上游版本依据当前源码 pin;本轮不顺带升级上游。 +以下“当前版本”为现有未合入候选,不代表新 mwrap 已发布。上游版本依据当前源码 pin;除用户指定 Godot 升级至 10.0.0-stable 外,本轮不顺带升级其他上游。 | 仓库 / 现有 PR | 当前候选身份与版本 | 新完整身份 | mwrap 首发版本 | 描述符文件名 | |---|---|---|---|---| @@ -91,12 +91,12 @@ C++ 的 `import` 没有包选择器的省略规则,必须与实际 `export mod | ffmpeg-m #8 | `ffmpeg.ffmpeg@8.1.2.1` | `mcpplibs.mwrap.ffmpeg` | `8.1.2` | `ffmpeg.lua` | | grpc-m #8 | `grpc.grpc@1.83.0.1` | `mcpplibs.mwrap.grpc` | `1.83.0` | `grpc.lua` | | imgui-m #13 | `ocornut.imgui@1.92.8.1` | `mcpplibs.mwrap.imgui` | `1.92.8` | `imgui.lua` | -| godot-cpp-m #1 | `godotengine.godot-cpp-m@10.0.0-rc1.1` | `mcpplibs.mwrap.godot_cpp` | `10.0.0-rc1` | `godot_cpp.lua` | +| godot-cpp-m #2 | `godotengine.godot-cpp-m@10.0.0-rc1.1`(既有基线) | `mcpplibs.mwrap.godot_cpp` | `10.0.0` | `godot_cpp.lua` | Godot short name 已确认为 `godot_cpp`:与原 module spelling 对应,适合直接作为 C++ 模块名的一段; 仓库仍为 `godot-cpp-m`,供应者仍为 `compat.godot-cpp`。该映射在正式规范中明确记录。 `llamacpp` 保留既有辨识名称,避免把 `llama.cpp` 的点误表达为额外 namespace。 -`b10069` 使用精确 pin,不承诺 semver 范围;Godot 仍为 prerelease,不标为稳定引擎兼容认证。 +`b10069` 使用精确 pin,不承诺 semver 范围;Godot 采用稳定 tag `10.0.0-stable`,包版本 `10.0.0`,固定上游默认 4.7 引擎 API;扩展构建不等于引擎加载认证。 首发后的封装修复才追加单个修订尾号,例如 `8.1.2.1`、`b10069.1`;上游升级后重新从对应原始版本开始。 新身份首发去尾号不表示可以将已经发布的同身份版本降级、覆盖或重用。 @@ -414,3 +414,12 @@ ORT 已发布的 1.25.1 和 Godot 已创建的 10.0.0-rc1 tag 保留,故两者 供应包只增加上游 binding_generator.py 的 gen/ 输出,原始上游文件保持字节一致; 两次生成 hash 一致,GLOBAL/CN 公共下载已核对。稳定版已将两个 hash 函数移到 上游实现文件,删除本封装过时的 hashfuncs shim,重新生成完整模块并做原生验证。 + +### 12.6 同版本覆盖后的缓存刷新 + +实际 warm-home 测试证实仅改 URL/hash 不会立即替换已安装的同版本源码。 +ORT 对外仍为 `1.25.1`,索引该版本使用 `revision = 1, floor = 1` 标识本次 +正确打包并刷新错误旧缓存;这不是 package version 尾号,不改变依赖命令或 tag。 +旧源码安装 → 同版本新资源 → 构建自动重新安装已在实际 mcpp 2026.10.24.1 +验证,原先的 MIT/Microsoft 顶层许可被更正为封装 Apache-2.0/mcpp-community, +原始上游许可仍保留,继续验证实际推理。mcpp 引擎源码保持只读。 diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index aa6c2ae3..d772e329 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -207,3 +207,35 @@ in /tmp/mwrap-ort-overwrite-cache-check/home, with the original MIT root license and old source digest. After the authorized replacement, the same home will refresh and consume the corrected same-version source, checking its new license and actual inference. No wrapper version suffix is introduced. + +The corrected ORT 1.25.1 commit has also passed real indexed-archive installation, +Identity CPU inference, self-contained pack and isolated relocation. Acceptance +checks both original SDK MIT/ThirdPartyNotices and distinct wrapper Apache-2.0, +mcpp-community NOTICE and retained upstream documents byte-for-byte. Evidence: +/tmp/mwrap-ort-upstream-aligned-deployment.log (exit 0). + +Godot native CI found an existing-home routing problem: copying a candidate +built-in index did not change xlings' previously published catalog routing. +The new SDK therefore appeared missing despite valid published source assets. +The source CI now explicitly routes compat through a test-only namespace view +of unchanged candidate descriptors for the root, extension and template. Final +installed-index tests still consume the original complete publication layout. +This changes no mcpp engine code or upstream implementation bytes. + +ORT authorized first-release replacement is now published and publicly fetched +on both forges at version 1.25.1. New archive SHA256 is +bec1f319d9869624b0efeb20c0376c1e429b07f6652f65536f17fca722458d6e. +The recorded old GitHub release/tag and GitCode attachment were replaced only +after corrected squash-commit CI and full archive checks. No version suffix. + +A real old-home test found that changing SHA alone leaves the installed source +usable. Packaging metadata revision=1/floor=1 makes the library build refresh +the actual old source; root Apache-2.0 and mcpp-community NOTICE were verified +after automatic download. Public identity, version and tag remain unchanged. +Evidence: /tmp/mwrap-ort-overwrite-cache-proof.json and +/tmp/mwrap-ort-overwrite-cache-configure.log; real inference follows. + +Godot 10.0.0 stable source PR #2 passed all three exact-head native jobs and +self-review and was squash merged as d7be0cd9dc8224ec8313e540b515a5aacfc1cf83. +Its new main CI remains a distinct release gate. ImGui 1.92.8 and FFmpeg 8.1.2 +formal GitHub/GitCode source assets are also publicly hash-verified. diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua index d24df23a..45f1825a 100644 --- a/pkgs/mwrap/godot_cpp.lua +++ b/pkgs/mwrap/godot_cpp.lua @@ -10,20 +10,20 @@ package = { xpm = { linux = { ["10.0.0"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/abda8c93a766023ffdcf2f29b2200898de798657.tar.gz", - sha256 = "00a9a6540960f57d06f7ff26a8d62ea627cd8519235cf8c738cfea8616ba4915", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/d06b8d1337b39af4130e0327972348d5eee53d37.tar.gz", + sha256 = "35027ce21d87e6c4e17e463163924b2046e3bae959c8f1bb3259d152147673e8", }, }, macosx = { ["10.0.0"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/abda8c93a766023ffdcf2f29b2200898de798657.tar.gz", - sha256 = "00a9a6540960f57d06f7ff26a8d62ea627cd8519235cf8c738cfea8616ba4915", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/d06b8d1337b39af4130e0327972348d5eee53d37.tar.gz", + sha256 = "35027ce21d87e6c4e17e463163924b2046e3bae959c8f1bb3259d152147673e8", }, }, windows = { ["10.0.0"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/abda8c93a766023ffdcf2f29b2200898de798657.tar.gz", - sha256 = "00a9a6540960f57d06f7ff26a8d62ea627cd8519235cf8c738cfea8616ba4915", + url = "https://github.com/mcpplibs/godot-cpp-m/archive/d06b8d1337b39af4130e0327972348d5eee53d37.tar.gz", + sha256 = "35027ce21d87e6c4e17e463163924b2046e3bae959c8f1bb3259d152147673e8", }, }, }, diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua index c308453c..79e1f49a 100644 --- a/pkgs/mwrap/onnxruntime.lua +++ b/pkgs/mwrap/onnxruntime.lua @@ -11,18 +11,24 @@ package = { linux = { ["1.25.1"] = { url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + revision = 1, + floor = 1, sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", }, }, macosx = { ["1.25.1"] = { url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + revision = 1, + floor = 1, sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", }, }, windows = { ["1.25.1"] = { url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + revision = 1, + floor = 1, sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", }, }, From e5d3e4e979111507c8db4644b83f776300af106c Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 10:19:35 +0900 Subject: [PATCH 40/47] docs(mwrap): align stable Godot plan and verify published consumers --- ...unified-identity-and-first-release-plan.md | 12 ++++----- .../2026-10-25-unified-mwrap-execution.md | 4 ++- .../skills/add-mcpp-index-package/SKILL.md | 3 +++ docs/mwrap-licensing.md | 5 ++++ docs/zh/mwrap-licensing.md | 4 +++ tests/mwrap/check_installed_template.py | 27 +++++++++++-------- 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md index 64fb81b5..50cdcbe8 100644 --- a/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md +++ b/.agents/docs/2026-10-25-mwrap-unified-identity-and-first-release-plan.md @@ -233,10 +233,10 @@ tests/ | Godot | `v10.0.0-rc1` | 有 | “新 mwrap 身份首次发版”不等于“Git 仓库没有历史版本”。已有 tag 的源码携带旧身份或旧接口,不能给新包复用这些归档。 -建议七库统一采用独立 tag 序列 `mwrap-${version}`:例如 `mwrap-8.1.2`、`mwrap-b10069`、`mwrap-10.0.0-rc1`。 -包 version 仍分别是 `8.1.2`、`b10069`、`10.0.0-rc1`;release title 使用 `mwrap.ffmpeg 8.1.2` 这类可辨认名称。 +建议七库统一采用独立 tag 序列 `mwrap-${version}`:例如 `mwrap-8.1.2`、`mwrap-b10069`、`mwrap-10.0.0`。 +包 version 仍分别是 `8.1.2`、`b10069`、`10.0.0`;release title 使用 `mwrap.ffmpeg 8.1.2` 这类可辨认名称。 tag 的 mwrap 前缀用于隔离同仓库历史,不是额外封装版本尾号。ORT 也采用同一规则,避免每库一套规则。 -未来修订 tag 为 `mwrap-8.1.2.1` 等,已发布 tag、release asset 与 SHA256 永久不变。 +后续需要封装修订时最多追加一个尾号,例如 `mwrap-8.1.2.1`。一般发布资源保持不可变;本轮用户明确授权的错误首发覆盖按 §12.4 和 §12.6 执行,不能据此覆盖其他历史资源。 updater 新 mwrap 配方只匹配新 tag 序列;旧配方不能把新 tag 当作旧 namespace 的后续版本自动提案。 不能仅依赖 GitHub 的 latest release:同仓库混有旧序列与 mwrap 序列,必须显式筛选 tag、去除准确的 mwrap 前缀后再核对 manifest/package version。 新增回归覆盖旧 tag 被新 updater 拒绝、新 tag 被旧 updater 忽略、`b10069` 精确版本及 Godot RC 的 prerelease 策略。 @@ -273,7 +273,7 @@ updater 新 mwrap 配方只匹配新 tag 序列;旧配方不能把新 tag 当 对已通过的 squash SHA 创建独立 mwrap tag;核查 tag 指向、manifest 首发版本、上游 pin、许可证与产物后发布。 从实际 tag/release 下载正式归档,计算 SHA256、核对源码与打包闭包;GitHub/GitCode 镜像地址只有实际上传并验证后才写入。 先建立可验证的发布物,再声称库已 release;不能只建空 release 或仍指向 PR commit。 -Godot RC release 标为 prerelease;llama 的非 semver tag 不因含字母就自动判为 prerelease。 +Godot `10.0.0-stable` 对应正式 release,不能继续标为 RC/prerelease;若未来发布实际 RC,才标为 prerelease。llama 的非 semver tag 不因含字母就自动判为 prerelease。 发布源归档/选中 notices,并按现有受支持平台规则提供所需运行资源,不把上游 SDK 大二进制直接提交 Git。 ### E. 最后统一更新并发布索引 @@ -384,7 +384,7 @@ Modules 位于 Getting started 前,核心模块按以下形式逐行列出, 只列实际存在的公共模块,使用完整前缀;有 feature 条件时明确说明。 中英规范、skill 和七库双语页采用相同顺序;单模块库可列根模块及宏映射入口。 -### 12.3 通用许可规范补充 +### 12.3 通用许可规范补充(版本处理已由 §12.4、§12.5 替代) 用户确认此规则适用于全部 mwrap / xxx-m:封装层默认 Apache-2.0,归属标识 `mcpp-community`;上游 README 与 LICENSE/COPYING、适用通知原样保留在 `upstream//`。 @@ -400,7 +400,7 @@ ORT 已发布的 1.25.1 和 Godot 已创建的 10.0.0-rc1 tag 保留,故两者 ### 12.4 用户最终确认:首发覆盖,不加尾号 用户明确指令:“不用追加小版本 覆盖就可以了 和 上游对齐 版本”。 -本轮七库全部使用上游原始版本,ORT 1.25.1、Godot 10.0.0-rc1;取消此前 +本轮七库全部使用上游原始版本,ORT 1.25.1;Godot 原 RC 目标随后由 §12.5 更新为稳定版 10.0.0。取消此前 1.25.1.1 / 10.0.0-rc1.1 发布目标。已存在的本轮错误首发 tag/release/镜像 在更正提交通过 CI、自我复核后按该授权覆盖,更新所有 URL/hash 并重新真实安装验证。 此前关于本轮必须保留错误首发并加尾号的实施决定已被本条替代;不动无关历史旧身份。 diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index d772e329..7f681df1 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -233,7 +233,9 @@ usable. Packaging metadata revision=1/floor=1 makes the library build refresh the actual old source; root Apache-2.0 and mcpp-community NOTICE were verified after automatic download. Public identity, version and tag remain unchanged. Evidence: /tmp/mwrap-ort-overwrite-cache-proof.json and -/tmp/mwrap-ort-overwrite-cache-configure.log; real inference follows. +/tmp/mwrap-ort-overwrite-cache-configure.log and +/tmp/mwrap-ort-overwrite-cache-inference.log; the strict build and Identity CPU +inference completed successfully with the refreshed source. Godot 10.0.0 stable source PR #2 passed all three exact-head native jobs and self-review and was squash merged as d7be0cd9dc8224ec8313e540b515a5aacfc1cf83. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 4287a906..53b07e4c 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -202,3 +202,6 @@ README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting st 首次发布收敛时,已有用户明确授权覆盖问题候选的,按上游原始版本替换候选发布, 同步 tag、资产、镜像与 hash 并重验,不能再次以默认不可变策略要求加尾号或重复请求授权。 这不隐含对其他已发布历史资源的覆盖权限。 + +同版本覆盖还需处理实际旧缓存:使用索引打包 revision/必要的 floor,并实测旧 home +自动换入新载荷和运行;不要用增加 package version 尾号替代用户明确要求的版本对齐。 diff --git a/docs/mwrap-licensing.md b/docs/mwrap-licensing.md index 4ac124e1..ad8c3870 100644 --- a/docs/mwrap-licensing.md +++ b/docs/mwrap-licensing.md @@ -38,3 +38,8 @@ the problematic first-release tags/assets instead of adding wrapper revisions. All seven package versions therefore equal upstream versions. Replacement is performed only after the corrected commit passes its gates; all download regions, checksums and installed-consumer checks must be synchronized. + +An authorized same-version replacement must also refresh incorrect installed +payloads. Use the index packaging `revision` (and `floor` when the old payload +is unusable); these are metadata integers, not package-version suffixes. Verify +a real old-home build refresh and runtime result before declaring migration complete. diff --git a/docs/zh/mwrap-licensing.md b/docs/zh/mwrap-licensing.md index 7d751638..b7d729ee 100644 --- a/docs/zh/mwrap-licensing.md +++ b/docs/zh/mwrap-licensing.md @@ -26,3 +26,7 @@ 本轮首次发布中,用户已明确授权覆盖有问题的首发 tag/资产,不追加修订尾号, 七库版本均直接等于上游版本。更正提交通过门槛后再替换,同步全部下载区域、 校验值和真实安装验收;不沿用旧版本已验证的结论。 + +授权同版本覆盖时,也要刷新错误的已安装载荷:使用索引内部 `revision`,必要时设置 +最低可用 `floor`。它们不进入 package version,不改变依赖命令和 tag;必须实测 +已有旧缓存的构建刷新及运行结果,不能仅凭新 hash 宣告迁移成功。 diff --git a/tests/mwrap/check_installed_template.py b/tests/mwrap/check_installed_template.py index 9947753d..3d1ef047 100644 --- a/tests/mwrap/check_installed_template.py +++ b/tests/mwrap/check_installed_template.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Install real archives from the unchanged candidate index and run a template.""" +"""Install real archives from the candidate or published index and run an unmodified template.""" import argparse import hashlib import json @@ -18,6 +18,8 @@ def main(): parser.add_argument("--toolchain", default="llvm@23.1.3") parser.add_argument("--package", default="mcpplibs.mwrap.onnxruntime@1.25.1") parser.add_argument("--deploy", action="store_true", help="pack, relocate and run the consumer; verify declared notices") + parser.add_argument("--published-index", action="store_true", help="refresh the real public index instead of staging this checkout") + parser.add_argument("--home", type=Path, help="reuse a dedicated test home across independent installed consumers") parser.add_argument("--run-arg", action="append", default=[]) parser.add_argument("--legacy-exact-key", action="store_true", help="allow only mcpp's nonnumeric exact-version diagnostic; fail other build warnings") @@ -26,17 +28,20 @@ def main(): identity, version = args.package.rsplit("@", 1) with tempfile.TemporaryDirectory(prefix="mwrap-installed-template-") as directory: temporary = Path(directory) - home = temporary / "home" - index = home / "indices/mcpplibs" - index.mkdir(parents=True) - # Exactly the publication layout, with all namespaces in one built-in - # index. No namespace views, source pre-seeding or dependency rewriting. - shutil.copytree(root / "pkgs", index / "pkgs") - shutil.copyfile(root / "index.toml", index / "index.toml") + home = args.home.resolve() if args.home else temporary / "home" + if not args.published_index: + index = home / "indices/mcpplibs" + index.mkdir(parents=True) + # Exactly the publication layout, with all namespaces in one built-in + # index. No namespace views, source pre-seeding or dependency rewriting. + shutil.copytree(root / "pkgs", index / "pkgs") + shutil.copyfile(root / "index.toml", index / "index.toml") env = dict(os.environ, MCPP_HOME=str(home)) - commands = [[args.mcpp, "self", "config", "--mirror", "GLOBAL"], - [args.mcpp, "new", "--list-templates", args.package], - [args.mcpp, "new", "installed-quickstart", "--template", args.package]] + commands = [[args.mcpp, "self", "config", "--mirror", "GLOBAL"]] + if args.published_index: + commands.append([args.mcpp, "index", "update"]) + commands += [[args.mcpp, "new", "--list-templates", args.package], + [args.mcpp, "new", "installed-quickstart", "--template", args.package]] for command in commands: print("+", " ".join(command), flush=True) subprocess.run(command, cwd=temporary, env=env, check=True) From dc93f6b8a6861f159fe3feae602c17819b6c918e Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 10:20:48 +0900 Subject: [PATCH 41/47] fix(index): audit snapshot URLs without converting numeric revision metadata --- tests/autoupdate/ci.py | 14 +++++++++----- tests/autoupdate/test_ci.py | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/autoupdate/ci.py b/tests/autoupdate/ci.py index 1db52c33..2ffb4e94 100644 --- a/tests/autoupdate/ci.py +++ b/tests/autoupdate/ci.py @@ -29,15 +29,19 @@ def immutable_commit_snapshot(info: dict) -> bool: urls = [] for platform in info["platforms"].values(): for value in platform["entries"].values(): - entry = value.plain() + if value.kind != "table": + return False + entry = value.table() if "ref" in entry: continue + # Inspect only the URL: revision/floor are valid numeric Lua + # fields that the updater's general plain() conversion rejects. url = entry.get("url") - if isinstance(url, dict): - url = url.get("GLOBAL") - if not isinstance(url, str): + if url is not None and url.kind == "table": + url = url.table().get("GLOBAL") + if url is None or url.kind != "string": return False - urls.append(url) + urls.append(url.string()) return bool(urls) and all(re.fullmatch( r"https://github\.com/[^/]+/[^/]+/archive/[0-9a-fA-F]{40}(?:[0-9a-fA-F]{24})?\.(?:tar\.gz|zip)", url) for url in urls) diff --git a/tests/autoupdate/test_ci.py b/tests/autoupdate/test_ci.py index bb3cdcac..439cd7b6 100644 --- a/tests/autoupdate/test_ci.py +++ b/tests/autoupdate/test_ci.py @@ -33,6 +33,7 @@ def test_commit_snapshot_is_manual_but_historical_bytes_are_still_guarded(self): original = '''package = { spec="1", namespace="mcpplibs.mwrap", name="example", xpm={linux={["1.0.0"]={ +revision=1, floor=1, url="https://github.com/acme/example/archive/1111111111111111111111111111111111111111.tar.gz", sha256="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", }}}, From 8a77fea3a83707a508d4f1f35ff1e388689781ee Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 10:49:15 +0900 Subject: [PATCH 42/47] test(mwrap): prepare public-index WebP deployment acceptance --- .../2026-10-25-unified-mwrap-execution.md | 36 +++++++++++++++++++ tests/mwrap/check_webp_deployment.py | 21 ++++++----- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 7f681df1..50fa430d 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -241,3 +241,39 @@ Godot 10.0.0 stable source PR #2 passed all three exact-head native jobs and self-review and was squash merged as d7be0cd9dc8224ec8313e540b515a5aacfc1cf83. Its new main CI remains a distinct release gate. ImGui 1.92.8 and FFmpeg 8.1.2 formal GitHub/GitCode source assets are also publicly hash-verified. + + +The current index scan exposed numeric revision/floor metadata being rejected +by the updater's generic plain() conversion while classifying commit archives. +The audit now reads only literal URL nodes for this classification, retaining +historical-resource checks. Its real revision/floor fixture, all 19 updater +regressions and the full current-tree audit pass; the new remote scan passes. + +Final public-index acceptance supports a shared dedicated fresh home for the +seven unchanged default scaffolds and optional WebP relocation. The WebP audit +also verifies wrapper NOTICE byte-for-byte. These are prepared checks, not a +claim that final public-index acceptance has already completed. + +Completed task-owned architecture build outputs for OpenCV, gRPC and Godot were +removed after checking for active compiler/build processes and tracked files. +41 small build metadata files were preserved alongside all task logs; 8.7 GiB +was freed. Evidence: /tmp/mwrap-completed-architecture-build-cleanup.json and +/tmp/mwrap-completed-build-metadata.zip. No source or user cache was removed. + + +Godot stable main CI now passes all three native jobs. The formal +[mwrap-10.0.0 release](https://github.com/mcpplibs/godot-cpp-m/releases/tag/mwrap-10.0.0) +is published (draft=false, prerelease=false) at squash commit +`d7be0cd9dc8224ec8313e540b515a5aacfc1cf83`. GitHub and public GitCode +source downloads both match SHA256 +`b5f6d13d018f2359913c6e6fba92e24810b1a1585f027547f4b20c5fd27eeec5`. +This proves the stable wrapper publication; public-index installation remains +part of the final index gate. + + +gRPC PR #8 passed all six current-head checks, including real Linux/macOS RPC +and advanced plan/submit examples, and was squash merged as +`b7a918ef931c270040d0db8ae36478b2d58f8a8a`. Review accepted the one harmless +empty line at the end of src/grpc.cppm; all other whitespace checks pass. The +source commit was kept unchanged so its completed native CI remains exact. +Its merge-commit CI and formal release are separate remaining gates. diff --git a/tests/mwrap/check_webp_deployment.py b/tests/mwrap/check_webp_deployment.py index 6ed15b68..7ae4474b 100644 --- a/tests/mwrap/check_webp_deployment.py +++ b/tests/mwrap/check_webp_deployment.py @@ -15,15 +15,18 @@ def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--mcpp", default="mcpp") parser.add_argument("--toolchain", default="llvm@23.1.3") + parser.add_argument("--published-index", action="store_true", help="refresh the public index instead of staging this checkout") + parser.add_argument("--home", type=Path, help="reuse a dedicated test home") args = parser.parse_args() root = Path(__file__).resolve().parents[2] with tempfile.TemporaryDirectory(prefix="mwrap-webp-deployment-") as directory: temporary = Path(directory) - home = temporary / "home" - index = home / "indices/mcpplibs" - index.mkdir(parents=True) - shutil.copytree(root / "pkgs", index / "pkgs") - shutil.copyfile(root / "index.toml", index / "index.toml") + home = args.home.resolve() if args.home else temporary / "home" + if not args.published_index: + index = home / "indices/mcpplibs" + index.mkdir(parents=True) + shutil.copytree(root / "pkgs", index / "pkgs") + shutil.copyfile(root / "index.toml", index / "index.toml") project = temporary / "consumer" shutil.copytree(root / "tests/mwrap/opencv-webp", project) manifest = project / "mcpp.toml" @@ -34,8 +37,10 @@ def main(): (project / "src").mkdir() shutil.copyfile(project / "tests/pipeline.cpp", project / "src/main.cpp") env = dict(os.environ, MCPP_HOME=str(home)) - commands = [ - [args.mcpp, "self", "config", "--mirror", "GLOBAL"], + commands = [[args.mcpp, "self", "config", "--mirror", "GLOBAL"]] + if args.published_index: + commands.append([args.mcpp, "index", "update"]) + commands += [ [args.mcpp, "build", "--toolchain", args.toolchain, "--strict"], [args.mcpp, "run", "--toolchain", args.toolchain], [args.mcpp, "pack", "--toolchain", args.toolchain, "--mode", "self-contained", @@ -59,7 +64,7 @@ def main(): sources = (Path(entry["file"]).parent.parent for entry in entries if Path(entry["file"]).name == "core.cppm") source = next(path for path in sources if (path / "upstream/opencv/LICENSE").is_file()) - originals = [source / "LICENSE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", + originals = [source / "LICENSE", source / "NOTICE", source / "port/licenses/UPSTREAM_SOURCE_NOTICES.txt", *[path for path in (source / "upstream/opencv").rglob("*") if path.is_file() and any(word in path.name for word in ("LICENSE", "COPYING", "COPYRIGHT", "NOTICE"))]] notices = list(relocated.rglob("licenses/opencv")) From 783c371ceb974ddcc7e83ebb0d102bc0aea72b3a Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 11:21:21 +0900 Subject: [PATCH 43/47] docs(mwrap): standardize community topics and record dependency CI --- .../2026-10-25-unified-mwrap-execution.md | 20 +++++++++++++++++++ .../skills/add-mcpp-index-package/SKILL.md | 2 ++ docs/mwrap-licensing.md | 2 ++ docs/zh/mwrap-licensing.md | 1 + 4 files changed, 25 insertions(+) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 50fa430d..d5b0c930 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -277,3 +277,23 @@ and advanced plan/submit examples, and was squash merged as empty line at the end of src/grpc.cppm; all other whitespace checks pass. The source commit was kept unchanged so its completed native CI remains exact. Its merge-commit CI and formal release are separate remaining gates. + + +All seven GitHub repository topic lists now include mcpp-community, verified +after mutation while preserving existing topics. README/manifest attribution +continues to use that same label. Evidence: /tmp/mwrap-community-topics-proof.json. + + +After merging newer index main ad0f019 locally, the earlier dc93f6b candidate +validate/OpenKAL runs (40150276669/40150276638) were intentionally canceled to +free queued Linux runners for exact merged-source CI. Their head/event/branch +were checked first. This is not a passing final-index gate: all workflows must +run again on the final formal-resource tree. The old observer ending on these +cancellations is expected, not a new product test failure. The updater run was +retained to finish its remaining host-tool candidates. + + +Prepublication updater run 40150276617 at dc93f6b completed successfully: all +12 actual candidate builds passed (four Godot stable SDK legs, eight gRPC host +tool legs). Evidence: /tmp/mwrap-prepublication-twelve-candidate-ci-proof.json. +This does not replace final formal-resource index CI. diff --git a/.agents/skills/add-mcpp-index-package/SKILL.md b/.agents/skills/add-mcpp-index-package/SKILL.md index 53b07e4c..fc9da695 100644 --- a/.agents/skills/add-mcpp-index-package/SKILL.md +++ b/.agents/skills/add-mcpp-index-package/SKILL.md @@ -205,3 +205,5 @@ README 导航统一使用 `[Upstream](上游地址)`;Modules 位于 Getting st 同版本覆盖还需处理实际旧缓存:使用索引打包 revision/必要的 floor,并实测旧 home 自动换入新载荷和运行;不要用增加 package version 尾号替代用户明确要求的版本对齐。 + +仓库归属检查也包括 GitHub Topics 的 `mcpp-community`,更新时保留其他 topic;与 README 及 manifest 作者归属一致。 diff --git a/docs/mwrap-licensing.md b/docs/mwrap-licensing.md index ad8c3870..036466bf 100644 --- a/docs/mwrap-licensing.md +++ b/docs/mwrap-licensing.md @@ -9,6 +9,8 @@ thin `compat.*` consumers and repositories with vendored upstream sources. - Use `mcpp-community` as the wrapper author/attribution label. This does not change repository organization, package namespace or import identity: `mcpplibs.mwrap.` remains the public module/package identity. +- GitHub repositories include the `mcpp-community` topic, preserving any existing + topics; README attribution and manifest authors use the same community label. - Keep the original upstream README, LICENSE/COPYING and applicable NOTICE or third-party notices in `upstream//`, preserving their bytes and authors. Record their pinned source and checksums. Provider-based wrappers keep these diff --git a/docs/zh/mwrap-licensing.md b/docs/zh/mwrap-licensing.md index b7d729ee..92953a39 100644 --- a/docs/zh/mwrap-licensing.md +++ b/docs/zh/mwrap-licensing.md @@ -6,6 +6,7 @@ 顶层 `NOTICE` 标明 `mcpp-community` contributors 以及封装贡献的适用范围。 - 封装作者/归属标签统一 `mcpp-community`。这不改变仓库组织、包 namespace 或模块身份: 对外仍是 `mcpplibs.mwrap.`。 +- GitHub 仓库 Topics 包含 `mcpp-community`,保留原有其他 topic;README 归属与 manifest 作者使用同一社区标识。 - 上游原始 README、LICENSE/COPYING 及适用的 NOTICE、第三方通知放在 `upstream//`, 保留原始字节、作者与版权声明,记录固定来源和校验值。使用 `compat.*` 供应源码也保留这些上游文档。 - 顶层 README 介绍封装,链接上游项目和保留文档;许可证链接/badge 表示封装 Apache-2.0, From fd64a5ba3164178dfe401e131159cb4a7feac92d Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 12:10:39 +0900 Subject: [PATCH 44/47] test(mwrap): require real Git-index discovery of all seven templates --- .../2026-10-25-unified-mwrap-execution.md | 22 ++++++ tests/mwrap/check_git_index_discovery.py | 76 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 tests/mwrap/check_git_index_discovery.py diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index d5b0c930..ef227e08 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -297,3 +297,25 @@ Prepublication updater run 40150276617 at dc93f6b completed successfully: all 12 actual candidate builds passed (four Godot stable SDK legs, eight gRPC host tool legs). Evidence: /tmp/mwrap-prepublication-twelve-candidate-ci-proof.json. This does not replace final formal-resource index CI. + + +All seven current source PRs have passed exact-head native CI and self-review +and are squash merged. OpenCV's five-platform run 40145824570 completed with +success, including the last GCC real ORT CPU/template check, and PR #1 merged +as `832664939561dfe058b73050c7704e307c811064`. The byte-pinned upstream notice +and binary ONNX fixture were preserved; code whitespace checks pass. OpenCV +and gRPC exact squash-commit CI remain required before their formal releases. + + +Completion-audit gap: path/index-archive evidence alone does not prove Git +index discovery. Added tests/mwrap/check_git_index_discovery.py for a fresh +home with the supported [index.repos.mcpplibs] source="git" setting and no +artifact fallback. It requires an actual Git checkout containing the expected +merge commit, byte-identical seven short descriptors, real list/new for seven +full identities, and rejection of an absent identity. Final execution remains +pending the index merge; helper syntax/help alone is not acceptance. + +A preliminary project-index probe before publication checked out the current +public main, which lacks the seven new packages; mcpp add accepted a selector +with an unchecked warning. That is explicitly not discovery proof, and no +engine modification or manual copying is used to turn it into a pass. diff --git a/tests/mwrap/check_git_index_discovery.py b/tests/mwrap/check_git_index_discovery.py new file mode 100644 index 00000000..60aa9a70 --- /dev/null +++ b/tests/mwrap/check_git_index_discovery.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Discover all seven mwrap templates through the real Git index, without an artifact fallback.""" +import argparse +import os +from pathlib import Path +import re +import subprocess +import tempfile +import tomllib + + +PACKAGES = { + "opencv": "5.0.0", "onnxruntime": "1.25.1", "llamacpp": "b10069", + "ffmpeg": "8.1.2", "grpc": "1.83.0", "imgui": "1.92.8", "godot_cpp": "10.0.0", +} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--mcpp", default="mcpp") + parser.add_argument("--expected-rev", required=True, help="merged index commit that must be present") + args = parser.parse_args() + source = Path(__file__).resolve().parents[2] + with tempfile.TemporaryDirectory(prefix="mwrap-git-index-final-") as directory: + root = Path(directory) + home = root / "home" + env = dict(os.environ, MCPP_HOME=str(home)) + + def run(*arguments): + print("+", args.mcpp, *arguments, flush=True) + subprocess.run([args.mcpp, *arguments], cwd=root, env=env, check=True) + + run("self", "config", "--mirror", "GLOBAL") + config = home / "config.toml" + text = config.read_text() + # Use the supported global registry setting, not project [indices]: + # mcpp new intentionally discovers templates from global registries. + marker = '[index.repos."mcpplibs"]' + start = text.index(marker) + end = text.find("\n[", start + len(marker)) + if end < 0: + end = len(text) + block = text[start:end] + block = re.sub(r"(?m)^artifact\s*=.*\n", "", block) + block = re.sub(r"(?m)^source\s*=.*\n", "", block) + block += '\nsource = "git"\n' + config.write_text(text[:start] + block + text[end:]) + repo = tomllib.loads(config.read_text())["index"]["repos"]["mcpplibs"] + assert repo["source"] == "git" and "artifact" not in repo + run("index", "update") + checkout = home / "indices/mcpplibs" + assert (checkout / ".git").exists(), "Expected an actual Git clone, not an unpacked artifact" + subprocess.run(["git", "-C", str(checkout), "merge-base", "--is-ancestor", args.expected_rev, "HEAD"], check=True) + revision = subprocess.check_output(["git", "-C", str(checkout), "rev-parse", "HEAD"], text=True).strip() + print("Verified actual Git index checkout", revision, flush=True) + for name, version in PACKAGES.items(): + relative = Path("pkgs/mwrap") / (name + ".lua") + assert (checkout / relative).read_bytes() == (source / relative).read_bytes(), relative + identity = "mcpplibs.mwrap." + name + selector = identity + "@" + version + run("new", "--list-templates", selector) + project_name = "git-" + name.replace("_", "-") + run("new", project_name, "--template", selector) + manifest = tomllib.loads((root / project_name / "mcpp.toml").read_text()) + dependency = manifest["dependencies"][identity] + actual = dependency if isinstance(dependency, str) else dependency["version"] + assert actual == version, (identity, dependency) + print("Verified Git-index identity and unmodified scaffold", selector, flush=True) + missing = subprocess.run([args.mcpp, "new", "--list-templates", "mcpplibs.mwrap.definitely_missing@1.0.0"], + cwd=root, env=env, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + assert missing.returncode != 0 and "not found for exact identity" in missing.stdout, missing.stdout + print("Verified seven Git-index discoveries and rejection of an absent identity", flush=True) + + +if __name__ == "__main__": + main() From e9b6ab8ebd45bacd861632272c3b47d746efdcfc Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 12:57:43 +0900 Subject: [PATCH 45/47] index(mwrap): stage six verified formal releases and gRPC host sources --- .../2026-10-25-unified-mwrap-execution.md | 26 +++++++++++++++++ pkgs/g/grpc-plugin.lua | 21 ++++++++++---- pkgs/g/grpcgen.lua | 21 ++++++++++---- pkgs/mwrap/ffmpeg.lua | 29 ++++++++++++++----- pkgs/mwrap/godot_cpp.lua | 29 ++++++++++++++----- pkgs/mwrap/grpc.lua | 22 ++++++++++---- pkgs/mwrap/imgui.lua | 29 ++++++++++++++----- pkgs/mwrap/llamacpp.lua | 29 ++++++++++++++----- pkgs/mwrap/onnxruntime.lua | 29 ++++++++++++++----- 9 files changed, 183 insertions(+), 52 deletions(-) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index ef227e08..7bafe03e 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -319,3 +319,29 @@ A preliminary project-index probe before publication checked out the current public main, which lacks the seven new packages; mcpp add accepted a selector with an unchecked warning. That is explicitly not discovery proof, and no engine modification or manual copying is used to turn it into a pass. + + +Five already published wrappers are now staged locally with their formal +GitHub/GitCode URLs and matching hashes: ImGui, FFmpeg, ORT, llama.cpp and +Godot. mcpp 2026.10.24.1 parses all five exact full identities/platform versions; +all five autoupdate configurations and four tag-selection regressions pass. +Historical-resource audit passes against ad0f019, with only OpenCV/gRPC still +using commit candidates. The branch has not been pushed or declared ready: +all seven formal assets and final index CI remain mandatory. Evidence: +/tmp/mwrap-available-formal-descriptors-proof.json and +/tmp/mwrap-partial-formal-resource-audit.json. + + +gRPC squash commit b7a918ef931c270040d0db8ae36478b2d58f8a8a now passes +both exact main workflows: CI 40151741673 and actual templates 40151741542. +The final Linux advanced example completed successfully. Release preflight +is verifying each of the 2,969 tracked archive files against that commit; +no gRPC release/mirror is declared verified until the publication record exists. + + +gRPC 1.83.0 is now formally published and publicly mirrored on GitCode. +Its release archive SHA256 is `772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca`. Both public +regions and every tracked blob match the validated squash source. The sixth +formal wrapper descriptor and the two independent 1.83.0.1 host-tool packaging +entries now use those verified assets locally. Existing versions remain intact +in the ad0f019-based audit; only OpenCV still uses a candidate source. diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua index d3b885ff..d0f52a5a 100644 --- a/pkgs/g/grpc-plugin.lua +++ b/pkgs/g/grpc-plugin.lua @@ -38,8 +38,11 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, ["1.83.0"] = { url = { @@ -52,8 +55,11 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, ["1.83.0"] = { url = { @@ -66,8 +72,11 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, ["1.83.0"] = { url = { diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua index 79bfb645..8eea0bac 100644 --- a/pkgs/g/grpcgen.lua +++ b/pkgs/g/grpcgen.lua @@ -38,8 +38,11 @@ package = { linux = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, ["1.83.0"] = { url = { @@ -52,8 +55,11 @@ package = { macosx = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, ["1.83.0"] = { url = { @@ -66,8 +72,11 @@ package = { windows = { -- Host packaging revision from the same verified source as mwrap.grpc 1.83.0. ["1.83.0.1"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, ["1.83.0"] = { url = { diff --git a/pkgs/mwrap/ffmpeg.lua b/pkgs/mwrap/ffmpeg.lua index d264a158..5385e821 100644 --- a/pkgs/mwrap/ffmpeg.lua +++ b/pkgs/mwrap/ffmpeg.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,23 +7,38 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/ffmpeg-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/ffmpeg-m/releases/download/${tag}/ffmpeg-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/0ec0231fa4276b109134136234ffc67169bca6ec.tar.gz", - sha256 = "25951bb282c1feaa0408b23c4d2b242f846dad0ee35978b18bcfd954a6fa9c23", + url = { + GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/releases/download/mwrap-8.1.2/ffmpeg-m-8.1.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + }, + sha256 = "416a3d3bde8c376bf90deb9f538b8f06edd364a0207dc5bfc0301bc7c6790b7e", }, }, macosx = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/0ec0231fa4276b109134136234ffc67169bca6ec.tar.gz", - sha256 = "25951bb282c1feaa0408b23c4d2b242f846dad0ee35978b18bcfd954a6fa9c23", + url = { + GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/releases/download/mwrap-8.1.2/ffmpeg-m-8.1.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + }, + sha256 = "416a3d3bde8c376bf90deb9f538b8f06edd364a0207dc5bfc0301bc7c6790b7e", }, }, windows = { ["8.1.2"] = { - url = "https://github.com/mcpplibs/ffmpeg-m/archive/0ec0231fa4276b109134136234ffc67169bca6ec.tar.gz", - sha256 = "25951bb282c1feaa0408b23c4d2b242f846dad0ee35978b18bcfd954a6fa9c23", + url = { + GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/releases/download/mwrap-8.1.2/ffmpeg-m-8.1.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + }, + sha256 = "416a3d3bde8c376bf90deb9f538b8f06edd364a0207dc5bfc0301bc7c6790b7e", }, }, }, diff --git a/pkgs/mwrap/godot_cpp.lua b/pkgs/mwrap/godot_cpp.lua index 45f1825a..336c6a0b 100644 --- a/pkgs/mwrap/godot_cpp.lua +++ b/pkgs/mwrap/godot_cpp.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,23 +7,38 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/godot-cpp-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/godot-cpp-m/releases/download/${tag}/godot-cpp-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["10.0.0"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/d06b8d1337b39af4130e0327972348d5eee53d37.tar.gz", - sha256 = "35027ce21d87e6c4e17e463163924b2046e3bae959c8f1bb3259d152147673e8", + url = { + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/releases/download/mwrap-10.0.0/godot-cpp-m-10.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-godot-cpp/releases/download/10.0.0/godot-cpp-m-10.0.0.tar.gz", + }, + sha256 = "b5f6d13d018f2359913c6e6fba92e24810b1a1585f027547f4b20c5fd27eeec5", }, }, macosx = { ["10.0.0"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/d06b8d1337b39af4130e0327972348d5eee53d37.tar.gz", - sha256 = "35027ce21d87e6c4e17e463163924b2046e3bae959c8f1bb3259d152147673e8", + url = { + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/releases/download/mwrap-10.0.0/godot-cpp-m-10.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-godot-cpp/releases/download/10.0.0/godot-cpp-m-10.0.0.tar.gz", + }, + sha256 = "b5f6d13d018f2359913c6e6fba92e24810b1a1585f027547f4b20c5fd27eeec5", }, }, windows = { ["10.0.0"] = { - url = "https://github.com/mcpplibs/godot-cpp-m/archive/d06b8d1337b39af4130e0327972348d5eee53d37.tar.gz", - sha256 = "35027ce21d87e6c4e17e463163924b2046e3bae959c8f1bb3259d152147673e8", + url = { + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/releases/download/mwrap-10.0.0/godot-cpp-m-10.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-godot-cpp/releases/download/10.0.0/godot-cpp-m-10.0.0.tar.gz", + }, + sha256 = "b5f6d13d018f2359913c6e6fba92e24810b1a1585f027547f4b20c5fd27eeec5", }, }, }, diff --git a/pkgs/mwrap/grpc.lua b/pkgs/mwrap/grpc.lua index 33c1c428..d58861f2 100644 --- a/pkgs/mwrap/grpc.lua +++ b/pkgs/mwrap/grpc.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,17 +7,29 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/grpc-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/grpc-m/releases/download/${tag}/grpc-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, }, macosx = { ["1.83.0"] = { - url = "https://github.com/mcpplibs/grpc-m/archive/bda43a641d1c67262ea15fd682466ff3c511796b.tar.gz", - sha256 = "9f0f356dbf0a591974500bdf49f0c753e944e60a89f8755c43edc79d2b6ecc90", + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + }, + sha256 = "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", }, }, }, diff --git a/pkgs/mwrap/imgui.lua b/pkgs/mwrap/imgui.lua index 59a67f4e..4c6bd3c4 100644 --- a/pkgs/mwrap/imgui.lua +++ b/pkgs/mwrap/imgui.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,23 +7,38 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/imgui-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/imgui-m/releases/download/${tag}/imgui-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/eeaa5164ecd801f316c8097ae8e43b03ae457550.tar.gz", - sha256 = "ccc22557b3d9e9ecae56a17d1ec3d7ef362ae7fcb429a2ec3a91f16f75e7d1a4", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/releases/download/mwrap-1.92.8/imgui-m-1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + }, + sha256 = "dee8081f791484f5d16cac222f022c0bb62a541d6a62e8ce0a526e3a343adbcd", }, }, macosx = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/eeaa5164ecd801f316c8097ae8e43b03ae457550.tar.gz", - sha256 = "ccc22557b3d9e9ecae56a17d1ec3d7ef362ae7fcb429a2ec3a91f16f75e7d1a4", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/releases/download/mwrap-1.92.8/imgui-m-1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + }, + sha256 = "dee8081f791484f5d16cac222f022c0bb62a541d6a62e8ce0a526e3a343adbcd", }, }, windows = { ["1.92.8"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/eeaa5164ecd801f316c8097ae8e43b03ae457550.tar.gz", - sha256 = "ccc22557b3d9e9ecae56a17d1ec3d7ef362ae7fcb429a2ec3a91f16f75e7d1a4", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/releases/download/mwrap-1.92.8/imgui-m-1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + }, + sha256 = "dee8081f791484f5d16cac222f022c0bb62a541d6a62e8ce0a526e3a343adbcd", }, }, }, diff --git a/pkgs/mwrap/llamacpp.lua b/pkgs/mwrap/llamacpp.lua index 58b8332c..8cabcde4 100644 --- a/pkgs/mwrap/llamacpp.lua +++ b/pkgs/mwrap/llamacpp.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,23 +7,38 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/llama.cpp-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/llama.cpp-m/releases/download/${tag}/llama.cpp-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/70f3735b450b16a079c4eb0123184cfe5fd88185.tar.gz", - sha256 = "1aa091ee6b84029d2b28a76737a0771182441d9afc665295b6780d1ae99dc499", + url = { + GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/releases/download/mwrap-b10069/llama.cpp-m-b10069.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-llamacpp/releases/download/b10069/llama.cpp-m-b10069.tar.gz", + }, + sha256 = "a1cf4b70d833bf1edd50fb70355768d109956191aae15c13775341b71bffe2e6", }, }, macosx = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/70f3735b450b16a079c4eb0123184cfe5fd88185.tar.gz", - sha256 = "1aa091ee6b84029d2b28a76737a0771182441d9afc665295b6780d1ae99dc499", + url = { + GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/releases/download/mwrap-b10069/llama.cpp-m-b10069.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-llamacpp/releases/download/b10069/llama.cpp-m-b10069.tar.gz", + }, + sha256 = "a1cf4b70d833bf1edd50fb70355768d109956191aae15c13775341b71bffe2e6", }, }, windows = { ["b10069"] = { - url = "https://github.com/mcpplibs/llama.cpp-m/archive/70f3735b450b16a079c4eb0123184cfe5fd88185.tar.gz", - sha256 = "1aa091ee6b84029d2b28a76737a0771182441d9afc665295b6780d1ae99dc499", + url = { + GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/releases/download/mwrap-b10069/llama.cpp-m-b10069.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-llamacpp/releases/download/b10069/llama.cpp-m-b10069.tar.gz", + }, + sha256 = "a1cf4b70d833bf1edd50fb70355768d109956191aae15c13775341b71bffe2e6", }, }, }, diff --git a/pkgs/mwrap/onnxruntime.lua b/pkgs/mwrap/onnxruntime.lua index 79e1f49a..bf185210 100644 --- a/pkgs/mwrap/onnxruntime.lua +++ b/pkgs/mwrap/onnxruntime.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,29 +7,44 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/onnxruntime-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/onnxruntime-m/releases/download/${tag}/onnxruntime-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/onnxruntime-m/releases/download/mwrap-1.25.1/onnxruntime-m-1.25.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-onnxruntime/releases/download/1.25.1/onnxruntime-m-1.25.1.tar.gz", + }, revision = 1, floor = 1, - sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", + sha256 = "bec1f319d9869624b0efeb20c0376c1e429b07f6652f65536f17fca722458d6e", }, }, macosx = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/onnxruntime-m/releases/download/mwrap-1.25.1/onnxruntime-m-1.25.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-onnxruntime/releases/download/1.25.1/onnxruntime-m-1.25.1.tar.gz", + }, revision = 1, floor = 1, - sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", + sha256 = "bec1f319d9869624b0efeb20c0376c1e429b07f6652f65536f17fca722458d6e", }, }, windows = { ["1.25.1"] = { - url = "https://github.com/mcpplibs/onnxruntime-m/archive/dc900ae129a8dda86067cd5ef85658c7606bac7d.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/onnxruntime-m/releases/download/mwrap-1.25.1/onnxruntime-m-1.25.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-onnxruntime/releases/download/1.25.1/onnxruntime-m-1.25.1.tar.gz", + }, revision = 1, floor = 1, - sha256 = "dda7f64be72ec27756dd200a64297bce67a2717c9a25dbd01643bcb0fc094984", + sha256 = "bec1f319d9869624b0efeb20c0376c1e429b07f6652f65536f17fca722458d6e", }, }, }, From b0e9be406d48faaad045ee7b8a068523d0b42713 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 14:04:51 +0900 Subject: [PATCH 46/47] index(mwrap): finalize seven verified releases and source gate evidence --- .../2026-10-25-mwrap-release-evidence.json | 118 +++++ .../docs/2026-10-25-mwrap-source-gates.json | 467 ++++++++++++++++++ .../2026-10-25-unified-mwrap-execution.md | 22 + pkgs/mwrap/opencv.lua | 29 +- 4 files changed, 629 insertions(+), 7 deletions(-) create mode 100644 .agents/docs/2026-10-25-mwrap-release-evidence.json create mode 100644 .agents/docs/2026-10-25-mwrap-source-gates.json diff --git a/.agents/docs/2026-10-25-mwrap-release-evidence.json b/.agents/docs/2026-10-25-mwrap-release-evidence.json new file mode 100644 index 00000000..4b97a9a9 --- /dev/null +++ b/.agents/docs/2026-10-25-mwrap-release-evidence.json @@ -0,0 +1,118 @@ +{ + "scope": "Formal source releases; all public GitHub/GitCode copies and tracked blobs verified. Final public-index installation is a separate gate.", + "mcpp_version": "2026.10.24.1", + "libraries": [ + { + "repo": "imgui-m", + "package_name": "imgui", + "version": "1.92.8", + "tag": "mwrap-1.92.8", + "pr": 14, + "pr_head": "eeaa5164ecd801f316c8097ae8e43b03ae457550", + "merge_sha": "15e68efe76d5e63d7d0fea0d66971d8528c512af", + "main_ci": "https://github.com/mcpplibs/imgui-m/actions/runs/40144637066", + "tracked_files": 57, + "release_url": "https://github.com/mcpplibs/imgui-m/releases/tag/mwrap-1.92.8", + "global_url": "https://github.com/mcpplibs/imgui-m/releases/download/mwrap-1.92.8/imgui-m-1.92.8.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + "sha256": "dee8081f791484f5d16cac222f022c0bb62a541d6a62e8ce0a526e3a343adbcd", + "github_release_id": 423055919 + }, + { + "repo": "ffmpeg-m", + "package_name": "ffmpeg", + "version": "8.1.2", + "tag": "mwrap-8.1.2", + "pr": 9, + "pr_head": "0ec0231fa4276b109134136234ffc67169bca6ec", + "merge_sha": "5b6aaef9ab7206ca7e944d5e0ccdd23cca1d7844", + "main_ci": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40144626705", + "tracked_files": 70, + "release_url": "https://github.com/mcpplibs/ffmpeg-m/releases/tag/mwrap-8.1.2", + "global_url": "https://github.com/mcpplibs/ffmpeg-m/releases/download/mwrap-8.1.2/ffmpeg-m-8.1.2.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + "sha256": "416a3d3bde8c376bf90deb9f538b8f06edd364a0207dc5bfc0301bc7c6790b7e", + "github_release_id": 423061244 + }, + { + "repo": "onnxruntime-m", + "package_name": "onnxruntime", + "version": "1.25.1", + "tag": "mwrap-1.25.1", + "pr": 3, + "pr_head": "dc900ae129a8dda86067cd5ef85658c7606bac7d", + "merge_sha": "baf37fe63375021e937fb6e80ecc0214242a24e2", + "main_ci": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40147251050", + "tracked_files": 41, + "release_url": "https://github.com/mcpplibs/onnxruntime-m/releases/tag/mwrap-1.25.1", + "global_url": "https://github.com/mcpplibs/onnxruntime-m/releases/download/mwrap-1.25.1/onnxruntime-m-1.25.1.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-onnxruntime/releases/download/1.25.1/onnxruntime-m-1.25.1.tar.gz", + "sha256": "bec1f319d9869624b0efeb20c0376c1e429b07f6652f65536f17fca722458d6e", + "github_release_id": 423069764 + }, + { + "repo": "llama.cpp-m", + "package_name": "llamacpp", + "version": "b10069", + "tag": "mwrap-b10069", + "pr": 6, + "pr_head": "70f3735b450b16a079c4eb0123184cfe5fd88185", + "merge_sha": "c8b41c67cc6a7767797ccb05d637a7936c3d22ea", + "main_ci": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40146341452", + "tracked_files": 3298, + "release_url": "https://github.com/mcpplibs/llama.cpp-m/releases/tag/mwrap-b10069", + "global_url": "https://github.com/mcpplibs/llama.cpp-m/releases/download/mwrap-b10069/llama.cpp-m-b10069.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-llamacpp/releases/download/b10069/llama.cpp-m-b10069.tar.gz", + "sha256": "a1cf4b70d833bf1edd50fb70355768d109956191aae15c13775341b71bffe2e6", + "github_release_id": 423076517 + }, + { + "repo": "godot-cpp-m", + "package_name": "godot_cpp", + "version": "10.0.0", + "tag": "mwrap-10.0.0", + "pr": 2, + "pr_head": "d06b8d1337b39af4130e0327972348d5eee53d37", + "merge_sha": "d7be0cd9dc8224ec8313e540b515a5aacfc1cf83", + "main_ci": "https://github.com/mcpplibs/godot-cpp-m/actions/runs/40148707230", + "tracked_files": 36, + "release_url": "https://github.com/mcpplibs/godot-cpp-m/releases/tag/mwrap-10.0.0", + "global_url": "https://github.com/mcpplibs/godot-cpp-m/releases/download/mwrap-10.0.0/godot-cpp-m-10.0.0.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-godot-cpp/releases/download/10.0.0/godot-cpp-m-10.0.0.tar.gz", + "sha256": "b5f6d13d018f2359913c6e6fba92e24810b1a1585f027547f4b20c5fd27eeec5", + "github_release_id": 423085962 + }, + { + "repo": "grpc-m", + "package_name": "grpc", + "version": "1.83.0", + "tag": "mwrap-1.83.0", + "pr": 8, + "pr_head": "bda43a641d1c67262ea15fd682466ff3c511796b", + "merge_sha": "b7a918ef931c270040d0db8ae36478b2d58f8a8a", + "main_ci": "https://github.com/mcpplibs/grpc-m/actions/runs/40151741673", + "tracked_files": 2969, + "release_url": "https://github.com/mcpplibs/grpc-m/releases/tag/mwrap-1.83.0", + "global_url": "https://github.com/mcpplibs/grpc-m/releases/download/mwrap-1.83.0/grpc-m-1.83.0.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + "sha256": "772403e3d2bc64d00998ba262ebb5edd8476603931e70cd2fea1a3257f6d42ca", + "github_release_id": 423132613 + }, + { + "repo": "opencv-m", + "package_name": "opencv", + "version": "5.0.0", + "tag": "mwrap-5.0.0", + "pr": 1, + "pr_head": "867b319cbd3b7417f1472bdf0788d9901e0e4f5c", + "merge_sha": "832664939561dfe058b73050c7704e307c811064", + "main_ci": "https://github.com/mcpplibs/opencv-m/actions/runs/40155258597", + "tracked_files": 3720, + "release_url": "https://github.com/mcpplibs/opencv-m/releases/tag/mwrap-5.0.0", + "global_url": "https://github.com/mcpplibs/opencv-m/releases/download/mwrap-5.0.0/opencv-m-5.0.0.tar.gz", + "cn_url": "https://gitcode.com/mcpp-res/mwrap-opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + "sha256": "01e440d03eef4b77a7bb7a7043f2c28b83f18e9270f203462a0fe69c1d41d0a2", + "github_release_id": 423155837 + } + ] +} diff --git a/.agents/docs/2026-10-25-mwrap-source-gates.json b/.agents/docs/2026-10-25-mwrap-source-gates.json new file mode 100644 index 00000000..e65c1c3e --- /dev/null +++ b/.agents/docs/2026-10-25-mwrap-source-gates.json @@ -0,0 +1,467 @@ +{ + "scope": "Seven source PRs, exact reviewed heads, squash merges and exact merge-commit CI. Final index publication and installed consumers are separate gates.", + "mcpp_version": "2026.10.24.1", + "libraries": [ + { + "repo": "ffmpeg-m", + "pr": 9, + "pr_head": "0ec0231fa4276b109134136234ffc67169bca6ec", + "merge_sha": "5b6aaef9ab7206ca7e944d5e0ccdd23cca1d7844", + "version": "8.1.2", + "pr_url": "https://github.com/mcpplibs/ffmpeg-m/pull/9", + "main_ci": [ + { + "id": 40144626680, + "path": "templates.yml", + "name": "Actual project templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40144626680" + }, + { + "id": 40144626705, + "path": "ci.yml", + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40144626705" + } + ], + "self_review_head": "0ec0231fa4276b109134136234ffc67169bca6ec", + "pr_ci": { + "checks": [ + { + "name": "mcpp (ubuntu-latest, required)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40143768020/job/121020724592" + }, + { + "name": "templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40143767976/job/121020724275" + } + ], + "runs": [ + { + "id": 40143768020, + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40143768020" + }, + { + "id": 40143767976, + "name": "Actual project templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/ffmpeg-m/actions/runs/40143767976" + } + ] + } + }, + { + "repo": "imgui-m", + "pr": 14, + "pr_head": "eeaa5164ecd801f316c8097ae8e43b03ae457550", + "merge_sha": "15e68efe76d5e63d7d0fea0d66971d8528c512af", + "version": "1.92.8", + "pr_url": "https://github.com/mcpplibs/imgui-m/pull/14", + "main_ci": [ + { + "id": 40144637062, + "path": "templates.yml", + "name": "Actual project templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40144637062" + }, + { + "id": 40144637066, + "path": "ci.yml", + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40144637066" + } + ], + "self_review_head": "eeaa5164ecd801f316c8097ae8e43b03ae457550", + "pr_ci": { + "checks": [ + { + "name": "templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40143776565/job/121020831873" + }, + { + "name": "mcpp (windows-latest)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40143776561/job/121020748610" + }, + { + "name": "mcpp (macos-latest)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40143776561/job/121020748546" + }, + { + "name": "mcpp (ubuntu-latest)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40143776561/job/121020748436" + } + ], + "runs": [ + { + "id": 40143776561, + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40143776561" + }, + { + "id": 40143776565, + "name": "Actual project templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/imgui-m/actions/runs/40143776565" + } + ] + } + }, + { + "repo": "llama.cpp-m", + "pr": 6, + "pr_head": "70f3735b450b16a079c4eb0123184cfe5fd88185", + "merge_sha": "c8b41c67cc6a7767797ccb05d637a7936c3d22ea", + "version": "b10069", + "pr_url": "https://github.com/mcpplibs/llama.cpp-m/pull/6", + "main_ci": [ + { + "id": 40146341452, + "path": "ci.yml", + "name": "ci", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40146341452" + } + ], + "self_review_head": "70f3735b450b16a079c4eb0123184cfe5fd88185", + "pr_ci": { + "checks": [ + { + "name": "release-contract", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121024233561" + }, + { + "name": "cpu (macos-15)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716431" + }, + { + "name": "linux-arm64", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716247" + }, + { + "name": "vulkan", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716234" + }, + { + "name": "cpu (ubuntu-24.04)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716215" + }, + { + "name": "cpu (windows-latest)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716206" + }, + { + "name": "metal", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716197" + }, + { + "name": "unit-and-import", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749/job/121020716042" + } + ], + "runs": [ + { + "id": 40143765749, + "name": "ci", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/llama.cpp-m/actions/runs/40143765749" + } + ] + } + }, + { + "repo": "onnxruntime-m", + "pr": 3, + "pr_head": "dc900ae129a8dda86067cd5ef85658c7606bac7d", + "merge_sha": "baf37fe63375021e937fb6e80ecc0214242a24e2", + "version": "1.25.1", + "pr_url": "https://github.com/mcpplibs/onnxruntime-m/pull/3", + "main_ci": [ + { + "id": 40147251050, + "path": "ci.yml", + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40147251050" + } + ], + "self_review_head": "dc900ae129a8dda86067cd5ef85658c7606bac7d", + "pr_ci": { + "checks": [ + { + "name": "linux-gcc", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40144792244/job/121023717830" + }, + { + "name": "macos-arm64", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40144792244/job/121023717828" + }, + { + "name": "windows-msvc-abi", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40144792244/job/121023717726" + }, + { + "name": "linux-llvm", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40144792244/job/121023717676" + } + ], + "runs": [ + { + "id": 40144792244, + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/onnxruntime-m/actions/runs/40144792244" + } + ] + } + }, + { + "repo": "godot-cpp-m", + "pr": 2, + "pr_head": "d06b8d1337b39af4130e0327972348d5eee53d37", + "merge_sha": "d7be0cd9dc8224ec8313e540b515a5aacfc1cf83", + "version": "10.0.0", + "pr_url": "https://github.com/mcpplibs/godot-cpp-m/pull/2", + "main_ci": [ + { + "id": 40148707230, + "path": "ci.yml", + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/godot-cpp-m/actions/runs/40148707230" + } + ], + "self_review_head": "d06b8d1337b39af4130e0327972348d5eee53d37", + "pr_ci": { + "checks": [ + { + "name": "mcpp (macos)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/godot-cpp-m/actions/runs/40147052805/job/121030524774" + }, + { + "name": "mcpp (windows)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/godot-cpp-m/actions/runs/40147052805/job/121030524764" + }, + { + "name": "mcpp (linux)", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/godot-cpp-m/actions/runs/40147052805/job/121030524619" + } + ], + "runs": [ + { + "id": 40147052805, + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/godot-cpp-m/actions/runs/40147052805" + } + ] + } + }, + { + "repo": "grpc-m", + "pr": 8, + "pr_head": "bda43a641d1c67262ea15fd682466ff3c511796b", + "merge_sha": "b7a918ef931c270040d0db8ae36478b2d58f8a8a", + "version": "1.83.0", + "pr_url": "https://github.com/mcpplibs/grpc-m/pull/8", + "main_ci": [ + { + "id": 40151741542, + "path": "templates.yml", + "name": "Actual project templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40151741542" + }, + { + "id": 40151741673, + "path": "ci.yml", + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40151741673" + } + ], + "self_review_head": "bda43a641d1c67262ea15fd682466ff3c511796b", + "pr_ci": { + "checks": [ + { + "name": "templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772542/job/121020909610" + }, + { + "name": "runtime and host tools share upstream source", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772566/job/121020735851" + }, + { + "name": "templates/greeter == examples/greeter", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772566/job/121020735789" + }, + { + "name": "linux x86_64", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772566/job/121020735782" + }, + { + "name": "macos arm64", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772566/job/121020735779" + }, + { + "name": "source list == upstream CMakeLists", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772566/job/121020735604" + } + ], + "runs": [ + { + "id": 40143772542, + "name": "Actual project templates", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772542" + }, + { + "id": 40143772566, + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/grpc-m/actions/runs/40143772566" + } + ] + } + }, + { + "repo": "opencv-m", + "pr": 1, + "pr_head": "867b319cbd3b7417f1472bdf0788d9901e0e4f5c", + "merge_sha": "832664939561dfe058b73050c7704e307c811064", + "version": "5.0.0", + "pr_url": "https://github.com/mcpplibs/opencv-m/pull/1", + "main_ci": [ + { + "id": 40155258597, + "path": "ci.yml", + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40155258597" + } + ], + "self_review_head": "867b319cbd3b7417f1472bdf0788d9901e0e4f5c", + "pr_ci": { + "checks": [ + { + "name": "macos-llvm", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40145824570/job/121027034712" + }, + { + "name": "windows-llvm", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40145824570/job/121027034631" + }, + { + "name": "linux-gcc", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40145824570/job/121027034616" + }, + { + "name": "linux-musl-static", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40145824570/job/121027034601" + }, + { + "name": "linux-llvm-22", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40145824570/job/121027034470" + } + ], + "runs": [ + { + "id": 40145824570, + "name": "CI", + "status": "completed", + "conclusion": "success", + "url": "https://github.com/mcpplibs/opencv-m/actions/runs/40145824570" + } + ] + } + } + ] +} diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 7bafe03e..0e962c2b 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -345,3 +345,25 @@ regions and every tracked blob match the validated squash source. The sixth formal wrapper descriptor and the two independent 1.83.0.1 host-tool packaging entries now use those verified assets locally. Existing versions remain intact in the ad0f019-based audit; only OpenCV still uses a candidate source. + + +All seven exact merge-commit workflows have now passed, including OpenCV +Windows real ORT CPU/template execution in run 40155258597. Permanent source +gate evidence is stored in [mwrap-source-gates](2026-10-25-mwrap-source-gates.json). +OpenCV tag mwrap-5.0.0 and Release run 40163571662 also passed; published asset +blob and GitCode mirror verification is still a separate remaining gate. + + +All seven GitHub release assets and public GitCode mirrors now verify against +their exact squash commits and archive hashes. Formal URL/hash/autoupdate +entries replace every remaining commit candidate; ORT revision/floor 1 remains. +The two appended gRPC host tool entries share the formal gRPC source archive. +Permanent public resource evidence is in [mwrap-release-evidence](2026-10-25-mwrap-release-evidence.json). + +Final local checks pass on all 265 descriptors: Lua syntax, region URLs, atomic +names, reserved namespaces, cross-package references, platform version parity, +duplicate versions and the pinned mcpp resolver grammar. All seven updater +configs, 19 updater regressions, four tag regressions and skill validation pass. +The ad0f019-based audit preserves all existing versions, with zero remaining +manual commit snapshots. Final remote index CI, ecosystem review/squash, actual +index publication and artifact/Git installed consumers remain required. diff --git a/pkgs/mwrap/opencv.lua b/pkgs/mwrap/opencv.lua index 7e59c3e8..6ea1270e 100644 --- a/pkgs/mwrap/opencv.lua +++ b/pkgs/mwrap/opencv.lua @@ -1,4 +1,4 @@ --- Immutable candidate for the new mwrap identity; formal release URLs follow after source CI. +-- Immutable upstream-aligned mwrap source release; GLOBAL and CN bytes are identical. package = { spec = "1", namespace = "mcpplibs.mwrap", @@ -7,23 +7,38 @@ package = { licenses = { "Apache-2.0" }, repo = "https://github.com/mcpplibs/opencv-m", type = "package", + extensions = { + autoupdate = { + tag = "mwrap-${version}", + url = "https://github.com/mcpplibs/opencv-m/releases/download/${tag}/opencv-m-${version}.tar.gz", + }, + }, xpm = { linux = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/867b319cbd3b7417f1472bdf0788d9901e0e4f5c.tar.gz", - sha256 = "8b2c048703b91bcb8b98ffd6adf11508aa47add2a190774186d5cb5e28811d16", + url = { + GLOBAL = "https://github.com/mcpplibs/opencv-m/releases/download/mwrap-5.0.0/opencv-m-5.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + }, + sha256 = "01e440d03eef4b77a7bb7a7043f2c28b83f18e9270f203462a0fe69c1d41d0a2", }, }, macosx = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/867b319cbd3b7417f1472bdf0788d9901e0e4f5c.tar.gz", - sha256 = "8b2c048703b91bcb8b98ffd6adf11508aa47add2a190774186d5cb5e28811d16", + url = { + GLOBAL = "https://github.com/mcpplibs/opencv-m/releases/download/mwrap-5.0.0/opencv-m-5.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + }, + sha256 = "01e440d03eef4b77a7bb7a7043f2c28b83f18e9270f203462a0fe69c1d41d0a2", }, }, windows = { ["5.0.0"] = { - url = "https://github.com/mcpplibs/opencv-m/archive/867b319cbd3b7417f1472bdf0788d9901e0e4f5c.tar.gz", - sha256 = "8b2c048703b91bcb8b98ffd6adf11508aa47add2a190774186d5cb5e28811d16", + url = { + GLOBAL = "https://github.com/mcpplibs/opencv-m/releases/download/mwrap-5.0.0/opencv-m-5.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mwrap-opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + }, + sha256 = "01e440d03eef4b77a7bb7a7043f2c28b83f18e9270f203462a0fe69c1d41d0a2", }, }, }, From 558f9a7644838cc868db5dd8a67ee2e7847563da Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 25 Oct 2026 14:55:05 +0900 Subject: [PATCH 47/47] Fix legacy llama standard headers on macOS without replacing archives --- .../docs/2026-10-25-unified-mwrap-execution.md | 15 +++++++++++++++ pkgs/g/ggml-org.llamacpp.lua | 12 +++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.agents/docs/2026-10-25-unified-mwrap-execution.md b/.agents/docs/2026-10-25-unified-mwrap-execution.md index 0e962c2b..1c3fdbf2 100644 --- a/.agents/docs/2026-10-25-unified-mwrap-execution.md +++ b/.agents/docs/2026-10-25-unified-mwrap-execution.md @@ -367,3 +367,18 @@ configs, 19 updater regressions, four tag regressions and skill validation pass. The ad0f019-based audit preserves all existing versions, with zero remaining manual commit snapshots. Final remote index CI, ecosystem review/squash, actual index publication and artifact/Git installed consumers remain required. + + +Final b0e9be4 index CI found a legacy macOS regression in workspace default +shard 1/2 (job 121081914195): ggml-org.llamacpp b10069.2 implementation +llama-mmap.cpp lacks explicit cstdlib declarations for posix_memalign/free. +The new mwrap llama consumer passed. Existing Linux installation adaptation +already supplies cstdlib/cerrno; extended that same source-scoped manifest +adaptation to native macOS. Raw historical archive URLs/hash/version remain +unchanged; macOS packaging revision/floor 1 refreshes installed old manifests. +The actual Lua install hook was executed against the public legacy manifest, +and both native tables parse with the expected ordinary-source-only flags. +This is not a skipped legacy test: complete final-head CI must run again. +The previous strict auto-merge observer was stopped before preparing this fix. +At b0e9be4, site, updater and OpenKAL workflows passed; validate did not. +Failure log: /tmp/mwrap-final-index-macos-default-1-failed.log. diff --git a/pkgs/g/ggml-org.llamacpp.lua b/pkgs/g/ggml-org.llamacpp.lua index a7c82f7a..da3c64ae 100644 --- a/pkgs/g/ggml-org.llamacpp.lua +++ b/pkgs/g/ggml-org.llamacpp.lua @@ -88,6 +88,9 @@ package = { }, macosx = { ["b10069.2"] = { + -- Refresh older installs after the explicit standard-header fix. + revision = 1, + floor = 1, url = { GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz", CN = "https://gitcode.com/mcpp-res/llamacpp/releases/download/b10069.2/llamacpp-b10069.2.tar.gz", @@ -135,8 +138,8 @@ import("xim.libxpkg.pkginfo") function install() local wrap = "llama.cpp-m-" .. pkginfo.version() - -- libc++ 23 exposes missing standard headers in this Linux checkpoint. - -- Scope the explicit includes to ordinary Linux implementation sources; + -- Current libc++ exposes missing standard headers in this checkpoint. + -- Scope explicit includes to ordinary Linux/macOS implementation sources; -- the exported module and the downloaded source files remain untouched. if pkginfo.version() == "b10069.2" then local manifest = path.join(wrap, "mcpp.toml") @@ -144,7 +147,10 @@ function install() local patched, count = content:gsub("\n%[target%.linux%.build%]\n", '\n[target.linux.build]\nflags = [{ glob = "third_party/llama.cpp/**/*.cpp", cxxflags = ["-include", "cstdlib", "-include", "cerrno"] }]\n', 1) assert(count == 1, "llamacpp: expected the native Linux build table") - io.writefile(manifest, patched) + local macos, macos_count = patched:gsub("\n%[target%.macos%.build%]\n", + '\n[target.macos.build]\nflags = [{ glob = "third_party/llama.cpp/**/*.cpp", cxxflags = ["-include", "cstdlib", "-include", "cerrno"] }]\n', 1) + assert(macos_count == 1, "llamacpp: expected the native macOS build table") + io.writefile(manifest, macos) end local prefix = pkginfo.install_dir() os.tryrm(prefix)