Repository navigation
test(tier1): cover rubric rejection sanitization - #478
Merged
Merged
Conversation
The second invalid judge reply put the raw, full-length validation error into the llm_invalid_response finding and the rubric_eval summary, while the log line and the retry note already redacted it. A judge-chosen criterion id could therefore leak a credential into the report, or make the message as long as the id. _bounded_problem now also collapses newlines and other control characters to a single space, as finding_verification does for reasoning, and the finding message and summary use it too. The log line and retry prompt no longer carry a forged line from a judge-chosen id. Fold the two review fix-up bullets into the unreleased retry entry in the changelog, and loosen the docs test for the answering-model rule to check that both paragraphs name llm_model_used and the fallback block instead of pinning one sentence. Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia
marked this pull request as ready for review
November 13, 2026 07:28
chrisknvidia
requested review from
mosheabr,
rmalani-nv and
rng1995
as code owners
November 13, 2026 07:28
The docs test for the answering-model rule only checked that both paragraphs mention llm_model_used and a fallback block, so a paragraph could state the wrong rule and still pass. Assert the full rule sentence in both the --llm-verify and the rubric_eval paragraphs again. Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Main now sanitizes rejection diagnostics in _bounded_problem (redaction, terminal control sequences removed, one line, bounded) and applies it to the finding message, so take main's implementation and its changelog entry. This branch keeps its tests for that behaviour; the escape-sequence test now expects the whole sequence to be removed, as main does. Signed-off-by: Christopher Kevin <[email protected]>
Contributor
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🐛 1 issue in files not directly in the diff
🟥 Rubric rejection diagnostics expose split credentials
When a judge embeds an ANSI escape inside a credential, _bounded_problem leaves the credential visible after stripping the escape. redact_sensitive_text runs before the fragments join, so rejection logs and failed-run reports expose the reconstructed token.
rng1995
reviewed
Nov 13, 2026
rng1995
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed tests-only head 4d5cbf4c270b and the production sanitizer it exercises. The full rubric test file passed (134 passed, 1 skipped) in a compatible provider-dependency environment. No new defect introduced by these tests. The existing split-credential redaction concern concerns unchanged production behavior and remains tracked there; no duplicate finding added.
This was referenced Nov 13, 2026
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
Follow-up to #484. Main now redacts, strips terminal control sequences from, collapses and bounds the rubric judge's rejection reason (
_bounded_problem) and uses it for thellm_invalid_responsefinding, so this branch no longer changes the source. It adds tests for that behaviour: credential redaction in the finding and therubric_evalsummary with a bare and a padded criterion id, the length bound, and one-line collapse of judge-chosen ids in every report of the problem.Verification
make lint(ruff check src testspasses)Release Impact