You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Pro live-status stream stays wedged after in-place channel recovery (sync pill doesn't auto-resume) #1879
Follow-up to the wedged-channel self-heal (#1672). That fix rebuilds the shared gRPC channel in place when it wedges under sync load, and recovers:
the node data plane + WatchNodes watcher (the P0 journal-hang),
the ai-chat token stream (now interrupted by the db_generation bump and re-subscribed on the fresh channel),
all unary Pro cloud-sync calls (ProClient::rebind points the cached client at the new channel).
Gap
The live-status WatchSyncStatus forwarding task (commands/pro_sync.rs::pro_subscribe_sync_status) is not recovered. It is a die-and-respawn task (no internal reconnect loop): it ends → resets STREAM_SPAWNED → emits sync:status disconnected → the frontend re-subscribes. But on a wedge, stream.next().await hangs forever, so:
the task never ends → STREAM_SPAWNED stays true → a respawn is blocked, and
the frontend pro-sync store only re-subscribes at init / on pro:tier-detected, not on onDaemonReconnect.
Net: after an automatic channel recovery the sync pill's live status stays stale until a full app restart, even though everything else recovered.
Fix direction (coordinated 3-point change)
Give ProClient a generation signal (or reuse GrpcClient's), bumped by ProClient::rebind, and have the forwarding task tokio::select! on it (biased) — mirror the node watcher, so a rebuild drops the wedged stream and lets the task end (resetting STREAM_SPAWNED + emitting disconnected).
Ensure the respawn re-fetches pro.client()afterrebind so it subscribes on the new channel (order the generation bump after the rebind to avoid the race).
Wire onDaemonReconnect(() => invoke('pro_subscribe_sync_status')) in the pro-sync store so a recovery re-subscribes automatically.
Acceptance
After an automatic wedge recovery (no restart), the sync pill's live status resumes updating within a couple of seconds.
No double-spawn / STREAM_SPAWNED race on rapid reconnect.
Found by adversarial review of the #1672 fix (finding #1, stream half).
Resolved in #1890 (merged). The Pro WatchSyncStatus forwarding task is now a self-healing loop that re-subscribes on the current channel when ProClient::rebind bumps a generation signal after a wedged-channel recovery — so the sync pill's live status recovers automatically instead of freezing until an app restart. This completes the #1672 wedge-recovery across every surface (node watcher, ai-chat token stream, unary Pro calls, and now the live-status stream). Adversarial review caught + fixed a free-tier regression (community Unimplemented is terminal, not a 2s retry loop) and bounded the re-subscribe with a timeout.
Activity
Recover a wedged gRPC channel in place instead of hanging until app r…
mstomar125 commentedon Aug 1, 2026
Resolved in #1890 (merged). The Pro
WatchSyncStatusforwarding task is now a self-healing loop that re-subscribes on the current channel whenProClient::rebindbumps a generation signal after a wedged-channel recovery — so the sync pill's live status recovers automatically instead of freezing until an app restart. This completes the #1672 wedge-recovery across every surface (node watcher, ai-chat token stream, unary Pro calls, and now the live-status stream). Adversarial review caught + fixed a free-tier regression (communityUnimplementedis terminal, not a 2s retry loop) and bounded the re-subscribe with a timeout.