Skip to content

feat(RL): publish worker transfer metadata - #13606

Merged
biswapanda merged 8 commits into
mainfrom
feat/rl-worker-transfer-metadata
Aug 27, 2026
Merged

biswapanda merged 8 commits into
mainfrom
feat/rl-worker-transfer-metadata

Conversation

@biswapanda

@biswapanda biswapanda commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • publish RL worker world size and optional admin URL through the existing worker discovery endpoint
  • version the discovery response and reject stale or malformed worker entries
  • keep live RL workers visible when model metadata is unavailable or ambiguous
  • keep Python-backed workers unchanged unless they explicitly opt into the shared Rust RL endpoint

This is the contract layer of a two-PR stack. The vLLM sidecar producer is follow-up PR #13607.

Supersedes #13524 without changing its reviewed commit history.

Validation

  • cargo fmt --all
  • cargo clippy -p dynamo-backend-common -p dynamo-rl --all-targets -- -D warnings
  • cargo test -p dynamo-backend-common -p dynamo-rl
  • review follow-up: cargo test -p dynamo-rl --lib (13 passed)

Review follow-up evidence

  • RED: the worker-selection regression test failed before a model-independent selector existed
  • GREEN: workers without resolvable model metadata remain listed with model omitted
  • present blank or non-string admin_base_url values now produce worker probe errors

Summary by CodeRabbit

  • New Features
    • Added optional RL worker metadata, including worker count and administrator URL.
    • RL worker discovery responses now include protocol version and available metadata.
    • Worker routes expose world size and optional administrator base URL.
  • Bug Fixes
    • Added validation to reject invalid worker counts and blank administrator URLs.
    • Improved endpoint filtering and metadata handling during worker discovery.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Comment thread lib/backend-common/src/rl.rs Resolved
Comment thread lib/backend-common/src/rl.rs Resolved
Comment thread lib/rl/src/lib.rs Resolved
Comment thread lib/rl/src/lib.rs Resolved
Comment thread lib/rl/src/lib.rs Resolved
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 77681ea6-2bb6-404d-aecf-b7589d61f8ad

📥 Commits

Reviewing files that changed from the base of the PR and between 93cb441 and 314b67b.

📒 Files selected for processing (5)
  • lib/backend-common/src/lib.rs
  • lib/backend-common/src/rl.rs
  • lib/backend-common/src/worker.rs
  • lib/bindings/python/rust/backend.rs
  • lib/rl/src/lib.rs

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

RL worker discovery now reports a protocol version and optional worker metadata. Backend configuration accepts this metadata, validates it, and includes it in successful RL route responses. Endpoint discovery also handles missing model metadata.

Changes

RL worker metadata

Layer / File(s) Summary
Discovery protocol and route parsing
lib/rl/src/lib.rs
RL responses include a protocol version, optional admin URL, and optional world size. Route parsing validates and preserves these fields.
Endpoint discovery orchestration
lib/rl/src/lib.rs
Endpoint filtering uses a helper. Discovery responses include the protocol version. Discovery succeeds without model metadata.
Backend metadata configuration and serving
lib/backend-common/src/lib.rs, lib/backend-common/src/rl.rs, lib/backend-common/src/worker.rs, lib/bindings/python/rust/backend.rs
Worker configuration accepts optional RL metadata. The backend validates, forwards, and returns the metadata in route responses. Tests cover defaults, serialization, and invalid values.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 314b6

The PR adds versioned RL worker transfer metadata and preserves existing worker behavior, with validation covering formatting, linting, and tests; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the implementation and validation, but it omits the required Related Issues section and reviewer-start guidance. Add the required Related Issues section with an issue link or confirmation that no issue exists, and identify the files where reviewers should start.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.74% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 27 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes publishing RL worker transfer metadata, which is the main change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@biswapanda
biswapanda force-pushed the feat/rl-worker-transfer-metadata branch from d1c1530 to ad5f700 Compare August 20, 2026 21:00
@biswapanda
biswapanda force-pushed the feat/rl-worker-transfer-metadata branch from ad5f700 to e78ea80 Compare August 20, 2026 21:41

@jthomson04 jthomson04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with three non-blocking follow-up comments.

Comment thread lib/rl/src/lib.rs Resolved
Comment thread lib/backend-common/src/rl.rs Resolved
Comment thread lib/rl/src/lib.rs Resolved
@biswapanda
biswapanda requested a review from a team as a code owner August 20, 2026 21:57
@biswapanda

Copy link
Copy Markdown
Contributor Author

Approving with three non-blocking follow-up comments.

fixed the non-blockers in a follow up commit

@biswapanda
biswapanda merged commit 5bc908a into main Aug 27, 2026
118 checks passed
@biswapanda
biswapanda deleted the feat/rl-worker-transfer-metadata branch August 27, 2026 19:00
@nnshah1 nnshah1 mentioned this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants