Repository navigation
fix(overview): timeout hung ScreenCaptureKit calls - #129
Conversation
- Wrap SCShareableContent and SCScreenshotManager calls with 5-second timeout - Prevents hung native calls from holding the capture limiter slot indefinitely - Abandons stalled captures so subsequent overview sessions can proceed - Add test for timeout behavior and recovery - Add agent verification docs for overview, workspaces, scrolling, and service lifecycle
|
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This targeted overview reliability fix changes production capture scheduling by abandoning timed-out ScreenCaptureKit calls and automatically suppressing desktop retries after five failures per session. The concurrency and limiter interactions, along with the new retry gate, warrant human review. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Summary
withOverviewCaptureTimeout()helper using Task.sleep-based deadline with first-completion semanticsTesting
hungNativeCaptureFailsAtDeadlineInsteadOfHoldingTheSlotverifies timeout fires and limiter releasespython3 script/verify.py local(swift build and non-desktop tests)testOverviewShowsBothMonitorsBeforeLoadingPreviewsexercises the capture flowdefi toggle-overview && sleep 3 && defi statusshould showoverviewReceivedPreviews > 0Note
Timeout hung ScreenCaptureKit calls in overview capture paths
withOverviewCaptureTimeoutin OverviewPreviewCapture.swift, a main-actor wrapper that races a capture operation against a 5-second deadline and throwsOverviewCaptureTimeoutError. The hung native call is not cancelled; the wrapper just stops waiting on it.captureOverviewImages, and shareable-content discovery plus sample-buffer capture inOverviewSurfaceCapture.prepare. Timeout errors follow the existing error paths and release the capture limiter slot.Macroscope summarized 44c31e1.