Skip to content

test(apple): keep the same-named slice dyld fixture openable on x64 hosts - #2755

Merged
N0zoM1z0 merged 1 commit into
mainfrom
test/dylib-same-name-slices-portable
Oct 13, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
test/dylib-same-name-slices-portable

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

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

…osts

The test added in #2733 wrote a universal executable with only arm64e and
arm64e.x1 slices. Target resolution requires a host-compatible slice, so
on Linux x64 CI the CLI refused the bundle ("FAT binary has no
host-compatible x64 architecture") and the test failed on main and
every PR merge build.

Add a plain x86_64 slice without LC_DYLD_ENVIRONMENT. The two arm64e
slices still carry the settings under test, and the assertion counts
the arm64e roots instead of all roots.

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

chatgpt-codex-connector Bot commented Oct 13, 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-13T10:28:42.447519Z 98432f9 PR opened
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Adds a plain x86_64 slice so the same-named slice test can open its fixture on x64 hosts.

  • The dyld test fixture opens on x64 hosts while keeping its arm64e settings.

Reviews (1) · Last reviewed commit: "test(apple): keep the same-named slice d..." · Reviewed by Greptile

@N0zoM1z0
N0zoM1z0 merged commit fb28ec1 into main Oct 13, 2026
31 checks passed
@N0zoM1z0
N0zoM1z0 deleted the test/dylib-same-name-slices-portable branch October 13, 2026 11:31
@morluto morluto added area: tests Test suite and verification area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants