Skip to content

refactor(router): delete the dead scheduling policy and the dummy shared cache - #144

Closed
ishandhanani wants to merge 1 commit into
idhanani/dyn-179-selection-core-movefrom
idhanani/dyn-180-drop-dead-policy-shared-cache
Closed

ishandhanani wants to merge 1 commit into
idhanani/dyn-179-selection-core-movefrom
idhanani/dyn-180-drop-dead-policy-shared-cache

Conversation

@ishandhanani

Copy link
Copy Markdown
Owner

Step 7a of the router split v2 (DYNO-180). Stacked on #143. Step 7 thins lib/kv-router to the composition crate; this first PR is the pure deletion the plan row lists: the dead scheduling policy module and the dummy shared-cache server.

Summary

  • Deleted lib/kv-router/src/scheduling/policy.rs (446 lines: SchedulingPolicy trait, FcfsPolicy, WsptPolicy, RouterSchedulingPolicy, their tests). The queue actor orders by the admission stage's PolicyQueue; the only reference to these names was the lib.rs re-export, removed with it. ordered-float leaves the kv-router manifest (this module was its only user; the lockfile entry stays for other crates).
  • Deleted lib/kv-router/src/services/shared_cache/{mod,server}.rs (276 lines: the in-memory check_blocks dummy server under standalone-indexer). No caller in lib/, components/, deploy/, docs/, or the Python bindings. services/mod.rs and the README feature list drop the entry. The kernel's SharedKvCache hook and the flat shared_cache_* settings are unrelated and untouched.

Validation

  • cargo test -p dynamo-kv-router with standalone-selection,standalone-slot-tracker,metrics,testing: 225 + 2 + 7 (241 before; the deleted modules carried 14 policy tests and 2 shared-cache tests); default 119 (133); standalone-slot-tracker only 141 (155); --test standalone_indexer_http under standalone-indexer,metrics: 7.
  • cargo clippy -D warnings --all-targets: kv-router (full, default, slot-tracker only, indexer only, selection only), dynamo-llm -p dynamo-mocker -p dynamo-ext-proc -p dynamo-sglang-sidecar -p dynamo-custom-policy-builtin --tests --benches, dynamo-bench --tests; cargo check on the six custom-policy example crates.
  • cargo test -p dynamo-llm kv_router 485. scripts/router_layering_check.sh: 26 checks, 0 failures. build_codeowners.py --strict passes after pruning the lib/kv-router/src/services/shared_cache/ glob from areas.yaml and regenerating CODEOWNERS. cargo fmt --all -- --check clean.
  • cargo check on lib/bindings/python (kv-indexer,slot-tracker,select-service) fails on a type mismatch this PR does not touch: startup_policy_parameters has taken &SelectionConfig since 5d-1 (refactor(router): give worker selection its own config slices #124) and entrypoint.rs:288 still passes the flat config. The next PR of the stack fixes it; the bindings check joins every step's chain from here.

@github-actions github-actions Bot added refactor documentation Improvements or additions to documentation labels Oct 31, 2026
@ishandhanani
ishandhanani force-pushed the idhanani/dyn-180-drop-dead-policy-shared-cache branch from 952c217 to 76c76cc Compare October 31, 2026 09:24
@ishandhanani
ishandhanani force-pushed the idhanani/dyn-180-drop-dead-policy-shared-cache branch from 76c76cc to 3f879ab Compare October 31, 2026 09:25
@ishandhanani
ishandhanani added this pull request to stack #158 November 1, 2026 06:36
…red cache

Step 7a of the router split (DYNO-180). lib/kv-router/src/scheduling/
policy.rs (FcfsPolicy, WsptPolicy, RouterSchedulingPolicy, the
SchedulingPolicy trait) has no user: the queue actor took its policy
from the admission stage's PolicyQueue long ago and only lib.rs still
re-exported the four names. services/shared_cache/{mod,server}.rs, the
in-memory dummy shared KV cache server, has no caller in the tree, the
Python bindings, the components, or the docs. Both go, with the
ordered-float dependency the policy module alone used and the README
line that listed the shared-cache service under standalone-indexer.

Validation: kv-router tests 225 + 2 + 7 under
standalone-selection,standalone-slot-tracker,metrics,testing (241 before:
the deleted modules' 16 tests), 119 default (133), 141 slot-tracker only
(155), standalone_indexer_http 7; clippy -D warnings on kv-router (five
feature sets), dynamo-llm, mocker, ext-proc, sglang-sidecar, builtin
(tests and benches), dynamo-bench, the six example crates; lib/llm
kv_router 485; router layering gate 26 checks; codeowners strict after
pruning the shared_cache glob and regenerating CODEOWNERS; fmt. The
Python bindings check fails on a type mismatch that predates this change
(5d-1, startup_policy_parameters takes the selection slice); fixed in the
next PR of the stack.

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 — 11b02932 Deployed Nov 2, 2026 by ishandhanani via ok-to-test #489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant