Improve telemetry for the diff state model#12162
Conversation
|
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 Powered by Oz |
There was a problem hiding this comment.
Overview
This PR introduces a shared DiffStateError classifier, adds backend-origin and operation dimensions to diff failure telemetry, and wires those through local and remote diff-state error paths.
Concerns
- Raw diff-state error messages are now sent through code-review telemetry paths that still classify events as non-UGC, so repo paths, refs, command output, and possible secrets bypass the telemetry UGC redaction/routing path.
- Client-side remote diff errors are reported to Sentry after being replayed from the daemon as plain strings, which duplicates daemon-side captures for the same failure and loses the original error chain used for actionability.
- No approved spec context was provided; no material spec drift was assessed.
Verdict
Found: 1 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| .take() | ||
| .map(|start| start.elapsed()); | ||
| let err = DiffStateError::from_message(&msg); | ||
| warp_core::report_error!(&err); |
There was a problem hiding this comment.
DiffState::Error again on the client duplicates the daemon-side capture for the same load failure and wraps only the flattened string, so Unknown errors lose the original chain used for actionability; keep this branch to telemetry/state updates and reserve report_error! for client-originated failures such as empty diff data.
There was a problem hiding this comment.
I think it'd still be valuable to have the client and daemon both reporting the errors - there may be cases where the failure doesn't make it back to the client
Description
DiffStateErrortype to help classify the different kinds of errors a user can run into when loading diffs/running git commandsis_localwhich also returns true for a diff state model running on the remote daemon, this made it hard to parse which errors were actually from a local machine vs. remote machineLinked Issue
APP-4634
APP-4631
File invalidation error: Failed to execute git command: No such file or directorywhich is typically an expected user/environment error that signifies git is not installed on a user's machineTesting
./script/runAgent Mode