Reduce Sentry noise: demote non-actionable report_error! calls in MCP + credentials#13863
Open
warp-dev-github-integration[bot] wants to merge 1 commit into
Open
Conversation
… + credentials Audit report_error! calls across the AI MCP and cloud-credential code paths and demote the ones that represent expected/handled conditions (network and STS failures, background-refresh retries, secure-storage/keychain write failures, shutdown-time channel sends, and benign lookup misses) from Sentry issues to log::warn! breadcrumbs. Genuine invariant violations (serialization of our own types, internal-consistency checks, resolved-config parse failures) keep Co-Authored-By: Oz <oz-agent@warp.dev>
warp-dev-github-integration
Bot
force-pushed
the
factory/demote-mcp-credentials-report-error
branch
from
July 16, 2026 22:50
929da96 to
7632d3b
Compare
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.
Description
Audits every
report_error!call in the AI MCP and cloud-credential code paths and demotes the ones that don't represent actionable engineering issues from Sentry events tolog::warn!breadcrumbs, to reduce Sentry noise. Guided by.agents/skills/logging-and-error-reporting/SKILL.md(a non-actionable failure is one an engineer can't act on: network/transient failures, expected fallbacks, and gracefully-handled conditions). Demoting toWarnmirrors whatreport_error!itself already does at runtime for non-actionable errors (logged atWarn, never sent to Sentry).Demoted to
log::warn!(12):app/src/ai/aws_credentials.rs— STSAssumeRoleWithWebIdentitySDK error (network/transient; also a non-sink duplicate of the load-credentials sink) and the credential-load sink (surfaced to the user via theFailedstate).app/src/ai/bedrock_credentials.rs— STS error in the background refresh loop, which already retries with backoff.app/src/ai/geap_credentials.rs— credential mint failure that is explicitly, gracefully handled (keeps the previous token or surfaces aFailedstate).crates/mcp/src/oauth.rs— secure-storage (keychain) write failure — environmental/recoverable; the read path already treats these aswarn.crates/mcp/src/runtime.rs— MCP child-process stderr read failure (expected terminal condition when the child exits).app/src/ai/mcp/templatable_manager/native.rs— threemodel_event_sender.sendfailures (receiver dropped during shutdown = teardown race), a benign installed-server lookup miss in update dedup, and per-server legacy→templatable conversion failures at startup (e.g. template already exists).app/src/ai/mcp/mod.rs— reading MCP env vars from sqlite, which expectedly misses (falls back to config defaults).Kept as
report_error!(9): genuine invariant violations that warrant a Sentry issue — serialization of our own types "that should never fail" (mod.rs×2,templatable_installation.rs,oauth.rs), internal-consistency checks (missing installation/template mappings, template with no servers), and resolved-config JSON parse failures innative.rs.Unused
report_errorimports were removed from the four files where every call was demoted.Linked Issue
N/A — requested via the factory-client bug-triage Slack thread (linked below).
Testing
No behavior changes — only the log level / Sentry-reporting of these call sites changed, so no new automated test was added.
./script/formatpasses.cargo clippy -p warp -p mcp --all-targets --tests -- -D warningspasses (the affected crates;CARGO_BUILD_JOBS=1).Agent Mode
CHANGELOG-NONE