Description
The SSE id and retry fields are standard parts of the SSE protocol with defined parsing and behavior. Clients should handle them unconditionally; services should not need to declare them using TypeSpec decorators.
Current SSE Spector coverage exercises event and data, but does not establish expected behavior for event IDs, reconnection delays, or resumption through Last-Event-ID.
Expected scenarios
Add language-neutral Spector scenarios covering:
- Receiving an event containing
id, event, and data fields.
- Receiving a valid
retry field containing ASCII digits.
- Ignoring an invalid
retry field.
- Ignoring an
id field containing U+0000 NULL.
- Reconnecting after the stream closes and sending the most recently received event ID in the
Last-Event-ID request header.
The reconnection scenario can be scoped separately if Spector or generated clients do not currently own automatic reconnection behavior.
Emitter expectations
Emitter-specific tests should verify how event IDs are exposed and how retry/reconnection behavior is implemented. These fields should remain SSE envelope metadata and must not be included in the typed data payload.
Relevant specification
Server-Sent Events are defined by the WHATWG HTML Living Standard:
Additional context
This coverage gap was identified while implementing C# SSE streaming support for #10738.
Description
The SSE
idandretryfields are standard parts of the SSE protocol with defined parsing and behavior. Clients should handle them unconditionally; services should not need to declare them using TypeSpec decorators.Current SSE Spector coverage exercises
eventanddata, but does not establish expected behavior for event IDs, reconnection delays, or resumption throughLast-Event-ID.Expected scenarios
Add language-neutral Spector scenarios covering:
id,event, anddatafields.retryfield containing ASCII digits.retryfield.idfield containing U+0000 NULL.Last-Event-IDrequest header.The reconnection scenario can be scoped separately if Spector or generated clients do not currently own automatic reconnection behavior.
Emitter expectations
Emitter-specific tests should verify how event IDs are exposed and how retry/reconnection behavior is implemented. These fields should remain SSE envelope metadata and must not be included in the typed
datapayload.Relevant specification
Server-Sent Events are defined by the WHATWG HTML Living Standard:
Last-Event-IDheaderAdditional context
This coverage gap was identified while implementing C# SSE streaming support for #10738.