Repository navigation
refactor(router): add dynamo-zmq, the socket helper - #177
Closed
ishandhanani wants to merge 1 commit into
Closed
ishandhanani wants to merge 1 commit into
ishandhanani wants to merge 1 commit into
Conversation
Move lib/kv-router/src/services/common/zmq.rs to lib/zmq as the dynamo-zmq crate: the async ZmqSocket over tokio's AsyncFd, multipart send and receive, the process-wide context pool sized by DYN_ZMQ_IO_THREADS, the SUB, DEALER, and bound PUB constructors, and validate_endpoint. The file moves verbatim; the feature gates that selected functions per standalone service are dropped because the crate is unconditional, and pub(crate) becomes pub. The error type stays anyhow for now so callers do not change; it becomes a thiserror enum when those callers move into the router adapter layer. lib/kv-router re-exports the crate at services::common::zmq behind the same standalone features, so no caller changes. The layering gate gains a dynamo-zmq row; CODEOWNERS claims lib/zmq. Step 4 of the router split v2 plan. DYNO-173. Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
ishandhanani
had a problem deploying
to
external_collaborator
November 2, 2026 13:53 — with
GitHub Actions
Failure
Owner
Author
|
Landed upstream as ai-dynamo#18055 (squash commit 79692cf on main, 2026-11-11). Closing this fork review unit. |
This branch had an error being deployed
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.
Router split v2, unit 04 of 17. Stacked on #176 (unit 03).
Summary
dynamo-zmq(lib/zmq) is the one ZMQ socket helper: an asyncZmqSocketovertokio::io::unix::AsyncFd, multipart send and receive, the process-wide context pool sized byDYN_ZMQ_IO_THREADS, the SUB, DEALER, and bound PUB constructors, andvalidate_endpoint, moved verbatim fromlib/kv-router/src/services/common/zmq.rs. The per-service feature gates inside the file are dropped because the crate is unconditional, andpub(crate)becomespub; that is the entire non-whitespace delta. It is the one router crate allowed to reachzmq; the error type staysanyhowuntil its callers (indexer listener, replica mesh, direct ingress) move into kv-router's adapter layer in unit 11. kv-router re-exports it atservices::common::zmq. Replaces fork PR #114.What moves
5bc7bdf07brefactor(router): add dynamo-zmq, the socket helper:services/common/zmq.rstolib/zmq/src/lib.rs. Move-diff (its body): 326 normalized lines in common; 12 new and 12 dropped, each pair the same line withpub(crate)replaced bypub.Dependency edges
dynamo-zmq-> no router crate; direct: anyhow, tokio, tracing, zmq (dynamo-runtime, dynamo-kv-router, dynamo-router-protocol, dynamo-kv-events, dynamo-kv-hashing, prometheus, axum, hyper, reqwest forbidden in its tree)Validation
Unit-level move-diff, run from the worktree at the unit head
5bc7bdf07b:python3 -I scripts/router_move_diff.py acd8bf4226 5bc7bdf07b --from <1 paths> --to <1 paths>, the union of the replaced fork PRs'--from/--tolists filtered to the paths present at each end (full command in the artifact/tmp/rr-split/unit-prs/04-move-diff.txt).12 new / 12 dropped, each pair the same declaration with
pub(crate)replaced bypub, as the fork PR recorded.New and dropped normalized lines (12 new, 12 dropped).
Chain v2, full mode, on the rebased stack head
ebd31cdf4d(every unit's commits are ancestors of it; the chain ran once on the head, not per unit), log/tmp/rr-split/srebase-validation.log: stage 1, the 13 router crates (clippy under default and all features,cargo test1,247 passed / 5 ignored, rustdoc with all features), 1 min 50 s; stage 2, kv-router (clippy, bench check, 229 tests including the prelude test), 1 min 20 s; stage 3, workspace clippy, 4 min 58 s; stage 4, hosts (dynamo-llmlib alone, its kv_router 492 / discovery 275 / pool_relay 261 tests, 13 host crates clippy, bindings clippy; the pre-existing kvbm-consolidator manifest failure is the one non-zero exit), 29 min 21 s; stage 5, gates (every kv-router feature alone and together, 6 public-API snapshots unchanged with kv-router at 918 items, layering gate 47 checks and--host66 checks with 0 failures, codeowners 7590/7590, fmt, 3 lockfiles--locked), 3 min 06 s; 40 min 35 s total, exit 0.Each replaced fork PR carried its own validation chain; see its body.
Tickets
Part of DYNO-173