Skip to content

test(apple): skip ibtool-compiled NIB tests when Xcode ibtool is unavailable - #2070

Merged
baron merged 1 commit into
morluto:mainfrom
TonyWu2333:test/ibtool-availability
Oct 12, 2026
Merged

baron merged 1 commit into
morluto:mainfrom
TonyWu2333:test/ibtool-availability

Conversation

@TonyWu2333

Copy link
Copy Markdown
Contributor

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.

…ailable

Command Line Tools install the /usr/bin/ibtool and xcrun shims without ibtool itself, so the existing /usr/bin/ibtool existence guard never skipped the storyboard test, and the native NIB hierarchy suite had no guard. On a Command Line Tools-only macOS host these seven tests failed at fixture compilation. Probe xcrun --find ibtool once and use it for both suites.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T07:03:08.855463Z e8068cc Manual request
ℹ️ 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.

@morluto

morluto commented Oct 12, 2026

Copy link
Copy Markdown
Owner

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: e8068cc801

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@baron baron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head e8068cc and current-main integration. No source/design blocker.

The shared fixture owns xcrun's actual Xcode ibtool resolution, rather than inferring availability from the installed shim. Both compiled-NIB consumers use it; distinct native fixture tests remain intact.

The earlier positive-Xcode verification hold is now satisfied: pinned Node 24.18.0/npm 11.16.0 current-main integration executed all seven specifically inspected repository-owned XIB/storyboard compile-and-static-decode cases: 7 passed, 0 selected skips/failures; 46 unrelated cases were excluded. All seven fixture directories were observed removed. Existing mocked available/unavailable/error/non-macOS controls also passed. No app/device/GUI/hdiutil/mount or target execution occurred. Current exact-head hosted CI is green; optional skipped jobs are not misrepresented as real-provider evidence.

@baron
baron merged commit 7bc57e1 into morluto:main Oct 12, 2026
28 checks passed
@morluto morluto added the area: tests Test suite and verification label Oct 14, 2026
rjvaleo pushed a commit to rjvaleo/rea that referenced this pull request Dec 1, 2026
…ailable (morluto#2070)

Command Line Tools install the /usr/bin/ibtool and xcrun shims without ibtool itself, so the existing /usr/bin/ibtool existence guard never skipped the storyboard test, and the native NIB hierarchy suite had no guard. On a Command Line Tools-only macOS host these seven tests failed at fixture compilation. Probe xcrun --find ibtool once and use it for both suites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants