0.1.11: build on endpoint-libs 3.3, and serve WebSocket without owning the process signals - #11
Merged
Merged
Conversation
added 3 commits
September 23, 2026 11:10
3.2 removed the tokio flavour of the transport. `framed_json_with_max_frame` is gone and `framed_json_neutral_with_max_frame` replaces it, taking a `futures_io` stream, so the tokio `UnixStream`s here bridge through tokio-util's `compat`. The frame cap and the codec on the wire are unchanged. `listen` also stopped being a future. It builds its own reactor, registers SIGTERM and SIGINT on that reactor, and blocks until one fires, so the `.await` comes off and the drain that follows it runs exactly as before. The requirement was already `^3` and needed no edit: the lock was pinning 3.0.0.
Three things broke when endpoint-libs moved its server onto nagoya, and the WebSocket suite hung on them. listen() now blocks its thread for the life of the server. serve_websocket called it from an async fn, which held a tokio worker forever and, on the current-thread runtime every test uses, the only one. The server now runs on a thread of its own and serve_websocket awaits its answer. listen() also claimed SIGTERM and SIGINT for the process, and nagoya allows one waiter per signal, so the second server in a test process failed with EBUSY after binding and its client waited on a dead port. Each test passed alone and hung together. serve_websocket now takes a stop future and uses listen_until (endpoint-libs 3.3); main owns the signals through tokio and forwards the first one over a oneshot, keeping the SIGTERM drain contract. A handler is polled in place on the connection task with no spawner, so the run-event forwarder could not spawn_local. It runs on the registry's tokio executor, where provider work already runs; the toolbox is Send + Sync. TLS goes: endpoint-libs 3 refuses certificates outright and terminates TLS at the edge, and this listener is loopback-only by validation anyway. Outbound HTTPS is untouched; this crate has no TLS client, the provider CLIs make those calls themselves.
Builds against endpoint-libs 3.3; 0.1.10 no longer compiles against 3.2.
pathscale
force-pushed
the
docs/working-agreement
branch
from
September 23, 2026 04:55
8d51fb0 to
0ed2dd6
Compare
added 2 commits
September 23, 2026 18:41
No lockfile: CI and consumers resolve the manifest ranges afresh, so a release of one of our crates reaches this one without a commit here. CI drops --locked, which only meant "fail when the ranges moved", and publish no longer triggers on a file that is gone. Our own crates are required at the major line (^0.1, ^0.4, ^3) rather than a patch floor: with no lockfile the newest release is what resolves, which for endpoint-libs is 3.3 and its listen_until.
tokio and tokio-util are gone from every crate, tests included, and so is tokio-tungstenite: the WebSocket tests drive the server with endpoint-libs' own nagoya client. Sockets are nagoya's, framed with NagoyaStream and the neutral framing, so no compat layer sits in between. tokio's broadcast and watch become two small local types, broadcast and Flag, with the semantics the code relied on (lag reporting, close on last sender, cancel-safe recv). There is no global reactor. main is the composition root: it registers SIGTERM and SIGINT before any thread exists, which a Linux signalfd needs, then creates the one Reactor, keeps it for the life of the process, and passes its Handle to the server, the registry and agent-abstraction. Every test starts its own. Public changes: Client::connect, ProxyServer::bind and bind_with_registry take the Handle; RuntimeRegistry::new(handle) replaces Default, which could only have been honest by creating a reactor; subscribe and Attachment::events return the local broadcast receiver. agent-abstraction moves to ^0.5, the release that takes the Handle too.
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.
Releases 0.1.11. The published 0.1.10 no longer compiles against endpoint-libs 3.2 (
framed_json_with_max_framewas removed), which fails AgencyZero's sidecar build.framed_json_neutral_with_max_frameover tokio-utilcompat.listenblocks its thread for the life of the server, so it runs on a dedicated thread.main:listenclaimed SIGTERM/SIGINT for the process, and a second server in one process failed withEBUSYafter binding. This is why the WebSocket tests passed alone and hung together.serve_websocketnow takes a stop future and useslisten_until(endpoint-libs 3.3, 3.3.0: let the caller say when a server stops endpoint-libs#57).mainowns the signals and keeps the SIGTERM drain contract.spawn_local, which endpoint-libs 3 handlers can no longer reach.Verified locally against endpoint-libs 3.3.0 by path: all suites pass, and
websocket_mcppasses 5/5 on three consecutive runs (~2.4s).Lands after endpoint-libs 3.3.0 is published.
Cargo.lockis tracked and CI runs--locked, so the lockfile is refreshed against the registry release as the last commit here. CI is red until then.