fix: Address review feedback for SSE streaming and dynamic upstreams#6
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
event: errorSSE event instead of returning a rawbufio.ErrTooLongwhen a stream line exceeds the 1MB scanner buffer, so agents receive a clean error notification instead of an abruptly broken stream.*now matches exactly one dot-separated hostname segment (e.g.,*.googleapis.comdoes NOT matchevil.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 linesTestMatchUpstream_GlobSubdomain— verifies*rejects multi-segment subdomainsTestMatchUpstream_DoubleStarSubdomain— verifies**matches multi-segment subdomains🤖 Generated with Claude Code