Skip to content

fix(desktop): Bots roster no longer stalls behind a live profile's write lock; failed queries show an error card (salvage #92793) - #95126

Merged
teknium1 merged 3 commits into
mainfrom
salv/92793-roster-lock-and-retry
Aug 26, 2026
Merged

teknium1 merged 3 commits into
mainfrom
salv/92793-roster-lock-and-retry

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

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:

  1. profiles.list (polled every 5s by the Bots sidebar) opened every profile's state.db as 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 now read_only=True.
  2. The roster query used retry: true (infinite) — ANY queryFn failure presented as an eternal spinner with no error card. Now ROSTER_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 activeBotRoute plugin 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

Validation

main (sabotage run) this branch
roster-query-retry.test.mjs 0 pass / 1 fail pass
test_profiles_list_canonical_session.py 2 failed (write-lock test waits out patience) 18/18 pass
full plugin suite 567 pass / 0 fail
writable opens on poll path 2 0

Live repro: the write-lock stall mechanism was independently confirmed during the Routines-cluster live A/B (killing a profile's hermes serve mid-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

Roster unstuck

kudapara and others added 3 commits August 25, 2026 16:57
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.
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 1846a56 — chore: map kgparadzayi attribution

⚠️ Warnings

CI timings · View report · View job

Wall time 24m6s vs 4m4s (+492.6%). 8 job(s) slower, 4 faster, 1 unchanged.

  • Python tests / Run tests: -44.0s
  • OS-specific tests / Windows-only tests: -23.0s
  • OSV scan / Scan lockfiles / osv-scan: +15.0s
  • OS-specific tests / macOS-only tests: +11.0s
  • Check contributors / check-attribution: +4.0s

OSV vulnerability scan · View job

7 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Aug 26, 2026
@teknium1
teknium1 merged commit ad1d159 into main Aug 26, 2026
63 of 65 checks passed
@teknium1
teknium1 deleted the salv/92793-roster-lock-and-retry branch August 26, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants