Repository navigation
Self-heal the Pro live-status stream after an in-place channel recovery (closes #1879) - #1890
Merged
Merged
Conversation
…ry (closes #1879) Completes the #1672 wedged-channel recovery for the last surface it missed: the Pro WatchSyncStatus live-status stream (the sync pill). #1672 rebuilds the shared gRPC channel and ProClient::rebind re-points cloud-sync calls, but the long-lived WatchSyncStatus forwarding task stayed blocked on the dead stream, so the pill's live status stopped updating until an app restart. - ProClient gains a watch signal, bumped by rebind() AFTER the new client is installed (so a woken task re-fetches the rebound client, never the old one) + subscribe_generation(). - The forwarding task becomes a self-healing loop (mirrors the node watcher + token stream from #1672): a biased select on generation.changed() vs the stream drops a wedged/ended stream and re-subscribes on the current channel — a rebuild re-subscribes at once; a plain end greys the pill, backs off, and retries. No frontend change: it is all app-side (ProClient + the task run in the Tauri process), so the rebuild's generation bump self-heals the stream and the webview recovers via the resumed sync:status events. Removes the STREAM_SPAWNED reset — one forwarding task now runs for the process lifetime. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
Author
|
APPROVE (self-review + adversarial review addressed). Review confirmed the core mechanics sound (self-healing loop, generation watch semantics, rebind happens-before, no busy-loop, no deadlock, no spurious DISCONNECTED flash on rebuild). Two findings fixed in 7249d7f:
Full gate green. |
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
Completes the #1672 wedged-channel recovery for the last surface it missed: the Pro
WatchSyncStatuslive-status stream (the sync pill). #1672 rebuilds the shared gRPC channel andProClient::rebindre-points cloud-sync calls, but the long-lived forwarding task stayed blocked on the dead stream, so the pill's live status froze until an app restart.Change
ProClientgains agenerationwatch signal, bumped byrebind()after the new client is installed (so a woken task re-fetches the rebound client, never the old one) +subscribe_generation().select!ongeneration.changed()vs the stream drops a wedged/ended stream and re-subscribes on the current channel — a rebuild re-subscribes at once; a plain end greys the pill, backs off, retries.All app-side (the task +
ProClientrun in the Tauri process), so the channel rebuild's generation bump self-heals the stream and the webview recovers via the resumedsync:statusevents — no frontend change.Adversarial review — findings fixed
UnimplementedforWatchSyncStatus; the loop would have retried it every 2s forever on every free install (against 'free users unaffected'). Now terminal —Unimplementedexits the task.SUBSCRIBE_TIMEOUT, so a wedge landing exactly during re-subscribe can't hang outside the generation select.Full pre-push gate green.
Co-Authored-By: Claude Opus 4.8 [email protected]