Repository navigation
fix: preserve terminal connections across consumer cancellation - #61
Merged
Merged
Conversation
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.
Canceling a pending terminal read previously passed cancellation to the physical WebSocket and could abort the connection. Both terminal families now keep receiving independently, so a consumer can cancel and later read or write on the same healthy attachment. Queued output precedes the terminal outcome; explicit disposal abandons unread output and joins owned work.
Persistent input preserves locally requested viewport dimensions in send order. Both connection options add a finite
SendTimeout(30 seconds by default), covering queue wait and physical send. Queued expiry affects that call; physical interruption ends the attachment without retry. Runtime/packaging canon and ADR-0023 document these contracts.The first hosted Windows run exposed nested cancellation scheduling in existing net472 cleanup test helpers. The follow-up uses the already-owned worker directly and removes unrelated observation timers from teardown unit tests. An isolated actual-code probe changed from stuck cleanup to one completed callback; all 31 focused ownership tests and the full 5,134-test local gate passed.
Validation:
The consumer queue is unbounded and can grow for slow or absent consumers. Final three-platform CI passed on
b231755: Windows 5,134, Linux 4,030, macOS 4,030; zero failures/skips. All 20 normal/persistent terminal live outcomes across ten platform/framework legs were verified from the original TRX reports. The separate upstream observer-input question is outside this change.Final documentation follow-up
62970f8corrects the receive-buffer lifetime in README and roadmap. Its only changes since testedb231755are those two Markdown files; CI is skipped for that follow-up under the repository workflow rule.