Repository navigation
fix(xvm): let doctor repair a dangling legacy binding edge - #412
Merged
Merged
Conversation
Found by finally running the real-toolchain check the plan had carried from
the start and never executed. On a real installation:
0.4.68 xlings use gcc 15.1.0 -> gcc -> 15.1.0
2026.7.27.0 xlings use gcc 15.1.0 -> refused,
"a member of this release is registered at no such
version"; nothing was changed
`[email protected]` carries a pairwise binding edge to `[email protected]`, an
anchor registered only at 16.1.0. The fail-closed resolution added in #384 is
right to refuse an unresolvable release -- what was missing is any way out.
`doctor` did not report it, because its INV-4 pass only inspects entries that
carry a `bindingGroup` and everything written before 0.4.70 does not. `--fix`
could not repair it. The hint said "reinstall the package", which works but
is a heavy answer to a stale edge, and nothing pointed the user at it. For an
upgrade sold as seamless, that is the opposite.
An edge whose destination version does not exist carries no information: it
cannot name a member anyone could switch to, it can only cause a refusal. So
dropping it is repair without guessing, which is exactly what separates it
from the incoherent-release case that `--fix` deliberately will not resolve.
doctor now reports these as `xvm-legacy-edge-dangling` and `--fix` drops
them, before the deactivation pass so that pass does not see this problem
wearing another shape.
Deliberately narrow: an edge recorded under a version that is *also* absent
is left alone. Resolution always starts from a real (target, version), so
such an edge is unreachable and cannot cause the refusal this fixes. On the
same real installation that is 12 of 32 -- inert, and touching them would be
cleanup rather than repair.
Measured on that installation: 20 edges dropped, `use gcc 15.1.0` works
again, and 16.1.0 still resolves as a two-member release rather than
collapsing into standalone entries.
Verified: 6 new cases (XvmDanglingEdge), one of which reproduces the refusal
before anything is repaired so the fix cannot pass vacuously. 458 tests, 11
binaries green.
An upgrade from 0.4.68/0.4.69 can hit a `use` that is refused where it previously worked: legacy pairwise edges may point at versions that are no longer registered, and fail-closed resolution rejects the whole release. The notes now say what to run. Without it the user's only visible option was the reinstall the error hinted at, which is a heavy answer to a stale edge -- and doctor did not surface the finding in the first place.
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.
发布阻塞项。 补跑计划里一直有、却从未执行的 P4.2(真实工具链验证)时发现的。
症状:真实安装上的行为回退
用真实的
~/.xlings.json(246 targets / 372 条目)在隔离 HOME 里测:原因:
[email protected]带一条指向[email protected]的 legacy 成对边,而这个锚点只注册了 16.1.0。为什么之前没被发现
doctor报不出来 —— 它的 INV-4 检查只看有bindingGroup的条目,而 0.4.70 之前写的状态全都没有--fix修不了对一个宣称无感升级的版本,这是反面。
修法
指向不存在版本的边不携带任何信息 —— 它描述不出任何可切换的成员,只会造成拒绝。所以剪掉它是不需要猜测的修复,这正是它区别于"发布内部不一致"(
--fix刻意不碰那种)的地方。doctor 现在报
xvm-legacy-edge-dangling,--fix剪除,且排在停用扫描之前 —— 否则那一遍会看到同一个问题换了个样子。刻意保守
拥有者版本本身也不存在的边,不动。 解析永远从真实的
(target, version)出发,这类边不可达、造不成本次要修的拒绝。同一台真实机器上是 32 条里的 12 条 —— 惰性垃圾,动它们属于清理而非修复。实测(真实配置)
use gcc 15.1.0测试
6 个新用例(
XvmDanglingEdge),其中一个先复现拒绝,保证修复不是空过。458 测试 / 11 二进制全绿。