Skip to content

Fix Windows startup and portable memory reporting - #37

Open
Bortlesboat wants to merge 2 commits into
block:mainfrom
Bortlesboat:fix/windows-startup-20260907
Open

Fix Windows startup and portable memory reporting#37
Bortlesboat wants to merge 2 commits into
block:mainfrom
Bortlesboat:fix/windows-startup-20260907

Conversation

@Bortlesboat

Copy link
Copy Markdown

Fixes #33.

Importing the queue on Windows currently fails because Python's resource module is unavailable. Use psutil to report the current process's RSS in MiB and add a Windows CI smoke test that imports the queue and exercises memory reporting.

The dependency range also keeps FastMCP on its supported 2.x API. A fresh install otherwise selects FastMCP 4, which no longer provides the fastmcp.tools.tool import used by this project.

The memory helper now reports current RSS, as its docstring describes, instead of the lifetime peak returned by ru_maxrss. Memory deltas can therefore become negative when memory is released. Task scheduling and cancellation are unchanged; this does not claim full Windows cancellation support.

Validation:

  • Reproduced the original ModuleNotFoundError: resource with the new regression test.
  • Native Windows, clean Python 3.12 environment: import/RSS regression passes; Ruff passes.
  • Linux, Python 3.12: all 91 tests pass. The local WSL run used COLUMNS=512 so ps returned complete arguments for the existing process-identification tests.

Manually reviewed the four-file diff, including subprocess isolation, RSS conversion, and the retained Linux workflow.

Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Signed-off-by: Andrew Barnes <169967362+Bortlesboat@users.noreply.github.com>
@Bortlesboat
Bortlesboat force-pushed the fix/windows-startup-20260907 branch from 9a6c8b3 to ccc8aeb Compare September 7, 2026 21:24
@Bortlesboat

Bortlesboat commented Sep 8, 2026

Copy link
Copy Markdown
Author

detects commit SHAs that don't match their version comment tags

Corrected the version comments in 580a5f6: the existing checkout pin is v6.0.2, and the setup-uv pin is v7.3.0. Verified both against their repositories' release tags and updated both jobs consistently. The action SHAs and executable workflow content are unchanged.

Signed-off-by: Bortlesboat <169967362+Bortlesboat@users.noreply.github.com>
@Bortlesboat
Bortlesboat force-pushed the fix/windows-startup-20260907 branch from 00f56b5 to 580a5f6 Compare September 8, 2026 17:25
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.

[Bug] ModuleNotFoundError: No module named 'resource'

2 participants