Skip to content

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
masterfrom
factory/demote-mcp-credentials-report-error
Open

Reduce Sentry noise: demote non-actionable report_error! calls in MCP + credentials#13863
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
factory/demote-mcp-credentials-report-error

Conversation

@warp-dev-github-integration

Copy link
Copy Markdown
Contributor

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 to log::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 to Warn mirrors what report_error! itself already does at runtime for non-actionable errors (logged at Warn, never sent to Sentry).

Demoted to log::warn! (12):

  • app/src/ai/aws_credentials.rs — STS AssumeRoleWithWebIdentity SDK error (network/transient; also a non-sink duplicate of the load-credentials sink) and the credential-load sink (surfaced to the user via the Failed state).
  • 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 a Failed state).
  • crates/mcp/src/oauth.rs — secure-storage (keychain) write failure — environmental/recoverable; the read path already treats these as warn.
  • 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 — three model_event_sender.send failures (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 in native.rs.

Unused report_error imports were removed from the four files where every call was demoted.

Note for the reviewer: the mod.rs sqlite env-var read is the most debatable demotion — the logging skill's canonical example reports sqlite read failures, but here the lookup expectedly misses and gracefully falls back to defaults. Happy to keep it as report_error! if you'd prefer.

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/format passes.
  • cargo clippy -p warp -p mcp --all-targets --tests -- -D warnings passes (the affected crates; CARGO_BUILD_JOBS=1).

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-NONE

… + 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
warp-dev-github-integration Bot force-pushed the factory/demote-mcp-credentials-report-error branch from 929da96 to 7632d3b Compare July 16, 2026 22:50
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