Repository navigation
Conversation
Signed-off-by: alexn-ac <alexn@appliedcompute.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add session ID to judge context crates/libsy/src/algorithms/llm_class/decision.rs, crates/switchyard-runner/tests/openai_decisions.rs, crates/libsy/src/algorithms/llm_class.rs, crates/switchyard-server/CONFIGURATION.md |
The judge context includes the request’s session ID, or null when it is absent. Tests check the serialized session ID, and the configuration documentation describes the context field. |
Priority:
Estimated code review effort: 2 (Simple) | ~5 minutes
Merge Risk: 
Minimal · up to 3e904
-
The session field is documented and covered by focused serialization and routing tests; no actionable merge risk remains.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit checks the session trail
And finds its ID inside the tale
If none is set, then null appears
The test confirms what context hears
The docs record it, crisp and clear
Comment @coderabbitai help to get the list of available commands.
What
The
llm_classifierdecision client now sends the request's session ID in the decision context, assession. The value isnullwhen the request has no session ID.Why
An external decision service may keep state for each conversation, such as a cache of earlier turns. To do that, it needs a stable key for the conversation. Switchyard already reads the session ID from client headers, such as
x-claude-code-session-idand Codex'sx-codex-turn-metadata. Before this change, the decision service could not see it.Notes for reviewers
crates/libsy/src/algorithms/llm_class/decision.rs.crates/switchyard-server/CONFIGURATION.mddocuments the new field.libsyexact-context test now expectssession. The runneropenai_decisionstest sends a request with a session ID and checks that it reaches the decision endpoint.switchyard-serverwith mock backends. The session ID arrived for both Claude Code and Codex requests.cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace,uv run ruff check .,uv run mypy switchyardanduv run pytest tests/all pass.Summary by CodeRabbit
nullwhen no session ID is available.