Repository navigation
fix(apple): keep unrooted extensionless Mach-O in IPA executables - #3300
Conversation
IPA projections keep components outside every application root, but executables required root membership and native_libraries matched only .dylib/.so names, so an unrooted extensionless Mach-O such as SwiftSupport/HelperTool was in neither list and formed no bridge candidate. List unrooted Mach-O images under executables unless they are already native libraries. Fixes #3174
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
|
Thank you, @Sriram-PR, for catching the unrooted extensionless Mach-O case in IPA inventories. Recognizing helper tools such as |
Summary
For IPA inventories,
project-apple-application-graphkeeps components outside every application root, but an extensionless Mach-O there (for exampleSwiftSupport/HelperTool) was dropped from every component array and never paired with unrooted JavaScript.executablesrequired application-root membership andnative_librariesonly matched.dylib/.sonames, so the helper fit neither.Fixes #3174
Problem and expected behavior
Smallest trigger: an IPA with
SwiftSupport/HelperTool(Mach-O) andSwiftSupport/outside.js.docs/apple-application-analysis.mdsays IPA components outside every root stay in the component lists and their JavaScript/native candidates pair with other unrooted components. Expected: the helper is listed as a native component, stays unrooted, and forms theoutside.js -> HelperToolcandidate.Change and scope
executablesinclassifyComponentsnow includes a Mach-O outside every root unless it is already a native library by name. Unrooted.dylib/.soimages stay only innative_libraries, as the existing sidecar test expects..dylib/.sotest is shared through a smallisNativeLibraryhelper so both arrays use the same rule.Contribution scope: ordinary fix within existing boundaries; no scope decision needed.
Contract and boundary impact
src/domain/apple/appleApplication.ts, component classification in the Apple projection.components.executablesandbridge_candidatescan now include unrooted extensionless Mach-O images.projection_idchanges; component paths and hashes are reported as inventoried, and no application-root attribution is added.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
src/domain/apple/appleApplication.test.ts, an IPA with a rooted executable,SwiftSupport/HelperTool,SwiftSupport/iphoneos/libswiftCore.dylibandSwiftSupport/outside.js. It checks thatexecutablesholds the rooted executable and the helper (not the unrooted dylib) and that both unrooted native components pair withoutside.js.executableslacks the helper and theoutside.js -> HelperToolcandidate is missing. The existing sidecar test, which keeps unrooted dylibs out ofexecutables, still passes.inspect-artifactandproject-apple-application-graph:For evidence-bearing changes:
Validation performed
npm run test:local -- src/domain/apple/appleApplication.test.ts— 20 passed (new test fails on the base revision)npm run test:focusedon the Apple/Android/Harmony projection boundary and acceptance tests (tests/boundary/filesystem/{appleApplication,android/application,harmony/application}.test.ts,tests/acceptance/applications/mobileFrameworkConventions.test.ts,tests/boundary/cli/jsonInputStatus.test.ts,ArtifactOccurrenceIdentity.test.ts) — 7 files, 93 passednpm run check:fast— typecheck and lint passednpm run build:cachedon base and on this branchCompatibility, safety, and release
Author readiness
Human owner: @Sriram-PR
Before merge
type(scope): outcome.