Skip to content

refactor(kv-indexer): make the cuckoo module root the DC relay contract - #206

Draft
ishandhanani wants to merge 1 commit into
mainfrom
idhanani/dyno-197-cuckoo-relay-contract
Draft

ishandhanani wants to merge 1 commit into
mainfrom
idhanani/dyno-197-cuckoo-relay-contract

Conversation

@ishandhanani

Copy link
Copy Markdown
Owner

Summary

The cuckoo module of dynamo-kv-indexer is the DC relay's pool index. Its consumers are the pool relay in lib/llm and the relay benches in lib/bench; the indexer stage itself does not use it. This change makes the module's root re-export list the relay contract and removes everything that is not part of it.

  • The root list contains every item a consumer names (33) plus every type that appears in the signature of one of those items (17, found with -W unnameable_types). Submodules were already private, so an item off the list is unreachable.
  • pub use adapter::* is gone. cuckoo/adapter.rs (LocalCkfAdapter and six error and report types, 547 lines) had no user anywhere in the tree, so it is deleted along with its README row.
  • The three DEFAULT_GLOBAL_INGESTION_* constants leave the root; nothing outside the module reads them.
  • The ingestion pool imports its sibling global module directly instead of through the root list.
  • The pre-split dynamo_kv_router::indexer::cuckoo compat block (182 lines, 60 re-exports and deprecated aliases) is removed. dynamo_kv_indexer::cuckoo is the only path.
  • kv-indexer host.rs header and AGENTS.md state the contract in one sentence each.
Surface Before After
Items reachable at dynamo_kv_indexer::cuckoo:: 60 50
of which named by a consumer today 33 33
of which signature-reachable only 17 17
glob re-exports at the root 1 0
compat shims for indexer::cuckoo 60 0

Exported: CKF_LANE_COUNT, CkfBuildError, CkfConfig, PrefixSearchConfig, CanonicalSequenceBlockHash, CkfCommitState, CkfFailureAction, CkfFailureDisposition, CkfFailureDomain, CkfFailurePoint, ConsumerDrainMarker, ConsumerInstanceId, DcCkfAggregationStats, DcCkfBucketImage, DcCkfDelta, DcCkfDeltaSink, DcCkfEventOutcome, DcCkfFormatIdentity, DcCkfMemoryStats, DcCkfPublicationBatch, DcCkfPublicationStats, DcCkfPublishError, DcCkfPublisher, DcCkfRankReplacement, DcCkfSnapshot, DcCkfState, DcCkfStats, GlobalCkfAssignmentError, GlobalCkfBucketImage, GlobalCkfBuildError, GlobalCkfDelta, GlobalCkfIndexer, GlobalCkfIngestOutcome, GlobalCkfIngestionError, GlobalCkfIngestionFault, GlobalCkfIngestionPool, GlobalCkfIngestionPoolBuildError, GlobalCkfIngestionPoolConfig, GlobalCkfLaneFault, GlobalCkfLaneIngestor, GlobalCkfLaneMatch, GlobalCkfManifest, GlobalCkfQueryError, GlobalCkfQueryResult, GlobalCkfSnapshot, LaneLease, ProducerIdentity, PublisherEmitOutcome, PublisherFenceReason, PublisherSnapshotError.

Part of DYNO-197.

Validation

All with a fresh per-worktree target directory on top of origin/main 909d4ef.

  • cargo fmt --all: clean.
  • cargo check --workspace --all-targets --locked: one error, pre-existing on main and untouched by this change: lib/llm/tests/streaming_tool_dispatch_http.rs:87 is missing model_eos (fix(frontend): stop tool_call_dispatch handing harnesses truncated arguments ai-dynamo/dynamo#13986 vs fix(beam): finalize constrained tool calls at confirmed model EOS ai-dynamo/dynamo#17625). cargo check --workspace --lib --bins --tests --benches --examples --locked --exclude dynamo-llm: clean.
  • cargo test -p dynamo-kv-indexer --locked: 594 passed, 2 ignored.
  • cargo test -p dynamo-kv-router --locked: 138 + 2 passed. --all-features: 251 + 2 + 7 passed.
  • cargo test -p dynamo-llm --lib pool_relay --locked: 269 passed.
  • cargo clippy --no-deps --all-targets --locked -- -D warnings: clean for dynamo-kv-indexer, dynamo-kv-router, dynamo-kv-router --all-features. For dynamo-llm, --all-targets hits the same pre-existing model_eos break; --lib --bins is clean.
  • cd lib/bindings/python && cargo check --locked: clean.
  • bash scripts/router_layering_check.sh: 36 checks, 0 failures.
  • uvx pre-commit run --files <changed files>: no failed hooks.
  • Temporary #![warn(unnameable_types)] on the module: zero warnings with the final list.

The cuckoo module's root re-export list is now the relay contract: every item
the pool relay in lib/llm and the relay benches name, plus every type that
appears in the signature of one of those items (`-W unnameable_types` is
clean). The submodules were already private; the `pub use adapter::*` glob is
gone, as are the three DEFAULT_GLOBAL_INGESTION_* constants nothing outside
the module reads. Items reachable at the module root: 60 before, 50 after.

`cuckoo/adapter.rs` (LocalCkfAdapter and its six error and report types,
547 lines) had no user anywhere in the tree once the glob was gone; it is
deleted along with its README row. The ingestion pool names its sibling
`global` module directly instead of going through the root list.

The pre-split `dynamo_kv_router::indexer::cuckoo` compat block (182 lines,
60 re-exports and deprecated aliases) is removed; `dynamo_kv_indexer::cuckoo`
is the only path. The kv-indexer host.rs header and AGENTS.md state the
contract.

Part of DYNO-197

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

This branch had an error being deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant