Skip to content

Reduce Sentry noise from non-actionable report_error! in terminal view#13909

Open
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
factory/reduce-report-error-noise-terminal-view
Open

Reduce Sentry noise from non-actionable report_error! in terminal view#13909
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
factory/reduce-report-error-noise-terminal-view

Conversation

@warp-dev-github-integration

Copy link
Copy Markdown
Contributor

Description

Audits every report_error! call in app/src/terminal/view.rs against the logging-and-error-reporting skill to reduce Sentry noise, demoting calls that don't represent actionable engineering issues to log::warn!. report_error! is the only form that creates a Sentry issue, so it should be reserved for genuine bugs (invariant violations / states that shouldn't be possible); expected, recoverable, or environmental failures belong at log::warn!.

21 call sites were reviewed. 11 demoted to log::warn!; 10 kept as report_error!.

Demoted to log::warn! (fire on expected / recoverable / handled conditions)

  • Model-event channel sends (4): sender.send(persistence::ModelEvent::…) failures for UpdateBlockAgentViewVisibility (×3) and UpdateFinishedCommand. An mpsc SendError fires when the receiver has been dropped — an expected teardown/shutdown race, not a bug. These typed errors aren't registered as non-actionable, so today they hit Sentry on every teardown.
  • Not-in-a-git-repository guard (1): the early-return when the agent requests PR-comment insertion but the terminal isn't in a git repo — an expected precondition that is gracefully handled.
  • Best-effort setting-persistence failures (6): set_value(...) failures for alias-expansion enable, the two codebase-index speedbump-banner dismissals, the Agent-Mode setup-banner-shown flag, and the two notifications-setting writes. The underlying write in write_to_preferences is already best-effort (its result is deliberately ignored), the failures are recoverable/handled, and there is existing in-file precedent (log::warn! for the MCP-execution-path set_value failure).

Kept as report_error! (genuine invariant violations / unexpected failures)

Missing conversation lookup for the usage footer; missing session after a bootstrap notification; the two agent-view entry failures for passive code diffs; the inline agent-view tag-in failure; the "clean up conversation that still has other blocks" invariant; the two end_selection dispatched with no pending selection guards; the unknown notification-permission error (the explicit unknown-error branch); and the missing working directory for a local terminal session.

Testing

  • ./script/format passes.
  • cargo clippy -p warp --all-targets --tests -- -D warnings passes.

No new automated test: this change only reclassifies log/telemetry severity levels — there is no observable runtime behavior change to assert on (the surrounding code already handles each of these error paths identically).

Agent Mode

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

Conversation: https://staging.warp.dev/conversation/10f04aa7-3bb8-45d5-ac0f-8c462c8caab3
Run: https://oz.staging.warp.dev/runs/019f71d6-0673-7ea2-a5cc-4e186941947f

This PR was generated with Oz.

Audit all report_error! calls in app/src/terminal/view.rs against the
logging-and-error-reporting skill and demote the ones that don't represent
actionable engineering issues to log::warn!.

Demoted (fire on expected/recoverable/handled conditions, not bugs):
- 4 model-event channel sends (mpsc SendError fires on receiver teardown
  during shutdown).
- The "not in a git repository" guard when the agent requests PR-comment
  insertion (an expected precondition, gracefully handled).
- 6 best-effort setting-persistence failures (the underlying write in
  write_to_preferences is already best-effort/ignored).

Kept as report_error! (genuine invariant violations / unexpected failures):
missing conversation/session lookups, agent-view entry failures, the
cleanup-with-other-blocks invariant, end_selection-with-no-selection, the
unknown notification-permission error, and the missing working directory.

CHANGELOG-BUG-FIX:

Co-Authored-By: Oz <oz-agent@warp.dev>
@oz-for-oss

oz-for-oss Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@warp-dev-github-integration[bot]

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR demotes non-actionable terminal view report_error! sites to log::warn! while preserving the existing control flow and user-visible behavior.

Concerns

  • No blocking correctness, security, or spec-drift concerns found in the attached diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant