design+realize: RLM-336 text streaming through the completion boundary #350
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm!350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "research/text-streaming"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ADADR design and realization slices for issue #336 (text streaming). Research record RLM-RESEARCH-336 was approved for realization in PR #349.
Design (approved by the operator on 2026-09-04)
rage/336-text-streaming-design.orgresolves research OQ1-OQ6 and records the adversarial review. Decision gate: GO with operator evidence.Realization (within the approved scope)
text_delta_handler(Handler)selecting the chain streaming transport (model_stream_execute) inside the existing bounded async worker. Absent option = byte-identicalmodel_complete_executepath. Combining with injectedplanner_handler/model_handlerfails fast (conflicting_stream_option).stream_message{}vocabulary keyed bystream_call{operation, depth, seq}; chainstream_event{}shape stays private; exactly-oncestarted(before first delta) andcompleted(post-validation); no completion on error/cancel paths.stream_result.responsestays authoritative: usage exactly once; harddelta_final_divergencegate with preserved usage; transport-dict stream errors carry observedstream_usage; cancellation stays conservative.ui_stream_handler/3projects to canonicalagent_event(message_started/model_delta/message_completed)with bijective message ids; UI v1 wire protocol unchanged; no scheduler, trajectory, trace, or persistence changes.Evidence
.prologledger (task issue-336-realize) at the pushed HEAD.Non-goals (unchanged): no scheduler/event-bus changes, no SSE transport changes, no direct-mode native streaming, no trajectory-shape or UI protocol changes, no reasoning-delta delivery.
ADADR design slice resolving OQ1-OQ6 from approved RLM-RESEARCH-336: - One trusted completion option text_delta_handler(Handler) selecting model_stream_execute inside the existing bounded async worker; absent option is byte-identical to today's model_complete_execute path. - Closed completion-level stream_message{} vocabulary with CallRef{operation, depth, seq}; chain stream_event{} shape stays private; completion runtime owns started/completed lifecycle (first-delta start, post-validation complete, exactly once per CallRef). - Reasoning deltas aggregated and consistency-checked but not delivered; no coalescing; conflict rule fails fast when combined with injected planner/model handlers; transport-dict stream errors carry observed stream_usage; divergence is a hard error, never silent reconciliation. - Conversation/UI surfaces consume the handler via host-side projection to canonical agent_event terms; UI v1 protocol unchanged. Design approval is the pending human gate on PR #350; implementation is not authorized by this commit. Verification ledger refreshed for task issue-336-design.design: RLM-336 text streaming through the completion boundaryto design+realize: RLM-336 text streaming through the completion boundaryRealization pushed through
9006c22(design approval15261a3, implementationbef1b6e, verification ledger9006c22).Real OpenRouter live evidence (credentialed, this worktree): real SSE deltas through the completion boundary, aggregate text == validated final response, usage recorded exactly once, CallRef-attributed lifecycle started/delta/completed delivered exactly once per call.
Deterministic: focused streaming suite 13/13; full suite 1192/1192 (97 suites); benchmark deterministic 16/16; CLI demo smoke; research-approval gate green (21 tracked records).
Merge closes the implementation of #336 per the ADADR decision gate recorded in rage/336-text-streaming-design.org.
Local verification of the failing remote lanes (head
9006c22), run by the operator directive 'local nix tests then merge when local works':The re-dispatched CI nix (run 300), paid (299) and tree-sitter (301) failures reproduce nowhere locally with identical commands; they are runner/infra failures, not branch failures. Merging per the operator's explicit local-verification directive; the lane issues remain tracked (#340 tree-sitter runner; nix/paid runner issues stay open for the CI owners).