Skip to content

fix(libsy): restore judge classification test - #212

Closed
nachiketb-nvidia wants to merge 1 commit into
mainfrom
fix/libsy-judge-classification-test
Closed

fix(libsy): restore judge classification test#212
nachiketb-nvidia wants to merge 1 commit into
mainfrom
fix/libsy-judge-classification-test

Conversation

@nachiketb-nvidia

@nachiketb-nvidia nachiketb-nvidia commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What

Restore the LlmJudge test helper to pass the Classification enum directly to selected.

Why

PR #204 changed the helper to access tuple field .0, but Classification is an enum. This prevents cargo clippy --workspace --all-targets -- -D warnings from compiling on main and makes every subsequent CI run fail.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p switchyard-libsy
  • uv run ruff check .
  • uv run maturin develop
  • uv run pytest tests/ (1729 passed, 35 skipped)

Summary by CodeRabbit

  • Bug Fixes
    • Improved policy selection by preserving the complete classifier result when evaluating served content.
    • Ensured judge-based scoring uses the full classification outcome for more accurate decisions.

Signed-off-by: nachiketb <nachiketb@nvidia.com>
@nachiketb-nvidia
nachiketb-nvidia requested a review from a team as a code owner July 30, 2026 20:07
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

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: 3d3f3a25-2664-4f66-b1b1-5ec63dd39811

📥 Commits

Reviewing files that changed from the base of the PR and between 7a4bb2a and 97bbc8e.

📒 Files selected for processing (1)
  • crates/libsy/src/algorithms/util/llm_judge.rs

Walkthrough

Changes

LLM Judge Selection

Layer / File(s) Summary
Forward complete classification result
crates/libsy/src/algorithms/util/llm_judge.rs
score_served_with passes the full classification result to selected instead of unwrapping its first field.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a rabbit hopping through the code,
Carrying the verdict’s full payload.
No tuple nibble left behind,
Selection now sees the whole design.
Hop, hop—cleaner judgment today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly points to the judge classification regression fix in libsy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@grahamking

Copy link
Copy Markdown
Contributor

I'll race you :-) #206

@nachiketb-nvidia
nachiketb-nvidia enabled auto-merge (squash) July 30, 2026 20:11
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.

4 participants