Skip to content

fix(sse): bound the build-notification connection pool - #125

Merged
Aukevanoost merged 2 commits into
mainfrom
fix/sse-bounded-pool
Aug 11, 2026
Merged

fix(sse): bound the build-notification connection pool#125
Aukevanoost merged 2 commits into
mainfrom
fix/sse-bounded-pool

Conversation

@Aukevanoost

Copy link
Copy Markdown
Contributor

Behind a reverse proxy the notifier's peer is the proxy, not the browser, so a stream the client abandoned on navigation still looks writable and the existing liveness sweep never reclaims it. The pool is now capped at 16, evicting the oldest entry — which bounds the pile-up without needing to tell why a stream went stale.

Also:

  • Declare a reconnect delay on the stream, so backoff after a dev-server restart is ours rather than the browser default.
  • First spec for the notifier (12 tests); it had none.
  • buildNotifications.enable carries default: true on a nested property, so it only applies once the parent object exists. The schema read as on-by-default when the feature is opt-in; the description now says so. No behaviour change.

Refs native-federation/native-federation-core#50

Behind a reverse proxy the notifier's peer is the proxy rather than the browser,
so a stream the client abandoned on navigation still looks writable and is never
reclaimed by the existing liveness sweep. Cap the pool at 16 and evict the oldest
entry, which bounds the pile-up without needing to tell why a stream went stale.

Also declares a reconnect delay on the stream so backoff after a dev-server
restart is ours rather than the browser default, and adds the first spec for the
notifier. The schema's nested `enable` default read as on-by-default when the
feature is in fact opt-in, so that description is now explicit.

Refs native-federation/native-federation-core#50
@Aukevanoost
Aukevanoost force-pushed the fix/sse-bounded-pool branch from 5584da6 to 97ebe1e Compare August 8, 2026 08:24
@Aukevanoost
Aukevanoost merged commit 65211b9 into main Aug 11, 2026
1 check 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