Problem
The SSE surface is a bare Sequence, and the reader explicitly disclaims ownership of the response (ServerSentEventReader.kt:23). Partial consumption can strand the connection.
Proposed change
Expose SseStream : AutoCloseable, Iterable<ServerSentEvent> that closes the underlying response when the stream closes or is partially consumed (mirror the close-on-partial-consume invariant pagination enforces). Turn the current doc-warnings into enforced constrain-once / is-closed guards.
Acceptance
Dependencies
Priority: medium · Effort: medium
Problem
The SSE surface is a bare
Sequence, and the reader explicitly disclaims ownership of the response (ServerSentEventReader.kt:23). Partial consumption can strand the connection.Proposed change
Expose
SseStream : AutoCloseable, Iterable<ServerSentEvent>that closes the underlying response when the stream closes or is partially consumed (mirror the close-on-partial-consume invariant pagination enforces). Turn the current doc-warnings into enforced constrain-once / is-closed guards.Acceptance
Dependencies
Priority: medium · Effort: medium