[PR #3499] [CLOSED] fix(native): preserve arm64e variant for otool #5782

Closed
opened 2026-10-31 01:09:24 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3499
Author: @zpf2234
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/native-arm64e-otool


📝 Commits (1)

  • ad0c8c2 fix(native): preserve arm64e variant for otool

📊 Changes

2 files changed (+10 additions, -4 deletions)

View changed files

📝 src/native/NativeMachoInspection.test.ts (+3 -1)
📝 src/native/NativeMachoInspection.ts (+7 -3)

📄 Description

Summary

Fixes #3389. A universal Mach-O containing x86_64 and arm64e.x1 can be selected correctly by REA, but otool receives arm64e after the variant suffix is stripped and may reject the valid slice.

Problem and expected behavior

dyld_info already receives the exact lipo spelling. otool needs the same exact spelling for newer arm64e.* variants on affected Apple toolchains; the generic base spelling is not equivalent for slice selection.

Change and scope

Keep the exact architecture name only for otool when the selected name is an arm64e.* variant. Other tools retain their existing base-family behavior, and dyld_info remains unchanged. The test adds a universal x86_64/arm64e.x1 selection case and checks the command argument.

Contract and boundary impact

  • Semantic owner and earliest changed stage: native Mach-O slice command construction.
  • Contribution scope fit and linked maintainer decision: ordinary platform compatibility fix; no additional decision required.
  • CLI and MCP/tool-catalog contract: no schema or catalog change.
  • Provider, bridge, target-format, or platform compatibility: improves Apple otool handling for lipo-reported arm64e variants.
  • Evidence, artifact, provenance, or reconstruction contract: keeps the selected slice identity in the native command invocation.
  • Target selection, authority, upstream behavior, and cleanup details: read-only native inspection; no process launch or target mutation.
  • Generated metadata or package impact: none.

Evidence and regression coverage

  • Tests added or updated: src/native/NativeMachoInspection.test.ts covers selection of arm64e.x1 alongside x86_64 and preserves existing base-family expectations for other variants.
  • Base reproduction or other evidence: issue #3389 reports direct otool -arch arm64e.x1 success and REA's -arch arm64e failure.
  • Remaining proof gaps: the test uses the repository's command fixture; a real Apple otool run on a universal arm64e.x1 binary remains to be executed.

Validation performed

  • npm run test:focused -- src/native/NativeMachoInspection.test.ts — 20 passed.
  • npm run check:fast — typecheck and lint passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real provider or OS coverage: no live Apple toolchain was available on this Windows host.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: read-only argument selection; no new authority.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/3499 **Author:** [@zpf2234](https://github.com/zpf2234) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/native-arm64e-otool` --- ### 📝 Commits (1) - [`ad0c8c2`](https://github.com/morluto/rea/commit/ad0c8c26486d7f69a3bb30d6f49a3674da1e2dfd) fix(native): preserve arm64e variant for otool ### 📊 Changes **2 files changed** (+10 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/native/NativeMachoInspection.test.ts` (+3 -1) 📝 `src/native/NativeMachoInspection.ts` (+7 -3) </details> ### 📄 Description ## Summary Fixes #3389. A universal Mach-O containing `x86_64` and `arm64e.x1` can be selected correctly by REA, but `otool` receives `arm64e` after the variant suffix is stripped and may reject the valid slice. ## Problem and expected behavior `dyld_info` already receives the exact lipo spelling. `otool` needs the same exact spelling for newer `arm64e.*` variants on affected Apple toolchains; the generic base spelling is not equivalent for slice selection. ## Change and scope Keep the exact architecture name only for `otool` when the selected name is an `arm64e.*` variant. Other tools retain their existing base-family behavior, and `dyld_info` remains unchanged. The test adds a universal `x86_64`/`arm64e.x1` selection case and checks the command argument. ## Contract and boundary impact - Semantic owner and earliest changed stage: native Mach-O slice command construction. - Contribution scope fit and linked maintainer decision: ordinary platform compatibility fix; no additional decision required. - CLI and MCP/tool-catalog contract: no schema or catalog change. - Provider, bridge, target-format, or platform compatibility: improves Apple `otool` handling for lipo-reported arm64e variants. - Evidence, artifact, provenance, or reconstruction contract: keeps the selected slice identity in the native command invocation. - Target selection, authority, upstream behavior, and cleanup details: read-only native inspection; no process launch or target mutation. - Generated metadata or package impact: none. ## Evidence and regression coverage - Tests added or updated: `src/native/NativeMachoInspection.test.ts` covers selection of `arm64e.x1` alongside `x86_64` and preserves existing base-family expectations for other variants. - Base reproduction or other evidence: issue #3389 reports direct `otool -arch arm64e.x1` success and REA's `-arch arm64e` failure. - Remaining proof gaps: the test uses the repository's command fixture; a real Apple `otool` run on a universal arm64e.x1 binary remains to be executed. ## Validation performed - `npm run test:focused -- src/native/NativeMachoInspection.test.ts` — 20 passed. - `npm run check:fast` — typecheck and lint passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real provider or OS coverage: no live Apple toolchain was available on this Windows host. - Package or release metadata impact: none. - Security, privacy, process, or containment review: read-only argument selection; no new authority. ## Author readiness Human owner: <!-- @GitHub-handle --> - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:24 +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#5782
No description provided.