Skip to content

Move BufferedStreamWriter (+Switchable, +Pipe) to RESPite.Streams as the single copy - #3153

Merged
mgravell merged 1 commit into
mainfrom
marc/respite-buffered-stream-writer
Aug 3, 2026
Merged

Move BufferedStreamWriter (+Switchable, +Pipe) to RESPite.Streams as the single copy#3153
mgravell merged 1 commit into
mainfrom
marc/respite-buffered-stream-writer

Conversation

@mgravell

@mgravell mgravell commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

The trio existed twice: here (redis-coupled factory) and drifted lib-generic copies on the proxy spike branch. Duplicated code is asking for trouble, so this is the unification, replace/move not duplicate: the SE.Redis files are GONE, the one copy lives in RESPite.Streams (it already leaned on RESPite.Buffers -- the move is with the grain), and the proxy branch deletes its copies on next rebase.

What decoupled: the factory loses ConnectionType/ConfigurationOptions and takes (WriteMode, Stream, MemoryPool?, CancellationToken); WriteMode.Default maps to Async as the lib-safe default. The redis POLICY (pub/sub never wants sync latency mode) moves to the one call site in PhysicalConnection.InitOutput, where it reads as policy instead of hiding in a lib factory.

RESPite gains the same conditional System.IO.Pipelines reference SE.Redis already carries (in-box from net10.0) so PipeStreamWriter -- the comparison/troubleshooting implementation -- stays with its family rather than being split back out via cross-assembly inheritance. Everything stays internal; RESPite already grants IVT to StackExchange.Redis and the test projects.

Solution builds 0 errors on all TFMs; BufferedStreamWriter + RoundTrip + InProcess/WriteMode test batteries all pass (129 tests).

Checklist

  • I fully and freely contribute this code in accordance with the project license (and am legally able to do so)
  • I take responsibility for this contribution's quality and correctness, including any portions produced with AI assistance (see CONTRIBUTING.md).

…the single copy

The trio existed twice: here (redis-coupled factory) and drifted lib-generic copies on the proxy spike
branch. Duplicated code is asking for trouble, so this is the unification, replace/move not duplicate:
the SE.Redis files are GONE, the one copy lives in RESPite.Streams (it already leaned on RESPite.Buffers
-- the move is with the grain), and the proxy branch deletes its copies on next rebase.

What decoupled: the factory loses ConnectionType/ConfigurationOptions and takes (WriteMode, Stream,
MemoryPool<byte>?, CancellationToken); WriteMode.Default maps to Async as the lib-safe default. The
redis POLICY (pub/sub never wants sync latency mode) moves to the one call site in
PhysicalConnection.InitOutput, where it reads as policy instead of hiding in a lib factory.

RESPite gains the same conditional System.IO.Pipelines reference SE.Redis already carries (in-box from
net10.0) so PipeStreamWriter -- the comparison/troubleshooting implementation -- stays with its family
rather than being split back out via cross-assembly inheritance. Everything stays internal; RESPite
already grants IVT to StackExchange.Redis and the test projects.

Solution builds 0 errors on all TFMs; BufferedStreamWriter + RoundTrip + InProcess/WriteMode test
batteries all pass (129 tests).
@mgravell
mgravell merged commit 09d8065 into main Aug 3, 2026
3 of 5 checks passed
@mgravell
mgravell deleted the marc/respite-buffered-stream-writer branch August 3, 2026 13:20
mgravell added a commit that referenced this pull request Aug 3, 2026
…copies die

This branch was the source of the duplication -- its lib-generic src/RESPite/Streams copies drifted
from the redis-coupled originals. Main now carries the unified trio in RESPite.Streams (#3153), so the
merge resolves every add/add in main's favour; the branch's copies are gone. The one branch call site
(InnerLeg's sync writer) moves to the unified factory signature, and the PublicAPI file unions this
branch's RespStream entries with main's SER009 entries.

Solution + proxy toy build clean; the 129-test writer/round-trip/in-proc battery passes on the merged
result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant