Repository navigation
refactor(router): move ResidencyOwnerKey to protocol identity - #167
Closed
ishandhanani wants to merge 1 commit into
Closed
ishandhanani wants to merge 1 commit into
ishandhanani wants to merge 1 commit into
Conversation
ResidencyOwnerKey is an identity the indexer computes and every other crate names, the AttemptId precedent: kv-hints carries it in KvTransferCandidateSource::CacheOwner, the kernel and lib/llm pass it through, and dynamo-kv-events itself never used it. Move the struct and its two const fns verbatim from dynamo_kv_events::residency to dynamo_router_protocol::identity, directly after CacheOwnerId. Consequences: dynamo-kv-hints drops its dynamo-kv-events dependency (the edge DYNO-186 added) and is back to protocol-only among router crates; the layering gate row, crate docs, README, and AGENTS say so again. kv-indexer and both deprecated protocols shims re-point with every name kept. Snapshots: kv-events -4, protocol +4, kv-hints two defining-path lines, kv-router and dynamo-error unchanged. No behavior change. DYNO-187. Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
ishandhanani
had a problem deploying
to
external_collaborator
November 2, 2026 04:30 — with
GitHub Actions
Failure
Owner
Author
|
Closed: superseded. With kv-hints allowed to depend on kv-indexer, ResidencyOwnerKey belongs in kv-indexer (its producer) rather than protocol; DYNO-191 moves it there together with KvTransferCandidateSource and the label-hash helpers. The branch stays for reference. |
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 follow-up (DYNO-187). Stacked on #166.
Summary
ResidencyOwnerKeyis an identity, not residency vocabulary. The indexer computes it (ResidencyOwnerKeyExt::compact_key, BLAKE3 over aResidencyOwner) and every other crate only carries and compares it: kv-hints names it inKvTransferCandidateSource::CacheOwner, the kernel and lib/llm pass it through, kv-events itself never used it (no type indynamo-kv-eventsmentions the key;ResidencyOwnerand its impls do not reference it). That is theAttemptIdprecedent: an identity one crate mints and everyone names lives indynamo_router_protocol::identity. Moving it there drops the kv-hints -> kv-events edge that DYNO-186 (refactor(router): move the residency vocabulary to dynamo-kv-events #166) had to add, so kv-hints is back to protocol-only among router crates.impl ResidencyOwnerKey { from_digest, digest }):lib/kv-events/src/residency.rslines 43-60 ->lib/router/protocol/src/identity.rs, directly afterCacheOwnerIdand itsDisplay/FromStrimpls. The doc link[CacheOwnerId]now resolves in the same module, so the text is unchanged. Theidentitymodule doc names the key.lib/kv-hints/src/wire.rsimportsdynamo_router_protocol::identity::ResidencyOwnerKey;lib/kv-hints/Cargo.tomldropsdynamo-kv-events(nothing else in kv-hints used it; verified by grep). kv-indexerresidency.rs(the key from protocol,ResidencyOwnerstill from kv-events) andprelude.rs(same split). lib/llm needed no change: its recovery tests reachResidencyOwnerKeyExtthroughdynamo_kv_indexer::hostand never name the key type.dynamo_scheduler::protocolsanddynamo_kv_router::protocolseach re-exportResidencyOwnerKeyfromdynamo_router_protocol::identityinstead ofdynamo_kv_events::residency; every public name kept.scripts/router_layering_check.sh) kv-hints row back to its DYNO-185 shape: column 2 router depsdynamo-router-protocol dynamo-kv-events dynamo-kv-hashing->dynamo-router-protocol; column 3 forbidden regainsdynamo-kv-events dynamo-kv-hashing; column 4 direct deps dropdynamo-kv-events. No other row changes. Three lockfiles (root,lib/bindings/python,lib/bindings/kvbm) each lose the onedynamo-kv-eventsline underdynamo-kv-hints.dynamo-router-protocolonly" (AGENTS "never add" list regainsdynamo-kv-eventsand now also namesdynamo-kv-hashing); protocol crate doc and README table note the key stays inidentity; kv-events README drops the key from the residency list and AGENTS drops kv-hints from the consumer list;lib/router/README.mdkv-hints row deps back toprotocol, serde, rustc-hash.scripts/router_public_api_check.sh --update):lib/kv-events/public-api.txt261 -> 257 (-4:pub struct ResidencyOwnerKey(_), itsimpl,digest,from_digest);lib/router/protocol/public-api.txt251 -> 255 (+4: the same four lines underidentity::, betweenPoolIdandRoutingPartitionId);lib/kv-hints/public-api.txt142 unchanged in count, two defining-path lines change:KvTransferCandidateSource::CacheOwner(dynamo_kv_events::residency::ResidencyOwnerKey)->(dynamo_router_protocol::identity::ResidencyOwnerKey)at thewire::path and the root re-export;lib/kv-router/public-api.txt(1398) andlib/error/public-api.txt(134) byte-identical.Validation
All stages exit 0 except the pre-existing kvbm-consolidator manifest failure (its manifest inherits
kvbm-logicalfrom a root workspace that does not define it; unrelated, untouched here); log/tmp/rr-split/s187-validation.logon the build host (/tmp/rr-split/chain-187.sh).dynamo-kv-events:cargo clippy -p dynamo-kv-events --all-targets -- -D warnings(default and--all-features);cargo test -p dynamo-kv-events(65 passed);RUSTDOCFLAGS="-D warnings" cargo doc -p dynamo-kv-events --no-deps(default and--all-features).dynamo-router-protocol,dynamo-kv-hints,dynamo-kv-indexer,dynamo-scheduler:cargo clippy -p <c> --all-targets -- -D warnings(default and--all-features);cargo test -p <c> --all-features(11; 4; 597 + 2 ignored; 289 + 1 ignored);RUSTDOCFLAGS="-D warnings" cargo doc -p <c> --no-deps(default and--all-features).cargo clippy -p dynamo-kv-router --features http,ingest-zmq,replica-sync-zmq,peer-recovery,metrics,testing --all-targets -- -D warnings;cargo check -p dynamo-kv-router --features bench --benches;cargo test -p dynamo-kv-router --features ...(220 + 1 + 1 + 7);cargo test -p dynamo-kv-router --test plugin_api_prelude --test plugin_api_compat(1 + 1).cargo clippy --workspace --all-targets -- -D warningsclean.cargo check -p dynamo-llm --lib;cargo clippy -p dynamo-llm --all-targets -- -D warnings;cargo test -p dynamo-llm --lib kv_router(485 passed);cargo test -p dynamo-llm --lib block_manager::kv_consolidator(21 passed);cargo clippy -p <p> --tests -- -D warningsfor dynamo-mocker, dynamo-bench, dynamo-ext-proc, dynamo-custom-policy-builtin, dynamo-worker-selection-policy-catalog, dynamo-sglang-sidecar, dynamo-vllm-sidecar, dynamo-backend-common, dynamo-sglang-mocker, dynamo-vllm-mocker, dynamo-custom-policy-example-epp, dynamo-custom-policy-example-soft-pin-repin (all twelve exist);lib/bindings/python:cargo clippy --features kv-indexer,slot-tracker,select-service -- -D warnings.bash scripts/router_features_check.sh;bash scripts/router_public_api_check.shafter--update(all five snapshots match);bash scripts/router_layering_check.sh44 checks, 0 failures and--host63 checks, 0 failures;python3 .github/codeowners/build_codeowners.py ... --strict7549/7549 explicitly owned;cargo fmt --all -- --check;cargo metadata --lockedfor the root,lib/bindings/python, andlib/bindings/kvbmlockfiles.python3 -I scripts/router_move_diff.py e844c1580e WORKTREE --from lib/kv-events/src/residency.rs lib/router/protocol/src/identity.rs --to lib/kv-events/src/residency.rs lib/router/protocol/src/identity.rs:from residency.rs raw=260 normalized=190 found=190,from identity.rs raw=359 normalized=281 found=281,to residency.rs raw=241 normalized=180,to identity.rs raw=379 normalized=291,summary from_normalized=471 to_normalized=471 common=471 new=0 dropped=0,result MOVE.