socket-client: bump default RPC timeout 3s → 30s for cold-start ccbd warmup#185
Closed
SevenX77 wants to merge 1 commit intobfly123:mainfrom
Closed
socket-client: bump default RPC timeout 3s → 30s for cold-start ccbd warmup#185SevenX77 wants to merge 1 commit intobfly123:mainfrom
SevenX77 wants to merge 1 commit intobfly123:mainfrom
Conversation
…t ccbd warmup Root cause (TD-005): ccbd cold-start warmup often takes 10-30s (first tmux session materialization + completion tracker state load), but CcbdClient's 3s default client-side RPC timeout fails long before that. Local fork used CCB_CCBD_CLIENT_TIMEOUT_S=60 as a workaround; upstreaming the default bump so the env override isn't mandatory out of the box. env override (CCB_CCBD_CLIENT_TIMEOUT_S) and explicit timeout_s= kwarg precedence are unchanged. Existing callers that pass timeout_s=0.2 (daemon health probe in daemon_process.py) are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
I give a deeper design to solve this problem, thank you ! |
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
Bump
CcbdClient._resolve_timeoutdefault from3.0s→30.0s(both fallback branches).Why
ccbd cold-start warmup reliably takes 10–30 seconds in practice (first tmux session materialization + completion tracker state load + backend enumeration). The 3s default meant that the first
ccb askafterccb kill(or on a fresh machine) would routinely fail withsocket_unreachable, surfacing a brittle workflow:CCB_CCBD_CLIENT_TIMEOUT_S=60as a permanent shell-level workaround (which is what we've been doing in a fork for weeks)30s covers nearly all observed cold-starts while still being short enough that a truly unreachable ccbd is caught quickly.
Scope
lib/ccbd/socket_client.py:_resolve_timeout— two fallbackreturn 3.0→return 30.0test/test_ccbd_socket_client.py::test_ccbd_client_uses_stable_default_timeout— assertion3.0→30.0What is unchanged
CCB_CCBD_CLIENT_TIMEOUT_Senv override (still takes precedence over default)timeout_s=kwarg precedence (overrides both env and default)timeout_s=0.2for health probes (daemon_process.py,keeper_runtime/loop.py) — unaffectedmax(0.1, ...)clamp — unaffectedTest plan
pytest test/test_ccbd_socket_client.py→ 7 passedpytest test/full suite (clean env) → no new failures vs pre-change baseline on this branch's base (main@52f6d95). Confirmed by stashing the 4-line diff and re-running: identical pre-existing failure set before/after.