Repository navigation
Stream a run's pieces through RunSetup::streaming, and delete RunBroker - #38
Conversation
The plan moves streaming from `RunBroker` to the Harness callback set with `RunSetup::streaming`. Workshop deletes `RunBroker`, forwards `on_piece` from `WorkshopBroker`, and publishes each live piece into its conversation from the callback. The file holds the commits in three repositories and the order of the pushes and the merges. - Workshop pins the Harness commit that holds the callback in the same commit as the code, because the changed trait breaks its two brokers. - `seq` on `agent_delta` and `runvil-classroom` are outside the plan. Plan: /plan/2026-11-24-1-streaming-callback.plan.md
The launch code sets the `streaming` callback of `RunSetup` to a function that publishes each live piece into the conversation, and `RunBroker` is deleted. `WorkshopBroker` takes `on_piece`, hands it to the Gateway broker, and answers `true` from `supports_streaming`. The pin moves to the Harness commit that holds the callback, because the changed trait breaks both brokers. - `live_pieces` is a free function beside `setup_for`. It moves the text of each `Delta` into `publish_delta` under the round's id, and it ignores a variant it does not know. - The callback does not check a round's origin, because the Harness hands it only a section's own rounds. - The tests in `broker-tests.rs` run `chat` with `None` and with a callback, and check that the broker says it streams. A new test feeds `live_pieces` two pieces under round 3 and reads them from `subscribe_deltas`. The test of `RunBroker` goes with the type. - `Cargo.lock` changes its 14 source lines for the Harness packages and nothing else. - The two socket tests that stream deltas are unchanged. Plan: /plan/2026-11-24-1-streaming-callback.plan.md
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
The three `rev` values of `runvil-harness` in `Cargo.toml` move to the Harness commit that holds the corrected docs of the streaming setter. `Cargo.lock` changes its 14 `source` lines for the Harness packages, and no code changes. - The commit holds no test, because it moves a pin and nothing else. Plan: /plan/2026-11-24-1-streaming-callback.plan.md
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Workshop streams a reply's live pieces through the Harness's
RunSetup::streaming, and its per-run broker is gone. The launch code sets a callback on each run's setup that publishes each piece into the conversation under the round's id.WorkshopBrokertakes the Harness's newon_pieceargument, hands it to the Gateway broker, and says that it streams. Both come with the Harness at5d9c7bf8, the head of cppalliance/runvil-harness#76.Merge order: this pull request merges after cppalliance/runvil-harness#76. Its pin names a commit that only that pull request holds until then. The Harness merge is a fast-forward, so the commit keeps its id.
The commits
InferenceBrokerbreaks Workshop's two brokers, so the pin cannot move alone.5d9c7bf8. The pin moves again, andCargo.lockwith it, after a review fix to the docs of the Harness's streaming setter. No code changes.Each of the two commits that follow the plan copy passes Workshop's whole verification list by itself, on its pin. Each commit message ends with a
Plan:line that names the plan file in this repository.What changes
setup_for, before:After:
The callback:
RunBrokerand the privateWorkshopBroker::chat_streamingare deleted.WorkshopBroker::chattakeson_pieceand hands it to the Gateway broker'schat, andsupports_streamingreturnstrue.models.inferround never reaches it.Deltathat it does not know.with_host_stateneeded no change. It rebuilds the setup with struct update syntax, so the callback carries through.Cargo.lockchanges its 14sourcelines of the Harness packages and nothing else.What a person will notice
Nothing. The window, the transcript, and the run log get the same pieces and events in the same order as before. The two socket tests that stream deltas over the real launch path pass unchanged.
Call sites
setup_forpasses the server'sWorkshopBrokerstraight toRunSetup::new, and it takes two handles for the setup: one to the broker and one to the conversation, which the callback owns.broker-tests.rscallschatwithNone, and with a callback where it checks the pieces.Tests
The two test groups run 706 and 354 tests on Windows, all passing. Those are the counts of before.
live_piecesunder round 3 reaches a receiver fromsubscribe_deltaswith its kind, its content, and the reply id 3. This replaces the test ofRunBroker. Its nestedInferhalf is the Harness's test now, since the Harness hands that round no callback.chatwith a callback hands it the pieces of the reply and returns the whole reply, the broker says that it streams, and a round with no gateway fails asUnavailableand streams nothing.a_full_turn_streams_deltas_and_indexed_events_sharing_the_reply_idandgate_streaming_delivers_text_and_reasoning_deltas_then_the_replyrun over the real launch path and are unchanged.Checks
Every command in
AGENTS.mdpassed on the new pin before the code commit, with--locked: the format check, clippy in its two groups withCARGO_BUILD_WARNINGS=deny, nextest in its two groups, the docs build withRUSTDOCFLAGS="-D warnings",cargo dylint, the structural checks, and the wording scan. The private-item docs ofworkshop-serverbuild with warnings denied, which refuses a link to the deletedRunBroker. The pre-push hook passed on the push.Before the Harness was pushed, the same list also passed on the Harness head that was upstream, with no change of Workshop's own.
The checks ran on Windows.
Follow-up
seqonagent_delta, the per-round sequence number that lets the browser detect a gap in a round's pieces, gets its own plan.Summary by CodeRabbit