Skip to content

fix: Address review feedback for SSE streaming and dynamic upstreams#6

Merged
emretinaztepe merged 2 commits into
mainfrom
feature/streaming-and-dynamic-upstreams
Mar 6, 2026
Merged

fix: Address review feedback for SSE streaming and dynamic upstreams#6
emretinaztepe merged 2 commits into
mainfrom
feature/streaming-and-dynamic-upstreams

Conversation

@emretinaztepe

Copy link
Copy Markdown

Summary

  • SSE oversized line handling: Emit a proper event: error SSE event instead of returning a raw bufio.ErrTooLong when a stream line exceeds the 1MB scanner buffer, so agents receive a clean error notification instead of an abruptly broken stream.
  • Single vs multi-segment hostname globs: * now matches exactly one dot-separated hostname segment (e.g., *.googleapis.com does NOT match evil.com.googleapis.com). Added ** for matching one or more segments. Updated docs and tests accordingly.

Addresses review feedback from wardgate#3.

Test plan

  • TestSSEFilterReader_OversizedLine — verifies SSE error event on oversized lines
  • TestMatchUpstream_GlobSubdomain — verifies * rejects multi-segment subdomains
  • TestMatchUpstream_DoubleStarSubdomain — verifies ** matches multi-segment subdomains
  • Full test suite passes

🤖 Generated with Claude Code

emretinaztepe and others added 2 commits March 6, 2026 13:29
Instead of returning a raw bufio.ErrTooLong that causes the stream to
end abruptly, emit a proper SSE error event so the agent receives a
clean notification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-e
Signed-off-by: Emre Tinaztepe <emre@binalyze.com>
…ment

* now matches exactly one dot-separated hostname segment (e.g.,
*.googleapis.com does NOT match evil.com.googleapis.com).
** matches one or more segments for cases where multi-level subdomains
are intended. Updated docs and tests accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-e
Signed-off-by: Emre Tinaztepe <emre@binalyze.com>
@emretinaztepe
emretinaztepe merged commit 4e28bcb into main Mar 6, 2026
2 checks passed
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