fix(aterm): name the architecture LaunchServices should launch into #1305

Merged
coilyco-ops merged 1 commit from aos/claude/kb87-native-arch into main 2026-08-27 03:55:28 +00:00
Owner

Closes #1291.

Root cause, measured on kais-macbook-pro (M3 Pro):

  • A bundle whose CFBundleExecutable is a shell script gives LaunchServices no Mach-O slices to read, so it starts the wrapper under Rosetta. Launching a probe bundle with arch -arm64 open (what Finder does) reported translated=1 arch=i386 inside the wrapper.
  • aterm and claude still run native, being arm64-only, but the x86_64 preference propagates down the tree, so kitty and every universal binary below it pick x86_64. vmmap confirms it: aterm and claude are ARM64, the kitty above them and the /bin/zsh below them are X86-64 (translated).
  • Every aterm-launched kitty on the machine was translated. The one kitty Kai opened herself was ARM64.
  • That is why brew upgrade aos inside a session saw an Intel Mac and refused the arm-only formula.

Fix and the alternative that failed:

  • LSArchitecturePriority naming the generating host's architecture: wrapper translated=0 arch=arm64, and the kitty it opens is ARM64.
  • LSRequiresNativeExecution: measured, still translated. Not used.

Also here, from a test that started failing once the bundles carried a linked terminal: the stubbed launch tests now run against an empty HOME. A launch prefers the role's installed app, so without that isolation they answer about the machine they run on rather than about the code.

Closes #1291. Root cause, measured on kais-macbook-pro (M3 Pro): - A bundle whose `CFBundleExecutable` is a shell script gives LaunchServices no Mach-O slices to read, so it starts the wrapper under Rosetta. Launching a probe bundle with `arch -arm64 open` (what Finder does) reported `translated=1 arch=i386` inside the wrapper. - `aterm` and `claude` still run native, being arm64-only, but the x86_64 preference propagates down the tree, so kitty and every universal binary below it pick x86_64. `vmmap` confirms it: `aterm` and `claude` are `ARM64`, the kitty above them and the `/bin/zsh` below them are `X86-64 (translated)`. - Every aterm-launched kitty on the machine was translated. The one kitty Kai opened herself was `ARM64`. - That is why `brew upgrade aos` inside a session saw an Intel Mac and refused the arm-only formula. Fix and the alternative that failed: - `LSArchitecturePriority` naming the generating host's architecture: wrapper `translated=0 arch=arm64`, and the kitty it opens is `ARM64`. - `LSRequiresNativeExecution`: measured, still translated. Not used. Also here, from a test that started failing once the bundles carried a linked terminal: the stubbed launch tests now run against an empty `HOME`. A launch prefers the role's installed app, so without that isolation they answer about the machine they run on rather than about the code.
fix(aterm): name the architecture LaunchServices should launch into
All checks were successful
ci / aos-eval-tests (pull_request) Successful in 7s
ci / ward-doctor (pull_request) Successful in 5s
ci / aos-cli-tests (pull_request) Successful in 23s
ci / gate (pull_request) Successful in 48s
a738e06c87
Closes #1291. A bundle whose CFBundleExecutable is a shell script gives
LaunchServices no Mach-O slices to read, so it starts the wrapper under
Rosetta on Apple Silicon. aterm and claude still run native, being arm64
only, but the x86_64 preference propagates, so kitty and every universal
binary below it (/bin/zsh, brew's ruby) pick x86_64. That is why `brew
upgrade aos` in a session saw an Intel Mac and refused the arm-only
formula.

`LSArchitecturePriority` naming the generating host's architecture fixes
it. `LSRequiresNativeExecution` was measured and does not.

The stubbed launch tests now run against an empty home. A launch prefers
the role's installed app, so without that they answer about this machine
rather than about the code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Agent-Role: platform
Sign in to join this conversation.
No reviewers
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
coilyco-flight-deck/agentic-os!1305
No description provided.