fix(desktop): Bots roster no longer stalls behind a live profile's write lock; failed queries show an error card (salvage #92793) - #95126
Merged
Conversation
profiles.list opened every profile state.db as a writable SessionDB, which waits out write-lock patience while that profile's backend is mid-turn. The desktop RPC timed out and Bot Mode's infinite React Query retry kept the sidebar on a spinner. Inspect those DBs read-only and bound roster retries so names still paint.
The hang bound alone would pass if read-only open degraded to None.
Contributor
૮ >ﻌ< ა ci reviewran on 1846a56 — chore: map kgparadzayi attribution
|
This was referenced Aug 26, 2026
Closed
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
The Bots roster no longer stalls behind a live profile's write lock, and a failed roster query now surfaces an error card instead of spinning forever. Two independent hardening fixes from #92793, salvaged onto current main:
profiles.list(polled every 5s by the Bots sidebar) opened every profile'sstate.dbas a writable SessionDB — up to 20s of write-lock patience + schema init per profile while that profile's backend is mid-turn. The RPC timed out and the sidebar spun. Both open sites are nowread_only=True.retry: true(infinite) — ANY queryFn failure presented as an eternal spinner with no error card. NowROSTER_QUERY_RETRY = 2; the existing 5s refetchInterval + gateway-open effect still recover SSH/sleep drops.Salvage of #92793 by @kudapara (earliest submitter in the #92830 cluster; authorship preserved). The PR's
activeBotRouteplugin hunks were dropped — main removed that path entirely in 2ec229e (SDK ambient-owner routing). One integration commit reconciles the read-only refactor with the #92687 resurrect branch that landed on main after the PR was filed: recoverability is judged on the read-only handle first, and the un-archive write happens on a short-lived writable SessionDB only in the rare accidental-archive case — never on the poll fast path.Changes
tui_gateway/methods_profiles.py:_open_profile_session_db()(read-only attach, shared by preview + canonical lookups);_resurrect_recoverable_canonical()keeps the Bot Mode canonical 'Bot Chat' archived by ws_orphan_reap is not resurrected on reopen — every click creates a new transient session #92687 resurrect behavior without write-locking the poll.apps/desktop/.../plugin.js:ROSTER_QUERY_RETRY = 2onuseRoster().test_profiles_list_opens_session_db_read_only,test_profiles_list_does_not_wait_out_write_lock(+ live-writer preview coverage),roster-query-retry.test.mjs.Validation
roster-query-retry.test.mjstest_profiles_list_canonical_session.pyLive repro: the write-lock stall mechanism was independently confirmed during the Routines-cluster live A/B (killing a profile's
hermes servemid-poll); the read-only + bounded-retry pair is the class fix for "roster spins with no error card." Roster hydration on current main verified live via CDP before salvage.Infographic