fix: deduplicate identical parked-server reconnect warnings (Closes #1391) - #1418
Closed
Lexus2016 wants to merge 1 commit into
Closed
fix: deduplicate identical parked-server reconnect warnings (Closes #1391)#1418Lexus2016 wants to merge 1 commit into
Lexus2016 wants to merge 1 commit into
Conversation
…1391) When an MCP server is parked (reconnect budget exhausted) and the self-probe repeatedly fails with the same error, the WARNING was emitted every _PARKED_RETRY_INTERVAL cycle — 739 duplicate lines observed for tqmemory on startup. Added _last_parked_error tracking: first occurrence logs at WARNING, subsequent identical errors drop to DEBUG. The dedup key is only reset on successful reconnection (where _reconnect_retries is cleared to 0), not at the start of each revival attempt, so repeated identical failures are properly suppressed. Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated evolution PR for issue #1391.
Problem
When an MCP server is parked (reconnect budget exhausted) and the self-probe repeatedly fails with the same error, the WARNING was emitted every
_PARKED_RETRY_INTERVALcycle — 739 duplicate log lines observed for tqmemory on startup, drowning real errors in noise.Fix
Added
_last_parked_errortracking toMCPServerTask:_reconnect_retriesis cleared to 0), NOT at the start of each revival attempt — so repeated identical failures during parking are properly suppressedChanges
tools/mcp_tool.py: Added_last_parked_errorto__slots__and__init__; dedup logic in the parked-server warning path; reset on successful reconnection (2 sites)tests/tools/test_mcp_parked_self_probe.py: Addedtest_parked_server_dedup_identical_warningsverifying first WARNING is emitted, subsequent identical cycles are DEBUGValidation
tests/tools/test_mcp_parked_self_probe.py)Co-Authored-By: Hermes Evolution evolution@hermes.ai