Skip to content

refactor(router): move WorkerInputs and WorkerInfo to the protocol crate - #129

Closed
ishandhanani wants to merge 1 commit into
idhanani/dyn-177-worker-selectionfrom
idhanani/dyn-178-inputs-info-to-protocol
Closed

ishandhanani wants to merge 1 commit into
idhanani/dyn-177-worker-selectionfrom
idhanani/dyn-178-inputs-info-to-protocol

Conversation

@ishandhanani

Copy link
Copy Markdown
Owner

Step 5e-0 of the router split v2 (DYNO-178). Stacked on #128. A move.

Summary

  • WorkerInputs (the u8 bitset of optional column groups a classifier, filter, scorer, or picker declares; NONE, CACHE, LOAD, PREFERRED_TAINT, OCCUPANCY, KV_TRANSFER, ALL, contains, without, BitOr) and WorkerInfo (a rank's identity and advertised WorkerCapacity) move from lib/router/worker-selection/src/inputs.rs to lib/router/protocol/src/columns.rs.
  • Why protocol: worker selection builds its candidate rows from them, and the admission stage's classifier API (5e-1) declares its columns and reads workers through them. The fan design has no edge between stages, so the vocabulary both name lives in the crate both depend on. Both types are data with accessors: no behavior, no hashing, no dependencies beyond std::ops::BitOr.
  • WorkerInputs::without becomes pub (it was pub(crate); only the composed policy used it). Nothing else changes; dynamo-worker-selection re-exports both at dynamo_worker_selection::{WorkerInfo, WorkerInputs}, so dynamo_kv_router::plugins::worker_selection::*, dynamo_kv_router::WorkerInputs, and the plugin crates' imports are untouched.

Validation

  • protocol 10 and worker-selection 41 tests.
  • kv-router 554 + 2 + 7.
  • builtin plugin all targets.
  • lib/llm kv_router 485.
  • clippy clean on protocol, worker-selection, kv-router, builtin (all features, all targets) and lib/llm, mocker, ext-proc, bench (tests).
  • downstream check clean.
  • layering gate 22 checks.
  • move-diff 458 common / 1 new / 1 dropped.
  • scripts/router_layering_check.sh: 22 checks, 0 failures (protocol's dependency set is unchanged).
  • scripts/router_move_diff.py 280a78532e WORKTREE --from lib/router/worker-selection/src/inputs.rs --to lib/router/worker-selection/src/inputs.rs lib/router/protocol/src/columns.rs: 458 common / 1 new / 1 dropped, the one pair being pub(crate) fn without becoming pub fn without.

Step 5e-0 of the router split (DYNO-178). The column-group bitset a
stage component declares (WorkerInputs) and the static facts about a
rank every column carries (WorkerInfo: identity plus advertised
capacity) move from dynamo-worker-selection to a new columns module in
dynamo-router-protocol. Worker selection builds its rows from them and
admission's classifier will read workers through them, so neither
stage should have to name the other. Worker selection re-exports both,
so every existing path in kv-router, lib/llm, and the plugins holds.
WorkerInputs::without, which only the composed policy used, is public
in its new home.

Validation: protocol 10 and worker-selection 41 tests; kv-router
554 + 2 + 7; builtin plugin and lib/llm kv_router 485 tests; clippy clean
on the stage crates and lib/llm, mocker, ext-proc, bench; layering gate
22 checks; move-diff 458 common / 1 new / 1 dropped.

Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
@ishandhanani

Copy link
Copy Markdown
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

1 failed deployment
external_collaborator — 12dd91e9 Deployed Nov 2, 2026 by ishandhanani via ok-to-test #474
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant