Fix bundled engine lookup for Xcode-built app bundles - #87
Merged
Conversation
EngineClient.bundled() only looked under a "Resources/bin" or "bin" subdirectory inside Bundle.module, which is where SwiftPM's `.process` resource rule keeps it under `swift build`/`swift test`. Xcode's resource-processing build phase instead flattens the same file straight into the bundle's Resources root, so every real .app build failed to find it — surfacing as "The bundled simulation engine is missing" for both direct UI actions (e.g. the 1B cohorts preset) and Claude/MCP-driven runs, since both execute through the same running app instance. Add a subdirectory-less fallback lookup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUKvEN7BPfWJobSZwQrabK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EngineClient.bundled()searched for the packagedfips-wind-tunnelbinary under aResources/binorbinsubdirectory insideBundle.module, matching how SwiftPM's.processresource rule lays it out forswift build/swift test.Contents/Resourcesroot when building the.apptarget, so both existing lookups returnednilon every real build — surfaced as "The bundled simulation engine is missing" for direct UI actions (e.g. the 1B cohorts preset) and for Claude/MCP-driven runs, since both execute through the same running app instance.Test plan
Bundle(path:)check against the built.appthat the old two lookups returnniland the new fallback resolves the binaryswift testinFIPSDPackage— 78/78 passCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com
https://claude.ai/code/session_01BUKvEN7BPfWJobSZwQrabK