[PR #2755] [MERGED] test(apple): keep the same-named slice dyld fixture openable on x64 hosts #5366

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2755
Author: @kaoru0822-kitauji
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @N0zoM1z0

Base: main ← Head: test/dylib-same-name-slices-portable


📝 Commits (1)

  • 98432f9 test(apple): keep the same-named slice dyld fixture openable on x64 hosts

📊 Changes

1 file changed (+8 additions, -4 deletions)

View changed files

📝 tests/boundary/cli/dylibResolutionCli.test.ts (+8 -4)

📄 Description

Problem

The CLI boundary test I added in #2733, dylibResolutionCli.test.ts > reports each same-named slice's own embedded dyld environment, fails on Linux x64. That covers Test shard (1/6) and Portable tests on main and on every PR merge build:

"code":"target_unavailable", "message":"Cannot open artifact: FAT binary has no host-compatible x64 architecture."

The fixture is a universal executable with only arm64e and arm64e.x1 slices. Target resolution (parseBinaryTarget) requires a slice the host can run, so an x64 host refuses the bundle before tracing starts. I wrote and verified the test only on Apple Silicon, where arm64e is host-compatible.

Fix

Only test data changes. A plain x86_64 slice with no LC_DYLD_ENVIRONMENT is added, so every CI host can open the bundle. The two arm64e slices still carry the settings under test. The roots assertion now counts the arm64e roots (2) rather than all roots. The findings assertion is unchanged: one dyld-environment-present finding per arm64e slice, each with its own setting.

Validation

  • Native arm64 macOS: npm run test:focused -- tests/boundary/cli/dylibResolutionCli.test.ts gives 11 passed.
  • Simulated x64 host: the CLI child got NODE_OPTIONS=--import with a preload setting process.arch = "x64". This was a temporary local edit to the test environment, not committed.
    • Main's version reproduces the exact CI failure (FAT binary has no host-compatible x64 architecture).
    • This branch passes all 11 tests.
  • format:check passes.

The other current shard failure, releaseCheckpoint.test.ts, is unrelated and is addressed by #2741.

🤖 Generated with Claude Code


🔄 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/2755 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `test/dylib-same-name-slices-portable` --- ### 📝 Commits (1) - [`98432f9`](https://github.com/morluto/rea/commit/98432f913dabe2a089d7d927f241863360145479) test(apple): keep the same-named slice dyld fixture openable on x64 hosts ### 📊 Changes **1 file changed** (+8 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/cli/dylibResolutionCli.test.ts` (+8 -4) </details> ### 📄 Description ## Problem The CLI boundary test I added in #2733, `dylibResolutionCli.test.ts > reports each same-named slice's own embedded dyld environment`, fails on Linux x64. That covers Test shard (1/6) and Portable tests on main and on every PR merge build: ``` "code":"target_unavailable", "message":"Cannot open artifact: FAT binary has no host-compatible x64 architecture." ``` The fixture is a universal executable with only `arm64e` and `arm64e.x1` slices. Target resolution (`parseBinaryTarget`) requires a slice the host can run, so an x64 host refuses the bundle before tracing starts. I wrote and verified the test only on Apple Silicon, where `arm64e` is host-compatible. ## Fix Only test data changes. A plain `x86_64` slice with no `LC_DYLD_ENVIRONMENT` is added, so every CI host can open the bundle. The two `arm64e` slices still carry the settings under test. The roots assertion now counts the `arm64e` roots (2) rather than all roots. The findings assertion is unchanged: one `dyld-environment-present` finding per `arm64e` slice, each with its own setting. ## Validation - Native arm64 macOS: `npm run test:focused -- tests/boundary/cli/dylibResolutionCli.test.ts` gives 11 passed. - Simulated x64 host: the CLI child got `NODE_OPTIONS=--import` with a preload setting `process.arch = "x64"`. This was a temporary local edit to the test environment, not committed. - Main's version reproduces the exact CI failure (`FAT binary has no host-compatible x64 architecture`). - This branch passes all 11 tests. - `format:check` passes. The other current shard failure, `releaseCheckpoint.test.ts`, is unrelated and is addressed by #2741. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:06:05 +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#5366
No description provided.