Skip to content

fix(topic_relevance_llm): default on_fail to rephrase - #169

Merged
AkhileshNegi merged 1 commit into
mainfrom
fix/topic-relevance-llm-default-rephrase
Oct 15, 2026
Merged

AkhileshNegi merged 1 commit into
mainfrom
fix/topic-relevance-llm-default-rephrase

Conversation

@AkhileshNegi

@AkhileshNegi AkhileshNegi commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

TopicRelevanceLLMSafetyValidatorConfig inherited on_fail = fix from BaseValidatorConfig. Topic relevance produces no fix_value, so a config omitting on_fail silently returned an empty string on failure. Every real caller already passes rephrase; this makes it the default so the config matches intended behaviour.

  • on_fail: GuardrailOnFail = GuardrailOnFail.Rephrase override on the topic_relevance_llm config.
  • Test asserts the new default.

Checklist

  • Ran the validator/config test subset locally (314 passed, 14 skipped).
  • Added a test case for the default.

Topic relevance has no meaningful fix_value; the base default of `fix`
returned an empty string on failure. Rephrase is the intended behaviour
and what every caller already passes explicitly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1
  • ready-for-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: ProjectTech4DevAI/kaapi-guardrails/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 88cd7c09-07e8-4d82-9d4f-66e511dc280a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AkhileshNegi AkhileshNegi self-assigned this Oct 15, 2026
@AkhileshNegi AkhileshNegi added the enhancement New feature or request label Oct 15, 2026
@github-project-automation github-project-automation Bot moved this to To Do in Kaapi-dev Oct 15, 2026
@AkhileshNegi AkhileshNegi moved this from To Do to In Progress in Kaapi-dev Oct 15, 2026

@Ayush8923 Ayush8923 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.

LGTM

@AkhileshNegi
AkhileshNegi merged commit 6befdf5 into main Oct 15, 2026
2 checks passed
@AkhileshNegi
AkhileshNegi deleted the fix/topic-relevance-llm-default-rephrase branch October 15, 2026 17:59
@github-project-automation github-project-automation Bot moved this from In Progress to Closed in Kaapi-dev Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants