cttp: stream outbound %progress per chunk via stream flag#1004
Draft
mybropro wants to merge 1 commit into
Draft
Conversation
Implements per-chunk %progress delivery for outbound HTTP requests. When the iris %request gift arrives with stream=%.y, cttp fires a %start with empty body on header receipt, a %continue per body callback as h2o delivers bytes, and a terminating %continue with complete=%.y on EOS. Default stream=%.n preserves the existing buffered path. Bumps VERE_ZUSE 408 -> 407 to match the lull/iris wire-format change in urbit/urbit. Cannot land until that PR is in. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements per-chunk
%progressdelivery for outbound HTTP requests handled bycttp.When the iris
%requestgift arrives withstream=%.y,cttp:%startwith empty body andcomplete=%.non header receipt (so iris records the response-header)%continueper h2o body callback with the chunk andcomplete=%.n%continuewith empty body andcomplete=%.yon EOSDefault
stream=%.npreserves the existing buffered path — a single%startwith the full body andcomplete=%.y.Wire-format change
The iris
%requestgift to the%idriver gains a trailingstream=?field._cttp_ef_http_clientnow parses a 3-tuple[num req str]instead of[num req]. This is a coordinated change with urbit/urbit#7342.VERE_ZUSEbumped 408 → 407 in bothpkg/vere/mars.candpkg/vere/pier.cto match the lull/iris bump.Cannot land until
The companion arvo PR — urbit/urbit#7342 — is in. This vere PR can be reviewed in parallel but the kelvin assertion will refuse to boot against an unupgraded arvo.
Motivating use case
%llmproxy, an Urbit desk that proxies LLM inference to a local Ollama backend. Ollama streams responses as newline-delimited JSON; without%progresssupport the node agent must buffer the full response before forwarding anything over Ames.Test plan
*outbound-config:iris(defaultstream=%.n) → single%finishedwith full body, no%progressoutbound-config:iris(stream %.y)→%progressper h2o body callback, then%finishedwith empty bodyFollow-ons
%cancelsupport for in-flight streaming requests (still unimplemented)%progressinjection (avoid event-log writes on a hot streaming path)🤖 Generated with Claude Code