Repository navigation
Conversation
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryRail execution failures now produce a terminal SSE error frame instead of appearing in
No actionable issues found. Tests were inspected but not run.
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Error chunk typing and stream tests nemoguardrails/server/api.py, tests/server/test_api.py |
ChunkErrorMetadata.type now accepts internal_error. Streaming tests check that error chunks and output-rail failures produce an error frame followed by [DONE], without later unchecked content. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- NVIDIA-NeMo/Switchyard#1132: Both address distinguishing errors delivered in SSE streams from successful stream completion.
Possibly related PRs
- NVIDIA-NeMo/Guardrails#2278: Adds server handling for terminal
ChunkErrorframes, which this change extends to acceptinternal_error.
Suggested labels: bug
Suggested reviewers: m-misiura, tgasser-nv
Merge Risk: 
Minimal · up to 43155
-
Internal errors are intended to terminate streams with an error frame. No merge-blocking issue is established.
Pre-merge checks: 
5 · 
1
-
Failed checks: 1 warning Passed checks: 5 passed-
Full details: Title check
-
Explanation
The title "fix(server): emit terminal SSE frames for rail execution failures" matches the main change. The summary and objectives say the change treats internal_error stream chunks as terminal errors, so rail execution failures emit an SSE error frame followed by [DONE] instead of appearing in delta.content. The title is specific and uses a conventional commit prefix. It does not mention the ChunkErrorMetadata type change, but that is a supporting detail.
Full details: Test Results For Major Changes
-
Explanation
The PR changes terminal SSE error behavior and adds regression tests for string/dict chunks, stream termination, output-rail failures, invalid outcomes, sequential/parallel rails, and IORails fallback. The PR description documents this testing coverage. No numeric, convergence, or performance change is indicated.
-
Full 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 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 3 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
tgasser-nv
left a comment
There was a problem hiding this comment.
Looks good! Just a couple of small items to address before merging. Thanks for the quick-fix.
…lures Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Description
Recognize
internal_errorstream chunks as terminal errors so rail execution failures emit an SSE error frame followed by[DONE], instead of appearing indelta.content.Add regression coverage for string/dict chunks, stream termination, and sequential/parallel rail failures through the HTTP endpoint, including IORails fallback.
Summary by CodeRabbit