Document durable background recovery and legacy replay limits
This commit is contained in:
+10
-7
@@ -13,9 +13,9 @@ When a `chat_prompt` is accepted during a running turn, the reply sets
|
||||
## Restarts keep sessions running
|
||||
|
||||
A server restart or stop does not stop chat sessions. Only an operator action
|
||||
stops one: closing the chat, or Stop on its turn. On shutdown the server records
|
||||
each chat that still has work on its harness (a turn in flight, a pending
|
||||
question or approval, or running background tasks) in `chat_live_sessions`.
|
||||
stops one: closing the chat, or Stop on its turn. The server durably journals
|
||||
chat work as it changes (a turn in flight, a pending question or approval, or
|
||||
running background tasks), and refreshes `chat_live_sessions` on shutdown.
|
||||
It then detaches each backend instead of closing it, and never sends an
|
||||
interrupt.
|
||||
|
||||
@@ -26,8 +26,9 @@ and holds queued prompts behind the turn. If a turn ended while the server was
|
||||
down, or its end event was lost with the old stream, the end is folded in from
|
||||
the harness's history. Clients get a `resync`, the reply notifies once (with
|
||||
the text the harness recorded), and queued prompts are delivered in order. The
|
||||
older start-up probe of recently used chats still runs for anything not
|
||||
recorded, for example after a crash.
|
||||
startup discovery checks all open registered chats for work not yet recorded,
|
||||
including after a crash. Unavailable sessions remain journaled and retry;
|
||||
browser requests wait until journaled turns and queued prompts are restored.
|
||||
|
||||
Per backend (the contract is `chatShutdownDetacher.Detach`, which
|
||||
`chatManager.Close` calls instead of `Close`, plus `chatSessionReleaser` for
|
||||
@@ -181,8 +182,10 @@ Limits:
|
||||
- A container restart (Docker) still ends every host. So does a reboot or
|
||||
logout. The transcript survives and `--resume` applies.
|
||||
- The spool keeps at most 64 MiB of acknowledged output. Older output is
|
||||
dropped, so background-task state from before that point is not rebuilt after
|
||||
a restart. Unacknowledged output is dropped only beyond 256 MiB; the server
|
||||
dropped. Current hosts retain running task identities separately from output.
|
||||
Legacy hosts with an incomplete replay report task visibility as unknown,
|
||||
rather than claiming there are no tasks. Unacknowledged output is dropped only
|
||||
beyond 256 MiB; the server
|
||||
then logs the gap and clients reload the transcript.
|
||||
- Turn bookkeeping that lived only in server memory restarts fresh: the turn id,
|
||||
and which mid-turn messages are still outstanding. Output that begins a
|
||||
|
||||
Reference in New Issue
Block a user