Skip to content

fix(ci): Resolve macOS test failures on GitHub runners#81

Merged
CSRessel merged 4 commits into
devfrom
claude/fix-macos-test-failures-016AoBKUsLfap411HWMew3AZ
Dec 6, 2025
Merged

fix(ci): Resolve macOS test failures on GitHub runners#81
CSRessel merged 4 commits into
devfrom
claude/fix-macos-test-failures-016AoBKUsLfap411HWMew3AZ

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

@CSRessel CSRessel commented Dec 5, 2025

The mock_acp_agent path resolution only went up one parent directory, which resolved to target/{arch}/{profile}/deps/mock_acp_agent instead of target/{arch}/{profile}/mock_acp_agent where the binary is actually placed.

Changed to use .parent().and_then(|p| p.parent()) to correctly navigate from deps/ to the profile directory, matching the pattern used by codex_binary_path() in tui-pty-e2e.

claude and others added 4 commits December 5, 2025 17:35
The mock_acp_agent path resolution only went up one parent directory,
which resolved to target/{arch}/{profile}/deps/mock_acp_agent instead
of target/{arch}/{profile}/mock_acp_agent where the binary is actually
placed.

Changed to use .parent().and_then(|p| p.parent()) to correctly navigate
from deps/ to the profile directory, matching the pattern used by
codex_binary_path() in tui-pty-e2e.
The mock_acp_agent path resolution now detects the execution context:
- When running as `codex` binary: parent dir is the profile dir
- When running as test binary: parent dir is `deps/`, need two levels up

This fixes cross-platform compatibility where Linux runs codex binary
directly while macOS tests may run from the deps/ directory context.
The mock_acp_agent binary location varies across platforms due to
different cargo target directory structures. This fix:

1. Adds a CI step to build mock-acp-agent with --artifact-dir to place
   the binary in a predictable location (target/mock-acp-out/)

2. Sets MOCK_ACP_AGENT_BIN environment variable pointing to the binary

3. Updates registry.rs to check MOCK_ACP_AGENT_BIN first, falling back
   to relative path resolution for local development

This ensures consistent mock agent discovery on both Linux and macOS CI.
@CSRessel
Copy link
Copy Markdown
Collaborator Author

CSRessel commented Dec 6, 2025

This fixes the location of the build target, but looks like there's some other issue on MacOS that has been uncovered. Saving that for a separate PR

@CSRessel CSRessel merged commit 0aeb6ec into dev Dec 6, 2025
1 of 3 checks passed
@CSRessel CSRessel deleted the claude/fix-macos-test-failures-016AoBKUsLfap411HWMew3AZ branch December 6, 2025 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants