Migrate transport onto omnyhub 1.1.0 (FrameConnection)#108
Merged
Conversation
Replace the hand-written dart:io WebSocket adapter (WebSocketConnection) with FrameConnection: an OmnyShellConnection backed by an omnyhub Connection wrapped in a TypedConnection<OmnyShellFrame>. OmnyShell's FrameCodec is adapted to omnyhub's ConnectionCodec, mapping control<->text and data<->binary frames; undecodable inbound frames are dropped without tearing the link down. - lib/.../transport/frame_connection.dart: new FrameConnection + _FrameConnectionCodec adapter (wrap/fromChannel/connect). - ws_server_endpoint.dart: OnConnection now yields OmnyShellConnection, produced via FrameConnection.fromChannel. - io_connection_factory.dart, transport_factory_io.dart: dial via FrameConnection.connect. - node_runtime.dart: OmnyShellConnection field; dial via FrameConnection. - delete web_socket_connection.dart; the web WsChannelConnection is unchanged (omnyhub transport is VM-only). - pubspec: add omnyhub ^1.1.0. Bump to 1.55.0 + CHANGELOG. The protocol/broker core and browser transport are untouched. Full suite green (802 pass, 9 skipped), including wss/TLS-dir/e2e/TestCluster; new frame_connection_test covers codec mapping, drop-undecodable, and close. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
The existing FrameConnection unit test drives a fake connection, so it never proves the omnyhub transport puts control frames on the wire as WebSocket *text* frames and data frames as *binary* frames — the one thing that would silently corrupt every session if it were wrong. Add an integration test that binds a real TLS WsServerEndpoint, dials it with FrameConnection.connect and asserts: - a control frame arrives as a ControlFrame (text path). - a data frame with non-UTF-8 bytes survives byte-for-byte (binary path; the core regression). - the server can push a data frame back to the client. - a ~60 KiB binary payload (just under the 64 KiB frame cap) round-trips intact. - interleaved control/data frames keep their types and order. - an app-specific WebSocket close code (4401) propagates: the peer sees `done` and isOpen flips. 6 new tests; full suite 808 pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
omnydrive 1.12.0 is now published (its HTTP servers are hosted on omnyhub), so bump the constraint from ^1.11.0. All three packages now share the same omnyhub transport/HTTP stack. Full suite green (808 pass) against 1.12.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Migrates OmnyShell's transport onto omnyhub 1.1.0, so the two packages share one connection/TLS stack instead of maintaining parallel WebSocket adapters.
What changed
FrameConnection(lib/src/infrastructure/transport/frame_connection.dart): anOmnyShellConnectionbacked by an omnyhubConnectionwrapped inTypedConnection<OmnyShellFrame>. A small_FrameConnectionCodec implements ConnectionCodec<OmnyShellFrame>adapts OmnyShell'sFrameCodec— control↔TextMessage, data↔BinaryMessage. Undecodable inbound frames are dropped rather than tearing the link down.ws_server_endpoint.dart):OnConnectionnow yieldsOmnyShellConnection, produced viaFrameConnection.fromChannel.io_connection_factory.dart,transport_factory_io.dart,node_runtime.dart): dial throughFrameConnection.connectover omnyhub'sWebSocketConnection.dart:ioadapterweb_socket_connection.dart.WsChannelConnection(omnyhub transport is VM-only).pubspec.yaml: addomnyhub: ^1.1.0; bump to 1.55.0 + CHANGELOG.Testing
test/unit/transport/frame_connection_test.dart: codec mapping (control→text, data→binary), inbound decode round-trip, drop-undecodable-without-teardown, andclose().dart format/dart analyze --fatal-infos --fatal-warnings/dependency_validatorclean.Depends on published
omnyhub: ^1.1.0. Please verify — do not merge yet.🤖 Generated with Claude Code