Skip to content

Verify truncated SSE behavior with bounded, observable disconnect tests - #29

Merged
erikleblansch merged 1 commit into
mainfrom
test/truncated-sse-maintenance-20261105
Nov 5, 2026
Merged

erikleblansch merged 1 commit into
mainfrom
test/truncated-sse-maintenance-20261105

Conversation

@erikleblansch

Copy link
Copy Markdown
Contributor

Adds the three truncated-event regressions contributed in #26, retaining the original author's attribution. Incomplete events are discarded at normal EOF and abrupt disconnect, and a prior complete event is emitted once. The abrupt-disconnect test first proves the partial bytes reached the client; each new test has a deadline. LF formatting avoids an unrelated whole-file rewrite.

Validation: all 11 tests in tests/opencode-client.test.cjs pass on Node 24.19; git diff --check passes; only 55 test lines added, with no runtime protocol change.

Supersedes #26 because the connected GitHub integration cannot push to its contributor fork (403), even though maintainer edits are enabled. The original discussion and commit remain preserved. Fixes #25.

Preserve the contribution from PR #26, restore LF-only formatting, bound test lifetime and observe partial client bytes before the abrupt disconnect.

Co-authored-by: Muhammad Hamid <hamidbloger1@gmail.com>
@erikleblansch
erikleblansch merged commit 6aa4359 into main Nov 5, 2026
5 checks passed
@erikleblansch
erikleblansch deleted the test/truncated-sse-maintenance-20261105 branch November 5, 2026 18:57
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.

test: discard incomplete OpenCode SSE events on stream termination

1 participant