The initializeServices tests were failing in CI with "Response returned an
error code" because the refactored function now calls onboarding/auth modules
that make real API calls.
Changes:
- Added mocks for onboarding.js and auth/workos.js modules
- Enhanced modeService mock to include getToolPermissionService method
- Added serviceContainer mocks to prevent real service initialization
- Updated all test cases to use headless: true to skip onboarding flow
- Fixed test expectations to include isHeadless parameter
This ensures tests run in isolation without making network requests,
preventing CI failures due to authentication or network issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced isFilePath function to properly detect Windows absolute paths,
UNC paths, and paths with file extensions. This fixes test failures on
Windows where paths like "C:\Users\..." were incorrectly treated as
assistant slugs instead of file paths.
Changes:
- Added Windows drive letter pattern detection (C:\, D:\, etc.)
- Added UNC path detection (\\server\share)
- Added file extension detection (.yaml, .yml, .json)
Fixes Windows CI test failure: "Invalid assistant slug format" error
when --config points to non-existent Windows file paths.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive environment detection in runOnboardingFlow to skip
interactive prompts in test/CI environments. Detects:
- NODE_ENV=test
- CI=true
- VITEST=true
- GITHUB_ACTIONS=true
- \!process.stdin.isTTY
This prevents "The current environment doesn't support interactive
reading from TTY" errors in GitHub Actions CI.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add environment detection in runOnboardingFlow to skip interactive prompts in CI/test environments
- Check for NODE_ENV=test, CI=true, VITEST=true, or lack of TTY
- Prevents "The current environment doesn't support interactive reading from TTY" errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix import order issues across multiple files
- Remove unused imports (loadAuthConfig, ValidationOptions)
- Add proper import group separations
- All lint checks and tests now pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
ESLint was reporting import order violations. Fixed by running
eslint --fix which properly ordered the imports according to
the project's import order rules.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
The test file was still importing from '@jest/globals' instead of 'vitest',
causing CI failures. Updated to use vitest imports to match the project's
migration from Jest to Vitest.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, typing "/org" would hide the suggestion immediately upon
completion. Now suggestions only disappear when user presses space
or Enter, making it clearer that the command is available to execute.
Fixes UX issue where users lose visual confirmation of valid commands.
Updated workflow to use main branch's commented-out schedule configuration
to maintain consistency with current release process architecture.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Merged Sentry error tracking features with main branch changes:
- Integrated Sentry service with main branch logger architecture
- Preserved Sentry error capture functionality with improved error handling
- Combined import patterns and maintained compatibility
- Fixed logger.ts conflicts to include both Sentry integration and Winston logging
The merge conflict was handled by claude, please verify the changes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Merged explicit config path error handling with main branch changes:
- Preserved error handling for explicit --config flag failures
- Integrated with main branch service initialization patterns
- Maintained proper error propagation for config validation
The merge conflict was handled by claude, please verify the changes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Merge conflicts were handled by Claude AI - please verify the changes:
- src/commands/chat.ts: Integrated flag processing with main branch changes
- src/commands/serve.ts: Updated logger import and integrated flag processing
- src/services/index.ts: Updated logger import and maintained initialization logic
- src/services/index.test.ts: Accepted main branch version
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix service initialization race condition where getAllTools() would return
all tools when ToolPermissionService wasn't ready, causing plan mode to
incorrectly include excluded tools like Bash.
The issue occurred in GitHub Actions where `cn -p` (plan mode) should exclude
Bash tool, but due to timing issues, Bash was being presented to the LLM and
then failing during execution with permission errors.
Changes:
- Fix getAllTools() to properly pass permissions to filterExcludedTools()
- Throw descriptive error when service not initialized instead of fallback
- Add comprehensive regression tests covering all modes and edge cases
Fixes automated PR review failures in GitHub Actions workflows.