Skip to content

Reject --min-score outside 0-100 - #917

Open
JYunth wants to merge 1 commit into
NVIDIA:mainfrom
JYunth:fix/min-score-range
Open

JYunth wants to merge 1 commit into
NVIDIA:mainfrom
JYunth:fix/min-score-range

Conversation

@JYunth

@JYunth JYunth commented Nov 26, 2026

Copy link
Copy Markdown

Summary

validate, quality-check, rubric-eval and precommit-run took any integer for --min-score, so something like --min-score -5 meant the quality score could never fail. tier1 and ci init already limit it to 0-100, and the CLI reference says out-of-range values exit 2. This uses the same click.IntRange(0, 100) on those four commands and updates the docs and CLI snapshot to match.

Added a test that tries -1 and 101 on each command and expects exit 2.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

validate, quality-check, rubric-eval and the hidden precommit-run hook
command accepted any integer for --min-score, while tier1 and ci init
already used IntRange(0, 100). A negative value disabled the quality gate
and the run still passed; the CLI reference promises a usage error (exit 2)
for out-of-range values.

Signed-off-by: JYunth <jyunth28@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 15:07

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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