fix: payload discovery must skip delegating-package husks (#120)#121
Merged
Conversation
A delegating index package (xim:linux-headers -> scode:linux-headers) leaves a metadata-only husk (.xim-installed + .xpkg.lua) under its own prefix; find_sibling_package counted .xpkg.lua as content, returned the husk, and probe_payload_paths silently dropped the kernel-header include path -- every glibc toolchain build then died at <linux/limits.h> (e2e 29/31 on a cold sandbox). - payload qualification: dot-prefixed entries are metadata, not content; optional requiredRelPath must exist in the version dir - find_home_tool: search across all index prefixes (was hardcoded xim-x-) with the same qualification rules - probe: require include/linux/limits.h (linux-headers) and include/features.h (glibc fallback); log when no payload qualifies - CI cache hygiene: give ci-linux/ci-windows sandbox caches a '-ci-' lineage disjoint from release's '-release-' caches; a bare restore prefix used to swap in the release-flavored sandbox, which is what exposed this cold-path bug on main
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.
Fixes #120 (ci-linux e2e
29_toolchain_partial_versions.sh/31_transitive_deps.shfailing on main).Root cause (forensics)
~/.mcppcache holding an anciently-installed, complete toolchain — the cold first-run install path was never exercised. The old cache got evicted; the next run's bare restore prefixmcpp-sandbox-Linux-then matched release.yml'smcpp-sandbox-Linux-release-…cache (different sandbox flavor), and the run finally hit the true cold path.xim:linux-headersis a delegating package — the payload installs underscode-x-linux-headers/…, whilexim-x-linux-headers/<v>/is left as a metadata-only husk (.xim-installed+.xpkg.lua).find_sibling_packagecounted.xpkg.luaas content, returned the husk, andprobe_payload_pathssilently dropped the kernel-header include dir → glibc'sbits/local_lim.hfails at#include <linux/limits.h>in the std-module precompile.find_home_tool(the fallback) was worse: hardcodedxim-x-prefix, no content validation — it also returned the husk.Fix
requiredRelPathmust exist inside the version dir (probe passesinclude/linux/limits.h/include/features.h).find_home_toolnow scans all index prefixes (xim-x-,scode-x-, …) with the same rules.-ci-cache lineage for ci-linux/ci-windows, disjoint from release's-release-; release no longer falls back to the bare prefix either.Verification
XlingsSiblingPackage.*,XlingsHomeTool.*): husk-only → no match; husk + scode payload → scode payload wins; contentful-but-wrong candidate rejected via requiredRelPath; non-xim prefix found via home lookup. Full suite 18/18.