Skip to content

Commit 5296c25

Browse files
t3dotggclaude
andcommitted
docs(internals): the shell load paragraph keeps the constraints and drops the request sequence
Co-Authored-By: Claude Fable 5.2 <[email protected]>
1 parent 84fd2b3 commit 5296c25

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

‎docs/internals/connection-runtime.md‎

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,15 @@ connection nor overwrite newer live data during a reconnect. Loading and
7575
resuming snapshots belongs to the shared state services, so every view agrees
7676
on which data is current.
7777

78-
The shell snapshot loads over HTTP, which needs only the prepared connection.
79-
When the server's public descriptor names its shell flags, the
80-
[shell state](../../packages/client-runtime/src/state/shell.ts) asks for the
81-
shell as soon as the connection is prepared, while the socket opens and the
82-
config downloads. The request names held rows that may resume (`resumeFrom`), and
83-
the server answers `resumable` instead of a snapshot when the socket can replay
84-
from them, so a cold start costs one shell request plus the subscription. The
85-
live config stays the authority: rows loaded for a build or with omissions it
86-
does not confirm are replaced, never resumed. A server whose descriptor does not
87-
name the flags is asked only after its config arrives. The subscription waits
88-
for that answer, so a snapshot never lands on rows the socket has moved on. When
89-
held rows can resume, the wait ends 3 seconds after the socket is ready: the
90-
request is interrupted and the socket resumes the rows, so a proxy that drops
91-
`/api` without an answer does not hold the connect for the HTTP timeout.
78+
The shell snapshot loads over HTTP, which needs only the prepared connection, so
79+
the [shell state](../../packages/client-runtime/src/state/shell.ts) can ask for
80+
it before the socket and the config are ready. Two constraints follow. The live
81+
config stays the authority: rows loaded early for a build or with omissions that
82+
it does not confirm are replaced, never resumed. And an HTTP answer must never
83+
land on rows the socket has moved on: the subscription waits for the answer, and
84+
when held rows can resume, it ends the request 3 seconds after the socket is
85+
ready. A proxy that drops `/api` without an answer then does not hold the
86+
connect for the HTTP timeout.
9287

9388
Each environment synchronizes at its own time, so a thread list that follows every
9489
snapshot moves once per environment on each cold start and resume. Mobile lists read

0 commit comments

Comments
 (0)