Skip to content

fix(apple): pair bridge hypotheses within one application root - #931

Merged
kaoru0822-kitauji merged 3 commits into
mainfrom
fix/apple-bridge-roots
Oct 7, 2026
Merged

kaoru0822-kitauji merged 3 commits into
mainfrom
fix/apple-bridge-roots

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Follow-up to #922. It merged before these two review fixes were pushed. They answer the Codex comments r4205864180 and r4205864189.

Summary

  • Bridge candidates across applications: a ZIP or DMG with two applications produced bridge candidates from one app's scripts to the other app's native code. Candidates now pair a script only with native code owned by the same application root. Components outside every root, such as an IPA's SwiftSupport/, pair only with each other.
  • Framework Info.plist guessed from one file: when a versioned framework had several Versions/<v>/ directories but only one contained Resources/Info.plist, that plist was chosen. Versions/Current decides which version applies and is not inventoried. With several real versions, info_plist_path now stays null, and the limitation explains why.

Contract and boundary impact

  • Schema: none. Results change only in the two cases above.
  • Generated metadata: none.

Evidence and regression coverage

  • src/domain/appleApplication.test.ts gains two cases, each failing on main:
    • a ZIP containing First.app and Second.app, where only same-root pairs remain;
    • a framework with versions A and B where only A has a plist, which is now unknown.

Validation performed

  • npm run test:focused -- src/domain/appleApplication.test.ts tests/composition/analysis-sessions/appleApplication.test.ts tests/boundary/mcp/mobileApplicationGraphMcp.test.ts: 18 passed.
  • npm run check:changed: passed.
  • npm run docs:generate: no changes.
  • npm run verify:macos-bundle (before rebasing onto main): passed.

Compatibility, safety, and release

  • Breaking changes: none.
  • Real Hopper/Ghidra coverage: not applicable.

🤖 Generated with Claude Code

A ZIP or DMG holding two applications produced bridge candidates from
scripts in one app to native code in the other. Candidates now pair only
components owned by the same application root; components outside every
root pair only with each other.

A versioned framework with several real version directories now keeps
its Info.plist unknown even when only one version has a plist, because
Versions/Current, which is not inventoried, decides which applies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T11:49:58.461725Z 2e81e86 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9226ade511

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const directories = contentDirectories(bundle, layout, tree);
// With several real versions, Versions/Current (a symlink outside the
// inventory) decides which plist applies, so the plist stays unknown.
if (directories.length !== 1) return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count only actual directories as framework versions

When Versions/ contains an ordinary file such as .DS_Store or README alongside the sole real version A, contentDirectories() includes that file because Tree.children stores every child name without its entry kind. This new cardinality check therefore returns null for a valid Versions/A/Resources/Info.plist and emits a misleading multiple-version limitation. Retain or infer the child kind and exclude direct files and symlinks before counting real version directories.

AGENTS.md reference: AGENTS.md:L54-L56

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. In 2e81e86, the anatomy tree records which paths are directories, either observed as directory entries or implied by a deeper path. Framework versions are counted only among those, so Versions/.DS_Store and the Current symlink no longer make a single-version framework ambiguous. A regression test covers .DS_Store beside Versions/A.

A file such as Versions/.DS_Store beside the only real version made the
framework look multi-versioned, so its Info.plist became unknown with a
misleading limitation. Version directories are now limited to entries
observed as directories or implied by deeper paths.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e81e867b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const directories = contentDirectories(bundle, layout, tree);
// With several real versions, Versions/Current (a symlink outside the
// inventory) decides which plist applies, so the plist stays unknown.
if (directories.length !== 1) return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document multi-directory plist selection

When a framework has Versions/A/Resources/Info.plist and a second real Versions/B directory without a plist, this condition now returns null because there are two version directories. However, docs/apple-application-analysis.md lines 99–101 still says info_plist_path is null only when there are zero or several plist files; this scenario has exactly one. Update the guide to describe the new directory-based ambiguity so the documented result contract matches the projection.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. In 6d74992, the guide now says info_plist_path is null when the framework has more than one real Versions/<version>/ directory, even if only one of them holds a plist, because Versions/Current decides which applies. It is also null when the single version directory has no Resources/Info.plist. This matches the projection and the limitation text.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 7acf4e7 into main Oct 7, 2026
22 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the fix/apple-bridge-roots branch October 7, 2026 12:41
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
fix(apple): pair bridge hypotheses within one application root
@morluto morluto added bug Something isn't working area: bridge Hopper bridge (Python) related changes labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: bridge Hopper bridge (Python) related changes bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants