Skip to content

http: remove lifetime-launder workarounds in client body/buffer and RareData socket-group paths - #35373

Merged
Jarred-Sumner merged 9 commits into
mainfrom
farm/bf002c9c/http-borrowck-c6
Jul 24, 2026
Merged

http: remove lifetime-launder workarounds in client body/buffer and RareData socket-group paths#35373
Jarred-Sumner merged 9 commits into
mainfrom
farm/bf002c9c/http-borrowck-c6

http: remove lifetime-launder workarounds in client body/buffer paths

abfbcde
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 24, 2026 in 17m 44s

Code review found 2 potential issues

Found 3 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/sql_jsc/jsc.rs:327-328 Stale trait doc comment on VirtualMachineSqlExt socket-group accessors
🟡 Nit src/http/lib.rs:3806 Dead envelope_buf take + stale comment in start_proxy_handshake

Annotations

Check warning on line 328 in src/sql_jsc/jsc.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Stale trait doc comment on VirtualMachineSqlExt socket-group accessors

The trait doc comment on `VirtualMachineSqlExt::postgres_socket_group` still says it "Encapsulates the `rare_data(&mut self)` / `*_group(.., &VirtualMachine)` borrowck conflict … so the four call sites need no per-site raw-pointer dance," but this PR changed the `*_group` accessors to take `*mut uws::Loop` and rewrote the impl bodies to a plain two-liner with no borrowck conflict and no raw-pointer dance. The PR deleted the stale impl-body comments but left the trait-decl doc describing a signat

Check warning on line 3806 in src/http/lib.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Dead envelope_buf take + stale comment in start_proxy_handshake

Now that `handle_on_data_headers` unconditionally `mem::take`s `response_message_buffer` into a local at line 3638, `self.state.response_message_buffer` is guaranteed empty when `start_proxy_handshake` runs (line 3806 is its sole caller), so `envelope_buf = mem::take(...)` at line 3616 always takes an empty `MutableString` and its 27-line rationale comment is stale — the backing storage for `start_payload` is now the caller's local `buffer`, which outlives this call. Per REVIEW.md "Delete dead c