Skip to content

Resolve #2734: Reject managed SSE without response stream support#2760

Merged
ayden94 merged 1 commit into
mainfrom
issue-2734-reject-managed-sse-without-response-stream-support
Jul 14, 2026
Merged

Resolve #2734: Reject managed SSE without response stream support#2760
ayden94 merged 1 commit into
mainfrom
issue-2734-reject-managed-sse-without-response-stream-support

Conversation

@ayden94

@ayden94 ayden94 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Managed SSE async iterables were silently reported as handled when the active adapter exposed no FrameworkResponse.stream, swallowing the requested event stream without an observable error. This aligns managed SSE with the documented adapter contract by surfacing a clear unsupported-stream failure before marking the response handled.

Linked context: Closes #2734

Changes

  • packages/http/src/dispatch/dispatcher.ts: writeManagedSseIterable now checks requestContext.response.stream before constructing SseResponse and throws Managed SSE requires adapter-provided response.stream support. instead of returning true (silent handling). The failure flows through the standard dispatch error path (request error observers and the configured error response writer).
  • packages/http/src/dispatch/dispatcher.test.ts: Added regression test rejects managed SSE AsyncIterable sources when the adapter exposes no response stream asserting the dispatcher commits a 500 response and notifies request error observers with the unsupported-stream message.
  • packages/http/README.md / packages/http/README.ko.md: Documented that managed SSE requires an adapter that exposes FrameworkResponse.stream and that the dispatcher rejects the managed async iterable before marking the response handled when stream support is absent.
  • .changeset/issue-2734-reject-managed-sse-without-stream.md: @fluojs/http patch changeset.

Testing

  • pnpm --filter @fluojs/http typecheck — passed.
  • pnpm --filter @fluojs/http test — 223 tests passed (83 dispatcher tests including the new regression test).
  • pnpm verify:platform-consistency-governance — passed.
  • pnpm verify:public-export-tsdoc (changed mode) — passed.

Release impact

  • This PR has consumer-visible release impact and includes a changeset.

Public export documentation

  • No public exports were added or changed; existing TSDoc is unaffected. The change is an internal dispatcher behavior correction.

Behavioral contract

  • No documented behavioral contracts were removed without migration notes.
  • New behavioral contracts are documented in the affected package README.
  • Intentional limitations are explicitly stated (not silently removed).
  • Runtime invariants are covered by regression tests.

Platform consistency governance (SSOT)

  • SSOT English/Korean mirror structure remains synchronized for changed governance docs (README.md and README.ko.md updated together).
  • No platform contract docs changed; companion updates not applicable.
  • No package README alignment/conformance claims added beyond the documented stream support requirement, which is backed by the new dispatcher regression test.

Managed SSE async iterables were silently reported as handled when the
active adapter exposed no FrameworkResponse.stream, swallowing the
requested event stream without an observable error. The dispatcher now
checks stream support before constructing SseResponse and throws a
clear unsupported-stream failure that flows through the standard
dispatch error path (request error observers and the error response
writer), aligning managed SSE with the documented adapter contract.

- Move stream check before SseResponse construction in
  writeManagedSseIterable and throw instead of returning true
- Add regression test covering the no-stream managed SSE path
- Document the stream support requirement in README and README.ko.md
- Add @fluojs/http patch changeset
@ayden94
ayden94 merged commit c0ebd48 into main Jul 14, 2026
10 checks passed
@ayden94
ayden94 deleted the issue-2734-reject-managed-sse-without-response-stream-support branch July 14, 2026 01:33
This was referenced Jul 14, 2026
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.

[audit][area:http-runtime] Reject managed SSE without response stream support (priority:p1)

1 participant