Skip to content

fix(sentry): Exclude peer anomalies from shutdown summary level escalation#302

Merged
cameroncooke merged 1 commit intomainfrom
shutdown_bug
Mar 31, 2026
Merged

fix(sentry): Exclude peer anomalies from shutdown summary level escalation#302
cameroncooke merged 1 commit intomainfrom
shutdown_bug

Conversation

@cameroncooke
Copy link
Copy Markdown
Collaborator

Exclude peer anomalies (peer-count-high, peer-age-high) from the level
escalation logic in captureMcpShutdownSummary. These are environmental
observations common in multi-client setups (multiple MCP hosts connecting
simultaneously), not indicators of a problem with the shutting-down process
itself.

Previously, any anomaly elevated the shutdown summary event to warning
level. With PEER_COUNT_HIGH_THRESHOLD = 2 and multiple MCP clients being
standard, nearly every stdin-end shutdown was emitted as a warning --
generating ~484k Sentry events on XCODEBUILDMCP-Z since March 16.

Now only process-local anomalies (high-rss, long-lived-high-rss) and
cleanup failures escalate to warning. Normal shutdowns with only peer
anomalies emit at info level. Peer anomaly data is still:

  • Present in the event snapshot extra data
  • Tracked independently via recordMcpLifecycleAnomalyMetric

Fixes XCODEBUILDMCP-Z

…ation

Peer anomalies (peer-count-high, peer-age-high) are environmental
observations common in multi-client setups, not indicators of a
problem with the shutting-down process. Exclude them from the level
escalation logic so normal shutdowns emit at info instead of warning.

Peer anomaly data is still captured in the event snapshot extra data
and tracked independently via recordMcpLifecycleAnomalyMetric. Only
process-local anomalies (high-rss, long-lived-high-rss) and cleanup
failures now escalate to warning.

Fixes XCODEBUILDMCP-Z
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 31, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@302

commit: bc1f54b

@cameroncooke cameroncooke marked this pull request as ready for review March 31, 2026 11:20
@cameroncooke cameroncooke merged commit 8f34c21 into main Mar 31, 2026
12 checks passed
@cameroncooke cameroncooke deleted the shutdown_bug branch March 31, 2026 11:34
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