{{ message }}
2026.9.6.6: one package, one version — and a rule brings its own environment - #584
Merged
Conversation
版本在一个地方属于包的身份,在另一个地方不属于。条件合并按包去重 (`xim:glibc` 与 `xim:glibc@2.40` 是一个条目),而跨包的划分比对整个地址 串(是两个包)。于是工程钉 `xim:cuda-nvcc@13.3.33`、规则包钉 `@>=12.9.86` 时两份都装 —— 每份数 GB —— 而 `fillXpkgDirs` 里「同名保留第 一个值」让 `xpkg_dir` 只答其中一个。装了两份、用了一份,没有一句话提到它。 身份统一为 `(namespace, name)`,版本永远是这个包上的约束。装哪一版分两 步:裁决 —— 离产物更近的声明赢,不带版本的声明弃权,结果被报出来;校验 —— 赢家必须满足每一条落败的要求,不满足就拒绝并同时点出两侧与出路。裸版 本是选择不是要求,两条不同的精确钉走裁决而不被拒绝,否则每一个「依赖钉了 工具、工程也钉了」的组合会在升级当天变成硬失败。 校验是一次比较不是一次搜索:版本由裁决选定再被检查,所以引擎从不需要问索 引「有哪些版本」,也就不带约束求解器。代价写进文档而不是藏起来。 `mcpp::xpkg_dir` 现在回答范围。版本位一直接受范围表达式且 xlings 真的求解 它,而这个查询把整个位置当目录名比对 —— 于是 `>=8.5.0` 装上了载荷然后回答 「没装」。这正是让规则包无法声明下界的那道缝。 四处新拒绝有了名字:`device-source-unconsumed`、`accel-backend-undeclared`、 `host-module-missing`、`tool-version-conflict`。 xlings pin 从 2026.8.30.2 抬到 2026.9.5.1。 判据:e2e 627(装了什么与答了什么必须同时断言)、628(拒绝 + 抬钉后通过的 反向腿 + `--format json` 的 token)、629(范围被安装并被回答)、630(两重门 的两条腿);单测 test_xlings_address_set 与 xpkg_payload_at 的范围/不可解析 版本两组。三条 e2e 在已发布的 2026.9.6.5 上实测为红。 规范:SPEC-001 §10、SPEC-004 §4.5 与判据 5–7。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The defect
The version belonged to a package's identity in one place and not in another.
merge_conditional_xlingsdeduplicated by PACKAGE, soxim:glibcandxim:glibc@2.40were one entry;graph_xlings_splitcompared whole address STRINGS, so the same two were two packages.A project pinning
xim:cuda-nvcc@13.3.33while a rule package declared@>=12.9.86therefore installed both — several gigabytes each — andfillXpkgDirs(keep the first value for a name) answeredxpkg_dirwith one of them. Installed twice, answered once, and nothing said so.The rule
A package's identity is
(namespace, name). The version is always a constraint on it.Two steps decide which version:
xlings/version-override).>=,^,~and comma-combined forms are requirements; a bare version is a choice, adjudicated rather than refused. Without that asymmetry every dependency that pinned a tool the project also pins would become a hard failure on upgrade.This is a comparison, not a search. The version is chosen by adjudication and then checked, so the engine never asks the index which versions exist and carries no constraint solver. The cost is stated in
docs/05rather than hidden: a combination a solver could satisfy is refused instead, and the refusal names the way out.xpkg_dirnow answers a rangeThe version position has accepted ranges all along and xlings resolves one when it installs — but this lookup compared the whole position against a directory name, so
>=8.5.0installed a payload and then reported that nothing was installed. That is the gap that made a rule package unable to state a floor, and the reason every project repeated its rule's package list.What it enables
and nothing else. The follow-up in
mcpp-pluginsmoves each rule's payloads into[target.'cfg(accelerator = ...)'.feature-xlings.rules-*]; this PR is the engine half that makes overriding one of them safe rather than a second install.Also here
docs/11:device-source-unconsumed,accel-backend-undeclared,host-module-missing,tool-version-conflict. The first three shipped in 2026.9.6.5 without one.check_version_pins.shis the guard).docs/specs/manifest-semantics.md§4.3.1 said selectors may not nameaccelerator; 2026.9.6.5 accepts it. Rewritten around the schedule, which is what the split has always been about.examples/09-heterogeneous/{hip,sycl}declarecudain[package] accelerators, which their globs name. Both are skipped by this repo's example job, so only the plugins CI could have caught it.Criteria
627_one_package_one_versionxpkg_diranswers it and the override is reported. Any one of the three alone passes on a broken engine628_a_pin_below_a_stated_floor_is_refused--format jsonreason istool-version-conflict, and raising the pin builds629_a_version_range_is_answered_by_xpkg_dir630_a_rule_brings_its_own_environmenttest_xlings_address_setXpkgPayload.*8.0.RC1)627, 628, 629 and 630 were run against the released 2026.9.6.5 and are red there.