prolog-rlm should support text streaming #336

Closed
opened 2026-09-04 14:23:29 +00:00 by nsaspy · 2 comments
Owner

Streaming is not currently implemented
ADARD skill should be used to enumerate the correct method for implemtation

research branch: research/text-streaming (research record RLM-RESEARCH-336: #349)
Then implement once operator approval is complete.

Streaming is not currently implemented ADARD skill should be used to enumerate the correct method for implemtation research branch: research/text-streaming (research record RLM-RESEARCH-336: https://git.starintel.actor/nsaspy/prolog-rlm/pulls/349) Then implement once operator approval is complete.
Author
Owner

Research record posted: RLM-RESEARCH-336 'Text streaming through the completion boundary' — #349 (branch research/text-streaming, approval state PENDING).

Verified gap map (main @ 466bde0): SSE transport + chain model_stream/chain_stream exist with include_usage, [DONE] enforcement, cancellation propagation and live OpenRouter coverage; UI v1 already advertises streaming_text and reduces text_delta frames. What is missing is any producer above the chain boundary: rlm_completion dispatches only model_complete_execute, and canonical agent_event(model_delta, ...) has zero producers.

Recommended method (enumerated in the record): opt-in trusted text_delta_handler completion option dispatching through model_stream_execute inside the existing async worker, with the validated stream_result.response remaining authoritative, delta/final consistency, exactly-once usage, and conservative mid-stream cancellation. Rejected: replay pseudo-streaming, a second event-bus subsystem, model-controlled stream, durable raw-delta persistence.

Verification: prolog-verify gate green at the PR head — research-approval validator PASS (21 records), static load PASS, deterministic suite PASS (1179 tests), whitespace clean, slice scope limited to research/ + .prolog/.

Awaiting operator approval to start the design phase.

Research record posted: RLM-RESEARCH-336 'Text streaming through the completion boundary' — https://git.starintel.actor/nsaspy/prolog-rlm/pulls/349 (branch `research/text-streaming`, approval state PENDING). Verified gap map (main @ 466bde0): SSE transport + chain `model_stream`/`chain_stream` exist with `include_usage`, `[DONE]` enforcement, cancellation propagation and live OpenRouter coverage; UI v1 already advertises `streaming_text` and reduces `text_delta` frames. What is missing is any producer above the chain boundary: `rlm_completion` dispatches only `model_complete_execute`, and canonical `agent_event(model_delta, ...)` has zero producers. Recommended method (enumerated in the record): opt-in trusted `text_delta_handler` completion option dispatching through `model_stream_execute` inside the existing async worker, with the validated `stream_result.response` remaining authoritative, delta/final consistency, exactly-once usage, and conservative mid-stream cancellation. Rejected: replay pseudo-streaming, a second event-bus subsystem, model-controlled `stream`, durable raw-delta persistence. Verification: `prolog-verify` gate green at the PR head — research-approval validator PASS (21 records), static load PASS, deterministic suite PASS (1179 tests), whitespace clean, slice scope limited to `research/` + `.prolog/`. Awaiting operator approval to start the design phase.
Author
Owner

Implemented and merged.

  • Design record: rage/336-text-streaming-design.org (resolves the research record's OQ1-OQ6; adversarial review recorded; operator design approval 2026-09-04 on PR #350).
  • Realization: trusted text_delta_handler(Handler) completion option streaming through model_stream_execute inside the existing bounded async worker; closed stream_message{} vocabulary keyed by stream_call{operation, depth, seq}; exactly-once started/completed lifecycle; hard delta_final_divergence consistency gate; usage exactly once; observed stream_usage on transport errors; conservative cancellation; ui_stream_handler/3 projection to canonical agent_event(model_delta, ...) — zero producers of model_delta before this slice, now one canonical producer.
  • Evidence: deterministic suite 1192/1192 on the merge commit (97 suites); focused fixture-server streaming suite 13/13; REAL OpenRouter live streaming through the completion boundary passed with pinned paid model and real credentials; nix flake check/build/packaged-load/wrapper all pass locally.
  • Merged as 2962d89 (PR #350). Remote nix/paid/tree-sitter CI lanes remain runner-broken (pre-existing, #340 et al.); identical commands verified locally.

Closing.

Implemented and merged. - Design record: rage/336-text-streaming-design.org (resolves the research record's OQ1-OQ6; adversarial review recorded; operator design approval 2026-09-04 on PR #350). - Realization: trusted text_delta_handler(Handler) completion option streaming through model_stream_execute inside the existing bounded async worker; closed stream_message{} vocabulary keyed by stream_call{operation, depth, seq}; exactly-once started/completed lifecycle; hard delta_final_divergence consistency gate; usage exactly once; observed stream_usage on transport errors; conservative cancellation; ui_stream_handler/3 projection to canonical agent_event(model_delta, ...) — zero producers of model_delta before this slice, now one canonical producer. - Evidence: deterministic suite 1192/1192 on the merge commit (97 suites); focused fixture-server streaming suite 13/13; REAL OpenRouter live streaming through the completion boundary passed with pinned paid model and real credentials; nix flake check/build/packaged-load/wrapper all pass locally. - Merged as 2962d89 (PR #350). Remote nix/paid/tree-sitter CI lanes remain runner-broken (pre-existing, #340 et al.); identical commands verified locally. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#336
No description provided.