Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug] A resumed session stream closes before a queued message is drained, so the answer never reaches the client

Abierto
#527 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

  1. Start a session and let a turn run.
  2. While it runs, queue a message.
  3. Reload the client, so it resumes the session.
  4. 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.

Lenguaje dominante
TypeScript
Estrellas
2.1k
Forks
271
Merge medio
9 h 58 min
PR fusionados (30 d)
54

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MiniMax-AI/minimax-code

Todos los issues de MiniMax-AI/minimax-code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.