refactor(api): extract SSE broadcaster into internal/api/sse leaf (ADR-0011)#452
Merged
Conversation
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
…rflow) CodeQL go/allocation-size-overflow flagged make([]byte,0,len(data)+const) (a practically-impossible overflow, but pre-existing on main in sse.go). Since the extraction moves this code, fix it properly: slices.Concat sizes internally with its own overflow guard — no hand-rolled make-capacity for the analyzer to flag. Behavior identical.
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
This was referenced Jun 16, 2026
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
Second ADR-0011 internal/api decomposition slice: extract the SSE broadcaster/streaming engine into the isolated leaf package
internal/api/sse(stdlib-only, no transport awareness), mirroring niac's pattern + the merged ratelimit leaf. The SSE HTTP handler stays in transport and consumessse.Frame. Adds theapi-sse-isolateddepguard rule. Endpoints, event types, and publish sites are unchanged.Linked Issue
Related to #450
Testing Evidence
(Independently re-verified by Opus from a clean worktree of the branch.)
Security and Release Checklist