fix(guardrails): Ensure input rail logs are not dropped from final response - #827
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesBlocked input-rail state
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
|
gabwow
reviewed
Jul 21, 2026
gabwow
self-requested a review
July 21, 2026 20:00
gabwow
approved these changes
Jul 21, 2026
…sponse Signed-off-by: Jash Gulabrai <jgulabrai@nvidia.com>
Signed-off-by: Jash Gulabrai <jgulabrai@nvidia.com>
JashG
force-pushed
the
jgulabrai/preserve-input-logs
branch
from
July 22, 2026 15:37
e3f1407 to
ba903ee
Compare
soluwalana
pushed a commit
that referenced
this pull request
Jul 22, 2026
…sponse (#827) * fix(guardrails): Ensure input rail logs are not dropped from final response Signed-off-by: Jash Gulabrai <jgulabrai@nvidia.com> * Address MR comment Signed-off-by: Jash Gulabrai <jgulabrai@nvidia.com> --------- Signed-off-by: Jash Gulabrai <jgulabrai@nvidia.com> Signed-off-by: Sam Oluwalana <soluwalana@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stash the input-rail
GenerationResponsein plugin state before returning anImmediateResponse, so response middleware can still rebuildguardrails_data.logcorrectly.IGW still runs response middleware after an input is blocked, which is where the
guardrails_datafield gets populated from the input and output rail results. Without this change, the blocked input's logs would be silently not included in the response.Summary by CodeRabbit