Repository navigation
fix(apple): match Swift runtime libraries by file name - #9796
Draft
liugedragon wants to merge 1 commit into
Draft
liugedragon wants to merge 1 commit into
liugedragon wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
Apple application projections infer
swift-objective-cfrom an ordinary resource below a directory namedlibswiftCore.dylib:The shared Swift predicate examined every path segment. It now examines the file name, preserving the existing case-insensitive matching for actual
libswift*.dylibentries, includingSwiftSupportentries.No dedicated issue is linked: the false positive was reproduced while inspecting the existing convention owner. Related #1506 and #7256 concern bounded runtime conventions; this fixes the remaining Swift-specific ancestor match.
Problem and expected behavior
An IPA containing
Info.plistand the resource above reportsruntime_families: ["swift-objective-c"]. After this change it reports[]. A leaf namedlibswiftCore.dylibstill reports the Swift convention. These are path-based inferences; they do not establish runtime loading.Change and scope
Change
isSwiftRuntimeLibraryinsrc/domain/nativeConvention.ts, its only consumer being Apple runtime-family projection. Keep other runtime/framework conventions unchanged. Four regressions create real ZIP files, inventory them through the production artifact reader, and project the resulting Evidence. They cover two directory-name false positives and two valid library leaves, including mixed case andSwiftSupport.Contract and boundary impact
identifyRuntimeFamiliesin Apple projection. No additional representation or parsing path.Expected effects:
Evidence and regression coverage
On base
55b6d2ca200649d433480f0aa45d8ac202436cae, the four retained ZIP cases give 2 assertion failures and 2 passing controls. After the predicate correction, all four pass. The tests also check that inventory coverage stays complete.The earlier runtime-convention fix was checked for sibling behavior: non-Swift runtime matching already restricts library names to the leaf while allowing framework ancestors. This change applies the same file distinction to Swift.
Validation performed
Windows x64, Node 24.22.1, npm 11.16.0, locked dependencies. Optional provider installation scripts were not run; repository preparation ran separately.
node node_modules/vitest/vitest.mjs run tests/boundary/filesystem/appleApplication.test.ts -t "classifies the Swift library leaf"— final four cases passed.npm run check:fast— normal pre-push hook passed both typecheck and lint tasks, with zero cache hits.node scripts/run-typescript.mjs --noEmit— passed.npm run lint— passed: 6,958 files, zero errors, 3,625 warnings; resolved module boundaries checked in 4,069 source files.node scripts/verify-test-discovery.mjs— all 3,336 test files discovered exactly once.oxfmt --checkandgit diff --check— passed.Core.framework/Versions/CurrentwithEPERM. The same original test failed identically in a clean detached worktree of the base revision. No privilege or test-expectation change was made.Compatibility, safety, and release
No migration or package change. This is source-level production inventory/projection coverage on synthetic ZIPs; a packaged CLI/MCP workflow, macOS host and real Swift application were not exercised. No runtime-loading claim is made. The existing Windows symlink test remains unverified on a host with symlink permission.
Author readiness
Human owner: @liugedragon