Parent: #563
Phase: #566
Summary
process_through_compression uses flush() then drop(encoder) which silently swallows finalization errors. This is a prerequisite for Task 2 (moving gzip to this path) — without it, gzip would regress from working finish() to broken drop().
Changes
- Change signature from
W (by value) to &mut W so caller retains ownership for finish()
- Remove
drop(encoder) — caller calls finish() explicitly
- Update
process_deflate_to_deflate and process_brotli_to_brotli callers
- Add deflate round-trip correctness test
File: crates/trusted-server-core/src/streaming_processor.rs:334-393
Plan
See docs/superpowers/plans/2026-03-25-streaming-response.md — Task 1