You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add standalone request-time LoRA identity and capability helpers to dynamo-lora, together with the corresponding environment names. The source reference remains opaque and the feature is not activated by this PR.
Ownership-policy preparation and the two SPDX-only routing source shells are inherited from #17896. This PR does not change .github/codeowners/ or root CODEOWNERS; the routing implementations and module registrations remain in #17889.
The shared identity error/key primitives and all dependency declarations and lockfile updates are inherited from #17896. This PR now changes only lib/llm/src/lora.rs, lib/lora/src/runtime.rs, and lib/runtime/src/config/environment_names.rs; their owners are frontend and runtime. It has no Cargo manifest, lockfile, or ownership-policy changes.
Validation
Diff-scoped pre-commit hooks and cargo fmt --all -- --check passed.
No actionable comments were generated in the recent review.
Walkthrough
The pull request moves LoRA code into a new workspace crate and adds runtime worker capability checks and model resolution. It updates controller metrics, load-estimator event handling, and model discovery to use the extracted crate. It also adds runtime configuration environment names and relocates simulation-test references.
Changes
LoRA crate and projections
Layer / File(s)
Summary
Crate API and worker projections Cargo.toml, lib/lora/*, lib/llm/src/model_card.rs
The workspace adds dynamo-lora. The crate defines the LoRA API and worker projection types. Observations now convert to and merge projections using capacity precedence, registration requirements, and adapter-name ordering.
LoRA imports and simulation references now use the extracted crate paths. The llm crate depends on dynamo-lora, removes the simulation test target and explicit AWS SDK dependencies, and removes its Hugging Face module exports.
Ownership paths now cover lib/lora/ and its routing and test paths instead of the former llm routing path.
Runtime LoRA
Layer / File(s)
Summary
Worker capabilities and eligibility lib/lora/src/runtime.rs, lib/llm/src/lora.rs
The runtime module decodes worker capability metadata and filters eligible workers. ModelRuntimeConfig provides runtime metadata through RuntimeLoraWorkerFacts.
Model resolution and configuration lib/lora/src/runtime.rs, lib/lora/src/lib.rs, lib/lora/Cargo.toml, lib/runtime/src/config/environment_names.rs
The runtime module adds configuration, model resolution, source validation, and adapter-key generation. Runtime environment-name constants and the duplicate-name test list are extended. Tests cover resolution, configuration, adapter keys, and debug redaction.
Controller metrics and discovery
Layer / File(s)
Summary
Controller metrics and discovery wiring lib/lora/src/metrics.rs, lib/lora/src/controller.rs, lib/llm/src/lora.rs, lib/llm/src/discovery/model_manager.rs, lib/llm/src/lora/metrics_tests.rs
LoraController now writes gauges through its ControllerMetrics instance and accepts supplied metrics for endpoint startup. Model discovery delegates projection conversion and merging to the LoRA types. The llm frontend supplies registry gauges and tests their values.
Load estimator subscription
Layer / File(s)
Summary
Event handling and subscription lib/lora/src/load_estimator.rs, lib/llm/src/lora/subscription.rs
LoadEstimator exposes event handling, and its former subscription loop is removed. LoadEstimatorSubscription subscribes to events, processes them, and retries failed subscriptions with cancellable backoff. Tests cover event processing and subscription behavior.
The new runtime LoRA helpers remain inactive in production. No issue requiring a fix before merge was established.
Pre-merge checks: 3 · 1 · 1
Failed checks: 1 warning · 1 inconclusive
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 12.90% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
The description covers the Summary, Validation, and the scope of this PR. It names the three changed files (lib/llm/src/lora.rs, lib/lora/src/runtime.rs, lib/runtime/src/config/environment_names.rs) a…
Restructure the description to follow the repository template. Add an Overview section with the summary of the standalone identity and capability helpers. Add a Key Changes section that lists the three changed files and their purpose. Keep …
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title "feat(lora): define runtime adapter identity" matches the main change. The PR adds request-time LoRA identity and capability helpers in the dynamo-lora crate, including adapter key derivatio…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(lora): define runtime adapter identity" matches the main change. The PR adds request-time LoRA identity and capability helpers in the dynamo-lora crate, including adapter key derivation and runtime resolution helpers. The title is short, specific, and follows a conventional commit style.
Full details: Docstring Coverage
Explanation
Docstring coverage is 12.90% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 31 functions across 21 files. (5 skipped: 5 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Description check
Explanation
The description covers the Summary, Validation, and the scope of this PR. It names the three changed files (lib/llm/src/lora.rs, lib/lora/src/runtime.rs, lib/runtime/src/config/environment_names.rs) and states that it has no Cargo manifest, lockfile, or ownership-policy changes. It reports validation results: pre-commit hooks, cargo fmt, cargo check for dynamo-llm, and cargo test for dynamo-lora identity tests. It also links to related issues (#15018, #14547, DIS-2937) and to the dependency PRs (#17896, #17889). The template's Overview heading is not present, and the Key Changes heading is not present, so the layout does not match the template. The template's 'Closes #XXXX' line is missing, and the PR Issue Link check is advisory, so this does not block the result. The template's Pull Request Checklist, including the /pr-checklist skill item, is not mentioned. The description is mostly complete in content, but it does not follow the required structure.
Resolution
Restructure the description to follow the repository template. Add an Overview section with the summary of the standalone identity and capability helpers. Add a Key Changes section that lists the three changed files and their purpose. Keep the existing Validation section. Under Issues and Ongoing Work, add a 'Closes' or 'Refs' line for the linked issues, and state the relationship to #15018, #14547, and DIS-2937. Add the Pull Request Checklist block and confirm whether the /pr-checklist skill was used.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Reviewing files that changed from the base of the PR and between 4f680f0 and b1c8063.
Files ignored due to path filters: 2
Cargo.lock is excluded by !**/*.lock
lib/bindings/python/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 37
.github/codeowners/areas.yaml
CODEOWNERS
Cargo.toml
lib/llm/Cargo.toml
lib/llm/src/discovery/model_manager.rs
lib/llm/src/hub.rs
lib/llm/src/lora.rs
lib/llm/src/lora/metrics_tests.rs
lib/llm/src/lora/subscription.rs
lib/llm/src/model_card.rs
lib/lora/Cargo.toml
lib/lora/src/cache.rs
lib/lora/src/config.rs
lib/lora/src/controller.rs
lib/lora/src/downloader.rs
lib/lora/src/filter.rs
lib/lora/src/huggingface.rs
lib/lora/src/lib.rs
lib/lora/src/load_estimator.rs
lib/lora/src/metrics.rs
lib/lora/src/predictor.rs
lib/lora/src/routing/hrw.rs
lib/lora/src/routing/mcf_allocator.rs
lib/lora/src/routing/min_cost_flow.rs
lib/lora/src/routing/mod.rs
lib/lora/src/routing/table.rs
lib/lora/src/runtime.rs
lib/lora/src/source.rs
lib/lora/src/state_tracker.rs
lib/lora/tests/lora_simulation/csv_export.rs
lib/lora/tests/lora_simulation/main.rs
lib/lora/tests/lora_simulation/plot_lora_churn.py
lib/lora/tests/lora_simulation/scenario_tests.rs
lib/lora/tests/lora_simulation/support.rs
lib/lora/tests/lora_simulation/topology_tests.rs
lib/lora/tests/lora_simulation/workloads.rs
lib/runtime/src/config/environment_names.rs
Files with no reviewable changes: 1
lib/llm/src/hub.rs
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
lib/lora/src/runtime.rs: 1
38-38: Trivial · Maintainability & Code Quality · Low value
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Define the runtime LoRA capability taint once.
Line 38 hardcodes "dynamo.runtime-lora/v2". Line 191 builds the same taint with format! from protocol_version. The producer and the filter can drift apart when RUNTIME_LORA_PROTOCOL_VERSION changes. Workers would then stop matching the taint that the request side requires. Derive both from one helper or constant.
Reviewing files that changed from the base of the PR and between 9231944 and e27c2d6.
Files ignored due to path filters: 2
Cargo.lock is excluded by !**/*.lock
lib/bindings/python/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 5
lib/llm/src/lora.rs
lib/lora/Cargo.toml
lib/lora/src/lib.rs
lib/lora/src/runtime.rs
lib/runtime/src/config/environment_names.rs
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
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
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.
Summary
Add standalone request-time LoRA identity and capability helpers to
dynamo-lora, together with the corresponding environment names. The source reference remains opaque and the feature is not activated by this PR.Ownership-policy preparation and the two SPDX-only routing source shells are inherited from #17896. This PR does not change
.github/codeowners/or rootCODEOWNERS; the routing implementations and module registrations remain in #17889.Part of #15018. Refs #14547 and DIS-2937.
The shared identity error/key primitives and all dependency declarations and lockfile updates are inherited from #17896. This PR now changes only
lib/llm/src/lora.rs,lib/lora/src/runtime.rs, andlib/runtime/src/config/environment_names.rs; their owners are frontend and runtime. It has no Cargo manifest, lockfile, or ownership-policy changes.Validation
cargo fmt --all -- --checkpassed.cargo check --locked -p dynamo-llm --no-default-featurespassed.cargo test --locked -p dynamo-lora --libpassed on the subsequent dormant-policy branch, including identity tests.Summary by CodeRabbit