Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/tui_gateway/test_inline_rpc_gil_starvation.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ def capture(server):
# seconds when the GIL is contended by concurrent agent turns.

FRONTEND_POLLED_RPCS = [
"session.list", # loads session list — SQLite query
"pet.info", # petdex poll — file/network read
"process.list", # background process status — process registry scan
"session.list", # loads session list — SQLite query
"pet.info", # petdex poll — file/network read
"process.list", # background process status — process registry scan
"setup.runtime_check", # runtime readiness — resolve_runtime_provider() I/O

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Inconsistent comment alignment in FRONTEND_POLLED_RPCS list (style)

In tests/tui_gateway/test_inline_rpc_gil_starvation.py, the FRONTEND_POLLED_RPCS list entries are aligned with 10 spaces between the closing quote and the # comment marker, except for the newly-added setup.runtime_check entry on line 70 which has only 3 spaces. This is purely cosmetic and does not affect functionality, but violates the established alignment pattern in the same list block.

💡 Suggestion: Add 7 more spaces before the # on line 70 to match the 10-space alignment of the other entries in the list (lines 67, 68, 69, 71).

Suggested change
"setup.runtime_check", # runtime readiness — resolve_runtime_provider() I/O
"setup.runtime_check", # runtime readiness — resolve_runtime_provider() I/O
📋 Prompt for AI Agents

In tests/tui_gateway/test_inline_rpc_gil_starvation.py on line 70, the comment alignment for the setup.runtime_check entry has only 3 spaces before the # while all other list entries have 10 spaces. Change the line to use 10 spaces before the # to align with the rest of the FRONTEND_POLLED_RPCS list.

"setup.status", # provider configured check — config/credential scan
]


Expand Down
10 changes: 10 additions & 0 deletions tui_gateway/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ def _thread_panic_hook(args):
"projects.for_cwd",
"projects.tree",
"projects.project_sessions",
# Setup readiness RPCs are polled by the Desktop frontend on connect
# and periodically (use-status-snapshot → evaluateRuntimeReadiness).
# setup.runtime_check calls resolve_runtime_provider() which reads
# config, checks auth state, and may probe the provider endpoint;
# setup.status calls _has_any_provider_configured() which scans
# provider config + credential files. Under GIL pressure from
# concurrent agent turns, either can take seconds inline, blocking
# the WS read loop and causing false "needs setup" (#50005 family).
"setup.runtime_check",
"setup.status",
"session.branch",
"session.compress",
"session.list",
Expand Down
Loading