[Bug] A resumed session stream closes before a queued message is drained, so the answer never reaches the client
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend, distributed-systems
Direzione di ricerca
Start with packages/local-runtime-v2/src/application/conversation/conversation-application.ts and packages/local-runtime-v2/src/service/session-system/stream/session-stream-service.ts, tracing how resumed streams decide liveness and handle terminal events. Check the active-turn source and the replay boundary; done means a resumed live stream delivers the queued turn's answer, clears its queue row, and a stream following an ended turn closes at the replay point.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Title
A resumed session stream closes before a queued message is drained, so the answer never reaches the client
Where
packages/local-runtime-v2/src/application/conversation/conversation-application.ts
and packages/local-runtime-v2/src/service/session-system/stream/session-stream-service.ts
Reproduction
- Start a session and let a turn run.
- While it runs, queue a message.
- Reload the client, so it resumes the session.
- The queued message drains and its answer is produced, but the client never
sees it, and the queue row is not cleared.
Why
Two defects stack.
The liveness check reads a lagging projection. Whether a resumed stream
is live or replay-only is decided from the session's persisted status, and
that status is an asynchronous projection of the state events. While a turn
is still running it can read as idle. The runtime then hands the client a
replay-only stream that closes, and the answer committed later never reaches
it. The runtime contradicts itself: asked "is there an active turn?" it says
yes, and in the next moment it says idle.
The authoritative answer is the active turn itself.
The stream waits for a terminal event that will not come. A stream that
follows a turn that has already ended waits for that turn's terminal event,
which was published before the client attached. The wait never resolves, so
the stream hangs instead of ending at the replay point.
The stream has to remember which turn the last terminal event belonged to,
and end at the replay point when it follows a turn that already ended.
Impact
Every client that resumes a session is affected, not only the WebUI. The
user sees a queued message that never gets an answer and a queue row that
never clears.
Expected
- the liveness decision uses the authoritative active turn
- a stream that follows an already-ended turn ends at the replay point
instead of waiting forever
Notes
The client can re-read the transcript and the queue once its event channel is
ready, and that covers the projection the client holds. It cannot cover the
frame itself: the browser's event channel carries lifecycle events only, and
the live stream frames travel on their own connection. The client also must
not set the "drain queued" flag on its own, because that flag starts the
queued turn as a side effect.
- Lingua principale
- TypeScript
- Stelle
- 2.1k
- Fork
- 271
- Merge medio
- 9h 58m
- PR unite (30g)
- 54
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MiniMax-AI/minimax-code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MiniMax-AI/minimax-code#507 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage tui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MiniMax-AI/minimax-code#481 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug cli documentation needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
MiniMax-AI/minimax-code#299 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-triage tui
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
MiniMax-AI/minimax-code#546 ·
I maintainer di solito rispondono entro 1 giorno
-
bug desktop needs-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
MiniMax-AI/minimax-code#545 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MiniMax-AI/minimax-code
Issue simili
-
支持对已取消(cancelled)任务生成报告Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
Clouditera/VulnHunter#57 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug bug:behavior clawsweeper:bulk-filed clawsweeper:fix-shape-clear clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openclaw/openclaw#185297 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apex-dev-tools/apex-log-parser#199 ·
I maintainer di solito rispondono entro 1 giorno