Audit timeout and delay patterns for correctness#79
Merged
Conversation
c0b1ad7 to
2607ace
Compare
Replace all magic-number delays with named constants, categorized as: - Protocol: commandQueueInterval (GoPro BLE spec ≤5 cmd/s) - Empirical: connection timeouts, retry delays, query intervals - Cosmetic: UI spinner timeouts, sync indicator durations Convert sleep/power-down fire-and-forget asyncAfter to cancellable DispatchWorkItems so timeouts are cancelled when responses arrive. Align BLEConnectionManager.connectionTimeout (was 30s, now 15s) with the rest of the codebase to eliminate conflicting timeout values. Document that BLEDeviceStateManager's retry logic is dead code and flag all three overlapping connection retry systems for consolidation. Closes #69 Co-authored-by: Cursor <cursoragent@cursor.com>
6710650 to
7a15b78
Compare
- Draft App Store listing copy with features, compatibility, disclaimer - Privacy policy URL: repo PRIVACY_POLICY.md - Support URL: repo Issues page - Update README to specify HERO10 Black + GoPro Labs as tested config - Add GoPro trademark disclaimer to README per brand policy Co-authored-by: Cursor <cursoragent@cursor.com>
7a15b78 to
ea5cb80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
asyncAfterto cancellableDispatchWorkItemsBLEConnectionManager.connectionTimeout(was 30s, now 15s) to eliminate conflicting valuesBLEDeviceStateManagerand flag three overlapping retry systems for consolidationDelay Inventory
commandQueueIntervalconnectionStaggerDelaysettingsQueryDelaycontrolReleaseDelaycommandRetryDelayerrorRecoveryDelayauthReconnectDelaywifiCredentialFetchDelayshutdownCommandTimeoutmultipartResponseTimeoutdeviceScanIntervaldeviceQueryIntervalconnectionTimeoutstragglerRetryIntervalArchitectural Finding
Three independent connection retry systems exist with conflicting timeout values:
connectionTimeout = 10.0s, own retry timers and backoffconnectionTimeoutwas 30.0s (now aligned to 15.0s), own retry timersconnectionTimeout = 10.0s, full retry system but entirely unused (only sleep-state tracking is called)Consolidation is recommended as a follow-up.
Test plan
Closes #69
Made with Cursor