fix: resolve CI test failures on Linux runner#19
Closed
Tsutomu-miku wants to merge 2 commits intoHOOLC:masterfrom
Closed
fix: resolve CI test failures on Linux runner#19Tsutomu-miku wants to merge 2 commits intoHOOLC:masterfrom
Tsutomu-miku wants to merge 2 commits intoHOOLC:masterfrom
Conversation
- add the run command to parser metadata and help output, and add a coverage test that keeps implemented commands, parser command names, and help text in sync - source codexm run account context from getCurrentStatus, pass the resolved launch platform through managed Desktop state checks, and make CLI watcher delays abortable with injectable process liveness checks - harden tests by restoring mocked platform state, isolating current --json from live runtime reads, and aligning runner/watcher suites with the current rstest setup - bump the package version to 0.0.18
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
Fixes CI pipeline failures introduced after PR #13 was merged. The GitHub Actions runner (Linux) caused multiple test failures due to platform-specific assumptions and incorrect test framework imports.
Root Causes & Fixes
1.
tests/cli-launch.test.ts— 9 test failuresCause: All launch tests assumed macOS (darwin) platform, but CI runs on Linux where
codexm launchnow correctly rejects with "not supported on Linux".Fix: Added
setPlatformForTesting("darwin")inbeforeEach/afterEachhooks so launch tests run under simulated macOS environment.2.
tests/codex-cli-runner.test.ts—Cannot find module 'vitest'Cause: Tests were written with
vitestimports, but the project uses@rstest/core.Fix: Migrated all
vi.fn()→rs.fn(),vi.mock()→rs.mock(),vi.useFakeTimers()→rs.useFakeTimers(). Also corrected mock paths.3.
src/main.ts—runcommand using non-existent APICause:
store.getCurrentAccountInfo?.()does not exist in the codebase.Fix: Changed to
store.getCurrentStatus()which exists and returns{ account_id, ... }.4.
src/main.ts—resolveManagedDesktopStatemissing parameterCause: Function body referenced
launchPlatformbut it was not declared as a parameter.Fix: Added
launchPlatform: CodexmPlatform = "darwin"as an explicit parameter.5.
src/cli/args.ts&src/cli/help.ts—runcommand not registeredFix: Added
"run"to command registration and help output.6. Testability improvements
codex-cli-watcher.ts: AbortSignal-awaredelay(), injectableisProcessAliveImplChanged Files
src/main.tsresolveManagedDesktopStateparam, fixruncommand APIsrc/cli/args.tsruncommandsrc/cli/help.tsrunto help textsrc/codex-cli-watcher.tsisProcessAliveImpltests/cli-launch.test.tstests/codex-cli-runner.test.tstests/codex-cli-watcher.test.tstests/cli-read-commands.test.tstests/cli.test.ts