Repository navigation
feat(libsy): stage router (signals only) - #135
Conversation
7cb8a7b to
96fc5e3
Compare
c8d9195 to
ac31ad5
Compare
|
Will you also be updating docs? |
My plan was to update the user docs when we have the full router working. |
WalkthroughChangesStage Router
Estimated code review effort: 4 (Complex) | ~60 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/libsy/src/algorithms/util/stage_router.rs`:
- Line 310: Make StageClassifier public and add its documentation in
crates/libsy/src/algorithms/util/stage_router.rs:310-310, then re-export it from
stage_router in crates/libsy/src/lib.rs:92-96 and forward that export through
the components bridge in crates/switchyard-components/src/stage_router.rs:12-15
so consumers can construct and register it.
- Around line 329-359: Update the PickOutcome::Resolved and
PickOutcome::ConsultClassifier branches to use the outcome-provided confidence
for resolved selections instead of deriving it from signed score. Keep fall-open
results genuinely ambiguous: do not remap the signed score onto default_tier or
emit high confidence for the default weak target, while preserving
default_target state handling.
In `@crates/libsy/src/algorithms/util/tool_signals.rs`:
- Around line 259-262: Add /// documentation for ToolSignalProcessor and its
recent_window field in crates/libsy/src/algorithms/util/tool_signals.rs:259-262.
Add a /// comment in crates/libsy/src/core/state.rs:24 describing the lifecycle
and absence semantics of tool_signals, and document the public stage_router
module in crates/libsy/src/lib.rs:92; use Rust documentation comments for all
three public APIs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d6162c00-6a3b-48de-ae14-2c8c1702ca6b
📒 Files selected for processing (7)
crates/libsy/src/algorithms/util.rscrates/libsy/src/algorithms/util/stage_router.rscrates/libsy/src/algorithms/util/tool_signals.rscrates/libsy/src/core/state.rscrates/libsy/src/lib.rscrates/libsy/src/signal.rscrates/switchyard-components/src/stage_router.rs
💤 Files with no reviewable changes (1)
- crates/libsy/src/signal.rs
ac31ad5 to
0775ad6
Compare
|
Pushed a commit to this branch (
All 9 libsy stage_router tests pass; cargo fmt + clippy clean. Parity with the v2 scorer/picker unchanged. |
|
Left the other TODO ( |
|
Design note for the follow-up parity work (tracked in SWITCH-1110), flagging it here since it may shape the
Not asking you to build handoff notes here — just consider surfacing the |
|
Addressed in |
|
Addressed the CodeRabbit findings in
libsy + components build clean; 9 stage_router tests pass; clippy clean; no new rustdoc warnings. Not touching Nachiket's structural asks here (module layout, deleting the old |
Signed-off-by: Greg Clark <grclark@nvidia.com> feat(libsy): bridge back to components for stage_router Signed-off-by: Greg Clark <grclark@nvidia.com>
…ct field math Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
…handoff gating Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
…nce, doc public items Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
…t::Decision Signed-off-by: Sabhatina Selvam <sabhatinas@nvidia.com>
Signed-off-by: Greg Clark <grclark@nvidia.com>
5e11262 to
87fbde1
Compare
What
How tested
uv run ruff check .cleanuv run mypy switchyardcleanuv run pytest tests/greenChecklist
snake_caseof the primary class.switchyard/__init__.py.__all__if intended for downstream use.--helpupdated if customer-facing surface changed.Signed-off-by: Your Name <email>) per the DCO.Notes for reviewers
Anything reviewers should pay extra attention to — risky paths, follow-up tickets, intentional trade-offs.
Summary by CodeRabbit