[PR #2070] [MERGED] test(apple): skip ibtool-compiled NIB tests when Xcode ibtool is unavailable #5004

Closed
opened 2026-10-31 00:57:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2070
Author: @TonyWu2333
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @baron

Base: main ← Head: test/ibtool-availability


📝 Commits (1)

  • e8068cc test(apple): skip ibtool-compiled NIB tests when Xcode ibtool is unavailable

📊 Changes

3 files changed (+15 additions, -3 deletions)

View changed files

📝 tests/boundary/filesystem/interfaceBuilderBundle.test.ts (+2 -2)
📝 tests/boundary/filesystem/nibNativeHierarchy.test.ts (+2 -1)
➕ tests/fixtures/ibtool.ts (+11 -0)

📄 Description

Summary

On a macOS host with only Command Line Tools (no Xcode), seven Interface Builder boundary tests fail when they compile their fixtures, instead of being skipped:

  • tests/boundary/filesystem/nibNativeHierarchy.test.ts: all 6 tests in "native compiled NIB view hierarchy"
  • tests/boundary/filesystem/interfaceBuilderBundle.test.ts: "decodes an Xcode-compiled storyboard NIB and recovers its UI routes"

No linked issue: I found this running the suite locally on macOS 26.5.1 with Command Line Tools only.

Problem and expected behavior

Command Line Tools install /usr/bin/ibtool and /usr/bin/xcrun as shims, but not ibtool itself:

$ ls -l /usr/bin/ibtool
-rwxr-xr-x  16 root  wheel  135488 May 21 16:57 /usr/bin/ibtool
$ /usr/bin/xcrun --find ibtool
xcrun: error: unable to find utility "ibtool", not a developer tool or in PATH
  • The storyboard test already intends to skip without ibtool, but it checks existsSync("/usr/bin/ibtool"). The shim always exists, so the test never skips.
  • The NIB hierarchy suite only checks process.platform, even though testing documents that these archives are compiled with Xcode ibtool.

On Command Line Tools-only hosts, npm run test:boundary therefore reports fixture compilation failures (Command failed: /usr/bin/xcrun ibtool --errors --warnings --compile …) rather than missing prerequisites.

Change and scope

tests/fixtures/ibtool.ts runs xcrun --find ibtool once and exports xcodeIbtoolAvailable, which is also false off macOS. Both suites skip on it. Production code is unchanged.

The macos-15 CI job, which selects these two files explicitly (ci.yml), has Xcode, so the tests still run there.

Contract and boundary impact

  • Semantic owner and earliest changed stage: test fixtures only
  • CLI and MCP/tool-catalog contract: none
  • Provider, bridge, target-format, or platform compatibility: none
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Process execution, authorization, cleanup, or containment impact: one xcrun --find probe at test module load on the test host
  • Generated metadata, package, or installation impact: none

Evidence and regression coverage

  • Tests added or updated: the two existing suites now use the shared availability guard
  • Base reproduction or other evidence: on 4573e8c with Command Line Tools only, the seven tests fail at ibtool fixture compilation. With this change they are reported as skipped.
  • User-visible CLI/MCP output: not applicable
  • Remaining proof gaps: I have no Xcode host, so the Xcode path (tests running, not skipped) relies on the macos-15 CI job for this PR

Validation performed

  • npx vitest run tests/boundary/filesystem/nibNativeHierarchy.test.ts tests/boundary/filesystem/interfaceBuilderBundle.test.ts: 46 passed, 7 skipped (previously 7 failed)
  • npm run check:fast: passed
  • npm run verify:test-discovery: "Discovered all 913 test files exactly once."
  • npx oxfmt --check on the changed files: clean

Compatibility, safety, and release

  • Breaking changes or migration steps: none
  • Real Hopper/Ghidra, browser, or OS coverage: macOS 26.5.1 with Command Line Tools only
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: none

Review checklist

  • This PR addresses a concrete problem or an agreed enhancement.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • 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/2070 **Author:** [@TonyWu2333](https://github.com/TonyWu2333) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@baron](https://github.com/baron) **Base:** `main` ← **Head:** `test/ibtool-availability` --- ### 📝 Commits (1) - [`e8068cc`](https://github.com/morluto/rea/commit/e8068cc80101df4d5db29e6200dd261a2aed34d9) test(apple): skip ibtool-compiled NIB tests when Xcode ibtool is unavailable ### 📊 Changes **3 files changed** (+15 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/filesystem/interfaceBuilderBundle.test.ts` (+2 -2) 📝 `tests/boundary/filesystem/nibNativeHierarchy.test.ts` (+2 -1) ➕ `tests/fixtures/ibtool.ts` (+11 -0) </details> ### 📄 Description ## Summary On a macOS host with only Command Line Tools (no Xcode), seven Interface Builder boundary tests fail when they compile their fixtures, instead of being skipped: - `tests/boundary/filesystem/nibNativeHierarchy.test.ts`: all 6 tests in "native compiled NIB view hierarchy" - `tests/boundary/filesystem/interfaceBuilderBundle.test.ts`: "decodes an Xcode-compiled storyboard NIB and recovers its UI routes" No linked issue: I found this running the suite locally on macOS 26.5.1 with Command Line Tools only. ## Problem and expected behavior Command Line Tools install `/usr/bin/ibtool` and `/usr/bin/xcrun` as shims, but not ibtool itself: ```text $ ls -l /usr/bin/ibtool -rwxr-xr-x 16 root wheel 135488 May 21 16:57 /usr/bin/ibtool $ /usr/bin/xcrun --find ibtool xcrun: error: unable to find utility "ibtool", not a developer tool or in PATH ``` - The storyboard test already intends to skip without ibtool, but it checks `existsSync("/usr/bin/ibtool")`. The shim always exists, so the test never skips. - The NIB hierarchy suite only checks `process.platform`, even though [testing](https://github.com/morluto/rea/blob/main/docs/testing.md#apple-interface-builder-archives) documents that these archives are compiled with Xcode `ibtool`. On Command Line Tools-only hosts, `npm run test:boundary` therefore reports fixture compilation failures (`Command failed: /usr/bin/xcrun ibtool --errors --warnings --compile …`) rather than missing prerequisites. ## Change and scope `tests/fixtures/ibtool.ts` runs `xcrun --find ibtool` once and exports `xcodeIbtoolAvailable`, which is also false off macOS. Both suites skip on it. Production code is unchanged. The `macos-15` CI job, which selects these two files explicitly (`ci.yml`), has Xcode, so the tests still run there. ## Contract and boundary impact - Semantic owner and earliest changed stage: test fixtures only - CLI and MCP/tool-catalog contract: none - Provider, bridge, target-format, or platform compatibility: none - Evidence, artifact, provenance, or reconstruction contract: none - Process execution, authorization, cleanup, or containment impact: one `xcrun --find` probe at test module load on the test host - Generated metadata, package, or installation impact: none ## Evidence and regression coverage - Tests added or updated: the two existing suites now use the shared availability guard - Base reproduction or other evidence: on `4573e8c` with Command Line Tools only, the seven tests fail at `ibtool` fixture compilation. With this change they are reported as skipped. - User-visible CLI/MCP output: not applicable - Remaining proof gaps: I have no Xcode host, so the Xcode path (tests running, not skipped) relies on the `macos-15` CI job for this PR ## Validation performed - `npx vitest run tests/boundary/filesystem/nibNativeHierarchy.test.ts tests/boundary/filesystem/interfaceBuilderBundle.test.ts`: 46 passed, 7 skipped (previously 7 failed) - `npm run check:fast`: passed - `npm run verify:test-discovery`: "Discovered all 913 test files exactly once." - `npx oxfmt --check` on the changed files: clean ## Compatibility, safety, and release - Breaking changes or migration steps: none - Real Hopper/Ghidra, browser, or OS coverage: macOS 26.5.1 with Command Line Tools only - Package or release metadata impact: none - Security, privacy, process, or containment review: none ## Review checklist - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] 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 00:57:54 +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#5004
No description provided.