Addressed Gemini code review feedback by refactoring repetitive log processing:
✅ **Added _process_log_stream helper function**:
- Encapsulates common pattern of reading, filtering, formatting, and printing log lines
- Takes tailer, filter_func, and format_func as parameters
- Eliminates repetitive timestamp and formatting logic
✅ **Simplified main monitoring loop**:
- Reduced from ~35 lines of repetitive code to 4 clean function calls
- Each log stream now uses: _process_log_stream(tailer, filter, formatter)
- Eliminated duplicate timestamp creation (reduced from 4 to 1 occurrence)
✅ **Improved maintainability**:
- Changes to log processing logic now only need to be made in one place
- Cleaner, more readable main loop
- Better separation of concerns
✅ **Verified functionality**:
- All containers rebuild and start successfully
- Log monitor functions correctly with refactored code
- No functional changes, only code organization improvements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed code quality issues identified by Gemini code review:
- Removed dead code: create_line_handler function was defined but never used
- Eliminated unused parameter warning
- Cleaned up unnecessary complexity in log_monitor.py
- The monitor_mcp_activity function implements all needed logic inline
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed NameError that was causing Docker container crashes:
- Updated type annotation in format_response method from TestGenRequest to TestGenerationRequest
- This was the last missing reference from the class rename
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed MagicMock comparison errors across multiple test suites by:
- Adding proper ModelCapabilities mocks with real values instead of MagicMock objects
- Updating test_auto_mode.py with correct provider mocking for model availability tests
- Updating test_thinking_modes.py with proper capabilities mocking in all thinking mode tests
- Updating test_tools.py with proper capabilities mocking for CodeReview and Analyze tools
- Fixing test_large_prompt_handling.py by adding proper provider mocking to prevent errors before large prompt detection
Fixed pytest collection warnings by:
- Renaming TestGenRequest to TestGenerationRequest to avoid pytest collecting it as a test class
- Renaming TestGenTool to TestGenerationTool to avoid pytest collecting it as a test class
- Updated all imports and references across server.py, tools/__init__.py, and test files
All 459 tests now pass without warnings or MagicMock comparison errors.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Exit early at MCP boundary if files won't fit within given context of chosen model
- Encourage claude to re-run with better context
- Check file sizes before embedding
- Drop files from older conversations when building continuations and give priority to newer files
- List and mention excluded files to Claude on return
- Improved tests
- Improved precommit prompt
- Added a new Low severity to precommit
- Improved documentation of file embedding strategy
- Refactor
When directories were provided to tools, only the directory path was stored
in conversation history instead of the individual expanded files. This caused
file filtering to incorrectly skip files in continued conversations.
Changes:
- Modified _prepare_file_content_for_prompt to return (content, processed_files)
- Updated all tools to track actually processed files for conversation memory
- Ensures directories are tracked as their expanded individual files
Fixes issue where Swift directory with 46 files was not properly embedded
in conversation continuations.
When directories were provided to tools, only the directory path was stored
in conversation history instead of the individual expanded files. This caused
file filtering to incorrectly skip files in continued conversations.
Changes:
- Modified _prepare_file_content_for_prompt to return (content, processed_files)
- Updated all tools to track actually processed files for conversation memory
- Ensures directories are tracked as their expanded individual files
Fixes issue where Swift directory with 46 files was not properly embedded
in conversation continuations.
New test to confirm history build-up and system prompt does not affect prompt size checks
Also check for large prompts in focus_on
Fixed .env.example incorrectly did not comment out CUSTOM_API causing the run-server script to think at least one key exists
Improved prompt for immediate action
Additional logging of tool names
Updated documentation
Context aware decomposition system prompt
New script to run code quality checks