Skip to content

Conversation

chris-sanders
Copy link
Owner

Summary

  • Fixes the critical regression in v1.6.5 where the server fails to initialize due to missing psutil dependency
  • Adds py3-psutil as a runtime dependency in .melange.yaml (was only in build environment)
  • Removes CI skip from the functional test that would have caught this issue

Root Cause

The v1.6.5 release introduced psutil to replace ps/pkill subprocess calls, but psutil was only included in the build environment, not as a runtime dependency. This caused the compiled binary components of psutil to be missing from the final container image, leading to ModuleNotFoundError: No module named 'psutil' during server initialization.

Test Plan

  • Confirmed the test test_production_container_mcp_protocol now catches the error locally
  • Fixed the issue by adding psutil as runtime dependency
  • Verified the test now passes with the fix
  • Removed CI skip so this test runs in CI and prevents future regressions

Validation

The previously failing test now passes:

uv run pytest tests/e2e/test_container_production_validation.py::test_production_container_mcp_protocol -v

This fix ensures:

  1. v1.6.6 will work properly for agents
  2. Future releases won't have similar runtime dependency issues
  3. CI will catch these problems before release

- Add py3-psutil as runtime dependency in .melange.yaml to fix
  ModuleNotFoundError during server initialization
- Remove CI skip from test_production_container_mcp_protocol to ensure
  this type of regression is caught in CI before release
- The test now runs in CI and would have caught the missing psutil
  dependency that caused v1.6.5 initialization failures
- Check if container image exists before trying to use it
- Skip gracefully if image not available instead of hard failing
- This allows the test to run in CI while providing clear guidance
  when container needs to be built first
@chris-sanders chris-sanders force-pushed the fix-v1.6.5-psutil-regression branch from 7dda8d3 to 13a14d9 Compare July 28, 2025 16:50
This removes the confusion between manual venv creation with uv pip install
and then using uv run commands, which could cause version conflicts.
The uv sync command uses ruff 0.11.8 (from lockfile) while uv pip install
was using ruff 0.12.5, causing formatting differences between local and CI.
This ensures CI and local development use the same tool versions,
avoiding formatting inconsistencies between ruff 0.11.8 and 0.12.5.
@chris-sanders chris-sanders merged commit 097cd0c into main Jul 28, 2025
6 checks passed
@chris-sanders chris-sanders deleted the fix-v1.6.5-psutil-regression branch July 28, 2025 17:09
chris-sanders added a commit that referenced this pull request Aug 11, 2025
* Fix v1.6.5 psutil runtime dependency issue

- Add py3-psutil as runtime dependency in .melange.yaml to fix
  ModuleNotFoundError during server initialization
- Remove CI skip from test_production_container_mcp_protocol to ensure
  this type of regression is caught in CI before release
- The test now runs in CI and would have caught the missing psutil
  dependency that caused v1.6.5 initialization failures
chris-sanders added a commit that referenced this pull request Aug 11, 2025
* Fix v1.6.5 psutil runtime dependency issue

- Add py3-psutil as runtime dependency in .melange.yaml to fix
  ModuleNotFoundError during server initialization
- Remove CI skip from test_production_container_mcp_protocol to ensure
  this type of regression is caught in CI before release
- The test now runs in CI and would have caught the missing psutil
  dependency that caused v1.6.5 initialization failures
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.

1 participant