Repository navigation
Conversation
project_apple_application_graph listed every component but never said when Mach-O code sat where Apple's "Placing content in a bundle" says code does not belong, so analysts compared each path with Apple's table by hand. The projection now returns an additive, optional bundle_placement section. It evaluates the rules whose facts the bundle anatomy already owns: observed layout, entry kind, path, and Mach-O format from magic. - code-in-resource-location: the outermost Mach-O file or nested bundle under Contents/Resources/ or Versions/<version>/Resources/. - framework-root-content: non-symlink framework root entries other than Versions/, and Versions/ entries other than versions and Current. - grouping-directory-in-code-location: a directory without bundle anatomy directly in a code location from Apple's table that holds Mach-O code, also citing dotted-directory-name for dotted names. The standalone-dylib and nested-framework rules need the platform from target content and the Mach-O file type, which the inventory does not carry, so they are reported as not evaluated rather than compliant. Partial inventory coverage and files without a byte-established format make the affected rules partial. Archive members are not treated as placed code. The anatomy now indexes symlinks and exposes its tree and iOS-family layout predicate so placement reuses its parsed facts. Historical projections without the field still parse; the field participates in projection_id. Validation: the six new projection tests failed on the base and pass; the extended CLI/MCP boundary test, related Apple boundary and acceptance tests, check:fast, and docs:check pass. Refs morluto#4312
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The documentation follow-up appears safe to merge. SummaryAdds opt-in Apple bundle placement reports while preserving default projection behavior. This follow-up clarifies which bundle directories appear only when placement checks are requested.
No superseding change was found in available local history. Remote supersession status was not verified. Reviews (11) · Last reviewed commit: "docs(apple): clarify opt-in bundle recog..." · Reviewed by Greptile |
Review follow-up for bundle placement. - Placement exempted directories with bundle anatomy, such as an Automator Act.action with Contents/, from the grouping rule. The anatomy never listed them as bundles, so their contents were never evaluated while coverage stayed complete. The anatomy now lists a dotted directory with bundle anatomy as a bundle (role "bundle"), following Apple's rule that code signing treats a dotted directory as a bundle. Placement keeps no recognizer of its own and exempts only listed bundles. - The anatomy derives versioned-framework from any observed Versions/ directory, and main's tests pin that for apps. Framework-only rules and code locations now also require the framework role, so an app with a Versions/ resource folder no longer has its root files reported. - An application found inside an inventoried archive, such as Fixture.zip/Fixture.app, is excluded like other archive members. The scope check now covers every ancestor, not only those below the root. - The tree index keeps one occurrence of a repeated path. Placement now treats repeated paths as unknown, so the rule reports partial coverage instead of trusting the last occurrence. Tests: four new cases (dotted anatomy bundle, Versions/ in an app, repeated path, app inside an archive) and the updated macOS case fail before this change and pass after. The fixture now gives repeated paths the inventory's duplicate ordinal. The Apple domain (334) and boundary (133) tests pass. check:fast and docs:check pass.
A Mach-O image was copied into every finding whose path contains it, so nested grouping directories multiplied the image records by nesting depth, and an unknown file under nested grouping directories was counted once per directory in the coverage limitation. Findings now carry mach_o_image_count, and bundle_placement.mach_o_images lists each image under a finding's path once. The output grows with the inventory instead of with nesting depth, and unknown files are counted once.
…overage status Main added the local-completeness-enum architecture guard: a local enum that contains "complete" must use coverageStatusSchema from src/domain/coverage instead. The placement rule status was a local ["complete", "partial", "not-evaluated"] enum, so the guard failed on the branch merged with main. The rule status is now coverageStatusSchema. A rule the projection cannot evaluate reports "unknown" and keeps its limitation that starts "Not evaluated", so the reason is still recorded. The guide describes the shared status.
# Conflicts: # src/domain/apple/appleApplication.ts
…he archive Partial inventory pages can list Contents/Resources/app.asar/addon.node without Contents/Resources/app.asar. Placement excluded a path only when an inventoried file encloses it, so that member was reported as Mach-O code in a resource location. The bundle anatomy now records which directories the inventory lists. With partial coverage a path is placed only when every directory above it is listed, and a bundle only when its own directory is listed as well. Any other path is not evaluated and each rule names the first one in a limitation. Complete inventories list every enclosing entry, so their results do not change. The new test fails before this change (the asar member is a finding) and passes after it; it also fails if a bundle with an unlisted directory is evaluated.
|
Fixed in 4d3cc2b. Root cause: placement excluded a path only when an inventoried file encloses it. Partial pages can list Contents/Resources/app.asar/addon.node without Contents/Resources/app.asar, and the tree cannot tell an unlisted archive from an implied directory. Fix: the bundle anatomy now records which directories the inventory lists. With partial coverage a path is placed only when every directory above it is listed, and a bundle only when its own directory is listed as well. Any other path is not evaluated, and each rule names the first one in a limitation. Complete inventories list every enclosing entry, so their results do not change. Validation: the new test lists an app.asar member and a bundle's code without app.asar or the bundle directory. Before the fix the asar member is a code-in-resource-location finding; after it, only the listed payload.dat is reported and the limitation names 3 unplaced paths. It also fails if a bundle with an unlisted directory is evaluated. Apple projection tests (64), the Apple CLI boundary test, architecture-guards, check:ci:fast and docs:check pass on the branch merged with main 072b578. |
|
Status since the last review:
About the CI failure on 4d3cc2b: I ran the 145 selected test files locally. 4 failed, in processFinalization, environmentServeMcp and mcpDoctor. None of them touches Apple code. On an idle machine, environmentServeMcp (1) and mcpDoctor (2) fail the same way on main 42cab26 alone, and processFinalization passes on both main and this branch. The description now matches the code: shared status values, the per-finding mach_o_image_count, and partial-page placement. |
When the inventory lists app.asar as a file and also lists its members, indexTree adds app.asar as a directory implied by those member paths. detectBundles trusted that entry, so an archive whose members include Info.plist or Contents/ was reported as a dotted bundle. detectBundles now skips any directory path the inventory lists as a file. A test lists app.asar with Info.plist and Contents/ members and expects no bundle at the archive path.
|
@Davmunrey thanks for the PR — this branch has merge conflicts with |
Refs #4312.
project_apple_application_graphcan report static Apple bundle placement findings when the caller setsinclude_bundle_placement: truein its CLI JSON input or MCP arguments. Default projections retain their existing shape, Evidence and projection identity for the same source. The opt-in result commits rule coverage and findings to its own content ID.The report covers code in macOS resource locations, unexpected content at versioned framework roots, and code grouped under extra directories. A recognized suffix or an empty
Contents/directory alone cannot exempt a grouping directory. Inventoried plist or executable facts corroborate bundle structure. Partial inventories retain uncertainty about grouping and archive membership. The two rules for platform-specific standalone dylibs and nested frameworks remain unevaluated, so this PR leaves #4312 open.Validation
Contents/PlugIns/Group.bundlecontaining a Mach-O child.Author readiness
Human owner: @Davmunrey
Before merge
type(scope): outcome.