fix(client): precisely capture raw response streams - #85
Merged
lightsofapollo merged 4 commits intoSep 28, 2026
Merged
lightsofapollo merged 4 commits into
lightsofapollo merged 4 commits into
Conversation
|
@adriendellagaspera is attempting to deploy a commit to the lbl-rd Team on Vercel. A member of the Team first needs to authorize it. |
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
Raw SSE/live response methods can return an opaque stream that implicitly captures the receiver and borrowed request inputs under Rust 2024 lifetime-capture rules. Downstream consumers therefore cannot prove that the stream is independently owned after the async call resolves.
Reuse the existing precise-capture request-parameter path for every raw response stream and emit:
The capture list still includes the generic type parameters required by the hidden type; the explicit
'staticbound proves the returned stream does not borrow request inputs or&self.Generated compatibility
'static + use<...>bounds.impl AsRef<str>capture path.Validation
cargo fmt --checkcargo clippy --all-features -- -D warningscargo test --all-featuresscripts/install-smoke.shfor packaging/dependency changes.scripts/spec-compile.shfor generator changes.The regression test generates an SSE-only operation with a borrowed query parameter and requires the returned stream to be boxable as an owned
'staticstream after the async request resolves.The corpus manifest was refreshed for the resulting signature-only changes.
Notes for reviewers
The smallest useful review path is:
src/client_generator.rs: two small changes make all raw response streams use precise capture and add the explicit 'static bound.tests/client_transport_variants_test.rs: the focused Rust 2024 regression demonstrating that the returned stream no longer borrows request inputs.tests/corpus-manifest.txt: expected signature-only corpus updates.There is no intended change to HTTP behavior, response parsing, request serialization, generated models, dependencies, or configuration semantics.