Surfaced while implementing #16024 (PR #16376), which gave TursoDriverConfig.timeout real behaviour. Filed bare for triage as an observation: after that PR the key is honest about this gap, but the gap is still there.
What was measured
@libsql/client@0.17.4 (@libsql/core@0.17.4, @libsql/hrana-client@0.10.0), read in the worktree at f377394ae:
Config.fetch is consulted only by the HTTP client (lib-esm/http.js hands it to hrana.openHttp(url, authToken, customFetch, …), whose HttpClient routes every request through it). lib-esm/ws.js never reads fetch, and @libsql/hrana-client's WebSocket client exposes no timeout option (grep for timeout over lib-esm/ws/*.js and lib-esm/index.js: 0 hits; the same grep over lib-esm/http/ finds the fetch call sites, so the zero is not a grep that does not work).
Config.timeout is the busy timeout for local file: databases — its own docblock says "remote clients ignore it".
So after #16376 the driver bounds remote operations over HTTP (libsql://, https://, http:// — the client resolves libsql:// to HTTPS) and bounds sync() on the replica arm, but a remote URL spelled wss:// / ws:// — which TursoDriver.detectMode accepts as remote — has no seam through which timeout can reach the WebSocket transport. The key's docblock and README now say so explicitly instead of promising it.
Why a card
A wss:// deployment that sets timeout reads an honest docblock, but the setting is still a declared no-op on that one transport — the ADR-0049 shape, narrowed to one URL scheme. Options for whoever picks it up, none recommended here:
- (a) route
wss:// / ws:// remote URLs through the HTTP transport when timeout is set — changes the wire protocol behind the author's back, needs a ruling;
- (b) bound each
RemoteTransport client call with a driver-side race, as the replica arm's sync() does — fails the caller within the window without cancelling the in-flight WebSocket request;
- (c) refuse
timeout together with a WebSocket URL at construction, so the no-op is loud;
- (d) leave it documented, as it is now.
Related: #16024 · #16376 · ADR-0049
Generated by Claude Code
Surfaced while implementing #16024 (PR #16376), which gave
TursoDriverConfig.timeoutreal behaviour. Filed bare for triage as an observation: after that PR the key is honest about this gap, but the gap is still there.What was measured
@libsql/client@0.17.4(@libsql/core@0.17.4,@libsql/hrana-client@0.10.0), read in the worktree atf377394ae:Config.fetchis consulted only by the HTTP client (lib-esm/http.jshands it tohrana.openHttp(url, authToken, customFetch, …), whoseHttpClientroutes every request through it).lib-esm/ws.jsnever readsfetch, and@libsql/hrana-client's WebSocket client exposes no timeout option (grep fortimeoutoverlib-esm/ws/*.jsandlib-esm/index.js: 0 hits; the same grep overlib-esm/http/finds the fetch call sites, so the zero is not a grep that does not work).Config.timeoutis the busy timeout for localfile:databases — its own docblock says "remote clients ignore it".So after #16376 the driver bounds remote operations over HTTP (
libsql://,https://,http://— the client resolveslibsql://to HTTPS) and boundssync()on the replica arm, but a remote URL spelledwss:///ws://— whichTursoDriver.detectModeaccepts as remote — has no seam through whichtimeoutcan reach the WebSocket transport. The key's docblock and README now say so explicitly instead of promising it.Why a card
A
wss://deployment that setstimeoutreads an honest docblock, but the setting is still a declared no-op on that one transport — the ADR-0049 shape, narrowed to one URL scheme. Options for whoever picks it up, none recommended here:wss:///ws://remote URLs through the HTTP transport whentimeoutis set — changes the wire protocol behind the author's back, needs a ruling;RemoteTransportclient call with a driver-side race, as the replica arm'ssync()does — fails the caller within the window without cancelling the in-flight WebSocket request;timeouttogether with a WebSocket URL at construction, so the no-op is loud;Related: #16024 · #16376 · ADR-0049
Generated by Claude Code