Repository navigation
test: Advertise server-directed-shutdown-request and last-event-id in SSE contract test service - #45
Merged
Merged
Conversation
Two capabilities the client already supports were not advertised, so the
SSE contract test suite silently skipped their tests:
- server-directed-shutdown-request: the client already treats a 204
response as terminal (no reconnection) -- the default error filter only
retries 500/502/503/504.
- last-event-id: the client seeds Last-Event-ID from
config.headers['Last-Event-ID']; the service now maps the harness's
lastEventId parameter into that config.
Verified locally: the full contract test suite passes with both
capabilities advertised, including the newly unlocked tests
("204 halts re-connection attempts", "sends Last-Event-Id in initial
request if set").
Generated-by: termag
kinyoklion
marked this pull request as ready for review
October 30, 2026 23:23
joker23
approved these changes
Nov 2, 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.
BEGIN_COMMIT_OVERRIDE
chore: Advertise server-directed-shutdown-request and last-event-id in SSE contract test service
END_COMMIT_OVERRIDE
What
Two capability fixes in
contract-tests/:server-directed-shutdown-request: the client already treats a 204 response as terminal (its default error filter only retries 500/502/503/504, so a 204 ends reconnection).last-event-idand wire the harness'slastEventIdparameter into the client'sheaders['Last-Event-ID']config, which is how this client seeds the initial Last-Event-ID header (lib/eventsource.js).Why
A capability audit of the SSE contract-test services (write-up) found both features supported by the client but not advertised by the service, so these suite tests were silently skipping:
HTTP behavior/204 halts re-connection attemptsHTTP behavior/sends Last-Event-Id in initial request if set(The pending redirect-preserves regression tests in the audit branch also gate on
last-event-id, so they unlock too.)How verified
Ran the full sse-contract-tests harness locally against the updated service (linux/arm64, node 24): all released-suite tests pass, including both newly unlocked ones. The only failure in the run comes from a not-yet-merged regression test for the known
retry: 0reconnect-storm issue (tracked in the audit; unrelated to this change).Draft for review of approach.
Opened from termag
SDK-3420
Note
Overview
Updates the SSE contract-test service so its advertised capabilities match what the harness and client already support, which stops the suite from skipping related scenarios.
The root
GET /capability list now includeslast-event-idandserver-directed-shutdown-request(the existingDELETE /204 shutdown path was already implemented). InstreamEntity.js, when the harness passeslastEventId, that value is merged into the EventSource config as theLast-Event-IDheader—the same mechanism the client uses to seed the initial header.This should unlock contract tests such as 204 halts re-connection attempts and sends Last-Event-Id in initial request if set, plus any redirect tests that gate on
last-event-id.Reviewed by Cursor Bugbot for commit 5a67d74. Bugbot is set up for automated code reviews on this repo. Configure here.