Skip to content

Stream responder output progressively in talk UI - #97

Open
ousamabenyounes wants to merge 1 commit into
laude-institute:mainfrom
ousamabenyounes:fix/issue-75
Open

Stream responder output progressively in talk UI#97
ousamabenyounes wants to merge 1 commit into
laude-institute:mainfrom
ousamabenyounes:fix/issue-75

Conversation

@ousamabenyounes

Copy link
Copy Markdown

Summary

  • Stream responder LLM stdout into an ephemeral per-trigger partial file under the identity run directory.
  • Expose active partial replies through the chat API without persisting them to trajectory history.
  • Render partial replies in the talk UI as the existing incoming bubble, keep fast polling while partials are active, and suppress duplicate typing/timeout affordances.
  • Treat nonzero LLM exits as reply failures even if stdout contains partial text or NO_REPLY.

Fixes #75

RED / GREEN proof

RED on upstream origin/main with the new responder regression:

FAIL partial reply is visible while llm is still running -- missing /tmp/tmp.6xu3gVi946/id/run/responder-partials/trig-1/content.txt
3 passed, 1 failed

RED on upstream origin/main with the new chat API regression:

FAILED web/tests/test_chat_api.py::test_chat_includes_active_partial_reply
1 failed in 0.98s

GREEN on this branch:

test_responder_partial_reply.sh: 12 passed, 0 failed
web/tests/test_chat_api.py: 18 passed

Validation

full local validation suite baseline on origin/main: pass
full local validation suite final on 05d283b: pass
bash suite: passed 40, failed 0
web pytest: 178 passed, 2 skipped
python diff coverage: 44/44 added lines covered
viewer test: 13 passed
viewer typecheck: pass
viewer build: pass

Browser/API proof against a served production build:

partial_text=partial reply in progress
chat_request_count=2
typing_dot_count=0
timeout_note_count=0

Review notes

Independent review found and this branch covers these edge cases:

  • partial stdout from a failed LLM call is never sent as the final reply
  • failed NO_REPLY output records reply-failed, not permanent no-reply
  • retry partials remain visible after a prior reply failed outcome
  • partial files tolerate incomplete UTF-8 writes during polling
  • malformed step IDs cannot make partial cleanup delete unrelated run/ files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream responder output progressively in the talk UI

1 participant