[PR #1306] [CLOSED] fix(apple): recognize legacy simulator Mach-O platforms #2785

Closed
opened 2026-10-17 21:10:14 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1306
Author: @rudycelekli
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: fix/legacy-simulator-platform-20261009


📝 Commits (2)

  • eee9c49 fix(apple): recognize legacy simulator Mach-O platforms
  • a6e6876 test(apple): schedule legacy simulator verification in Xcode lane

📊 Changes

4 files changed (+171 additions, -3 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -0)
➕ scripts/verify/apple/legacy-simulator.mjs (+128 -0)
📝 src/artifacts/apple/MachoLoadCommandReader.test.ts (+33 -0)
📝 src/artifacts/apple/MachoLoadCommandReader.ts (+8 -3)

📄 Description

Problem

Legacy x86/i386 iOS and watchOS simulator images use version-min load commands rather than LC_BUILD_VERSION. REA classified them as device images, so a legacy simulator executable could incorrectly fail dependency resolution against a modern simulator dylib.

Change

Use the image CPU type when interpreting legacy platform commands, matching Apple's dyld rules. Preserve modern explicit platform IDs, ARM device and macOS behavior; tvOS legacy simulator mapping applies to x86_64 only.

Verification

  • Frozen regressions: five platform cases and an actual Apple-linked executable/dylib trace failed before the fix.
  • After: 109 tests across the load-command reader, dependency-resolution domain and native filesystem regression passed.
  • npm run check passed (six tasks).
  • npm run verify:test-discovery passed: 683 test files discovered exactly once.
  • npm run verify:macos-bundle passed with real CLI/stdio MCP, directory/ZIP/DMG containers, 22 dependency edges, 11 otool slices and real dyld controls.
  • No Hopper/Ghidra run was required or performed; this changes read-only Mach-O metadata. The new simulator pair was inspected, not executed in a simulator. Other platforms skip the macOS-only producer regression. Hosted checks may still be pending.

AI assistance was used for investigation, implementation and verification.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1306 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/legacy-simulator-platform-20261009` --- ### 📝 Commits (2) - [`eee9c49`](https://github.com/morluto/rea/commit/eee9c4929d29d0136d112e69ad5eca8a0607ef04) fix(apple): recognize legacy simulator Mach-O platforms - [`a6e6876`](https://github.com/morluto/rea/commit/a6e6876d98dae74e1ba3f83d011c4fc6c565e464) test(apple): schedule legacy simulator verification in Xcode lane ### 📊 Changes **4 files changed** (+171 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -0) ➕ `scripts/verify/apple/legacy-simulator.mjs` (+128 -0) 📝 `src/artifacts/apple/MachoLoadCommandReader.test.ts` (+33 -0) 📝 `src/artifacts/apple/MachoLoadCommandReader.ts` (+8 -3) </details> ### 📄 Description ## Problem Legacy x86/i386 iOS and watchOS simulator images use version-min load commands rather than `LC_BUILD_VERSION`. REA classified them as device images, so a legacy simulator executable could incorrectly fail dependency resolution against a modern simulator dylib. ## Change Use the image CPU type when interpreting legacy platform commands, matching Apple's dyld rules. Preserve modern explicit platform IDs, ARM device and macOS behavior; tvOS legacy simulator mapping applies to x86_64 only. ## Verification - Frozen regressions: five platform cases and an actual Apple-linked executable/dylib trace failed before the fix. - After: 109 tests across the load-command reader, dependency-resolution domain and native filesystem regression passed. - `npm run check` passed (six tasks). - `npm run verify:test-discovery` passed: 683 test files discovered exactly once. - `npm run verify:macos-bundle` passed with real CLI/stdio MCP, directory/ZIP/DMG containers, 22 dependency edges, 11 otool slices and real dyld controls. - No Hopper/Ghidra run was required or performed; this changes read-only Mach-O metadata. The new simulator pair was inspected, not executed in a simulator. Other platforms skip the macOS-only producer regression. Hosted checks may still be pending. AI assistance was used for investigation, implementation and verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:10:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2785
No description provided.