Repository navigation
Conversation
PR risk: mediumFor commit Main concerns: public contract, host performance, data sent to Sentry. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
|
📲 Install BuildsAndroid
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b6952c6. Configure here.
| // scheduleWithFixedDelay stops all later ticks after an exception. | ||
| ExceptionUtils.rethrowIfFatal(t); | ||
| options.getLogger().log(SentryLevel.ERROR, "HangRecorder tick failed", t); | ||
| } |
There was a problem hiding this comment.
Tick errors skip hang time cap
Medium Severity
The max-recording-time stop lives in a finally that only wraps collector onSample calls. TickListener.onMetronomeTick runs before that block, so a listener that throws is caught by the outer catch (Throwable) and skips the cap. During a true hang, IDLE never arrives, so the interval can stay open and keep recording past maxRecordingTimeMs.
Triggered by project rule: PR Review Guidelines for Cursor Bugbot
Reviewed by Cursor Bugbot for commit b6952c6. Configure here.
| } | ||
| tickFuture = | ||
| self.scheduleWithFixedDelay(this::tick, 0, pollingIntervalMs, TimeUnit.MILLISECONDS); | ||
| } |
There was a problem hiding this comment.
Failed start leaves detection stuck
Medium Severity
startSignals sets signalsStarted = true before starting signals or scheduling ticks. If signal.start() throws, remaining signals never start, tickFuture is never scheduled, and later onForeground calls return immediately because signalsStarted is already true. The failed task is an execute() runnable, so the exception is swallowed by the executor. Hang detection then stays off until the next background/foreground cycle.
Triggered by project rule: PR Review Guidelines for Cursor Bugbot
Reviewed by Cursor Bugbot for commit b6952c6. Configure here.
| .setEndedAtMaxRecordingTime(endedAtMaxRecordingTime); | ||
| for (final @NotNull HangDataCollector collector : collectors) { | ||
| collector.onRecordingStopped(interval, builder); | ||
| } |
There was a problem hiding this comment.
Stop failure reopens capped hangs
Medium Severity
endInterval clears openInterval and then calls onRecordingStopped with no isolation. If a collector throws, the HangRecord is never delivered and remaining collectors are not stopped. When this happens on the max-recording-time path, waitingForIdleAfterMaxRecordingTime is also never set, so a later SUSPICIOUS can open a new interval while the original hang is still in progress.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bugbot
Reviewed by Cursor Bugbot for commit b6952c6. Configure here.


Adds
HangRecorder: it opens a hang interval when a signal reportsSUSPICIOUS, lets the collectors sample on its own 66 ms tick thread, and gives aHangRecordto the subscribers when the interval ends. Not wired yet.Design: Non-Fatal ANR Architecture (JAVA-777)
🤖 Generated with Claude Code
#skip-changelog