Skip to content

Conversation

@jamesbrink
Copy link
Member

No description provided.

jamesbrink and others added 3 commits April 1, 2025 20:49
Implements a comprehensive solution for managing server lifecycle with stdio transport:

1. StatePersistence: A new utility that maintains state across reconnections
2. MCP Protocol Synchronization: Properly tracks initialize/initialized handshake
3. Request Gating: Blocks requests during initialization to prevent partial responses

This implementation solves issues with reconnection state loss, improves server restart
handling, and ensures consistent responses during background initialization.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Resolves typecheck errors by fixing circular dependencies in imports:
- Added explicit imports of get_nixos_context from server.py
- Updated test files to import functions from correct modules
- Fixed incorrect imports in MCP tool modules

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Removed unused imports (Union, get_context_or_fallback) from home_manager_tools.py and nixos_tools.py
- Fixed circular dependencies by using importlib dynamic imports
- Updated tests to use importlib mocking instead of patch(get_context_or_fallback)
- Fixed flake8 linting errors
- All tests now pass (350 passed, 3 skipped)
- No typechecking errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 44.35028% with 197 lines in your changes missing coverage. Please review.

Project coverage is 68.94%. Comparing base (44fa188) to head (a3aca2b).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
mcp_nixos/tools/home_manager_tools.py 26.05% 105 Missing ⚠️
mcp_nixos/tools/nixos_tools.py 20.00% 64 Missing ⚠️
mcp_nixos/utils/state_persistence.py 81.25% 15 Missing ⚠️
mcp_nixos/server.py 75.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
- Coverage   71.10%   68.94%   -2.16%     
==========================================
  Files          32       33       +1     
  Lines        4329     4663     +334     
==========================================
+ Hits         3078     3215     +137     
- Misses       1251     1448     +197     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jamesbrink and others added 2 commits April 1, 2025 21:24
- Modifies lint command to automatically format code with Black when running locally
- Preserves lint-check behavior in CI environments for error detection
- Detects CI environments using both CI and GITHUB_ACTIONS environment variables
- Maintains Flake8 linter behavior in all environments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add branch management documentation to CLAUDE.md
- Remove trailing whitespace in test files
- Maintain consistent indentation across test modules

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jamesbrink jamesbrink self-assigned this Apr 2, 2025
@jamesbrink jamesbrink merged commit 9128902 into main Apr 2, 2025
21 of 24 checks passed
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