Repository navigation
fix(tests): realign two more stream-utils passthrough cases with the #10017 control-line rules - #10796
Merged
diegosouzapw merged 2 commits intoAug 20, 2026
Conversation
…ntrol-line rules Two passthrough cases still asserted the pre-#10017 framing and have been red on release/v3.8.50 since. #10473 stopped forwarding upstream SSE control lines, but only added new coverage — it left these two behind. The event-boundary case is an OpenAI Responses scenario (its fixture emits response.output_text.delta against a responses-model), so it now declares clientResponseFormat accordingly; `event:` framing is forwarded exactly for that format and for Claude Messages. The metadata case cannot be fixed by declaring a format: `:` comments, `id:` and `retry:` are dropped for every client format, since none of the three supported SSE protocols define them. Its expectation now pins what the case is actually about — the surviving lines stay inside ONE event instead of being split by blank lines — and asserts the dropped lines are gone.
Collaborator
|
Verified independently: rebuilt the passthrough SSE prefix-buffer logic in |
diegosouzapw
merged commit Aug 20, 2026
85aa84e
into
cheaper-inference:release/v3.8.50
5 checks passed
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…heaper-inference#10017 control-line rules (cheaper-inference#10796) Merged via merge-train (release/v3.8.50, batch1 2026-08-20) — static gates (typecheck/file-size/complexity/cognitive/changelog) green on the combined tree; test:unit reds observed in the boarded run were verified pre-existing on the pure release tip (unrelated flake), not caused by this PR. Thanks for the contribution!
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.
Follow-up to #10726 (merged). Two more
stream-utilscases are red onrelease/v3.8.50for the same reason the ones in that PR were: #10473 changed what passthrough forwards and only added new coverage, leaving these asserting the framing it replaced.Test-only change.
The two cases
forwards data only after the complete SSE event boundary— the fixture emitsresponse.output_text.deltaagainst aresponses-model, so it is an OpenAI Responses scenario.event:framing is forwarded for exactly that format and for Claude Messages (stream.ts:833), so the case now declaresclientResponseFormatand passes on its own terms.preserves event metadata in a single SSE event— this one cannot be fixed by declaring a format.:comments,id:andretry:are dropped for every client format, since none of the three supported SSE protocols define them (streamHelpers.ts→remember). The expectation now pins what the case is actually about — the surviving lines stay inside ONE event instead of being split apart by blank lines — and asserts the dropped lines are gone.Verification
npm run test:viteston the same base is already fully green (368/368).Two failures in the same file are NOT addressed here
They are left alone deliberately — both look like behaviour changes rather than stale expectations, and getting them wrong would affect billing and tool routing rather than just a test.
passthrough merges Claude usage chunks and restores mapped tool names— the fixture'smessage_startcarriesusage: { input_tokens: 6 }, but the completion payload reportsprompt_tokens: 33. An upstream-reported input count appears to be replaced by an estimate. If that is intended, the case needs a new expectation; if not, the estimate is overriding real usage data and the fix belongs in the usage merge path, not in this test.translate mode converts Claude SSE into OpenAI chunks and completion payload— fails in the same file and likely shares that cause.Also still red on this base and untouched here:
tests/unit/translator-tool-call-shim.test.ts→streaming: Read suppresses raw pages delta and emits cleaned input at finish. The shim itself is correct (/etc/hostsis not a PDF, sosanitizeReadArgsdeletespages), but the streaming path throughopenaiToClaudeResponseemits the uncleaned input — one delta is produced, so the shim is reached, yet"pages"survives inpartial_json.Happy to take any of these in a follow-up if the intended behaviour is confirmed.
release/v3.8.50was already red when this branch was cut.