Skip to content

test(tier1): cover rubric rejection sanitization - #478

Merged
chrisknvidia merged 4 commits into
mainfrom
fix/christopherk/rubric-retry-redaction
Nov 13, 2026
Merged

chrisknvidia merged 4 commits into
mainfrom
fix/christopherk/rubric-retry-redaction

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

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 the llm_invalid_response finding, so this branch no longer changes the source. It adds tests for that behaviour: credential redaction in the finding and the rubric_eval summary 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

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Ran make lint (ruff check src tests passes)
  • Ran the focused rubric and security tests locally (135 passed); the full suite runs in CI
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No CHANGELOG entry needed: tests only

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
chrisknvidia marked this pull request as ready for review November 13, 2026 07:28
devin-ai-integration[bot]

This comment was marked as resolved.

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]>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 0 new potential issues.

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 0 new potential issues.

Devin Review

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]>
@chrisknvidia chrisknvidia changed the title fix(tier1): redact and bound rubric judge validation errors in reports test(tier1): cover rubric rejection sanitization Nov 13, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Devin Review

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chrisknvidia
chrisknvidia merged commit 49c388e into main Nov 13, 2026
24 checks passed
@chrisknvidia
chrisknvidia deleted the fix/christopherk/rubric-retry-redaction branch November 13, 2026 17:07
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.

2 participants